Error recovery in byacc

derek@knosof.co.uk (Derek M Jones)
Thu, 16 Nov 1995 23:05:45 GMT

          From comp.compilers

Related articles
Error recovery in byacc derek@knosof.co.uk (1995-11-03)
Error recovery in byacc grosch@cocolab.sub.com (1995-11-16)
Error recovery in byacc derek@knosof.co.uk (1995-11-16)
| List of all articles for this month |
Newsgroups: comp.compilers
From: derek@knosof.co.uk (Derek M Jones)
Keywords: yacc, errors
Organization: Knowledge Software Ltd
References: 95-11-101
Date: Thu, 16 Nov 1995 23:05:45 GMT

Dear Dr. Josef Grosch,


grosch@cocolab.sub.com writes:


> (Derek M Jones <derek@knosof.co.uk> wrote:
>
> > Can anybody give me pointers to parsers containing error recovery that
> > are based on the byacc generated tables?
>
> The parser generator Lark of the Cocktail Toolbox generates parsers with
> error recovery. This is not exactly what you are asking for. Inspite of
> this the references used for Lark might be of interest:
>


Thanks for the references and to those people who told me about PCCTS.


I am currently adding error recovery to the byacc generated parser, based
on what existed in the hand written yacc parser.


The main problem arises from that fact that byacc does not default
reduce to the extent that yacc does. An extra function, reduce_ok,
has been written to handle this situation. This lack of full default
reduction also makes the parser more sensitive to parse stack
manipulation (pulling the stack back and throwing some input
tokens at it), causing the wrong actions to be invoked with consequent
core dumps.


After a few days work, not the expected few hours, I am close to having
a parser that is as 'good' as the orginal.


derek


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.