At 20:42 28/08/2009, stephane richard wrote:
>text_element
> : (~(OPEN_TAG) | WS)+
> ;
[...]
>NEWLINE : '\r'? '\n' ;
>WS : (' '|'\t'|'\n'|'\r')+ {skip();} ;
Given that you are skipping whitespace (although not individual
newlines for some bizarre reason), there is no possible way that a
WS could be matched in the text_element parser rule (which is what
the "following alternatives can never be matched" error was
about).
Even if that wasn't the case, since WS would already be included
in the set of tokens that aren't OPEN_TAG, specifying it at all is
completely redundant.
If you changed the text_element rule to this then it would
eliminate most or all of the errors, and function equivalently
(though I'm not sure if that behaviour is what you really want):
text_element : (~OPEN_TAG)+ ;
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
-~----------~----~----~----~------~----~------~--~---