On Nov 7, 2006, at 4:32 AM, Ryan H. wrote:
I made my decision a long time ago (at least 3+ years), and I don’t
remember my exact reasoning. However, I do have two racc parsers
available for your perusal if you’re interested, and one of them is
I’ve got a simple Nagios parser in my project named naginator, and
a pretty complicated one in Puppet. For Puppet, I used StrScan to
make a lexer, which has so far worked pretty well; for Nagios, I just
wrote a moderately crappy token() method that did the lexing for me.
I know this doesn’t help you specifically decide between any of them,
but at least it’s some code you can look at, which is more than I had
when I made my decision (I wrote Naginator about 2 years before I
wrote Puppet’s parser, and when I went to write Puppet’s parser,
Naginator’s was the only example I could find).
I’d be glad to answer any follow-on questions about them.
I did look at Antlr and Rockit or whatever they’re called, but again,
I don’t remember why I chose against them. I’m sure it was at least
partially because I was already pretty familiar with Lex/Yacc-style
1 - http://reductivelabs.com/cgi-bin/naginator.cgi/browser/trunk/lib/
2 - http://reductivelabs.com/cgi-bin/puppet.cgi/browser/trunk/lib/