]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/tex_cic_textual_parser/texCicTextualParser.mly
added \neqt macro
[helm.git] / helm / ocaml / tex_cic_textual_parser / texCicTextualParser.mly
index 709e23f18a65dd6207426d56068065c03701accf..500565823d20a328166fd06dda7e2222d4860777 100644 (file)
 %token LETIN FIX COFIX SEMICOLON LCURLY RCURLY CASE ARROW LBRACKET RBRACKET EOF
 %token DOLLAR
 %token RPLUS RMINUS RTIMES RDIV
-%token PLUS MINUS TIMES EQT EQ
+%token PLUS MINUS TIMES EQT EQ NEQT
 %right ARROW
-%nonassoc EQ EQT
+%nonassoc EQ EQT NEQT
 %left PLUS MINUS RPLUS RMINUS
 %left TIMES RTIMES RDIV
 %start main
@@ -323,6 +323,22 @@ expr2:
           (mk_expr2 interp)
          ]
    }
+ | expr2 NEQT expr2
+   { let dom1,mk_expr1 = $1 in
+     let dom2,mk_expr2 = $3 in
+     let dom3,mk_expr3 = mk_implicit () in
+      let dom = union dom1 (union dom2 dom3) in
+       dom, function interp ->
+        Cic.Appl [
+         Cic.Const (UriManager.uri_of_string "cic:/Coq/Init/Logic/not.con",[]);
+         Cic.Appl
+          [Cic.MutInd
+            (UriManager.uri_of_string "cic:/Coq/Init/Logic_Type/eqT.ind",0,[]) ;
+           (mk_expr3 interp) ;
+           (mk_expr1 interp) ;
+           (mk_expr2 interp)
+          ]]
+   }
  | expr2 EQ expr2
    { let dom1,mk_expr1 = $1 in
      let dom2,mk_expr2 = $3 in