bug-bison
[Top][All Lists]
Advanced

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

Re: Faster token table lookups


From: Hans Aberg
Subject: Re: Faster token table lookups
Date: Sat, 13 Jan 2001 11:28:05 +0100

At 11:42 +0100 0-12-22, Akim Demaille wrote:
>I won't look at it before January.  Are you sure it is worth the
>trouble?  My opinion is that 1. nobody uses those tables to parse, and
>2. those who do certainly process these tables before using them.

One example of such a use could be the English example in the parallel posts:

The token values (if it now is text or numbers) of the lexemes are stored
in a separate dictionary in internal format, and one does not want them to
be dependent on the token values that Bison happens to use, which may
change when the grammar is changed and recompiled. So one would prefer a
translation at startup time (avoiding that the whole dictionary must be
recompiled every time Bison recompiles the source file, and also avoiding
that the dictionary only can be used in connection with a single Bison
program).

It suffices to write in the sorted table (possibly as an option), though,
as the lookup algorithms can be put by hand in the source file.

  Hans Aberg





reply via email to

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