Hi!
I have a problem generating the artifacts for the grammar XText.xtext as attached to this post.
The following errors are printed:
warning(205): ../arden.xtext/src-gen/arden/xtext/parser/antlr/internal/InternalXText.g:2113:1: ANTLR could not analyze this decision in rule rulelogic_block; often this is because of recursive rule references visible from the left edge of alternatives. ANTLR will re-analyze the decision with a fixed lookahead of k=1. Consider using "options {k=1;}" for that decision and possibly adding a syntactic predicate.
error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279): could not even do k=1 for decision 20; reason: timed out (>12000ms)
warning(200): ../arden.xtext/src-gen/arden/xtext/parser/antlr/internal/InternalXText.g:2585:1: Decision can match input such as "RULE_LET" using multiple alternatives: 1, 2, 3, 5, 6
As a result, alternative(s) 2,3,5,6 were disabled for that input
warning(200): ../arden.xtext/src-gen/arden/xtext/parser/antlr/internal/InternalXText.g:2585:1: Decision can match input such as "RULE_NOW" using multiple alternatives: 1, 3, 6
As a result, alternative(s) 3,6 were disabled for that input
warning(200): ../arden.xtext/src-gen/arden/xtext/parser/antlr/internal/InternalXText.g:2585:1: Decision can match input such as "RULE_IDENTIFIER" using multiple alternatives: 1, 3, 6
As a result, alternative(s) 3,6 were disabled for that input
error(201): ../arden.xtext/src-gen/arden/xtext/parser/antlr/internal/InternalXText.g:2585:1: The following alternatives can never be matched: 3,5,6
In line 2113 of InternalXText.g, there is the ANTLR rule code derived from the following XText.xtext rule:
logic_block :
logic_statement=logic_statement semicolon logic_block=logic_block
| logic_statement=logic_statement;
That rule is right-recursive which should not be a problem and apart from that I don't see what is wrong with that rule. Do you know what could be wrong with that rule?
I did feature assignment for all non-terminal parts.
In line 2585 if InternalXText.g, there is the ANTLR rule code derived from the following XText.xtext rule:
logic_assignment :
id_becomes=identifier_becomes assignment_expr=expr
| time_becomes=time_becomes assignment_expr=expr
| id_becomes=identifier_becomes assignment_call_phrase=call_phrase
| l_par list=data_var_list r_par assign assignment_call_phrase=call_phrase
| let l_par list=data_var_list r_par be assignment_call_phrase=call_phrase
| id_becomes=identifier_becomes assignment_new=new_object_phrase;
Again, I don't see anything wrong with that rule. All non-terminal rule calls are assigned to features.
Thanks for any help.
I attached the complete Eclipse project.