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

Charles Felstead charles.felstead at gmail.com
Mon Aug 14 14:24:31 PDT 2006


Hello,

I'm getting a message that says something like: Expecting "aaabbb", Found
'aaabbb'. The only apparent difference is the single quotes versus double
quotes.

My parser has a rule that look like this:

root
      :
        TOPEN "aaabbb" WORD EQ ATTR_VAL TCLOSE
        TOPEN "aaabbb" TCLOSE
      ;

I've based my lexer/parser on the IDLv3 grammar from Gary Duzan. I know the
problem has to do with the parser trying to match some LITERAL_aaabbb but
can't figure out a way of making it work. I'm sure this is a basic mistake
... can someone help me out?

Thanks,
 Charles.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060814/1c9e416b/attachment.html


More information about the antlr-interest mailing list