[archived content]

What is Drat!?

Drat! is a packrat parser library for the D programming language.

  • Ever wanted to be able to use &!?*+ not only in regular expressions, but in your parsing rules? With Drat! you can!

  • Sick of unreadable generated parser code? Drat! is a library, it needs no code generation step! All unreadable code is 100% hand-made!

  • Do you want to be able to understand the parser you use? Not all in Drat! is trivial, but you have a sporting chance!

  • Do you want your parser to be fast and linear in time? Drat! is!

  • Do you want a frontend? Since v.0.20 there's one available!

The current (temporary) drawbacks of Drat! are:

  • Documentation is very sparse right now, but the example programme is lavishly commented. I suggest a look at dratfront.drat, dratfront.d and dratest.d!

What's on the stove for the next version?

  • Maybe someday I'll write some docs...

Why is it here?

For your convenience, and to help me to dump even more of my spare time into it! :)

Get it now, it's not as frightful as it used to be!

Drat! pre-alpha v.0.20

Regards,

    0ffh

Appendix: Drat! Version history

  • <2007.10.03 no version numbers, then v.epsilon - v.epsilon4 -- Pre-history :-)
  • 2007.10.03 v.0.1 -- First release. Yay!
  • 2007.10.05 v.0.11 -- Fixed inexplicable bug in dratest. (Yet it worked, don't ask why!) Removed annoying need to pass the source around during parsing by associating rules with the parser instance using them.
  • 2007.10.05 v.0.12 -- Introduced findMatch and collectMatch. Some minor edits.
  • 2007.10.29 v.0.13 -- Added templating to allow us to choose the result type of the rule functions.
  • 2007.11.03 v.0.20 -- Added some kind of frontend, is self-hosting. Minor changes.

Incidentally here alse be...

Grace, my first try using D. Another lispy forth trying to solve the "too low level" problem. I view the results with mixed feelings... =)

A few test cases for Grace, dunno which of the work just now... %*)

Page last modified on November 03, 2007, at 04:52 PM