From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA09713; Wed, 28 May 2003 17:45:19 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA09704 for ; Wed, 28 May 2003 17:45:17 +0200 (MET DST) Received: from grace.speakeasy.org (grace.speakeasy.org [216.254.0.2]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h4SFjFH05743 for ; Wed, 28 May 2003 17:45:16 +0200 (MET DST) Received: (qmail 2046 invoked by uid 36130); 28 May 2003 15:45:14 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 28 May 2003 15:45:14 -0000 Date: Wed, 28 May 2003 08:45:14 -0700 (PDT) From: brogoff@speakeasy.net To: Michal Moskal cc: Diego Olivier Fernandez Pons , "caml-list@inria.fr" Subject: Re: [Caml-list] Ocamlyacc vs stream parser In-Reply-To: <20030528102456.GA5672@roke.freak> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; brogoff:01 caml-list:01 michal:01 moskal:01 pons:01 camlp:01 recognizes:01 lalr:01 romans:01 esoteric:01 descent:01 hacks:01 fraser:01 recognized:99 proficient:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners