Neotoma 1.3
by Sean Cribbs
I’m pleased to announce yet another update to Neotoma. The major features and changes in this release:
- Transformation/semantic analysis code can be written inline with the PEG, enclosed in backticks (
`
) before the concluding semi-colon for each reduction. The variables available to your code areNode
(the parse result, including transformed results of subtrees), andIdx
(the current index into the input). - To do an identity transformation on a rule (i.e. pass along the result unchanged), use the tilde (
~
) instead of backtick-quoted code. - Extra functions for use inside your parser can be added to the end of the PEG, also enclosed in backticks (
`
). - All internal uses of the process dictionary have been expunged and instead use the memoization table.
- All of the modules have been renamed and the parser re-bootstrapped. The most significant user-facing change is that
peg_gen
is now calledneotoma
. See the commit for more details.
What is Neotoma?
Neotoma is a packrat parser-generator for Erlang for Parsing Expression Grammars (PEGs). It consists of a parser-combinator library with memoization routines, a parser for PEGs, and a utility to generate parsers from PEGs. It is inspired by treetop, a Ruby library with similar aims, and parsec, the parser-combinator library for Haskell.
- Browse & Fork: http://github.com/seancribbs/neotoma
- Download: http://github.com/seancribbs/neotoma/downloads
- Source:
git clone git://github.com/seancribbs/neotoma.git
- Discussion: http://groups.google.com/group/neotoma-erl