help-bison
[Top][All Lists]
Advanced

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

Re: too many gotos


From: Paul Eggert
Subject: Re: too many gotos
Date: Mon, 25 Oct 2004 09:26:30 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Akim Demaille <address@hidden> writes:

> Well, are you serious?  Can you possibly imagine a (real life) grammar
> exceeding our new boundary?

Not one generated by hand, no.  But an automatically-generated grammar could.

> I'm not sure there remain many arbitrary limits.

It depends on what you mean by "arbitrary limits", but if we're
talking about arbitrarily limiting ourselves to 32-bit sizes even on
64-bit hosts, then there are many instances of this in Bison.

Spurred by your patch, I started on a patch to fix just the problems
related to goto numbers but haven't had the time to finish it yet.
Perhaps later this week.  Here's the first one in the partial patch
I've written, to give you a feeling for what's involved.

--- src/lalr.c  22 Oct 2004 23:08:33 -0000      1.99
+++ src/lalr.c  25 Oct 2004 16:19:00 -0000
@@ -98,7 +98,7 @@ set_goto_map (void)
     }
 
   {
-    int k = 0;
+    goto_number k = 0;
     int i;
     for (i = ntokens; i < nsyms; i++)
       {

There are lots more fixes like this: token numbers, symbol numbers,
etc., etc.  To some extent this is just busy work as the limits will
never be reached in ordinary handwritten grammars; but to some extent
identifying which integers mean what will be a useful improvement to
Bison, for maintenance purposes.

> Could you also update the NEWS file?

Sorry about missing that.  I installed this:

--- NEWS        25 Oct 2004 10:37:35 -0000      1.105
+++ NEWS        25 Oct 2004 16:25:59 -0000
@@ -17,6 +17,8 @@ Changes in version 1.875e:
   the shifted symbols thrown away during the first part of the error
   recovery, and the lookahead rejected during the second part.
 
+* Goto numbers are no longer arbitrarily limited to 16-bit counts.
+
 Changes in version 1.875d, 2004-05-21:
 
 * Unescaped newlines are no longer allowed in character constants or




reply via email to

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