Parsing techniques

Kent Rollins <>
26 Nov 1996 20:26:52 -0500

          From comp.compilers

Related articles
Parsing techniques (1993-05-04)
Re: Parsing techniques (1993-05-07)
Re: Parsing techniques (1993-05-08)
Parsing techniques (Kent Rollins) (1996-11-26)
Re: Parsing techniques (Scott Stanchfield) (1996-12-01)
Re: Parsing techniques (1996-12-01)
Re: Parsing techniques (1996-12-01)
Re: Parsing techniques (1996-12-01)
Re: Parsing techniques (1996-12-03)
Re: Parsing techniques (Ron House) (1996-12-07)
[4 later articles]
| List of all articles for this month |

From: Kent Rollins <>
Newsgroups: comp.compilers
Date: 26 Nov 1996 20:26:52 -0500
Organization: Compilers Central
Keywords: parse, question

I am just getting into parsing and have some general questions about
the subject. Most of the literature I have read seems to imply that
LL(k) grammars are only for small/simple languages and that LR
grammars must be used for thicker languages like C++. Am I misreading
this info? Can C++ successfully be parsed with an LL(k) grammar? If
so, would the resulting parser be easier to debug? Would it be easier
to explain and recover from the errors it detects during parsing?

I have noticed numerous examples of ambiguous C/C++ statements posted
in this newsgroup that cause problems for such parsers. Assuming the
use of a lexer/parser combo, can all ambiguity be overcome or will we
always be able to create a contrived code example that will break even
the best C++ parser?

Where do hand-coded, recursive decent parsers fall into the mix? I
haven't read too much about them, but it seems that error recovery
would be terribly difficult. I am looking for the Wirth book on this
subject of which I have heard good reviews.

I have several books on parsing and compiler construction
([Aho,Sethi,Ullman], [Hollub], [Wilhelm,Maurer]). All of these are
excellent technical works, but none of them discuss the high-level
aspects of parsing such as which techniques are best for a given
language and a desired result. Any comments?

I know this post is wide-open for vociferous debate (the Internet
equivalent of a lot of plutonium in a relatively small space), but I
would appreciate any and all comments?


Post a followup to this message

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