X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Fmathql%2FmQueryTLexer.mll;h=a0884e79dd21a7a6ec2f23da7380875a6639d4d6;hb=9a73e22935eb65da9e23ece23ad152d79629c661;hp=5f9b2ebac254b9d7dee42ae15674e2fbc3c861ad;hpb=32f737bea2029db1f4870ec8a3a39ba6d2e4a57d;p=helm.git diff --git a/helm/ocaml/mathql/mQueryTLexer.mll b/helm/ocaml/mathql/mQueryTLexer.mll index 5f9b2ebac..a0884e79d 100644 --- a/helm/ocaml/mathql/mQueryTLexer.mll +++ b/helm/ocaml/mathql/mQueryTLexer.mll @@ -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 }