[Top][All Lists]

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

Re: Thoughts on getting correct line numbers in the byte compiler's warn

From: Alan Mackenzie
Subject: Re: Thoughts on getting correct line numbers in the byte compiler's warning messages
Date: Tue, 6 Nov 2018 08:53:09 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Davis.

On Tue, Nov 06, 2018 at 04:34:30 +0000, Herring, Davis wrote:
> > I've spend many hours at my PC, trying to figure out a neat way of
> > solving this problem.  The above is the best I've been able to come up
> > with, so far.

> Considering patterns like AoS vs. SoA, could the reader produce (on
> demand) a pair: the expression read and a parallel structure of
> position information?  For example,

> '(foo
> bar [baz])

> =>

> ((quote (foo bar)) .
>  (0 (2 6 [11])))

> where the numbers are character offsets from the beginning of the
> read?  This loses information on the opening delimiter for each
> list/cons/vector; it could be added with certain obvious alterations
> to the location structure if that's a problem.

Such a structure could be generated easily.  But how are we going to use
it?  The problem is how do we associate a particular piece of the main
structure with the pertinent bit of the auxiliary structure?

For example, at the time we're compiling baz, the byte compiler has just
baz itself.  How do we get to the 11 in the offsets structure?

This is the essence of the problem - associating data with the elements
of an arbitrary structure of lisp objects.  My proposal from yesterday
does this rigorously.

> Davis

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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