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] camlp4 vs. ocamllex/yacc?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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 Archives:
Bug reports: FAQ:
Beginner's list: