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

Re: information on sablecc (error recovery)



Hi Pieter,

I you are willing to work on this, I would suggest that you take the approach
suggested in Andrew Appel's "Modern compiler implementation in Java" book,
*second* edition, namely:  Page 78 & 79 "GLOBAL ERROR REPAIR" (using the Burke-Fisher
error repair algorithm), which would fit quite nicely in the SableCC framework.

To change this (e.g. Burke-Fisher), you need not modify any *.java source files,
only the source *.txt files in src/org/sablecc/sablecc/.

Hava fun!

Etienne



pieter@West.NL wrote:
Hello Mr. Gagnon,

I'm planning on using your compiler compiler, but I want to adapt it al
little. I noticed that a compiler, generared with the latest version (3.0
beta 1) of your compiler compiler, stops as soon as an error is
encountered in the in the input file. I want to adapt this in order to
make the compiler continue so that other errors will be found too (for
example by letting the compiler guess which token was omitted). However,
in stead of goning through every single source file to find out how I can
do this, I hoped you could tell me in which file(s) your compiler compiler
handles the possible errors in the input file.
If I know this, adapting the compiler compiler to my needs will at least
be a little easier.
Thanks in advance.

Greetings,
Pieter van der Spek


PS If you like, I can send you my modifications




-------------------

Pieter van der Spek
---- West Consulting B.V.        - www.west.nl
---- Tu Delft / Computer Science - www.tudelft.nl




--
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/