[racket-dev] Need a good way to fix location on cfg-parser
I've caught a bug with regards to the source locations constructed by
cfg-parser, but I don't know quite what the right patch is. I do know
what the _wrong_ patch is, so maybe that will help? :)
Here's what I've kludged so far:
https://github.com/dyoo/ragg/commit/5ef0e007d4b80e95a20824a20054a05406396801
The main problem is that a non-primitive pattern may consist of
multiple tokens, so it's not correct to just look at one of them when
constructing the position. I kludged it so "parse-and" keeps a hold
of the positions before and after parsing the first "rule-a", and
passes the positions along to the success continuation.