bug in SUN lex++; and whinge about fixed table sizes

Brian Bliss bliss at sp64.csrd.uiuc.edu
Thu Oct 11 09:31:10 AEST 1990


Well, I do have access to the source for yacc...

when trying to parser pre-tokenized fortran I ran into problems
with having too many tokens for yacc on the alliant fx/8 to
handle (> 128).  so I go into the source and changed the NTERM
constant appropriately.  now everything compiles correctly,
but it bombs at run-time.  it turns out that I was manually
assigning values to the tokens that were larger than 256,
and yaccpar was bombing.  I couldn't change the token values
(in order to be compatible with someone else's code), so
I up NTERM to 2056.  it still bombs at run-time.  it turns
out that there is a constant, YYFLAG (-1000 by default), such
that NTERM must be less than -YYFLAG.  of course, this was
not documented in the source.  so I change YYFLAG to -2000
(I wasn't using tokens in the range 2000-2056 - in retrospect,
I should have made it -3000).  still bombs.  turns out that
YYFLAG is defined in two places, once for the yacc soruce
(so that it generates the appropriate tables), and again
in yaccpar (the c code that is included with the generated
tables to form the parser).  not only that, but I had to 
redefine the NOMORE constant in the yacc source.

3 days later I got it to work...



More information about the Comp.unix mailing list