[antlr-interest] Using generated Java Lexer and Parser
Michael Angelo
mangelo.mailing at gmail.com
Thu Jun 14 10:29:34 PDT 2012
I've written a quick grammar to parse SQL. It doesn't have to give me every
gory detail of the query. I just need it broken down into sections so that
I can modify the where clause and then reassemble it.
When I run the interpreter in the eclipse plug-in, everything looks great!
My question is how do I use the generated java class to do what I need to
do? The only thing that I've come up with that remotely comes close to what
I need it a series of:
parser.comsumeUntil(tokenStream, Parser.FOLLOW...) and then
CommonTree tree = parser.tables().getTree()
This doesn't seem the best approach to me.
Any help would be greatly appreciated!!
Thanks!!
Mike
More information about the antlr-interest
mailing list