Related articles |
---|
[3 earlier articles] |
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) |
Re: Parsing techniques grosch@cocolab.sub.com (1996-12-09) |
Re: Parsing techniques parrt@MageLang.com (Terence Parr) (1996-12-09) |
Re: Parsing techniques parrt@MageLang.com (Terence Parr) (1996-12-09) |
Re: Parsing techniques sjmeyer@crl.com (1996-12-15) |
From: | Ron House <house@usq.edu.au> |
Newsgroups: | comp.compilers |
Date: | 7 Dec 1996 23:07:27 -0500 |
Organization: | University of Southern Queensland |
References: | 96-11-157 |
Keywords: | parse, tools |
Kent Rollins wrote:
> 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?
We are starting a compiler for a new programming language, and have
already had much occasion to thank our lucky stars we chose PCCTS
instead of YACC. I think PCCTS has turned traditional wisdom on its
head. LL(k) with semantic and syntactic predicates is THE best parsing
technique known today. Each rule becomes a function; we can read it,
check its logic, and insert code in it - anywhere. Once the grammar
has survived the generator without ambiguities, we can be sure it'll
stay that way no matter what semantic code we later insert. With Yacc,
addition of actions can cause fresh ambiguities.
--
Ron House
house@usq.edu.au
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.