Parsing frameworks
-
It's been a long while since I had an interest in playing with parsers but just for curiosity sake, what are some easy to lear/use parsing frameworks? I remember reading up on Spirit which was really cool and easy to understand I believe emulated (E)BNF. I also know when I looked into Yacc, etc...I just about cried. Ideally I'm looking for something much simpler(sp/gr) tool.
Blog Entry: 7 Software development best practices to make you more effective and productive PCSpectra :: Professional, Affordable PHP Programming, Web Development and Documentation
-
It's been a long while since I had an interest in playing with parsers but just for curiosity sake, what are some easy to lear/use parsing frameworks? I remember reading up on Spirit which was really cool and easy to understand I believe emulated (E)BNF. I also know when I looked into Yacc, etc...I just about cried. Ideally I'm looking for something much simpler(sp/gr) tool.
Blog Entry: 7 Software development best practices to make you more effective and productive PCSpectra :: Professional, Affordable PHP Programming, Web Development and Documentation
PCSpectra wrote:
I also know when I looked into Yacc, etc...I just about cried.
YACC is easy once you get to know it, it is also hard when you have to deal with conflicts. You might wanna look at ANTLR or Gold Parser, for ease of use.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x)) -
It's been a long while since I had an interest in playing with parsers but just for curiosity sake, what are some easy to lear/use parsing frameworks? I remember reading up on Spirit which was really cool and easy to understand I believe emulated (E)BNF. I also know when I looked into Yacc, etc...I just about cried. Ideally I'm looking for something much simpler(sp/gr) tool.
Blog Entry: 7 Software development best practices to make you more effective and productive PCSpectra :: Professional, Affordable PHP Programming, Web Development and Documentation
Another vote for ANTLR - the latest version (3.something) has support for Java, C#, C/C++and (IIRC) Python. It's now got performance comparable to lex/yacc. The documentation is a bit sparse unless you buy the book. Spirit is very cool - it's implemented as an embedded DSL using C++ expression templates and operator overloading. I've used it mainly for smaller grammars. It's slightly different from the ANTLR/YACC in that the lexer and parser are combined. This can be useful for some scenarios where lexer decisions are dependent on what parsing's already happened. The upcoming Spirit 2 (it's in beta, on the Boost SVN trunk) allegedly generates faster code than the current Spirit - but the compile time performance hasn't yet been optimised, so could be a bit slow.