summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2009-12-01 09:57:02 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2009-12-01 09:57:02 +0000
commit769be0ebbdd8f5c38e4e32e03e91f5612a2f0372 (patch)
tree52233e0d53baa9479e7f586a9edfb19480c9e0f0
parentcec0afc0767d4c63a345a8aaa0be7b34821caa33 (diff)
downloadocaml-769be0ebbdd8f5c38e4e32e03e91f5612a2f0372.tar.gz
Including bug correction (signed numeric constants may begin with a + sign).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--parsing/parser.mly8
1 files changed, 7 insertions, 1 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly
index 3b400c2bda..17faa91913 100644
--- a/parsing/parser.mly
+++ b/parsing/parser.mly
@@ -169,7 +169,7 @@ let bigarray_get arr arg =
["", arr; "", ghexp(Pexp_array coords)]))
let bigarray_set arr arg newval =
- let set = if !Clflags.fast then "unsafe_set" else "set" in
+ let set = if !Clflags.fast then "unsafe_set" else "set" in
match bigarray_untuplify arg with
[c1] ->
mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array1" set)),
@@ -1456,7 +1456,13 @@ signed_constant:
| MINUS INT32 { Const_int32(Int32.neg $2) }
| MINUS INT64 { Const_int64(Int64.neg $2) }
| MINUS NATIVEINT { Const_nativeint(Nativeint.neg $2) }
+ | PLUS INT { Const_int $2 }
+ | PLUS FLOAT { Const_float $2 }
+ | PLUS INT32 { Const_int32 $2 }
+ | PLUS INT64 { Const_int64 $2 }
+ | PLUS NATIVEINT { Const_nativeint $2 }
;
+
/* Identifiers and long identifiers */
ident: