[racket-dev] Need a good way to fix location on cfg-parser

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jan 8 18:07:16 EST 2013

At Tue, 8 Jan 2013 14:46:28 -0700, Danny Yoo wrote:
> On Fri, Jan 4, 2013 at 5:46 PM, Danny Yoo <dyoo at hashcollision.org> wrote:
> > 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?  :)
> Ok, I needed to do a bit more work to produce better locations: the
> parser now also keeps track of the last consumed token, which allows
> it to use the right token when computing end-pos.  The change is large
> enough that I'd like someone else's eyes on it to make sure it's sane
> before I merge it in.
> https://github.com/dyoo/racket/commit/e92e51bfa2444b85b99c0c81b6b4c4346d6a88a9

That looks sane to me.

Posted on the dev mailing list.