Browse thread
[Caml-list] int32/int64 literals in next release?
-
Chris Hecker
-
Pierre Weis
-
Shawn Wagner
- Yurii A. Rashkovskii
- Shawn Wagner
-
Shawn Wagner
-
Pierre Weis
[
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: | Yurii A. Rashkovskii <yrashk@o...> |
| Subject: | Re: [Caml-list] int32/int64 literals in next release? |
Hi Shawn!
On Wed, 13 Nov 2002, Shawn Wagner wrote:
> Problems I know about already:
[...]
> Help with any of the above is appreciated.
May be something like this will be easier?
open Pcaml;;
let create_int loc v = <:expr< (int_of_string $str:v$) >>;;
let create_int32 loc v = <:expr< (Int32.of_string $str:v$) >>;;
let create_int64 loc v = <:expr< (Int64.of_string $str:v$) >>;;
let create_nativeint loc v = <:expr< (Nativeint.of_string $str:v$) >>;;
EXTEND
expr:
[[
i = INT; "l" -> create_int32 loc i
| i = INT; "L" -> create_int64 loc i
| i = INT; "n" -> create_nativeint loc i
| i = INT -> create_int loc i
]];
END
;
--
Regards,
Yurii.