From e0554d32bf6a5deedd586b66c48aaa78b11ba0e7 Mon Sep 17 00:00:00 2001 From: mayero Date: Thu, 8 Feb 2001 23:35:50 +0000 Subject: modif de la syntax: assoc a droite pour Ring git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1359 85f007b7-540e-0410-9357-904b9bb8a0f7 --- parsing/g_rsyntax.ml | 8 ++++---- theories/Reals/Rsyntax.v | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/parsing/g_rsyntax.ml b/parsing/g_rsyntax.ml index 03f9fcbc64..b9902e103b 100644 --- a/parsing/g_rsyntax.ml +++ b/parsing/g_rsyntax.ml @@ -20,7 +20,7 @@ let r_of_int n dloc = else if n = 1 then ast1 else - Node(dloc,"APPLIST", [astp; mk_r (n-1); ast1]) + Node(dloc,"APPLIST", [astp; ast1; mk_r (n-1)]) in mk_r n @@ -43,8 +43,8 @@ let _ = let rec int_of_r_rec ast1 astp p = match p with | Node (_,"APPLIST", [b; a; c]) when alpha_eq(b,astp) && - alpha_eq(c,ast1) -> - (int_of_r_rec ast1 astp a)+1 + alpha_eq(a,ast1) -> + (int_of_r_rec ast1 astp c)+1 | a when alpha_eq(a,ast1) -> 1 | _ -> raise Non_closed_number @@ -57,7 +57,7 @@ let int_of_r p = let replace_plus p = let (_,ast1,_,astnr) = get_r_sign dummy_loc in - ope ("REXPR",[ope("APPLIST", [astnr; p; ast1;])]) + ope ("REXPR",[ope("APPLIST", [astnr; ast1; p])]) let r_printer std_pr p = let (_,ast1,astp,_) = get_r_sign dummy_loc in diff --git a/theories/Reals/Rsyntax.v b/theories/Reals/Rsyntax.v index 04f5bd911b..5f8b0d7a38 100644 --- a/theories/Reals/Rsyntax.v +++ b/theories/Reals/Rsyntax.v @@ -163,9 +163,6 @@ Syntax constr Rmult_inside [<<(REXPR <<(Rmult $n1 $n2)>>)>>] -> [ (REXPR $n1):E "*" [0 0] (REXPR $n2):L ] -(* |Rdiv_inside - [<<(REXPR <<(Rdiv $n1 $n2)>>)>>] - -> [ (REXPR $n1):E "/" [0 0] (REXPR $n2):L ]*) ; level 5: @@ -179,7 +176,7 @@ Syntax constr level 0: Rzero_inside [<<(REXPR <>)>>] -> ["0"] | Rone_inside [<<(REXPR <>)>>] -> ["1"] - | Rconst_inside [<<(REXPR <<(Rplus $r R1)>>)>>] -> [$r:"r_printer"]. + | Rconst_inside [<<(REXPR <<(Rplus R1 $r)>>)>>] -> [$r:"r_printer"]. -- cgit v1.2.3