[antlr-interest] Parser seems to confuse strings and literals
charles.felstead at gmail.com
Tue Aug 15 12:44:52 PDT 2006
John you were right. I checked the *Tokens files and found files from older
versions of my grammar files. That made me realize that I still had
import/export statements (invalid) in my new integrated lexer/parser .g
file. That was causing all the problems!! I got rid of those and my parser
now works just fine...it's so cool!!
However, I would really like to be able to reuse the same lexer for my other
parsers. I tried splitting the single .g into two .g, added the
imports/exports statements and I'm back were I started; I get a message that
says: expected "aaa", found 'aaa'!
Now this time I did real clean build; I removed every .class and all the
generated .java files before running antlr on the two .g files. Then I
generated the lexer, compiled it, and checked that it still works. Finally,
I generated the parser and compiled it but it doesn't work anymore. So, can
you tell what else I have to do when the lexer/parser grammars are in
Thanks for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest