[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: seeking an OO or functional parser generator for Java
Curran Nachbar wrote:
> JavaCC may help: http://javacc.dev.java.net/
> "In addition to the parser generator itself, JavaCC provides other
> standard capabilities related to parser generation such as tree building
> (via a tool called JJTree included with JavaCC), actions, debugging, etc."
I have also used JavaCC on a previous project, it was relatively
painless. I used it in conjunction with jjtree which automates the AST
generation, including support for using the visitor pattern to walk the
Note however that JavaCC dosn't address your original question, as it is
still a parser generator in the same vein as lex/yacc. Although it does
combine both the lexical definitions with the grammar in the same file.
OTOH I fail to see how you will avoid an impedance mismatch when trying
to map an OO model to the problem of defining a grammar and associated
productions. To my mind parsing is surely one of the more pure
declarative problems, and a declarative approach is likely to be simpler.
 Of course don't let that stop you; if I am mistaken then the
correction can only lead to my better understanding both OO and parsing.
Andrae Muys <email@example.com>
Engineer Braintree Communications