caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian Lindig <lindig@eecs.harvard.edu>
To: caml-list@inria.fr
Subject: Re: [Caml-list] More syntax: _ in numbers, backquote infix op's
Date: Thu, 7 Feb 2002 11:32:11 -0500	[thread overview]
Message-ID: <20020207163211.GC5027@lakeland.eecs.harvard.edu> (raw)
In-Reply-To: <871yfxiegy.dlv@wanadoo.fr>

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


  reply	other threads:[~2002-02-07 16:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-04 23:06 [Caml-list] Suggestion for Int32.rotate Berke Durak
2002-02-06 18:01 ` Xavier Leroy
2002-02-06 20:08   ` Daniel de Rauglaudre
2002-02-06 20:43     ` Frederic van der Plancke
2002-02-06 22:40       ` Chris Hecker
2002-02-07  1:07       ` Gerd Stolpmann
2002-02-07  3:05         ` Brian Rogoff
2002-02-07  3:25         ` Eric C. Cooper
2002-02-07 13:49         ` Thorsten Ohl
2002-02-07 13:55           ` Remi VANICAT
2002-02-07 16:32             ` Christian Lindig [this message]
2002-02-06 21:02   ` [Caml-list] integer types and their literals james woodyatt
2002-02-06 21:36   ` [Caml-list] Suggestion for Int32.rotate Berke Durak
2002-02-07  1:15 ` Gerd Stolpmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020207163211.GC5027@lakeland.eecs.harvard.edu \
    --to=lindig@eecs.harvard.edu \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).