|ANNOUNCE: Tiny, a parser generator for context sensitive grammars firstname.lastname@example.org (Maurice Gittens) (2001-07-23)|
|Re: ANNOUNCE: Tiny, a parser generator for context sensitive gram email@example.com (2001-07-27)|
|Re: ANNOUNCE: Tiny, a parser generator for context sensitive gr firstname.lastname@example.org (Maurice Gittens) (2001-08-02)|
|Re: ANNOUNCE: Tiny, a parser generator for context sensitive grammars email@example.com (Daniel C. Wang) (2001-08-06)|
|Re: ANNOUNCE: Tiny, a parser generator for context sensitive gramma firstname.lastname@example.org (Mike Dimmick) (2001-08-08)|
|From:||"Daniel C. Wang" <email@example.com>|
|Date:||6 Aug 2001 04:03:52 -0400|
|References:||01-07-128 01-07-149 01-08-011|
|Posted-Date:||06 Aug 2001 04:03:52 EDT|
"Maurice Gittens" <firstname.lastname@example.org> writes:
> This is an interesting question. LALR(1) grammars have proven to
> allow the generation of parsers for many languages used in practice.
> Is this because we tailor the languages we use to the possibilities of
> parser generators commonly used or is this because LALR(1) grammars
> are some how "good" enough for every day needs.
> To say the truth, I don't really now.
C doesn't have a pure LALR(1) grammar because the parser needs to be
aware of what has been typedefed and what hasn't. (i.e. parsing C is
not context free)
C++ sure doesn't either.
Perl (um nope...)
For Pascal and Java? I think the answer is yes here.
On the more academic side... neither Standard ML nor Haskell have
In anycase, it seems to me that in practice many languages do not have
LALR(1) grammars. All compilers use various hacks to fit the grammar
used for parsing into a LALR(1) framework and then do semantic
So, I think the few languages that do have LALR grammars are the ones
which were designed to have them. Otherwise designers keep the syntax
so brain dead simple (i.e. Scheme, Smalltalk..) that parsing is
trivial, or end up with something that is 90% LALR(1) plus semantic
So, I'm all for more powerful parsing techniques.
Return to the
Search the comp.compilers archives again.