Hello,
I have to "fix" a grammar developed by someone else.
This grammar contains these rules:
VarAccess:
varName=SingleVar (('[' {VarAccess.ArrayAccess=current} index=SignedInt ']') | ('.'{VarAccess.MemberAccess=current}attributeName=NAME))*;
SingleVar:
'$'name=NAME;
SignedInt:
('+' | '-')? UNSIGNED_INT;
terminal UNSIGNED_INT:
('1'..'9') ('0'..'9')* | '0';
terminal NAME:
('a'..'z' | 'A'..'Z') ('a'..'z' | 'A'..'Z' | '0'..'9')*;
But when I load a file containing this text :
I end up with a model where <VarAccessEObject>.getVarName().getName() is null (it should be "as").
I can't figure out what is wrong with this grammar and why the attribute 'name' of the 'SingleVar' object is null.
Do you see something that is not right in the code snippet ?
Thank you in advance for you help.
Charles
[Updated on: Thu, 03 October 2013 06:05] by Moderator