Re: Lemon, fallback, and vacuous tokens.

Chris F Clark <cfc@shell01.TheWorld.com>
Fri, 14 Jan 2011 15:53:50 -0500

          From comp.compilers

Related articles
Lemon, fallback, and vacuous tokens. darrencubitt@gmail.com (qarnos) (2011-01-02)
Re: Lemon, fallback, and vacuous tokens. gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-01-03)
Re: Lemon, fallback, and vacuous tokens. rpw3@rpw3.org (2011-01-05)
Re: Lemon, fallback, and vacuous tokens. cfc@shell01.TheWorld.com (Chris F Clark) (2011-01-14)
| List of all articles for this month |
From: Chris F Clark <cfc@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: Fri, 14 Jan 2011 15:53:50 -0500
Organization: The World Public Access UNIX, Brookline, MA
References: 11-01-011
Keywords: parse, tools
Posted-Date: 15 Jan 2011 00:27:56 EST

Error recovery has been studied and numerous papers written on it.
One of the idioms for error recovery involves inserting, deleting, and
replacing tokens at various costs and chosing the lowest cost variant
that allows the parse to continue as the recovery method.


Your "fallback" token is a replacement method. Your "vacuous" token
is an insertion method. You just need one more declaration
("spurious"?) for tokens you want to allow to be deleted and you will
have essentially re-invented this method (ok, perhaps you also need to
add costs for complete coverage), but you are on a track that has been
pioneered and been considered succcessful.


Hope this helps,
-Chris


******************************************************************************
Chris Clark email: christopher.f.clark@compiler-resources.com
Compiler Resources, Inc. Web Site: http://world.std.com/~compres
23 Bailey Rd voice: (508) 435-5016
Berlin, MA 01503 USA twitter: @intel_chris
------------------------------------------------------------------------------



Post a followup to this message

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