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=AWL 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 C4FFDBC0B for ; Wed, 17 Jan 2007 03:23:19 +0100 (CET) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0H2NHjs011644 for ; Wed, 17 Jan 2007 03:23:18 +0100 Received: from ppp27-234.lns1.syd6.internode.on.net (HELO rosella) ([59.167.27.234]) by ipmail01.adl2.internode.on.net with ESMTP; 17 Jan 2007 12:53:08 +1030 X-IronPort-AV: i="4.13,198,1167571800"; d="scan'208"; a="74890805:sNHT14018825016" Subject: Re: [Caml-list] Ocaml compiler features From: skaller To: Edgar Friendly Cc: caml-list@yquem.inria.fr In-Reply-To: <45AD12E0.60307@gmail.com> References: <45A87011.8080203@gmail.com> <20070115103556.GB12311@furbychan.cocan.org> <45AC60CB.4070408@gmail.com> <1168930305.5513.27.camel@rosella.wigram> <45AD12E0.60307@gmail.com> Content-Type: text/plain Date: Wed, 17 Jan 2007 13:23:03 +1100 Message-Id: <1169000583.8941.11.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45AD8895.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 syntax:01 elif:01 syntax:01 ocaml:01 ocamlyacc:01 lalr:01 camlp:01 recursive:01 edgar:98 sourceforge:01 wrote:01 wrote:01 caml-list:01 On Tue, 2007-01-16 at 12:01 -0600, Edgar Friendly wrote: > skaller wrote: > > So is your syntax: > > > > if cond1 then e1 > > elif cond2 then e2 > > .. > > else el > > endif > > > that would do what I want. Now is it possible to keep the open syntax > as well, for the ?: uses of if/then/else? Not directly. You could use IF .. THEN .. ENDIF and have both. Or perhaps you could add if .. do .. done to Ocaml -- "if .. then .. " and "if .. do .. " are both supported in Felix which uses Ocamlyacc to parse it, I think indicating LALR1 can distinguish these two cases? However camlp4 is recursive descent isn't it? -- John Skaller Felix, successor to C++: http://felix.sf.net