Gentlemen, just a quick heads up to the Java guys among you: parboiled, the open-source PEG parsing library for Java 5+, just received a major update to version 0.9.5.0.
The main improvement over the version announced on this list in November: - Parsing performance increased at least by factor of 10 - Parser actions are now much more powerful and flexible - Greatly improved error reporting and recovery - More examples, most importantly a complete Java 5 PEG grammar transcribed from the Mouse grammar by Roman Redziejowski - Much improved documentation (http://parboiled.org) - Reduced footprint (ca. 250Kb with no further dependencies) Especially noteworthy is the support of "inline action expressions" like in the following (a bit contrived) example: (1) public Rule term() { (2) return sequence( (3) factor(), (4) zeroOrMore( (5) sequence( (6) firstOf('*', '/'), (7) factor() (8) ) (9) ), (10) TEXT("factor").length() > 5 ? actions.doSomeThing() : !someThingElse() (11) ); (12) } Line 10 defines an action expression (which is any legal Java boolean expression embedded into a Rule definition). This expression is not evaluated during Rule construction but rather at the right point during the parsing process. parboiled achieves this by bytecode dataflow analysis, action expression code separation and transplantation into an automatically constructed anonymous Action class. This allows for very concise, elegant and fully type-safe parser actions with full IDE support. Error reporting and recovery is another strength of the latest parboiled version. parboiled now tells you the complete set of characters that would be legal at a certain error location and can figure out itself whether it is better to delete an erroneous character or insert a missing one, and in the latter case, which one is best to insert. In that regard it should achieve better single character error recovery than ANTLR (please correct me, if I'm wrong). Parsing performance has been increased to about 20'000 lines of Java 5 code or 700'000 characters per second with the included Java 5 PEG grammar, which should be sufficient for many applications. Maybe some of you find parboiled useful... Cheers from the Black Forest, Mathias --- math...@parboiled.org http://www.parboiled.org _______________________________________________ PEG mailing list PEG@lists.csail.mit.edu https://lists.csail.mit.edu/mailman/listinfo/peg