Browse thread
[Caml-list] Suggestion for Int32.rotate
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christian Lindig <lindig@e...> |
| Subject: | Re: [Caml-list] More syntax: _ in numbers, backquote infix op's |
On Thu, Feb 07, 2002 at 02:55:09PM +0100, Remi VANICAT wrote:
> Thorsten Ohl <ohl@hep.tu-darmstadt.de> 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