keywords and terminals [message #1552336] |
Wed, 07 January 2015 23:22  |
Eclipse User |
|
|
|
Hi guys,
I am new using Xtext so I am sure that the following question could be answered using some basic concepts.
I have one simple Grammar where the first character is "(" so the content assist suggest me to introduce that but when I changed "(" to be a terminal in my grammar the content assist does not suggest me anything.
Grammar 1:
grammar org.testing.xpp.XPP with org.eclipse.xtext.common.Terminals
generate xPP "htt://www.testing.org/xpp/XPP"
Model:
inicial="("
greetings+=Greeting*
fin=")";
Greeting:
'Hello' name=ID '!';
Grammar 2:
grammar org.testing.xpp.XPP with org.eclipse.xtext.common.Terminals
generate xPP "htt://www.testing.org/xpp/XPP"
Model:
inicial=A
greetings+=Greeting*
fin=B;
Greeting:
'Hello' name=ID '!';
terminal A:"(";
terminal B:")";
As far as I understand in the first grammar the "(" is handled as a keyword which are processed before local terminals maybe this is affecting the content assist but I am not able to figure out the reason of this.
Also I have noticed that in the first grammar the "Xtext Syntax Graph" view show me the "(" using a white background but in the second case this is shown in a different color, do you have any idea about what that means?
I hope someone can bring me some lights on this
Thanks in advance
Luis
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03943 seconds