X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_textual_parser%2FcicTextualLexer.mll;h=1be084795a11505eb80764da93da88e1ad79d5b6;hb=89262281b6e83bd2321150f81f1a0583645eb0c8;hp=3e256b2cf7aab75b055b2c0f012589b8d6ae91e9;hpb=6102d4a9cec5ed97e292d06679826c5ebc0b92bb;p=helm.git diff --git a/helm/ocaml/cic_textual_parser/cicTextualLexer.mll b/helm/ocaml/cic_textual_parser/cicTextualLexer.mll index 3e256b2cf..1be084795 100644 --- a/helm/ocaml/cic_textual_parser/cicTextualLexer.mll +++ b/helm/ocaml/cic_textual_parser/cicTextualLexer.mll @@ -49,7 +49,7 @@ ;; } let num = ['1'-'9']['0'-'9']* | '0' -let alfa = ['A'-'Z' 'a'-'z' '_'] +let alfa = ['A'-'Z' 'a'-'z' '_' ''' '-'] let ident = alfa (alfa | num)* let baseuri = '/'(ident '/')* ident '.' let conuri = baseuri ("con" | "var") @@ -71,12 +71,17 @@ rule token = | indtyuri { INDTYURI (indtyuri_of_uri ("cic:" ^ L.lexeme lexbuf)) } | indconuri { INDCONURI (indconuri_of_uri("cic:" ^ L.lexeme lexbuf)) } | num { NUM (int_of_string (L.lexeme lexbuf)) } - | '?' num { META (int_of_string (L.lexeme lexbuf)) } + | '?' num { let lexeme = L.lexeme lexbuf in + META + (int_of_string + (String.sub lexeme 1 (String.length lexeme - 1))) } | ":>" { CAST } | ":=" { LETIN } | '?' { IMPLICIT } | '(' { LPAREN } | ')' { RPAREN } + | '[' { LBRACKET } + | ']' { RBRACKET } | '{' { LCURLY } | '}' { RCURLY } | ';' { SEMICOLON } @@ -85,5 +90,6 @@ rule token = | ':' { COLON } | '.' { DOT } | "->" { ARROW } + | "_" { NONE } | eof { EOF } {}