[antlr-interest] related question: multiple grammars..

Eitan Suez eitan.suez at gmail.com
Fri Mar 30 08:04:34 PDT 2007


you're right!

this is the error message i would get

line 5:22 mismatched input '4px' expecting INT
line 11:22 mismatched input '2px' expecting INT
line 22:14 mismatched input '16pt' expecting INT
line 27:24 mismatched input '1px' expecting INT

when i tried to parse a test css file such as this one:

JPanel { border-right-width: 4px; }
.left-sidebar { border-right-width: 2px; }
JLabel { border-bottom-width: 1px; }
JOutlookBar { border-left-width: 3px; }

from the error message i jumped to the wrong conclusion!
i have located the error and it's a trivial thing.  i happened
to have a separate [weak] lexer rule that also matched
an INT.  argh!

i'm sorry to have bugged everyone about this.

/ eitan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070330/9b63bb28/attachment.html 


More information about the antlr-interest mailing list