Hi all,

Apologies if this is already known (I found similar issues in JIRA,
but I'm not sure if this is the same thing).
I've found an issue with interpreter where it doesn't consume the
second alternative in (a | b)* expression. In a simple example this
leads to incomplete parse tree, in more complex cases this leads to
NoViableAltException.
In all cases the grammar works as expected in the debugger.

Examples:

1) simple
grammar test;

brackets        :       expr (call | index)*;

call    :       '(' expr ')';

index   :       '[' expr ']';

expr    :       IDENT;

IDENT   :       ('a'..'z')+;

2) now adding another rule on top of that
grammar test;

member  :       brackets ('.' brackets)*;

brackets        :       expr (call | index)*;

call    :       '(' expr ')';

index   :       '[' expr ']';

expr    :       IDENT;

IDENT   :       ('a'..'z')+;


Is this a bug or am I missing something here?

Thanks,
Eugene

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