Want to contribute to Reia? Hack on its PEG

0 views
Skip to first unread message

Tony Arcieri

unread,
Dec 4, 2009, 9:33:27 PM12/4/09
to Reia Mailing List, Neotoma
I've been playing around with Neotoma (Parsing Expression Grammars for Erlang) and it seems really interesting.  Here is my initial attempt at translating the Reia grammar from the new branch from the traditional "yecc" (Erlang's yacc-alike) format with a "leex" (Robert Virding's lex-alike for Erlang) scanner into Neotoma's PEG format:

http://github.com/tarcieri/reia/blob/neotoma/src/compiler/reia_parse.peg

This implements only a small subset of Reia's current yecc grammar:

http://github.com/tarcieri/reia/blob/minimalist/src/compiler/reia_parse.yrl

And certainly nothing close to the original grammar:

http://github.com/tarcieri/reia/blob/master/src/compiler/reia_parse.yrl

Right now, the PEG is little more than a calculator that can only add.  I would like to continue hacking on it, but at the same time I'd rather be working on higher level features than just the grammar.

If you would like to try hacking on the PEG and adding in features from the current "minimalist" grammar, I would love to get some pull requests on github.

--
Tony Arcieri
Medioh/Nagravision
Reply all
Reply to author
Forward
0 new messages