lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: precise input location


From: Han-Wen Nienhuys
Subject: Re: precise input location
Date: Sun, 9 Jan 2005 17:19:02 +0100

address@hidden writes:
> Nicolas Sceaux <address@hidden> writes:
> 
> > Han-Wen Nienhuys <address@hidden> writes:
> >
> >> I believe bison has builtin support for handling locations (check out
> >> the bison manual under Locations). Maybe you could run some experiments
> >> whether it's usable for us.
> 
> Here is a patch.
> The (modest) benefit is that parser errors are more accurate, quoting
> the beginning of the faulty expression iso the end.
> Point and click may also be more exact.
> 
> make web is being running now.

Some comments: I think that {first,last}{line,column} is somewhat
overkill. It would be my preference to store

          char* start_, end_;

and figure out the line/column locations only when necessary, using
the method used now for determining line/column locations.  So the
set_location() would take

               (Source_file*, char const* start, char const* end)

as arguments, and store those; other than that: great work! Can you
take this comment into account and then commit if make web succeeds?

-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]