Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!psuvax1!ukma!xanth!mcnc!decvax!ima!esegue!compilers-sender
From: markg@well.sf.ca.us (Mark Grand)
Newsgroups: comp.compilers
Subject: Re: Error reporting in LR parsers
Message-ID: <1989Aug12.201931.4857@esegue.uucp>
Date: 12 Aug 89 20:19:31 GMT
Sender: compilers-sender@esegue.uucp
Reply-To: markg@well.sf.ca.us (Mark Grand)
Organization: Whole Earth 'Lectronic Link, Sausalito, CA
Lines: 15
Approved: compilers@esegue.segue.bos.ma.us
In-Reply-To: <1989Aug8.130702.957@esegue.uucp>

Generating a list of acceptable tokens before allowing YACC to perform a
default reduction is expensive.  A cheaper way (assumimg a fast
implementation of memcpy) is to take a snapshot of YACC's state stack every
time it gets a new token.  That way you can generate a list of the expected
tokens from the snapshot and only have to do it when actually needed.

-- 
Mark Grand                     markg@well.sf.ca.usa
GeoMaker Software              {apple,pacbell,hplabs,ucbvax}!well!markg
P.O. Box 273124                415-680-1964
Concord CA   94527-3124
-- 
Send compilers articles to compilers@ima.isc.com or, perhaps, Levine@YALE.EDU
{ decvax | harvard | yale | bbn }!ima.  Meta-mail to ima!compilers-request.
Please send responses to the author of the message, not the poster.