Xtext grammar question (XIntLiteral cannot be resolved to a rule) [message #1145242] |
Sat, 19 October 2013 11:08 |
d 627 Messages: 28 Registered: March 2013 |
Junior Member |
|
|
Hi there
I have been trying to work with a previous version of a grammar that I need to analize.
This is the head of the grammar:
grammar xxxx.dsl.xxxxx with org.eclipse.xtext.xbase.Xbase
generate xxxxx "http://xxxx.sf.net/xxxx"
import "http://www.eclipse.org/xtext/xbase/Xbase" as xbase
One rule of the grammar is this:
XLiteral returns xbase::XExpression:
EnvironmentAccess |
XClosure |
XBooleanLiteral |
[b]XIntLiteral[/b] |
XNullLiteral |
XStringLiteral |
XTypeLiteral
;
XExpression is pointed as a EClass. In the rest of the grammar there aren't rules such as XClosure, XBoolean and so on. In my ignorance I suppose this is because they are part of the xbase implemented in the head of the grammar or they are interfaces based on the XExpression EClase (I'm not so sure about this). The thing is, at the begining I have problems with xtext trying to recognize this alternatives, that is why I have added in the MANIFEST.MF file of the folder that contains the definition of the grammar the next dependencies:
org.eclipse.xtext.xbase;bundle-version="2.3.1",
org.eclipse.xtext.purexbase;bundle-version="2.3.1",
org.eclipse.xtext.purexbase.source;bundle-version="2.3.1",
org.eclipse.xtext.purexbase.ui;bundle-version="2.3.1",
org.eclipse.xtext.purexbase.ui.source;bundle-version="2.3.1",
org.eclipse.xtext.xbase.junit;bundle-version="2.3.1",
org.eclipse.xtext.xbase.junit.source;bundle-version="2.3.1",
org.eclipse.xtext.xbase.lib.source;bundle-version="2.3.1",
org.eclipse.xtext.xbase.source;bundle-version="2.3.1",
org.eclipse.xtext.xbase.ui;bundle-version="2.3.1",
org.eclipse.xtext.xbase.ui.source;bundle-version="2.3.1"
After doing this xtext recognized all the alternatives except for XIntLiteral, it still indicates me "XIntLiteral cannot be resolved to a rule" but I don't understand why this is the only one that is not recognize.
What can be happening, or where can I go to see the defitions of this alternatives....
Thanks a lot for your time.
[Updated on: Sat, 19 October 2013 11:38] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03725 seconds