]> matita.cs.unibo.it Git - helm.git/commitdiff
parentheses allowed inside comments
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 14 Jun 2005 16:01:05 +0000 (16:01 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 14 Jun 2005 16:01:05 +0000 (16:01 +0000)
helm/ocaml/cic_disambiguation/cicTextualLexer2.ml

index b28d3cae66de76a40b49725bdc829024dbcce848..a326acf7f5e5c246e9999487666bffe4a7478aa7 100644 (file)
@@ -40,7 +40,7 @@ let regexp symbol_char =
   ]
 let regexp dust = "%%" [^ '\n']* '\n'
 
-let regexp comment_char = [^ ")" ]
+let regexp comment_char = [^'*'] | '*'[^')']
 let regexp note = "(*" comment_char* "*)"
 
 let regexp commentbegin = "(**"
@@ -144,7 +144,7 @@ let rec token comments = lexer
   | note -> 
       (*if comments then*)
         let comment =
-          Ulexing.utf8_sub_lexeme lexbuf 2 (Ulexing.lexeme_length lexbuf - 2)
+          Ulexing.utf8_sub_lexeme lexbuf 2 (Ulexing.lexeme_length lexbuf - 4)
         in
         return lexbuf ("NOTE", comment)
       (*else