Community
Participate
Working Groups
Build Identifier: M20100909-0800 The lexer & parser even when backtracking can't handle the following case (keywords which share the same prefix): Reproducible: Always Steps to Reproduce: Grammar: grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals generate myDsl "http://www.xtext.org/example/mydsl/MyDsl" Model: expressions+=Expression+; Expression: Bar | Baz | Other; Bar: {Bar} "\\bar"; Baz: {Baz} "\\baz"; Other hidden(): "\\" id=ID; Generator options: fragment = parser.antlr.ex.rt.AntlrGeneratorFragment { options = { backtrackLexer = true backtrack = true } } Input: \b Error: no viable alternative at character '\' Xtext version: 1.0.1.v201008251220
I am having problems with this as well - backtracking lexer and keywords "else" and "elsif" will report problems for the combination of "el" as in "hello" when used elsewhere. Removing the "elsif" from my grammar makes it work.
I fear that we can't do much about it as it appears to be an Antlr problem.