diff options
author | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2001-11-07 12:55:55 +0000 |
---|---|---|
committer | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2001-11-07 12:55:55 +0000 |
commit | 7f6cd78f5a10cf83028dc4657a5cb88a7c6a91d3 (patch) | |
tree | 6573e9f8c63aac2c6fbbdd3c1aed749465ba9375 | |
parent | 7d23cf6672c4ecdb026dd1ab0840ce3e0092ac70 (diff) |
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3997 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | camlp4/compile/compile.ml | 3 | ||||
-rw-r--r-- | camlp4/etc/pa_o.ml | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/camlp4/compile/compile.ml b/camlp4/compile/compile.ml index d5f5e07fd..7e5582afe 100644 --- a/camlp4/compile/compile.ml +++ b/camlp4/compile/compile.ml @@ -551,9 +551,10 @@ value compile () = let pel = List.flatten pell in let si1 = <:str_item< value rec $list:pel$ >> in let si2 = + let list = List.sort compare keywords.val in <:str_item< List.iter (fun kw -> P.lexer.Token.using ("", kw)) - $expr_list keywords.val$ + $expr_list list$ >> in let loc = (1, 1) in diff --git a/camlp4/etc/pa_o.ml b/camlp4/etc/pa_o.ml index 92bbf33be..6b8815da2 100644 --- a/camlp4/etc/pa_o.ml +++ b/camlp4/etc/pa_o.ml @@ -157,7 +157,7 @@ value infixop0 = (parser [: `("", x) when - not (List.mem x excl) && String.length x >= 1 && + not (List.mem x excl) && String.length x >= 2 && List.mem x.[0] list && symbolchar x 1 :] -> x) ; @@ -557,6 +557,7 @@ EXTEND | e1 = SELF; "<>"; e2 = SELF -> <:expr< $e1$ <> $e2$ >> | e1 = SELF; "=="; e2 = SELF -> <:expr< $e1$ == $e2$ >> | e1 = SELF; "!="; e2 = SELF -> <:expr< $e1$ != $e2$ >> + | e1 = SELF; "$"; e2 = SELF -> <:expr< $lid:"\$"$ $e1$ $e2$ >> | e1 = SELF; op = infixop0; e2 = SELF -> <:expr< $lid:op$ $e1$ $e2$ >> ] | "^" RIGHTA [ e1 = SELF; "^"; e2 = SELF -> <:expr< $e1$ ^ $e2$ >> |