|LL(1) vs LALR(1) parsers email@example.com (Odd Arild Olsen) (1995-11-04)|
|Re: LL(1) vs LALR(1) parsers firstname.lastname@example.org (Saileshwar Krishnamurthy) (1995-11-09)|
|Re: LL(1) vs LALR(1) parsers email@example.com (Sebastian Schmidt) (1995-11-10)|
|Re: LL(1) vs LALR(1) parsers firstname.lastname@example.org (1995-11-10)|
|Re: LL(1) vs LALR(1) parsers email@example.com (1995-11-14)|
|Re: LL(1) vs LALR(1) parsers firstname.lastname@example.org (steve (s.s.) simmons) (1995-11-15)|
|Re: LL(1) vs LALR(1) parsers email@example.com (Terence John Parr) (1995-11-20)|
|Re: LL(1) vs LALR(1) parsers firstname.lastname@example.org (1995-11-22)|
|[20 later articles]|
|From:||Saileshwar Krishnamurthy <email@example.com>|
|Keywords:||parse, LL(1), LALR|
|Date:||Thu, 9 Nov 1995 22:17:26 GMT|
Odd Arild Olsen <firstname.lastname@example.org> writes:
Odd> grammars, but many languages can be described by LL(1)
Odd> grammars. If LL(1) can yield faster, smaller and more
Odd> understandable parsers with better error handling for
Odd> many languages, why isn't this method more elaborated?
As I understand it:
A standard (easily understandable) grammar of a typical programming
language often isn't LL(1). However normally after eliminating
left-recursion and left-factoring (and other transformations) the
grammar can be converted to one that is LL(1). However these
transformtations make the new grammar pretty difficult to understand.
So while the parser may be reasonably easy to understand, it becomes
difficult to use that grammar and embed semantic routines in it -
'coz the original version will probably be what is most intuitive.
However most standard grammars will not need conversion to make them
Also parser-controlled semantic stacks mesh excellently with LR
parsers, and are pretty much a pain for LL parsers (In LL parsers,
the semantic stack cannot grow in parallel with the parse stack)
Odd> the various Small-C compilers were recursive
Odd> descending. Which common languages can not be parsed by
Odd> LL(1) grammars?
They can be parsed perhaps, but the final LL(1) grammar that
corresponds to the language will probably not be so intuitively
obvious. Whoops, I find it difficult to convince myself whenever I
eliminate left-recursion for a toy grammar !
Return to the
Search the comp.compilers archives again.