From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 98CCEBC69 for ; Wed, 25 Apr 2007 04:29:56 +0200 (CEST) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3P2TuEX012094 for ; Wed, 25 Apr 2007 04:29:56 +0200 Received: by yquem.inria.fr (Postfix, from userid 25991) id 340A4BC69; Wed, 25 Apr 2007 04:29:56 +0200 (CEST) Date: Wed, 25 Apr 2007 04:29:56 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) Message-ID: <20070425022956.GA15422@yquem.inria.fr> References: <001401c785f3$3af5e890$6a7ba8c0@treble> <1177392571.10100.46.camel@rosella.wigram> <20070424122338.ozkvhzfhckcskkc4@webmail.etu.upmc.fr> <1177439118.6172.18.camel@rosella.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Miltered: at discorde with ID 462EBD24.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; rauglaudre:01 rauglaudre:01 camlp:01 bug:01 ocamlyacc:01 camlp:01 ocaml:01 ocaml:01 recompiled:01 lexer:01 plexer:01 syntax:01 lexer:01 cmo:01 parser:01 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/