I looked further into my grammars. In my lang grammer I have something like:
Type returns xtend::XtendTypeDeclaration :
{xtend::XtendTypeDeclaration} annotations+=XAnnotation*
(
{MyLangClass.annotationInfo = current}
modifiers+=CommonModifier*
'class' name=ValidID ('<' typeParameters+=JvmTypeParameter (',' typeParameters+=JvmTypeParameter)* '>')?
("extends" extends=JvmParameterizedTypeReference)?
('implements' implements+=JvmParameterizedTypeReference (',' implements+=JvmParameterizedTypeReference)*)?'{'
(members+=Member)*
'}'
)
;
Where the EObject MyLangClass directly extends the EObject XtendClass.
With this parser rule in the Lang grammar the generation of my base grammar fails. If I revert the parser rule to the rule in the Xtend grammar that is replacing {MyLangClass.annotationInfo} with {xtend::XtendClass) I can generate my base grammar just fine.
So why does the generator not recognize the {MyLangClass.annotationInfo) action correctly, it seems to not find a name for it?
[Updated on: Mon, 16 June 2014 09:53] by Moderator