I don't understand what is wrong with this grammar:
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
header=Header (elements+=Element)*;
Header:
'Test:Revision' version=Decimal ';'
;
Decimal:
INT'.'INT
;
Element:
TableRow
;
TableRow:
'__Row' name=ID '{'
'__Alias' '=' Alias(','Alias)* ';'
'}'
;
Alias:
'0'|'1'|'H'|'L'
;
The following simple test statement fails with JUnit with the message "mismatched input '0' expecting RULE_INT on Header
Test:Revision2.0;
Everything works fine if I remove '0' from the Alias rule or I change the test statement to:
Test:Revision2.00;
Can you please tell me what is wrong with this grammar?