]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/cicNotationLexer.ml
various updates, removed proofs for now because they are the real bottleneck!!
[helm.git] / helm / ocaml / cic_notation / cicNotationLexer.ml
index dfbedef733661e0ab2dc2aa4cdad6315004810e2..3c262ceec1854c27a502b9c56f1d8853a04bd430 100644 (file)
@@ -35,11 +35,16 @@ let regexp ident = xml_letter ident_cont* ident_decoration*
 
 let regexp tex_token = '\\' ident
 
+let regexp delim_begin = "\\["
+let regexp delim_end = "\\]"
+
 let regexp keyword = '"' ident '"'
 
 let regexp implicit = '?'
 let regexp meta = implicit number
 
+let regexp csymbol = '\'' ident
+
 let regexp uri =
   ("cic:/" | "theory:/")              (* schema *)
   ident ('/' ident)*                  (* path *)
@@ -106,9 +111,12 @@ let rec token = lexer
   | ident -> return lexbuf ("IDENT", Ulexing.utf8_lexeme lexbuf)
   | number -> return lexbuf ("NUMBER", Ulexing.utf8_lexeme lexbuf)
   | keyword -> return lexbuf (keyword lexbuf)
+  | delim_begin -> return lexbuf ("DELIM", Ulexing.utf8_lexeme lexbuf)
+  | delim_end -> return lexbuf ("DELIM",  Ulexing.utf8_lexeme lexbuf)
   | tex_token -> return lexbuf (expand_macro lexbuf)
   | uri -> return lexbuf ("URI", Ulexing.utf8_lexeme lexbuf)
   | eof -> return lexbuf ("EOI", "")
+  | csymbol -> return lexbuf ("CSYMBOL", Ulexing.utf8_lexeme lexbuf)
   | _ -> return lexbuf ("SYMBOL", Ulexing.utf8_lexeme lexbuf)
 
 (* API implementation *)