I lost my arithmetics ;) [message #1758698] |
Fri, 31 March 2017 13:55  |
Eclipse User |
|
|
|
Hi guys,
i'm implementing a very basic grammar, extending xbase, but when doing so i lost all arithmetic operations (!).
Would you be so kind to take a look at my (probably messed up) grammar and see if you spot the issue?
grammar cityfox.CLang with org.eclipse.xtext.xbase.Xbase
generate cLang "http://www.CLang.cit"
Model:
'pack' name=QualifiedName
(imports+=XImportSection)*
(sections+=Section)*;
Section:
Command |Method
;
Command returns Section:
{Command} 'Command'
name=ID
arguments=ArgDefinition?
('require' '['
(requires+=RequireExpression)*
']')?
(block=XBlockExpression)
;
RequireExpression:
type=JvmTypeReference name=ID ':' kind=('threaded'|'service' )
;
Method returns Section:
{Method} 'def' type=JvmTypeReference name=ID args=ArgDefinition (block=XBlockExpression)?
;
ArgDefinition:
{ArgDefinition}'(' (args+=Argument (',' args+=Argument)*)? ')'
;
Argument:
type=JvmTypeReference name=ID
;
when typing simple XExpressions like
i get: "+ cannot be resolved"
Any tip is very appreciated.
Regards
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.45568 seconds