Am 16.01.2011 22:23, schrieb Mark Christiaens:
> I simplified my test case further.  The grammar is now:
> 
> grammar test_grammar;
> 
> start : t*;
> t: ASSIGN | NUM ;
> ASSIGN : ':=';
> //NUM : '0';
> NUM : '0' ':0'?;
> 
> I would expect this to be able to match the input
> 
> 0:=0
> 
> but it doesn't.  Changing the definition of NUM to the commented version and
> the grammar does match the input.

some lookahead may help:

ASSIGN: (':=')=> ':=' ;
NUM: '0' ( (':0')=>':0' )?;

 Michael

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