lilypond-devel
[Top][All Lists]
Advanced

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

Re: precise input location


From: Nicolas Sceaux
Subject: Re: precise input location
Date: Sun, 09 Jan 2005 18:48:46 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> 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?

You're absolutely right, ok.

Right now, I'm going to hear Sigiswald Kuijken, but I hope to do it
tomorrow.

As for bison's version: I'm using 1.875d here.
http://sources.redhat.com/ml/bug-gnu-utils/2001-10/msg00115.html seems
to mention that %locations were added in bison 1.29

nicolas





reply via email to

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