Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Ocamlyacc vs stream parser
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-05-28 (15:45)
From: brogoff@s...
Subject: Re: [Caml-list] Ocamlyacc vs stream parser
On Wed, 28 May 2003, Michal Moskal wrote:
> On Wed, May 28, 2003 at 11:37:03AM +0200, Diego Olivier Fernandez Pons wrote:
> >     Bonjour,
> > 
> > > Sorry, I thought camlp4 recognizes LL(1) languages, and my dragon book
> > > copy states that LR(1) > LL(1) (I'm not sure about LARL(1) though).
> > 
> > My Appel states that LL(1) is not included in LALR(1).
> Oh, so by proof-by-book you're right :-) 

That's pretty funny, but those Romans did have this case covered. I believe 
the Latin expression is "argumentum ad verecundiam". 

> But in practice LARL(1) seems
> more usefull for parsing, at parsing least programming languages.

This is esoteric flame bait for the parsing crowd. I happen to think that 
recursive descent is the best way to write parsers, but note that recursive 
descent parsers are capable of parsing non-LL(1) grammars, even without the 
fairly obvious hacks. As a real world proof by example, consider that Ada is 
often cited as a language not amenable to RDP (Fraser&Hanson : "For example, 
C is in the class of languages that can be recognized by recursive descent 
parsers, but other languages, like ADA (sic), are not."), yet somehow the 
authors of GNAT were ignorant enough to make it work. 

In the real world, you'll need to be proficient with YACC and RDP, of course. 

-- Brian

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: