From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA08780; Thu, 7 Feb 2002 17:32:26 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA09011 for ; Thu, 7 Feb 2002 17:32:22 +0100 (MET) Received: from lakeland.eecs.harvard.edu (lakeland.eecs.harvard.edu [140.247.62.173]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g17GWLv27084 for ; Thu, 7 Feb 2002 17:32:21 +0100 (MET) Received: by lakeland.eecs.harvard.edu (Postfix, from userid 32148) id 1586D5792B; Thu, 7 Feb 2002 11:32:11 -0500 (EST) Date: Thu, 7 Feb 2002 11:32:11 -0500 From: Christian Lindig To: caml-list@inria.fr Subject: Re: [Caml-list] More syntax: _ in numbers, backquote infix op's Message-ID: <20020207163211.GC5027@lakeland.eecs.harvard.edu> Mail-Followup-To: Christian Lindig , caml-list@inria.fr References: <20020205000643.A31440@gogol.zorgol> <20020206190151.A9371@pauillac.inria.fr> <20020206210814.A15985@verdot.inria.fr> <3C61958D.C03D2463@decis.be> <20020207020735.A577@ice.gerd-stolpmann.de> <15458.34298.334820.912598@heplix4.ikp.physik.tu-darmstadt.de> <871yfxiegy.dlv@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871yfxiegy.dlv@wanadoo.fr> User-Agent: Mutt/1.3.25i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Feb 07, 2002 at 02:55:09PM +0100, Remi VANICAT wrote: > Thorsten Ohl writes: > > Gerd Stolpmann writes: > > > Why not allow "_" in integer literals, so one can write > it's already done in the cvs : > [..] > Objective Caml version 3.04+6 (2002-02-05) > > # 123_345.56;; > - : float = 123345.56 > # 123_465;; > - : int = 123465 On a similar note, is there a chance we get Haskell-style infix operators back? They allow to use a binary function add in infix notation with backqotes: 3 `add` 4. This addition to the lexer was for a short time in the repository, but taken out again: @@ -311,9 +311,6 @@ rule token = parse { INFIXOP4(Lexing.lexeme lexbuf) } | ['*' '/' '%'] symbolchar * { INFIXOP3(Lexing.lexeme lexbuf) } - | "`" lowercase identchar * "`" - { let s = Lexing.lexeme lexbuf in - INFIXOP3(String.sub s 1 (String.length s - 2)) } | eof { EOF } | _ { raise (Error(Illegal_character ((Lexing.lexeme lexbuf).[0]), Are there ambiguities in the lexer? -- Christian ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr