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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 236F9BC6B for ; Mon, 7 May 2007 14:30:14 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l47CUBd7031442 for ; Mon, 7 May 2007 14:30:13 +0200 X-IronPort-AV: E=Sophos;i="4.14,501,1170595800"; d="scan'208";a="124379319" Received: from ppp8-148.lns1.syd7.internode.on.net (HELO [192.168.1.201]) ([59.167.8.148]) by ipmail01.adl2.internode.on.net with ESMTP; 07 May 2007 22:00:01 +0930 Subject: Re: [Caml-list] 246 constructors? From: skaller To: Emmanuel Onzon Cc: caml-list@yquem.inria.fr In-Reply-To: <20070507102110.hdvb0z4firk0ow0o@tadorne.ens-lyon.fr> References: <20070506210912.38195BC82@yquem.inria.fr> <20070507102110.hdvb0z4firk0ow0o@tadorne.ens-lyon.fr> Content-Type: text/plain Date: Mon, 07 May 2007 22:29:57 +1000 Message-Id: <1178540997.6123.8.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 463F1BD3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; constructors:01 0200,:01 variants:01 constructors:01 lexer:01 ocaml:01 ocaml:01 buffer:01 buffer:01 lexbuf:01 lexer:01 kwd:01 ocamlyacc:01 sourceforge:01 wrote:01 On Mon, 2007-05-07 at 10:21 +0200, Emmanuel Onzon wrote: > I have just added an option -symbols-with-variants which makes dypgen use > variants instead of constructors. (see the file CHANGES for other changes > in this version) Hi! You're the author right? I there a repository somewhere? I have a couple of patches. To the lexer I added: and ocaml_type = parse | "->" { ocaml_code_buffer := (!ocaml_code_buffer) ^ "->"; ocaml_type lexbuf } otherwise function types can't be properly lexed. Probably be cool if the lexer was made a bit more sophisticated .. for example I had %token<...>... which failed due to a lack of a space between token and <. I also added: | "%type" blank { look_for_type:=true; KWD_TYPE } in a vain attempt to get it to ignore my %type commands. It should be possible to make it work with an ocamlyacc spec with a bit of fiddling shouldn't it? -- John Skaller Felix, successor to C++: http://felix.sf.net