"Maurice Gittens" <maurice@gittens.nl> writes:
{stuff deleted}> 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.

{stuff deleted}

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
LALR(1) grammars.

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
analysis.

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
hacks.