[antlr-interest] antlrWorks 1.4.3 - NoViableAltException
cristian.tarsoaga at gmail.com
Wed Feb 1 05:11:36 PST 2012
I try to 'interpret' the following grammar using antlrWorks 1.4.3
//arr : elem*;
elem : (itemA? itemB) => itemA? itemB
itemA : SPACE LETTER_A LETTER_A;
itemB : SPACE LETTER_B LETTER_B;
SPACE : ' ';
If I try using input text as ' AA', while 'arr' rule is commented, the
'elem' rule is matched.
If I try using input text as ' AA', while 'arr' rule is uncommented, the
'elem' rule fails: I get NoViableAltException.
I don't understand the effect of the 'arr' rule over the 'elem' one (and I
don't even try to match 'arr')
Can somebody help/explain?
Thanks a lot,
More information about the antlr-interest