Hi
I've the following grammar:
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
greetings+=GreetingRobot*;
GreetingRobot:
'Hello' name=ROBOT_ID '!';
ROBOT_ID :
'ROBOT_' INT
;
The following text:
produce the error:
org.opentest4j.AssertionFailedError: Unexpected errors: XtextSyntaxDiagnostic: null:1 mismatched input 'ROBOT_1' expecting 'ROBOT_' ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:210)
I would like to keep 'ROBOT_ID' as a DataType rule, i.e. not a terminal. I would like to know what is the problem and how to fix it.
thank you and kind regards,