Re: Error reporting (for syntactic errors)

"Russ Cox" <rsc@swtch.com>
9 Jan 2007 13:31:02 -0500

          From comp.compilers

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)
| List of all articles for this month |
From: "Russ Cox" <rsc@swtch.com>
Newsgroups: comp.compilers
Date: 9 Jan 2007 13:31:02 -0500
Organization: Compilers Central
References: 07-01-024
Keywords: parse, errors
Posted-Date: 09 Jan 2007 13:31:02 EST

> The compiler is backtracking in the sense that if a production fails,
> the next alternative, if any, is tried, but it does NOT backtrack
> within a production.


This informal description sounds like the same thing a
packrat parser does. You might look at how the various
packrat parser generators handle error reporting:


See for example section 3.2.4 of
http://pdos.csail.mit.edu/~baford/packrat/thesis/thesis.pdf


Russ



Post a followup to this message

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