Version française
Home     About     Download     Resources     Contact us    
Browse thread
Bug in ocamlyacc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc)
Hi,

On Tue, Apr 24, 2007 at 01:17:31PM -0700, Martin Jambon wrote:

> The current situation with camlp4 3.10-beta is terrible. Not because
> the new camlp4 is not good or anything, but because it is not compatible
> with the old one and yet replaces it.

Alternative solution : download my version of Camlp4, named "camlp4s" :
    http://pauillac.inria.fr/~ddr/camlp4s/

This is Camlp4 before its inclusion into OCaml some years ago, and
upgraded to be (almost) compatible to the most recent versions of
Camlp4, except the forthcoming one 3.10.

Most important changes :

  One only source which can be used for several versions of OCaml. Just
  need to be recompiled. Can be used for ocaml versions from 3.08.1 to
  3.10. (If you use a more older version, I can add it.)

  The lexer Plexer has been rewritten. It uses a new syntax pa_lexer.cmo
  allowing to make parser of streams of characters with a shorter syntax.

  Experimented new directive "#pragma" allowing to evaluate expressions
  at compile time (= camlp4 time). Useful, for example, to experiment
  syntax extensions with the EXTEND statement without having to put
  it in another file.

  Started an experiment of a new pretty printing system, the old one
  of Camlp4 not being satisfactory, nor Format which has sometimes
  problems. The library is named Sformat, and is very simple.

But notice that this module Sformat is not yet used for camlp4s pretty
print, the old system remaining for the moment. I experimented it
separatedly and it seems to work. Interesting future feature : you
will be able to decide, by symmetry, to skip all lines in a pattern
matching between the pattern and the expression if one case need a
newline. Same thing in a "if then else" if the "then" case and the
"else" case are similar ("similarity" is tested with the library
"mldiff").

Its distribution being independant from OCaml distribution, new releases
can be done at any time.

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/