|
From: | Hans Aberg |
Subject: | Re: Error recovery in C++ with Bison 2.3 |
Date: | Thu, 11 Jan 2007 12:55:58 +0100 |
On 2 Jan 2007, at 23:04, Bill Lear wrote:
I have written a rather extensive parser in C++, using Bison 2.3,basing it on the example, calc++, provided with the Bison distribution.I would like to be able to recover from simple errors in the input file by making note of them, providing a warning, and continuing on.
...
CLASS PID; CLASS POD; but fails on this: CLASS pid;
Since you do not detail much, it us hard to tell. But the Bison manual has an example how to use GLR to handle certain constructs in the C++ language. Error recovery should not, LALR, be used for the parsing itself, as it is too crude.
Hans Aberg
[Prev in Thread] | Current Thread | [Next in Thread] |