Browse thread
[Caml-list] camlp4 vs. ocamllex/yacc?
-
Daniel Andor
- Jacques Carette
-
Jean-Christophe Filliatre
- Alain.Frisch@e...
- Ed L Cashin
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2003-01-24 (18:13) |
From: | Alain.Frisch@e... |
Subject: | Re: [Caml-list] camlp4 vs. ocamllex/yacc? |
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