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 TAA30118; Fri, 24 Jan 2003 19:13:43 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA30259 for caml-list@pauillac.inria.fr; Fri, 24 Jan 2003 19:13:42 +0100 (MET) 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 RAA26467 for ; Fri, 24 Jan 2003 17:21:56 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0OGLtr00123 for ; Fri, 24 Jan 2003 17:21:55 +0100 (MET) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id h0OGLsM11221 ; Fri, 24 Jan 2003 17:21:54 +0100 (CET) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id h0OGLrcd023203 ; Fri, 24 Jan 2003 17:21:53 +0100 (MET) X-Authentication-Warning: clipper.ens.fr: frisch owned process doing -bs Date: Fri, 24 Jan 2003 17:21:53 +0100 (MET) From: Alain.Frisch@ens.fr X-X-Sender: frisch@clipper.ens.fr Reply-To: Alain.Frisch@ens.fr To: Jean-Christophe Filliatre cc: Daniel.Andor@physics.org, Caml list Subject: Re: [Caml-list] camlp4 vs. ocamllex/yacc? In-Reply-To: <15921.22474.602526.543452@lri.lri.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 24 Jan 2003, Jean-Christophe Filliatre wrote: > > What are the advantages/disadvantages of using camlp4 vs. a combination of > > ocamllex and ocamlyacc? > > For having used both of them intensively, I see (at least) the > following advantages of camlp4: > > - it comes with a lexer, saving you the burden of writing one > (this lexer conforms to ocaml lexical conventions; for prototype > implementations, it is usually fine) > > - it offers high level grammar constructors such as LIST0, LIST1, > OPT, ... It results in cleaner and more concise grammars. I can add: - it provides automatic error messages, explaining which rule failed, and what was expected and a disadvantage: - no detection of 'conflicts' in grammars -- Alain ------------------- 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