Related articles |
---|
Parsing techniques lex@prl.philips.nl (1993-05-04) |
Re: Parsing techniques ipser@solomon.technet.sg (1993-05-07) |
Re: Parsing techniques simonh@swidev.demon.co.uk (1993-05-08) |
Parsing techniques kentr@rollinssoft.com (Kent Rollins) (1996-11-26) |
Re: Parsing techniques scotts@metaware.com (Scott Stanchfield) (1996-12-01) |
Re: Parsing techniques jon@mauney.com (1996-12-01) |
Re: Parsing techniques miano@worldnet.att.net (1996-12-01) |
Re: Parsing techniques jlilley@empathy.com (1996-12-01) |
Re: Parsing techniques icedancer@ibm.net (1996-12-03) |
Re: Parsing techniques house@usq.edu.au (Ron House) (1996-12-07) |
[4 later articles] |
From: | Kent Rollins <kentr@rollinssoft.com> |
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?
Kent
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.