# 25 "odot_lexer.mll"
open Odot_parser
let print_DEBUG s = ()
let line = ref 0
let buf = Buffer.create 256
let init_buf () = Buffer.reset buf
let keywords = [
"digraph", DIGRAPH ;
"graph", GRAPH ;
"strict", STRICT ;
"node", NODE ;
"edge", EDGE ;
"subgraph", SUBGRAPH ;
]
let open_angles = ref 0
# 27 "odot_lexer.ml"
let __ocaml_lex_tables = {
Lexing.lex_base =
"\000\000\233\255\234\255\055\000\236\255\237\255\020\000\030\000\209\000\240\255\242\255\243\255\244\255\245\255\246\255\247\255\248\255\249\255\250\255\052\000\057\000\053\000\048\000\241\255\079\000\255\255\089\000\254\255\253\255\144\000\251\255\252\255\154\000\168\000\235\255\108\001\250\255\251\255\252\255\100\000\254\255\202\000\253\255\255\255\240\000\250\255\251\255\101\000\102\000\253\255\254\255\255\255\252\255\003\001\251\255\252\255\103\000\105\000\254\255\069\000\255\255\253\255";
Lexing.lex_backtrk =
"\255\255\255\255\255\255\020\000\255\255\255\255\017\000\022\000\016\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\022\000\022\000\020\000\022\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\017\000\017\000\255\255\255\255\255\255\255\255\255\255\001\000\255\255\005\000\255\255\255\255\255\255\255\255\255\255\005\000\002\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\004\000\001\000\255\255\004\000\255\255\255\255";
Lexing.lex_default =
"\008\000\000\000\000\000\255\255\000\000\000\000\255\255\255\255\255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\255\255\255\255\255\255\255\000\000\024\000\000\000\026\000\000\000\000\000\255\255\000\000\000\000\255\255\255\255\000\000\036\000\000\000\000\000\000\000\255\255\000\000\255\255\000\000\000\000\045\000\000\000\000\000\255\255\255\255\000\000\000\000\000\000\000\000\054\000\000\000\000\000\255\255\255\255\000\000\255\255\000\000\000\000";
Lexing.lex_trans =
"\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\004\000\021\000\001\000\004\000\003\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\004\000\001\000\009\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\010\000\016\000\019\000\007\000\022\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\017\000\018\000\005\000\015\000\001\000\001\000\001\000\034\000\033\000\028\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\026\000\025\000\023\000\012\000\020\000\011\000\001\000\024\000\001\000\031\000\029\000\027\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\040\000\052\000\049\000\061\000\030\000\058\000\060\000\000\000\000\000\000\000\000\000\000\000\000\000\014\000\001\000\013\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\042\000\000\000\000\000\001\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\043\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\049\000\000\000\000\000\048\000\000\000\000\000\002\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\000\000\000\000\058\000\000\000\000\000\057\000\000\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\050\000\059\000\051\000\000\000\008\000\000\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\047\000\000\000\000\000\255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\255\000\000\000\000\000\000\000\000\000\000\056\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\039\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\038\000\000\000\000\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\000\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\041\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\046\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\055\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\037\000";
Lexing.lex_check =
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\000\006\000\020\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\021\000\024\000\022\000\000\000\000\000\000\000\000\000\022\000\000\000\019\000\019\000\026\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\039\000\047\000\048\000\056\000\019\000\057\000\059\000\255\255\255\255\255\255\255\255\255\255\255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\041\000\255\255\255\255\000\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\041\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\255\255\255\255\044\000\255\255\255\255\044\000\255\255\255\255\000\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\255\255\255\255\053\000\255\255\255\255\053\000\255\255\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\044\000\053\000\044\000\255\255\008\000\255\255\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\044\000\255\255\255\255\024\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\026\000\255\255\255\255\255\255\255\255\255\255\053\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\035\000\255\255\255\255\035\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\035\000\255\255\255\255\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\255\255\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\035\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\008\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\044\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\053\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\035\000";
Lexing.lex_base_code =
"";
Lexing.lex_backtrk_code =
"";
Lexing.lex_default_code =
"";
Lexing.lex_trans_code =
"";
Lexing.lex_check_code =
"";
Lexing.lex_code =
"";
}
let rec main lexbuf =
__ocaml_lex_main_rec lexbuf 0
and __ocaml_lex_main_rec lexbuf __ocaml_lex_state =
match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with
| 0 ->
# 65 "odot_lexer.mll"
( incr line; main lexbuf )
# 235 "odot_lexer.ml"
| 1 ->
# 66 "odot_lexer.mll"
( incr line; incr line; main lexbuf )
# 240 "odot_lexer.ml"
| 2 ->
# 67 "odot_lexer.mll"
( incr line; main lexbuf )
# 245 "odot_lexer.ml"
| 3 ->
# 68 "odot_lexer.mll"
( EDGEOP )
# 250 "odot_lexer.ml"
| 4 ->
# 69 "odot_lexer.mll"
( EDGEOP )
# 255 "odot_lexer.ml"
| 5 ->
# 70 "odot_lexer.mll"
( SEMICOLON )
# 260 "odot_lexer.ml"
| 6 ->
# 71 "odot_lexer.mll"
( COLON )
# 265 "odot_lexer.ml"
| 7 ->
# 72 "odot_lexer.mll"
( COMMA )
# 270 "odot_lexer.ml"
| 8 ->
# 73 "odot_lexer.mll"
( EQUALS )
# 275 "odot_lexer.ml"
| 9 ->
# 74 "odot_lexer.mll"
( LBRA )
# 280 "odot_lexer.ml"
| 10 ->
# 75 "odot_lexer.mll"
( RBRA )
# 285 "odot_lexer.ml"
| 11 ->
# 76 "odot_lexer.mll"
( LSBRA )
# 290 "odot_lexer.ml"
| 12 ->
# 77 "odot_lexer.mll"
( RSBRA )
# 295 "odot_lexer.ml"
| 13 ->
# 78 "odot_lexer.mll"
( PLUS )
# 300 "odot_lexer.ml"
| 14 ->
# 79 "odot_lexer.mll"
( comment lexbuf )
# 305 "odot_lexer.ml"
| 15 ->
# 80 "odot_lexer.mll"
( print_DEBUG "entering double quoted string";
init_buf () ;
double_quoted lexbuf
)
# 313 "odot_lexer.ml"
| 16 ->
# 85 "odot_lexer.mll"
(
let id = Lexing.lexeme lexbuf in
try
List.assoc (String.lowercase id) keywords
with
Not_found ->
print_DEBUG ("ID "^id);
Id id
)
# 326 "odot_lexer.ml"
| 17 ->
# 95 "odot_lexer.mll"
(
let id = Lexing.lexeme lexbuf in
print_DEBUG ("ID "^id);
Id id
)
# 335 "odot_lexer.ml"
| 18 ->
# 102 "odot_lexer.mll"
(
init_buf () ;
open_angles := 1 ;
html_id lexbuf
)
# 344 "odot_lexer.ml"
| 19 ->
# 107 "odot_lexer.mll"
( main lexbuf )
# 349 "odot_lexer.ml"
| 20 ->
# 108 "odot_lexer.mll"
( incr line ; main lexbuf)
# 354 "odot_lexer.ml"
| 21 ->
# 109 "odot_lexer.mll"
( print_DEBUG "EOF"; EOF )
# 359 "odot_lexer.ml"
| 22 ->
# 111 "odot_lexer.mll"
(print_DEBUG (Lexing.lexeme lexbuf);
main lexbuf
)
# 366 "odot_lexer.ml"
| __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_main_rec lexbuf __ocaml_lex_state
and double_quoted lexbuf =
__ocaml_lex_double_quoted_rec lexbuf 35
and __ocaml_lex_double_quoted_rec lexbuf __ocaml_lex_state =
match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with
| 0 ->
# 116 "odot_lexer.mll"
( Buffer.add_string buf "\""; double_quoted lexbuf
)
# 378 "odot_lexer.ml"
| 1 ->
# 118 "odot_lexer.mll"
( incr line ;
Buffer.add_string buf (Lexing.lexeme lexbuf);
double_quoted lexbuf
)
# 386 "odot_lexer.ml"
| 2 ->
# 122 "odot_lexer.mll"
( incr line; double_quoted lexbuf )
# 391 "odot_lexer.ml"
| 3 ->
# 123 "odot_lexer.mll"
( print_DEBUG "getting out of double quoted string";
Id_double_quoted (Buffer.contents buf)
)
# 398 "odot_lexer.ml"
| 4 ->
# 126 "odot_lexer.mll"
( failwith ("End of file in double quoted string, line "^(string_of_int !line)) )
# 403 "odot_lexer.ml"
| 5 ->
# 127 "odot_lexer.mll"
( Buffer.add_string buf (Lexing.lexeme lexbuf);
double_quoted lexbuf
)
# 410 "odot_lexer.ml"
| __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_double_quoted_rec lexbuf __ocaml_lex_state
and html_id lexbuf =
__ocaml_lex_html_id_rec lexbuf 44
and __ocaml_lex_html_id_rec lexbuf __ocaml_lex_state =
match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with
| 0 ->
# 132 "odot_lexer.mll"
( decr open_angles;
if !open_angles <= 0 then
Id_html (Buffer.contents buf)
else
(
Buffer.add_string buf ">";
html_id lexbuf
)
)
# 429 "odot_lexer.ml"
| 1 ->
# 141 "odot_lexer.mll"
( incr open_angles ;
Buffer.add_char buf '<';
html_id lexbuf
)
# 437 "odot_lexer.ml"
| 2 ->
# 146 "odot_lexer.mll"
( incr line ;
Buffer.add_string buf (Lexing.lexeme lexbuf);
html_id lexbuf
)
# 445 "odot_lexer.ml"
| 3 ->
# 150 "odot_lexer.mll"
( incr line; html_id lexbuf )
# 450 "odot_lexer.ml"
| 4 ->
# 151 "odot_lexer.mll"
( failwith ("End of file in html id, line "^(string_of_int !line)) )
# 455 "odot_lexer.ml"
| 5 ->
# 152 "odot_lexer.mll"
( Buffer.add_string buf (Lexing.lexeme lexbuf);
html_id lexbuf
)
# 462 "odot_lexer.ml"
| __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_html_id_rec lexbuf __ocaml_lex_state
and comment lexbuf =
__ocaml_lex_comment_rec lexbuf 53
and __ocaml_lex_comment_rec lexbuf __ocaml_lex_state =
match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with
| 0 ->
# 157 "odot_lexer.mll"
( main lexbuf )
# 473 "odot_lexer.ml"
| 1 ->
# 158 "odot_lexer.mll"
( incr line ; comment lexbuf)
# 478 "odot_lexer.ml"
| 2 ->
# 159 "odot_lexer.mll"
( incr line; comment lexbuf )
# 483 "odot_lexer.ml"
| 3 ->
# 160 "odot_lexer.mll"
( failwith "Comment not terminated" )
# 488 "odot_lexer.ml"
| 4 ->
# 161 "odot_lexer.mll"
( comment lexbuf )
# 493 "odot_lexer.ml"
| __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_comment_rec lexbuf __ocaml_lex_state
;;