[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [xtext-dev] Xtext does not parse all LL(*) grammars, does it?

That does work in plain antlr with "backtrack = true", but doesn't work in Xtext not regarding backtrack option.
For setting up backtrack I used this code in workflow:
// generates a more lightweight Antlr parser and lexer tailored for content assist
            fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
                options = {
                    backtrack = true
                }
            }
What's wrong?

On 2 June 2012 16:16, Sebastian Zarnekow <sebastian.zarnekow@xxxxxxxxx> wrote:
The error message is from Antlr and has nothing to do with Xtext specific functionality. I assume you'd get that from a plain Antlr grammar, too.

Regards,
Sebastian

Sent from my iPhone

On 02.06.2012, at 14:05, Oleg Bolshakov <viona31@xxxxxxxxx> wrote:

sorry, "rule rulerules_s" instead of "rule ruleassignment_expression"

On 2 June 2012 16:04, Oleg Bolshakov <viona31@xxxxxxxxx> wrote:
There is a LL(*) grammar from here: www.antlr.org/wiki/display/~admin/LL%28*%29+grammar+analysis

Model:
(elem=rules_s);

rules_s :
rule_e 'X'
| rule_e 'Y'
;

rule_e : 'L' rule_e 'R'
| 'I'
;

Xtext posts this error message when generating workflow:
"rule ruleassignment_expression has non-LL(*) decision due to recursive rule invocations reachable from alts 1,2"

What is the reason? Xtext does not parse all LL(*) grammars, does it?

_______________________________________________
xtext-dev mailing list
xtext-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/xtext-dev

_______________________________________________
xtext-dev mailing list
xtext-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/xtext-dev