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=2.3 required=5.0 tests=AWL,RCVD_NUMERIC_HELO, SPF_FAIL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id B8732BC69 for ; Wed, 1 Nov 2006 13:43:35 +0100 (CET) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kA1ChZQM006849 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 1 Nov 2006 13:43:35 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GfFQs-0002W2-CP for caml-list@inria.fr; Wed, 01 Nov 2006 13:43:02 +0100 Received: from 88.122.97.102 ([88.122.97.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Nov 2006 13:43:02 +0100 Received: from ciol13 by 88.122.97.102 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Nov 2006 13:43:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: ciol Subject: Re: Functional programming using caml light Date: Wed, 01 Nov 2006 13:42:13 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 88.122.97.102 User-Agent: Thunderbird 1.5.0.7 (X11/20060927) In-Reply-To: Sender: news X-j-chkmail-Score: MSGID : 45489677.000 on discorde : j-chkmail score : X : 0/20 1 X-Miltered: at discorde with ID 45489677.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; expr:01 mult:01 mult:01 expr:01 author's:01 obtains:98 wrote:01 prefixes:02 caml:02 caml:02 functional:02 programming:03 identical:06 complicated:09 i've:12 ciol wrote: > after factoring common prefixes, the author obtains : > > Expr ::= Mult RestExpr > > RestExpr ::= + Mult RestExpr > |- Mult RestEXpr > |(* nothing *) > > [...] > > But I don't obtain the same result for RestExpr : > > RestExpr ::= + Mult Expr > |- Mult Expr > | (* nothing *) > _Sorry_, it's an error, I obtain : RestExpr ::= + Expr | - Expr | (* nothing *) But I've just realized that the author's solution is in fact the same as mine (he replaced Expr in RestExpr by Mult RestExpr. But why ? Isn't it more complicated ? The result in caml will be identical wont it be ?