[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
too many gotos
From: |
Nick Chapman |
Subject: |
too many gotos |
Date: |
Wed, 13 Oct 2004 11:44:54 +0000 |
Hi,
I have a grammar which exceeds the limit on the number of gotos in bison.
I get this problem in versions 1.28 and 1.875.
The problem is that short is used for indexing the goto_map, which limits the
number of gotos to 32767.
typedef short goto_number;
# define GOTO_NUMBER_MAXIMUM SHRT_MAX
Making a quick change to my bison 1.875 sources, to avoid the abort, I can see
that my grammar has around 45000 gotos.
I understand that other limits have been increased/removed in the more recent
versions of bison - why not the number of gotos? Is this not a common problem?
Is the solution just a `simple' matter of changing the typedef for goto_number
to be int, or are there other more subtle dependencies?
Or is it better to try transforming the grammar to reduce the number of gotos?
The problem is, I don't know what aspects of a grammar will influence this.
Cheers,
Nick.
--
Nick Chapman, Amadido Limited. address@hidden
34, St. Mary's Road, Harefield, Middlesex, UB9 6AD, UK.
+44 1895 473691 (work) +44 7966 421391 (mobile)
- too many gotos,
Nick Chapman <=
Re: too many gotos, Akim Demaille, 2004/10/22