]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql/mQueryTLexer.mll
Fun implemented.
[helm.git] / helm / ocaml / mathql / mQueryTLexer.mll
index 5f9b2ebac254b9d7dee42ae15674e2fbc3c861ad..a0884e79dd21a7a6ec2f23da7380875a6639d4d6 100644 (file)
@@ -43,12 +43,16 @@ let NUM   = ['0'-'9']
 let IDEN  = ALPHA (NUM | ALPHA)*
 let QSTR  = [^ '"' '\\']+
 
-rule string_token = parse
+rule comm_token = parse
+   | "*)"        { query_token lexbuf }
+   | [^ '*']*    { comm_token lexbuf }
+and string_token = parse
    | '"'         { DQ  }
    | '\\' _      { STR (String.sub (Lexing.lexeme lexbuf) 1 1) }
    | QSTR        { STR (Lexing.lexeme lexbuf) }
    | eof         { EOF }
 and query_token = parse
+   | "(*"        { comm_token lexbuf }
    | SPC         { query_token lexbuf }
    | '"'         { STR (qstr string_token lexbuf) }
    | '('         { LP }
@@ -60,6 +64,7 @@ and query_token = parse
    | '$'         { DL }
    | '.'         { FS }
    | ','         { CM }
+   | '/'         { SL }
    | "and"       { AND    }
    | "attr"      { ATTR   }
    | "attribute" { ATTRIB }