|
Re: What is wrong with my simple grammar ? [message #1064907 is a reply to message #1064902] |
Fri, 21 June 2013 15:15 |
|
Hi,
the problem is the hidden statement it should include ws and others. besides ws in keywords is a bad idea
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals hidden (NECST_PARAM,WS, ML_COMMENT, SL_COMMENT)
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:{Model}
'--NECST' 'HEADER' 'Scripts'
(commentNecst+=CommandNecst*)
scripts+=Script+;
CommandNecst:
'#NECST' command=ENUM_COMMANDNECST param+=NECST_PARAM*;
enum ENUM_COMMANDNECST : START|MIDDLE|EXIT;
Script:
'--NECST' script=ENUM_SCRIPT 'Script'
;
enum ENUM_SCRIPT : ONE|TWO|THREE;
terminal NECST_PARAM : '[' -> ']';
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05150 seconds