Related articles |
---|
FW: Does LR grammar has viable valid suffixes too J.vanKatwijk@ewi.tudelft.nl (jan) (2004-10-24) |
From: | "jan" <J.vanKatwijk@ewi.tudelft.nl> |
Newsgroups: | comp.compilers |
Date: | 24 Oct 2004 23:45:29 -0400 |
Organization: | Compilers Central |
Keywords: | parse |
Posted-Date: | 24 Oct 2004 23:45:29 EDT |
If just life was that easy!!! Obviously, there is no garantee that the
remainder of your input has any correct token. Just assume that only a
valid prefix was offered to the parser with an empty remaining
part. What the valid prefix offers you is that you can have your
parser built a valid suffix, so that you can always terminate your
parsing process. However, matching a valid suffix (and of course,
there is an unlimited set of valid suffixes) is the hard part in error
recovery, due to the nature of errors. Literature has a huge set of
references to error repair, correction and so on. My favorite method
was devised by Johannis Roehrich in the 70-ties, who gave algorithms
for building a suffix for LALR states.
Good luck, and please specify more clearly what you want to achieve
regards
jan
-----Oorspronkelijk bericht-----
Does LR grammars have viable valid suffix like viable valid prefix
property?? ...
Return to the
comp.compilers page.
Search the
comp.compilers archives again.