I faced a recursive rule problem in Xtext. The simplified version is as follow:
grammar my.mavenized.HeroLanguage with org.eclipse.xtext.common.Terminals
generate heroLanguage "http://www.mavenized.my/HeroLanguage"
Atomic:
Map |
FunctionCall |
value=ID;
Map:
'map' '{'
(entries+=MapEntry)+
'}';
MapEntry:
'(' key=Atomic ')' '=>' value=Atomic;
FunctionCall:
name=ID '(' arg=Atomic ')';
And Xtext gives me this error message:
[fatal] rule ruleAtomic has non-LL(*) decision due to recursive rule invocations reachable from alts 2,3. Resolve by left-factoring or using syntactic predicates or using backtrack=true option.
But i cannot find left recursive problems. Is there some implicit rules in Xtext about the left recursive?
Thanks.