[antlr-interest] Parser seems to confuse strings and literals

Charles Felstead charles.felstead at gmail.com
Tue Aug 15 12:44:52 PDT 2006


Hello,

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
seperate files?

Thanks for your help!
Charles.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060815/722e472a/attachment.html


More information about the antlr-interest mailing list