From: Stefano Zacchiroli Date: Sat, 24 Jan 2004 12:31:30 +0000 (+0000) Subject: collapsed parens in a singol token X-Git-Tag: V_0_2_3~151 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=14cf23213ea79b1157c224b2af2a256cff06e241;p=helm.git collapsed parens in a singol token --- diff --git a/helm/ocaml/cic_disambiguation/cicTextualLexer2.ml b/helm/ocaml/cic_disambiguation/cicTextualLexer2.ml index 5363d2180..21f020520 100644 --- a/helm/ocaml/cic_disambiguation/cicTextualLexer2.ml +++ b/helm/ocaml/cic_disambiguation/cicTextualLexer2.ml @@ -39,8 +39,7 @@ let regexp ident_cont = alpha | num | '_' let regexp ident_cont' = ident_cont | tex_token let regexp ident = (alpha ident_cont*) | ('_' ident_cont+) let regexp ident' = ((alpha | tex_token) ident_cont'*) | ('_' ident_cont'+) -let regexp lparen = [ '(' '[' '{' ] -let regexp rparen = [ ')' ']' '}' ] +let regexp paren = [ '(' '[' '{' ')' ']' '}' ] let regexp meta = '?' num (* let regexp catchall = .* *) @@ -93,8 +92,7 @@ let rec token = lexer return lexbuf (Hashtbl.find keywords lexeme) with Not_found -> return lexbuf ("IDENT", lexeme)) | num -> return lexbuf ("NUM", Ulexing.utf8_lexeme lexbuf) - | lparen -> return lexbuf ("LPAREN", Ulexing.utf8_lexeme lexbuf) - | rparen -> return lexbuf ("RPAREN", Ulexing.utf8_lexeme lexbuf) + | paren -> return lexbuf ("PAREN", Ulexing.utf8_lexeme lexbuf) | meta -> return lexbuf ("META", Ulexing.utf8_lexeme lexbuf) | symbol -> return lexbuf ("SYMBOL", Ulexing.utf8_lexeme lexbuf) | tex_token ->