I have the following grammar:

fragment TAB : '\t';
fragment PRINTABLE : '\u0020'..'\u007F' | TAB;

fragment DELIM: '|||||';
FILE_DELIMITER : DELIM (PRINTABLE ~ '|')+ DELIM;

I have the following sample lexer rules:
|||||12|||||
|||||123|||||

The ANTLR interpreter accepts the first one, but the generated tree diagram
looks like:
FILE_DELIMITER:
 |--DELIM
 |--PRINTABLE
 |--DELIM
(Note there's only one PRINTABLE.)

For the second one, the ANTLR interpreter blows up with a
MismatchedSetException and a diagram like:
FILE_DELIMITER:
  |--DELIM
  |--PRINTABLE
  |--PRINTABLE
  |--MismatchedSetException

This pattern is reproducible: any input with an even number of PRINTABLE
characters succeeds. All odd inputs fail.

Any thoughts?

Tyler Distad

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to