Related articles |
---|
Error reporting (for syntactic errors) roar.foshaug@systor.st (Roar) (2007-01-08) |
Re: Error reporting (for syntactic errors) roar.foshaug@systor.st (Roar) (2007-01-09) |
Re: Error reporting (for syntactic errors) rsc@swtch.com (Russ Cox) (2007-01-09) |
From: | "Roar" <roar.foshaug@systor.st> |
Newsgroups: | comp.compilers |
Date: | 9 Jan 2007 13:30:03 -0500 |
Organization: | Compilers Central |
References: | 07-01-024 |
Keywords: | parse, errors |
Posted-Date: | 09 Jan 2007 13:30:03 EST |
> [There isn't any "official" way, just ways that are more or less bad.
> -John]
Apart from adding productions for common errors, to recognize and
handle them spesifically, the approach of identifying a
point-of-no-return state inside a grammar production seems to work for
the tests I've done so far.
The idea is that deciding that a production has reached a
point-of-no-return, changes the meaning of failure to match required
elements from that of simply aborting the attempt and letting the
calling production decide what to do, to instead reporting an error,
based on what required element (production or token) failed.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.