]> matita.cs.unibo.it Git - helm.git/commitdiff
- split logic operators away from aritmetic ones so that
authorStefano Zacchiroli <zack@upsilon.cc>
Wed, 28 Apr 2004 14:11:51 +0000 (14:11 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Wed, 28 Apr 2004 14:11:51 +0000 (14:11 +0000)
   \forall n:nat. n > 0 \or n = 0
  is parsed "correctly"

helm/ocaml/cic_disambiguation/cicTextualParser2.ml
helm/ocaml/cic_disambiguation/logic_notation.ml

index 76f62b4171947473da8d3ab844f3049da5e730ec..8bb732a58960cd4175d9d1e39bf397bb433a31e8 100644 (file)
@@ -176,6 +176,9 @@ EXTEND
             return_term loc
               (CicAst.Binder (`Pi, (Cic.Anonymous, Some t1), t2))
       ]
+    | "logic_add" LEFTA   [ (* nothing here by default *) ]
+    | "logic_mult" LEFTA  [ (* nothing here by default *) ]
+    | "logic_inv" NONA    [ (* nothing here by default *) ]
     | "relop" LEFTA
       [ t1 = term; SYMBOL "="; t2 = term ->
         return_term loc (CicAst.Appl [CicAst.Symbol ("eq", 0); t1; t2])
index 073e2cdf34d1dad8b99eabd82adfc2f577945102..2227b2741e14c6dd6fadac9a75ba4401ba8dc3d2 100644 (file)
 open CicTextualParser2
 
 EXTEND
-  term: LEVEL "add"
+  term: LEVEL "logic_add"
     [
       [ t1 = term; SYMBOL <:unicode<lor>> (* ∨ *); t2 = term ->
           return_term loc (CicAst.Appl [CicAst.Symbol ("or", 0); t1; t2])
       ]
     ];
-  term: LEVEL "mult"
+  term: LEVEL "logic_mult"
     [
       [ t1 = term; SYMBOL <:unicode<land>> (* ∧ *); t2 = term ->
         return_term loc (CicAst.Appl [CicAst.Symbol ("and", 0); t1; t2])
       ]
     ];
-  term: LEVEL "inv"
+  term: LEVEL "logic_inv"
     [
       [ SYMBOL <:unicode<lnot>> (* ¬ *); t = term ->
         return_term loc (CicAst.Appl [CicAst.Symbol ("not", 0); t])