From 14cf23213ea79b1157c224b2af2a256cff06e241 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Sat, 24 Jan 2004 12:31:30 +0000 Subject: [PATCH] collapsed parens in a singol token --- helm/ocaml/cic_disambiguation/cicTextualLexer2.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -> -- 2.39.2