|
Re: NullPointer when generating parser [message #1386318 is a reply to message #1386288] |
Mon, 16 June 2014 13:50 |
Jan Rosczak Messages: 53 Registered: July 2009 Location: Hamburg, Germany |
Member |
|
|
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 13:53] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03072 seconds