At 08:08 19/08/2009, [email protected] wrote:
 >I want to use your solution, however it throws errors about "The 

 >following alternatives can never be matched: 1" for MC_QUESTION
 >and MC_INCORRECT. Shouldn't the below work?
 >
 >MC_QUESTION  : INT ('.'|')') .* ENDOFLINE;
 >MC_INCORRECT : LETTER '.' .* ENDOFLINE;
 >MC_CORRECT   : '*' MC_INCORRECT;
 >
 >fragment ENDOFLINE : NEWLINE | { input.LA(1) == EOF }?;

No.  You can't use a .* wildcard loop without (a) always having at 
least one termination character and (b) specifying it inline 
rather than in a subrule.

If you remove the .* (or make it more specific, eg. WS*) then it 
should work.


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