rsdn / nitra

Nitra is a language workbench

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Endless loop during parsing

ssrmm opened this issue · comments

commented

The following grammar produces an endless loop when parsing any invalid input:

namespace Test
{
  syntax module Test
  {
    using Nitra.Core;

    [StartRule]
    [ExplicitSpaces]
    syntax Expression = Foo;

    regex Foo ='a';
  }
}

It seems to be related to the ExplicitSpaces: A token rule shows the same behavior, a syntax rule without the ExplicitSpaces attribute works as expected.

Quickly attaching the debugger showed that Nitra is stuck somewhere in the error-recovery process.