|[2 earlier articles]|
|Re: Error recovery email@example.com (Gord Cormack) (1997-03-22)|
|Re: Error recovery P.Whillance@ncl.ac.uk (Peter Whillance) (1997-03-27)|
|Error Recovery firstname.lastname@example.org (1997-05-12)|
|Re: Error Recovery email@example.com (1997-05-25)|
|Re: Error Recovery firstname.lastname@example.org (Thomas W. Christopher) (1997-05-25)|
|Re: Error Recovery email@example.com (Mark Gregory) (1997-05-27)|
|Re: Error Recovery firstname.lastname@example.org (Michael Roach) (1997-05-31)|
|From:||Michael Roach <email@example.com>|
|Date:||31 May 1997 23:51:44 -0400|
|References:||97-05-153 97-05-293 97-05-307|
This system is already in use by VisualParse++ v2 from Sand-Stone.
I'm currently waiting for the source code so I can port it, but when I
do get a hold of it I'll see about getting permission to post the
VP++ allows you to define error tokens, such as %error ';' as well as
using what it calls synchronization tokens. Basically what it does is
it searches the stack for the tokens that can follow either a
synchronization token (%), or an %error token (; in this
example). This is then termed the valid token set. Next it skips all
the tokens in the input stream until it finds a token matching one in
the valid token set. If one is found, it then pops states off the
stack until the matched token is valid. Parsing then continues from
this point. Its enough for my needs. (above almost verbatum from the
manual, pgs 23-27)
Mark Gregory wrote:
> Thomas W. Christopher wrote:
> > A fiducial symbol is a terminal symbol that ends or separates
> > significant sections of program, e.g. ";", "end", "else".
> Hello Thomas ...
> I'm MarkAGr ( when I'm at home )
> The LL(k) generator I'm building needs a little more than the error
> recovery function ( "exit(-1);" ) that it already has ... and the
> system you described is the closest to that that I have already
> envisaged ... ie. when an error occurs ... the input stream is
> absorbed until a "guardian production" ( instead of "fiducial symbol"
> ) is found. The parser then continues from a given production as if no
> error has occured. This type of error recovery can ( relatively easily
> ) be generated automatically, by pushing the
> "end-of-current-production" production onto a "guardian
> production-stack" prior to any sub-production being entered, and
> popped if the sub-production resolves successfully. ( However an
> implementation is possible with no stack required for a
> recursive-descent parser. ) Finding a way to incorporate this
> guardian-production into the meta-syntax is another problem. My first
> attempt will be in the production declatation ...
Return to the
Search the comp.compilers archives again.