You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run the repro, please clone this repository and open ConsoleApplication3.sln and click run button. (The first run will fail because of nuget files isn't loaded. Restart VisualStudio and try again to reload.)
In this sample application, text "ABC" is parsed with very simple lexing/parsing rules. And parser returns position range obtained from parseState.ResultRange. Therefore position info should point entire text "ABC". However, reported range is incorrect and it points only part of it, "BC".
This glitch happens only when filename isn't set to lexbuf.EndPos. With filename set, parseState.ResultRange reports correct position.
Here is the output from sample application.
Range is 1 to 3.
Substring is "BC"
Try again with filename set to lexbuf.
Range is 0 to 3.
Substring is "ABC"
Known workarounds
To avoid this glitch, set filename to lexbuf.EndPos.
Related information
Visual Studio 2015
The text was updated successfully, but these errors were encountered:
Description
parseState.ResultRange reports incorrect position info when filename isn't set to lexbuf.EndPos.
Repro steps
I have uploaded repro here.
https://github.com/nshibano/FsLexYacc-report-20161111
To run the repro, please clone this repository and open ConsoleApplication3.sln and click run button. (The first run will fail because of nuget files isn't loaded. Restart VisualStudio and try again to reload.)
In this sample application, text "ABC" is parsed with very simple lexing/parsing rules. And parser returns position range obtained from parseState.ResultRange. Therefore position info should point entire text "ABC". However, reported range is incorrect and it points only part of it, "BC".
This glitch happens only when filename isn't set to lexbuf.EndPos. With filename set, parseState.ResultRange reports correct position.
Here is the output from sample application.
Known workarounds
To avoid this glitch, set filename to lexbuf.EndPos.
Related information
Visual Studio 2015
The text was updated successfully, but these errors were encountered: