1 exception LexerException
of string
2 let lexer_token_safe lexbuf
=
4 with Failure s
-> raise
(LexerException s
)
8 let line = input_line stdin
in
10 let tree = Parser.tex_expr
lexer_token_safe (Lexing.from_string
line) in
11 (match Html.render
tree with
12 Some _
-> print_string
"$^\n"
13 | None
-> print_string
"$_\n";
16 Texutil.Illegal_tex_function s
-> print_string
("$T" ^ s ^
" " ^
line ^
"\n")
17 | LexerException s
-> print_string
("$L" ^
line ^
"\n")
18 | _
-> print_string
("$ " ^
line ^
"\n"));