otac0n / Pegasus

A PEG parser generator for .NET that integrates with MSBuild and Visual Studio.

Home Page:http://otac0n.com/Pegasus/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect cursor position when reporting errors

frabert opened this issue · comments

When I try getting the cursor position for a syntax error (using exception.Data["cursor"]) I always get the last column on the last line, no matter where the error was detected

I'm not able to reproduce this problem.

Using the workbench (which uses the cursor data), I can see the cursor being updated in this example:

Grammar

a = "a"* #ERROR{ "Here" }

Subject

aaaaaaaaaabaaaaaaaaaa

This reports an error on column 11:

norepro

I'm closing this issue for now to keep things tidy, but if you have a repro case feel free to reopen.