jplevyak / dparser

A Scannerless GLR parser/parser generater.
https://github.com/jplevyak/dparser
BSD 3-Clause "New" or "Revised" License
105 stars 14 forks source link

Feature request: Provide column number for syntax errors, too #36

Open billdenney opened 1 year ago

billdenney commented 1 year ago

In the R port for dparser, I wanted to have syntax errors clarified as I was having trouble tracing an issue. I made the following PR there: https://github.com/nlmixr2/dparser-R/pull/13

But, @mattfidler indicated that code was auto-generated from the dparser source. I think that the correct location to make the changes would be here:

https://github.com/jplevyak/dparser/blob/c74f863a1872f31772b015a384ec5189897d4844/parse.c#L1636-L1639

But, I'm not really a C programmer, and I wouldn't know how to test what I'm changing, either. So, would it be possible to make the location indicate the line and column?