2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department, University of Bologna, Italy.
6 ||T|| HELM is free software; you can redistribute it and/or
7 ||A|| modify it under the terms of the GNU General Public License
8 \ / version 2 or (at your option) any later version.
9 \ / This software is distributed as is, NO WARRANTY.
10 V_______________________________________________________________ *)
15 let out s = if !O.debug_lexer then prerr_endline s
20 let UNI = ['\x80'-'\xBF']+
21 let SPC = ['\r' '\n' '\t' ' ']+
25 | OL { out "COM"; block lexbuf; token lexbuf }
26 | QT { out "STR"; O.count := !O.count + str lexbuf; token lexbuf }
27 | SPC { out "SPC"; incr O.count; token lexbuf }
28 | UNI { out "UNI"; token lexbuf }
29 | _ { out "CHR"; incr O.count; token lexbuf }
33 | "\\\"" { succ (str lexbuf) }
35 | _ { succ (str lexbuf) }
38 | OL { block lexbuf; block lexbuf }
39 | QT { let _ = str lexbuf in block lexbuf }