🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #226

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

#226
From: G. Paul Otto
Date: Wed, 10 Oct 1990 03:41
51 lines
2901 bytes
I have just tried using SUN "yacc++" and "yacc" on a C++ grammar we
have (Roskind's).  They bomb out "too many rules" - and there is
apparently no way of fixing them without source - which we (like most
people) do not have.
Yesterday, I tried using "lex++" on the lex file with the grammar.  Of
course, the default table sizes are too small - but there is an option
to increase them (unlike in yacc!).  So I try that.  It turns out that
I have a choice: set the table sizes too small - in which case it bombs
with a sensible error message - or set them large enough - in which
case it just dumps core.  Repeated trials are needed for this, of
course!

The good news: lex & bison can handle the files (after upping the table
sizes in lex, of course).   Of course, this does make it more difficult
to use C++ with the yacc & lex grammars.

I am especially pissed off, because the table sizes do not seem to have
been increased much (if at all) from the days when these progs ran on
PDP-11's - which mean that the max process size was 64k or 128k
(depending upon which model of PDP you had).  Process sizes 50 x
bigger than that are quite reasonable these days.  (And some people
have larger machines, and may wish to be able to take advantage of
them when convenient.)


This is not an isolated case: last I checked, the table sizes built
into refer were *smaller* than those which had been used on larger
PDPs.  (Of course, under SunOS 4.0, refer is crocked anyway ...)
Similarly, "vi", "sort" and "sed" have given me grief over line-length
limits; "awk" over record sizes; and other utilities too numerous to
mention (but including databases, X windows & so forth).


In these modern times, it is often just as easy to use table structures
which will grow as required (the wonders of modularity!) - why, oh why,
do they seem to be used so seldom?


[ Aside: GNU deserve an honourable mention here, for two reasons:
(i) in my experience, their software is less likely to hit arbitrary
limits; (ii) since they distribute source, it is easy to adjust the
table sizes if necessary. ]


Paul
-----------
Paul Otto, Canon Research Centre Europe Ltd.,
17-20 Frederick Sanger Rd, Surrey Research Park, Guildford, Surrey, GU2 5YD, UK.
NRS: otto@uk.co.canon	Internet: otto@canon.co.uk
UUCP: otto@canon.uucp	PATH: ..!ukc!uos-ee!canon!otto
Tel: +44 483 574325		Fax: +44 483 574360
Technical Details
Message-ID: <2158@megadon.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!ames!vsi1!altos!megadon!clp

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!ames!vsi1!altos!megadon!clp
From: otto@canon.co.uk (G. Paul Otto)
Newsgroups: comp.unix
Subject: bug in SUN lex++; and whinge about fixed table sizes
Keywords: lex yacc lex++ yacc++ GNU SUN Unix
Message-ID: <2158@megadon.UUCP>
Date: 10 Oct 90 03:41:42 GMT
Sender: clp@megadon.UUCP
Organization: Canon Research Europe, Guildford, UK
Lines: 51
Approved: clp@megadon.UUCP