# 19 "doclexer.mll" open Printf open Lexing open Output open Web open Pretty (*s Global variables and functions used by the lexer. *) (* [skip_header] tells whether option \verb|--header| has been selected by the user. *) let skip_header = ref true (* for displaying error message if any, [current_file] records the name of the file currently read, and [comment_or_string_start] records the starting position of the comment or the string currently being read. *) let current_file = ref "" let comment_or_string_start = ref 0 (* [brace_depth] records the current depth of imbrication of braces \verb|{..}|, to know in lex files whether we are in an action or not. [lexyacc_brace_start] records the position of the starting brace of the current action, to display an error message if this brace is unclosed. *) let in_lexyacc_action = ref false let doublepercentcounter = ref 0 let brace_depth = ref 0 let lexyacc_brace_start = ref 0 (* [web_style] records if web sections were used anywhere in any file. *) let web_style = ref false (* global variables for temporarily recording data, for building the [Web.file] structure. *) let parbuf = Buffer.create 8192 let ignoring = ref false let push_char c = if not !ignoring then Buffer.add_char parbuf c let push_first_char lexbuf = if not !ignoring then Buffer.add_char parbuf (lexeme_char lexbuf 0) let push_string s = if not !ignoring then Buffer.add_string parbuf s let subparlist = ref ([] : sub_paragraph list) let push_caml_subpar () = if Buffer.length parbuf > 0 then begin subparlist := (CamlCode (Buffer.contents parbuf)) :: !subparlist; Buffer.clear parbuf end let push_lex_subpar () = if Buffer.length parbuf > 0 then begin subparlist := (LexCode (Buffer.contents parbuf)) :: !subparlist; Buffer.clear parbuf end let push_yacc_subpar () = if Buffer.length parbuf > 0 then begin subparlist := (YaccCode (Buffer.contents parbuf)) :: !subparlist; Buffer.clear parbuf end let parlist = ref ([] : paragraph list) let code_beg = ref 0 let push_code () = assert (List.length !subparlist = 0); if Buffer.length parbuf > 0 then begin parlist := (Code (!code_beg, Buffer.contents parbuf)) :: !parlist; Buffer.clear parbuf end let push_lexyacccode () = assert (Buffer.length parbuf = 0) ; if List.length !subparlist > 0 then begin parlist := (LexYaccCode (!code_beg, List.rev !subparlist)) :: !parlist; subparlist := [] end let big_section = ref false let initial_spaces = ref 0 let push_doc () = if Buffer.length parbuf > 0 then begin let doc = Documentation (!big_section, !initial_spaces, Buffer.contents parbuf) in parlist := doc :: !parlist; big_section := false; Buffer.clear parbuf end let seclist = ref ([] : raw_section list) let section_beg = ref 0 let push_section () = if !parlist <> [] then begin let s = { sec_contents = List.rev !parlist; sec_beg = !section_beg } in seclist := s :: !seclist; parlist := [] end let reset_lexer f = current_file := f; comment_or_string_start := 0; section_beg := 0; code_beg := 0; parlist := []; seclist := []; in_lexyacc_action := false; doublepercentcounter := 0 let backtrack lexbuf = (*i eprintf "backtrack to %d\n" (lexbuf.lex_abs_pos + lexbuf.lex_start_pos); i*) lexbuf.lex_curr_pos <- lexbuf.lex_start_pos # 131 "doclexer.ml" let __ocaml_lex_tables = { Lexing.lex_base = "\000\000\251\255\252\255\002\000\254\255\000\000\255\255\001\000\ \253\255\003\000\003\000\007\000\005\000\004\000\005\000\001\000\ \007\000\002\000\018\000\250\255\009\000\000\000\047\000\011\000\ \020\000\054\000\003\000\004\000\056\000\013\000\061\000\026\000\ \031\000\071\000\081\000\249\255\033\000\034\000\095\000\040\000\ \036\000\102\000\047\000\056\000\109\000\120\000\043\000\127\000\ \134\000\058\000\050\000\053\000\140\000\060\000\145\000\147\000\ \075\000\065\000\067\000\128\000\084\000\001\000\073\000\078\000\ \082\000\003\000\132\000\087\000\142\000\156\000\192\000\109\000\ \004\000\084\000\090\000\006\000\228\000\106\000\238\000\048\001\ \053\001\245\255\122\000\026\000\248\255\121\000\105\000\206\000\ \208\000\234\000\240\000\070\000\247\255\093\001\126\000\246\255\ \103\001\113\001\059\001\114\000\039\001\097\001\104\001\106\001\ \162\001\115\000\185\000\164\001\170\001\180\001\188\001\195\001\ \181\000\136\000\141\000\201\001\206\001\185\000\213\001\215\001\ \123\000\134\000\209\001\190\000\219\001\229\001\034\002\244\255\ \034\001\194\000\178\000\227\000\023\002\028\002\199\000\048\002\ \069\002\146\000\163\000\035\002\215\000\054\002\069\002\251\000\ \203\000\121\002\126\002\095\001\228\000\228\000\172\000\000\001\ \228\000\195\000\255\000\004\001\206\000\004\001\004\001\042\001\ \062\002"; Lexing.lex_backtrk = "\255\255\255\255\255\255\002\000\255\255\003\000\255\255\255\255\ \255\255\003\000\003\000\255\255\002\000\003\000\255\255\003\000\ \003\000\255\255\255\255\255\255\004\000\004\000\004\000\003\000\ \255\255\255\255\255\255\255\255\255\255\002\000\002\000\003\000\ \255\255\255\255\255\255\255\255\005\000\005\000\005\000\002\000\ \255\255\255\255\004\000\255\255\255\255\255\255\004\000\001\000\ \000\000\255\255\255\255\255\255\255\255\004\000\001\000\000\000\ \255\255\255\255\255\255\255\255\005\000\005\000\005\000\005\000\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\004\000\ \004\000\004\000\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\010\000\010\000\255\255\010\000\010\000\010\000\ \010\000\255\255\255\255\003\000\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\004\000\004\000\004\000\255\255\255\255\ \255\255\006\000\006\000\006\000\006\000\255\255\255\255\255\255\ \008\000\008\000\008\000\008\000\008\000\255\255\255\255\255\255\ \255\255\003\000\255\255\255\255\255\255\255\255\255\255\255\255\ \011\000\011\000\011\000\011\000\011\000\011\000\255\255\255\255\ \255\255\255\255\004\000\255\255\255\255\255\255\255\255\255\255\ \002\000\000\000\000\000\255\255\003\000\003\000\000\000\255\255\ \002\000\255\255\002\000\255\255\255\255\002\000\255\255\255\255\ \003\000"; Lexing.lex_default = "\002\000\000\000\000\000\255\255\000\000\255\255\000\000\002\000\ \000\000\255\255\255\255\002\000\255\255\255\255\002\000\255\255\ \255\255\006\000\001\000\000\000\255\255\255\255\001\000\255\255\ \255\255\255\255\006\000\006\000\008\000\255\255\008\000\255\255\ \255\255\255\255\019\000\000\000\255\255\255\255\019\000\255\255\ \255\255\255\255\255\255\255\255\255\255\001\000\050\000\255\255\ \255\255\051\000\050\000\051\000\001\000\057\000\255\255\255\255\ \058\000\057\000\058\000\019\000\067\000\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\001\000\077\000\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \081\000\000\000\094\000\255\255\000\000\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\000\000\255\255\255\255\000\000\ \255\255\255\255\001\000\255\255\255\255\255\255\255\255\255\255\ \035\000\255\255\255\255\255\255\255\255\255\255\255\255\092\000\ \123\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\127\000\000\000\ \140\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\008\000\ \255\255\008\000\255\255\002\000\255\255\255\255\255\255\008\000\ \255\255\008\000\255\255\255\255\008\000\255\255\255\255\002\000\ \255\255"; Lexing.lex_trans = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\003\000\004\000\003\000\000\000\003\000\012\000\003\000\ \012\000\004\000\012\000\000\000\012\000\000\000\000\000\000\000\ \000\000\000\000\000\000\022\000\006\000\000\000\000\000\022\000\ \003\000\064\000\003\000\008\000\074\000\012\000\004\000\012\000\ \005\000\010\000\006\000\009\000\004\000\006\000\006\000\015\000\ \004\000\006\000\022\000\023\000\016\000\024\000\013\000\031\000\ \022\000\006\000\020\000\004\000\022\000\025\000\024\000\025\000\ \008\000\030\000\006\000\025\000\032\000\030\000\030\000\006\000\ \033\000\032\000\030\000\042\000\039\000\021\000\040\000\022\000\ \033\000\004\000\040\000\041\000\033\000\049\000\025\000\020\000\ \030\000\043\000\038\000\006\000\049\000\030\000\038\000\049\000\ \029\000\044\000\043\000\008\000\049\000\029\000\056\000\033\000\ \038\000\006\000\021\000\056\000\038\000\056\000\001\000\041\000\ \004\000\038\000\004\000\041\000\008\000\056\000\044\000\002\000\ \006\000\036\000\044\000\255\255\065\000\008\000\001\000\038\000\ \037\000\048\000\048\000\006\000\075\000\048\000\041\000\036\000\ \047\000\047\000\061\000\019\000\047\000\044\000\037\000\048\000\ \048\000\002\000\019\000\048\000\255\255\055\000\055\000\092\000\ \048\000\055\000\054\000\054\000\055\000\055\000\054\000\047\000\ \055\000\255\255\002\000\091\000\004\000\095\000\048\000\060\000\ \063\000\002\000\062\000\067\000\055\000\004\000\008\000\001\000\ \066\000\054\000\121\000\055\000\068\000\068\000\068\000\068\000\ \068\000\068\000\068\000\068\000\068\000\068\000\069\000\069\000\ \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ \004\000\076\000\072\000\047\000\067\000\067\000\067\000\067\000\ \067\000\067\000\067\000\067\000\067\000\067\000\093\000\089\000\ \006\000\090\000\089\000\089\000\255\255\090\000\004\000\054\000\ \067\000\002\000\008\000\120\000\001\000\084\000\067\000\071\000\ \046\000\002\000\073\000\047\000\138\000\008\000\089\000\001\000\ \090\000\137\000\067\000\089\000\006\000\002\000\067\000\089\000\ \067\000\090\000\089\000\019\000\053\000\090\000\081\000\054\000\ \001\000\008\000\004\000\004\000\004\000\008\000\001\000\001\000\ \004\000\006\000\089\000\077\000\019\000\004\000\150\000\006\000\ \090\000\122\000\019\000\006\000\078\000\078\000\078\000\078\000\ \078\000\078\000\078\000\078\000\078\000\078\000\079\000\079\000\ \079\000\079\000\079\000\079\000\079\000\079\000\079\000\079\000\ \144\000\155\000\152\000\255\255\154\000\006\000\158\000\255\255\ \102\000\006\000\255\255\006\000\102\000\255\255\019\000\157\000\ \001\000\004\000\255\255\000\000\255\255\255\255\088\000\087\000\ \077\000\255\255\088\000\255\255\101\000\100\000\077\000\102\000\ \101\000\255\255\000\000\255\255\006\000\000\000\000\000\000\000\ \000\000\035\000\077\000\000\000\255\255\088\000\077\000\019\000\ \077\000\000\000\083\000\101\000\082\000\085\000\084\000\255\255\ \077\000\077\000\077\000\077\000\077\000\077\000\077\000\077\000\ \077\000\077\000\103\000\102\000\000\000\255\255\103\000\000\000\ \086\000\102\000\006\000\103\000\102\000\102\000\099\000\103\000\ \019\000\000\000\255\255\000\000\000\000\000\000\139\000\000\000\ \035\000\103\000\000\000\000\000\094\000\000\000\160\000\149\000\ \102\000\148\000\103\000\000\000\019\000\096\000\096\000\096\000\ \096\000\096\000\096\000\096\000\096\000\096\000\096\000\097\000\ \097\000\097\000\097\000\097\000\097\000\097\000\097\000\097\000\ \097\000\094\000\094\000\094\000\094\000\094\000\094\000\094\000\ \094\000\094\000\094\000\108\000\107\000\109\000\006\000\108\000\ \035\000\109\000\084\000\110\000\109\000\255\255\000\000\110\000\ \002\000\094\000\000\000\000\000\000\000\109\000\006\000\094\000\ \019\000\109\000\108\000\004\000\109\000\110\000\109\000\106\000\ \000\000\110\000\110\000\094\000\116\000\115\000\004\000\094\000\ \116\000\094\000\118\000\006\000\109\000\000\000\118\000\119\000\ \118\000\000\000\000\000\119\000\110\000\105\000\118\000\006\000\ \119\000\118\000\118\000\116\000\119\000\019\000\000\000\000\000\ \000\000\118\000\112\000\113\000\000\000\000\000\119\000\000\000\ \000\000\000\000\000\000\000\000\000\000\118\000\117\000\119\000\ \123\000\000\000\000\000\002\000\000\000\000\000\114\000\117\000\ \004\000\124\000\124\000\124\000\124\000\124\000\124\000\124\000\ \124\000\124\000\124\000\125\000\125\000\125\000\125\000\125\000\ \125\000\125\000\125\000\125\000\125\000\123\000\123\000\123\000\ \123\000\123\000\123\000\123\000\123\000\123\000\123\000\001\000\ \135\000\006\000\255\255\000\000\135\000\136\000\135\000\000\000\ \000\000\136\000\008\000\133\000\132\000\123\000\000\000\133\000\ \000\000\000\000\000\000\123\000\000\000\008\000\000\000\135\000\ \000\000\135\000\006\000\008\000\136\000\135\000\035\000\123\000\ \000\000\000\000\133\000\123\000\035\000\123\000\000\000\131\000\ \000\000\128\000\140\000\134\000\000\000\000\000\136\000\135\000\ \135\000\129\000\136\000\141\000\141\000\141\000\141\000\141\000\ \141\000\141\000\141\000\141\000\141\000\130\000\095\000\008\000\ \004\000\000\000\000\000\000\000\000\000\136\000\142\000\142\000\ \142\000\142\000\142\000\142\000\142\000\142\000\142\000\142\000\ \000\000\000\000\000\000\000\000\134\000\140\000\140\000\140\000\ \140\000\140\000\140\000\140\000\140\000\140\000\140\000\140\000\ \000\000\000\000\146\000\006\000\000\000\140\000\146\000\146\000\ \006\000\000\000\000\000\146\000\000\000\000\000\000\000\000\000\ \000\000\140\000\000\000\000\000\000\000\140\000\000\000\140\000\ \000\000\146\000\004\000\000\000\000\000\092\000\146\000\000\000\ \004\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\ \004\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\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\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\004\000\000\000\000\000\000\000\000\000\000\000"; Lexing.lex_check = "\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\000\000\000\000\003\000\255\255\000\000\012\000\003\000\ \011\000\011\000\012\000\255\255\011\000\255\255\255\255\255\255\ \255\255\255\255\255\255\018\000\018\000\255\255\255\255\018\000\ \000\000\061\000\003\000\065\000\072\000\012\000\075\000\011\000\ \000\000\007\000\005\000\007\000\009\000\010\000\013\000\014\000\ \015\000\016\000\018\000\020\000\014\000\023\000\011\000\029\000\ \022\000\022\000\018\000\021\000\022\000\024\000\024\000\025\000\ \025\000\028\000\028\000\025\000\031\000\028\000\030\000\030\000\ \032\000\032\000\030\000\036\000\037\000\018\000\040\000\022\000\ \033\000\033\000\039\000\040\000\033\000\046\000\025\000\022\000\ \028\000\042\000\034\000\034\000\050\000\030\000\034\000\051\000\ \028\000\043\000\043\000\049\000\049\000\030\000\053\000\033\000\ \038\000\038\000\022\000\057\000\038\000\058\000\023\000\041\000\ \041\000\034\000\062\000\041\000\056\000\056\000\044\000\044\000\ \063\000\034\000\044\000\060\000\064\000\031\000\067\000\038\000\ \034\000\045\000\045\000\073\000\074\000\045\000\041\000\038\000\ \047\000\047\000\059\000\039\000\047\000\044\000\038\000\048\000\ \048\000\077\000\042\000\048\000\071\000\052\000\052\000\083\000\ \045\000\052\000\054\000\054\000\055\000\055\000\054\000\047\000\ \055\000\082\000\059\000\085\000\086\000\094\000\048\000\059\000\ \059\000\091\000\059\000\066\000\052\000\099\000\105\000\091\000\ \060\000\054\000\113\000\055\000\066\000\066\000\066\000\066\000\ \066\000\066\000\066\000\066\000\066\000\066\000\068\000\068\000\ \068\000\068\000\068\000\068\000\068\000\068\000\068\000\068\000\ \114\000\071\000\070\000\045\000\069\000\069\000\069\000\069\000\ \069\000\069\000\069\000\069\000\069\000\069\000\082\000\087\000\ \087\000\088\000\088\000\087\000\112\000\088\000\106\000\052\000\ \066\000\045\000\070\000\117\000\120\000\123\000\066\000\070\000\ \045\000\121\000\070\000\045\000\129\000\130\000\087\000\121\000\ \088\000\134\000\066\000\089\000\089\000\052\000\066\000\089\000\ \066\000\090\000\090\000\137\000\052\000\090\000\140\000\052\000\ \000\000\007\000\017\000\026\000\027\000\014\000\138\000\011\000\ \131\000\144\000\089\000\076\000\138\000\148\000\149\000\150\000\ \090\000\112\000\018\000\152\000\076\000\076\000\076\000\076\000\ \076\000\076\000\076\000\076\000\076\000\076\000\078\000\078\000\ \078\000\078\000\078\000\078\000\078\000\078\000\078\000\078\000\ \143\000\154\000\151\000\046\000\153\000\155\000\157\000\022\000\ \100\000\100\000\050\000\158\000\100\000\051\000\106\000\156\000\ \028\000\143\000\049\000\255\255\053\000\030\000\080\000\080\000\ \076\000\057\000\080\000\058\000\098\000\098\000\076\000\100\000\ \098\000\128\000\255\255\056\000\159\000\255\255\255\255\255\255\ \255\255\034\000\076\000\255\255\060\000\080\000\076\000\080\000\ \076\000\255\255\080\000\098\000\080\000\080\000\131\000\038\000\ \079\000\079\000\079\000\079\000\079\000\079\000\079\000\079\000\ \079\000\079\000\101\000\101\000\255\255\071\000\101\000\255\255\ \080\000\102\000\102\000\103\000\103\000\102\000\098\000\103\000\ \045\000\255\255\082\000\255\255\255\255\255\255\128\000\255\255\ \059\000\101\000\255\255\255\255\093\000\255\255\159\000\147\000\ \102\000\147\000\103\000\255\255\052\000\093\000\093\000\093\000\ \093\000\093\000\093\000\093\000\093\000\093\000\093\000\096\000\ \096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ \096\000\097\000\097\000\097\000\097\000\097\000\097\000\097\000\ \097\000\097\000\097\000\104\000\104\000\107\000\107\000\104\000\ \080\000\107\000\080\000\108\000\108\000\112\000\255\255\108\000\ \098\000\093\000\255\255\255\255\255\255\109\000\109\000\093\000\ \070\000\109\000\104\000\153\000\107\000\110\000\110\000\104\000\ \255\255\110\000\108\000\093\000\111\000\111\000\156\000\093\000\ \111\000\093\000\115\000\115\000\109\000\255\255\115\000\116\000\ \116\000\255\255\255\255\116\000\110\000\104\000\118\000\118\000\ \119\000\119\000\118\000\111\000\119\000\111\000\255\255\255\255\ \255\255\115\000\111\000\111\000\255\255\255\255\116\000\255\255\ \255\255\255\255\255\255\255\255\255\255\118\000\116\000\119\000\ \122\000\255\255\255\255\143\000\255\255\255\255\111\000\119\000\ \151\000\122\000\122\000\122\000\122\000\122\000\122\000\122\000\ \122\000\122\000\122\000\124\000\124\000\124\000\124\000\124\000\ \124\000\124\000\124\000\124\000\124\000\125\000\125\000\125\000\ \125\000\125\000\125\000\125\000\125\000\125\000\125\000\104\000\ \132\000\132\000\128\000\255\255\132\000\133\000\133\000\255\255\ \255\255\133\000\159\000\126\000\126\000\122\000\255\255\126\000\ \255\255\255\255\255\255\122\000\255\255\080\000\255\255\132\000\ \255\255\135\000\135\000\098\000\133\000\135\000\111\000\122\000\ \255\255\255\255\126\000\122\000\126\000\122\000\255\255\126\000\ \255\255\126\000\139\000\133\000\255\255\255\255\136\000\136\000\ \135\000\126\000\136\000\139\000\139\000\139\000\139\000\139\000\ \139\000\139\000\139\000\139\000\139\000\126\000\126\000\147\000\ \160\000\255\255\255\255\255\255\255\255\136\000\141\000\141\000\ \141\000\141\000\141\000\141\000\141\000\141\000\141\000\141\000\ \255\255\255\255\255\255\255\255\136\000\142\000\142\000\142\000\ \142\000\142\000\142\000\142\000\142\000\142\000\142\000\139\000\ \255\255\255\255\145\000\145\000\255\255\139\000\145\000\146\000\ \146\000\255\255\255\255\146\000\255\255\255\255\255\255\255\255\ \255\255\139\000\255\255\255\255\255\255\139\000\255\255\139\000\ \255\255\145\000\160\000\255\255\255\255\126\000\146\000\255\255\ \160\000\255\255\104\000\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\160\000\255\255\255\255\255\255\ \160\000\255\255\160\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\111\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\126\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\145\000\255\255\255\255\255\255\255\255\255\255"; 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 header lexbuf = __ocaml_lex_header_rec lexbuf 0 and __ocaml_lex_header_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 161 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; skip_comment lexbuf; skip_spaces_until_nl lexbuf; header lexbuf ) # 449 "doclexer.ml" | 1 -> # 166 "doclexer.mll" ( () ) # 454 "doclexer.ml" | 2 -> # 168 "doclexer.mll" ( header lexbuf ) # 459 "doclexer.ml" | 3 -> # 170 "doclexer.mll" ( backtrack lexbuf ) # 464 "doclexer.ml" | 4 -> # 172 "doclexer.mll" ( () ) # 469 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_header_rec lexbuf __ocaml_lex_state and skip_comment lexbuf = __ocaml_lex_skip_comment_rec lexbuf 7 and __ocaml_lex_skip_comment_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 177 "doclexer.mll" ( skip_comment lexbuf; skip_comment lexbuf ) # 480 "doclexer.ml" | 1 -> # 179 "doclexer.mll" ( () ) # 485 "doclexer.ml" | 2 -> # 181 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocaml comment\n"; exit 1 ) # 493 "doclexer.ml" | 3 -> # 186 "doclexer.mll" ( skip_comment lexbuf ) # 498 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_skip_comment_rec lexbuf __ocaml_lex_state and yacc_header lexbuf = __ocaml_lex_yacc_header_rec lexbuf 11 and __ocaml_lex_yacc_header_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 191 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; skip_yacc_comment lexbuf; skip_spaces_until_nl lexbuf; yacc_header lexbuf ) # 512 "doclexer.ml" | 1 -> # 196 "doclexer.mll" ( () ) # 517 "doclexer.ml" | 2 -> # 198 "doclexer.mll" ( yacc_header lexbuf ) # 522 "doclexer.ml" | 3 -> # 200 "doclexer.mll" ( backtrack lexbuf ) # 527 "doclexer.ml" | 4 -> # 202 "doclexer.mll" ( () ) # 532 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_header_rec lexbuf __ocaml_lex_state and skip_yacc_comment lexbuf = __ocaml_lex_skip_yacc_comment_rec lexbuf 14 and __ocaml_lex_skip_yacc_comment_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 206 "doclexer.mll" ( skip_yacc_comment lexbuf; skip_yacc_comment lexbuf ) # 543 "doclexer.ml" | 1 -> # 208 "doclexer.mll" ( () ) # 548 "doclexer.ml" | 2 -> # 210 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocamlyacc comment\n"; exit 1 ) # 556 "doclexer.ml" | 3 -> # 215 "doclexer.mll" ( skip_yacc_comment lexbuf ) # 561 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_skip_yacc_comment_rec lexbuf __ocaml_lex_state and caml_implementation lexbuf = __ocaml_lex_caml_implementation_rec lexbuf 17 and __ocaml_lex_caml_implementation_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 224 "doclexer.mll" ( backtrack lexbuf; paragraph lexbuf; caml_implementation lexbuf ) # 574 "doclexer.ml" | 1 -> # 228 "doclexer.mll" ( push_section () ) # 579 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_caml_implementation_rec lexbuf __ocaml_lex_state and paragraph lexbuf = __ocaml_lex_paragraph_rec lexbuf 18 and __ocaml_lex_paragraph_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 235 "doclexer.mll" ( paragraph lexbuf ) # 590 "doclexer.ml" | 1 -> # 237 "doclexer.mll" ( paragraph lexbuf ) # 595 "doclexer.ml" | 2 -> # 239 "doclexer.mll" ( paragraph lexbuf ) # 600 "doclexer.ml" | 3 -> # 241 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; let s = lexeme lexbuf in initial_spaces := count_spaces (String.sub s 0 (String.length s - 2)); start_of_documentation lexbuf; push_doc () ) # 609 "doclexer.ml" | 4 -> # 247 "doclexer.mll" ( code_beg := lexeme_start lexbuf; backtrack lexbuf; caml_subparagraph lexbuf; push_code() ) # 617 "doclexer.ml" | 5 -> # 252 "doclexer.mll" ( () ) # 622 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_paragraph_rec lexbuf __ocaml_lex_state and lex_description lexbuf = __ocaml_lex_lex_description_rec lexbuf 26 and __ocaml_lex_lex_description_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 260 "doclexer.mll" ( backtrack lexbuf; lex_paragraph lexbuf ; lex_description lexbuf ) # 635 "doclexer.ml" | 1 -> # 264 "doclexer.mll" ( push_section () ) # 640 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_lex_description_rec lexbuf __ocaml_lex_state and yacc_description lexbuf = __ocaml_lex_yacc_description_rec lexbuf 27 and __ocaml_lex_yacc_description_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 268 "doclexer.mll" ( backtrack lexbuf ; yacc_paragraph lexbuf; yacc_description lexbuf ) # 653 "doclexer.ml" | 1 -> # 272 "doclexer.mll" ( push_section () ) # 658 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_description_rec lexbuf __ocaml_lex_state and lex_paragraph lexbuf = __ocaml_lex_lex_paragraph_rec lexbuf 28 and __ocaml_lex_lex_paragraph_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 279 "doclexer.mll" ( lex_paragraph lexbuf ) # 669 "doclexer.ml" | 1 -> # 281 "doclexer.mll" ( lex_paragraph lexbuf ) # 674 "doclexer.ml" | 2 -> # 283 "doclexer.mll" ( code_beg := lexeme_start lexbuf; backtrack lexbuf; lex_subparagraphs lexbuf ; push_lexyacccode() ) # 682 "doclexer.ml" | 3 -> # 288 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; start_of_documentation lexbuf; push_doc () ) # 689 "doclexer.ml" | 4 -> # 292 "doclexer.mll" ( () ) # 694 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_lex_paragraph_rec lexbuf __ocaml_lex_state and yacc_paragraph lexbuf = __ocaml_lex_yacc_paragraph_rec lexbuf 34 and __ocaml_lex_yacc_paragraph_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 296 "doclexer.mll" ( yacc_paragraph lexbuf ) # 705 "doclexer.ml" | 1 -> # 298 "doclexer.mll" ( if not !in_lexyacc_action then yacc_paragraph lexbuf else begin code_beg := lexeme_start lexbuf; backtrack lexbuf; yacc_subparagraphs lexbuf ; push_lexyacccode() end ) # 717 "doclexer.ml" | 2 -> # 307 "doclexer.mll" ( if not !in_lexyacc_action then begin comment_or_string_start := lexeme_start lexbuf; start_of_yacc_documentation lexbuf; push_doc () end else begin code_beg := lexeme_start lexbuf; backtrack lexbuf; yacc_subparagraphs lexbuf ; push_lexyacccode() end ) # 733 "doclexer.ml" | 3 -> # 320 "doclexer.mll" ( if !in_lexyacc_action then yacc_paragraph lexbuf else begin code_beg := lexeme_start lexbuf; backtrack lexbuf; yacc_subparagraphs lexbuf ; push_lexyacccode() end ) # 745 "doclexer.ml" | 4 -> # 329 "doclexer.mll" ( if !in_lexyacc_action then begin comment_or_string_start := lexeme_start lexbuf; start_of_documentation lexbuf; push_doc () end else begin code_beg := lexeme_start lexbuf; backtrack lexbuf; yacc_subparagraphs lexbuf ; push_lexyacccode() end ) # 761 "doclexer.ml" | 5 -> # 342 "doclexer.mll" ( code_beg := lexeme_start lexbuf; backtrack lexbuf; yacc_subparagraphs lexbuf ; push_lexyacccode() ) # 769 "doclexer.ml" | 6 -> # 347 "doclexer.mll" ( () ) # 774 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_paragraph_rec lexbuf __ocaml_lex_state and start_of_documentation lexbuf = __ocaml_lex_start_of_documentation_rec lexbuf 45 and __ocaml_lex_start_of_documentation_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 357 "doclexer.mll" ( in_documentation lexbuf ) # 785 "doclexer.ml" | 1 -> # 359 "doclexer.mll" ( web_style := true; push_section (); section_beg := lexeme_start lexbuf; big_section := (lexeme_char lexbuf 0 == 'S'); in_documentation lexbuf ) # 793 "doclexer.ml" | 2 -> # 364 "doclexer.mll" ( let s = lexeme lexbuf in push_in_preamble (String.sub s 1 (String.length s - 3)) ) # 799 "doclexer.ml" | 3 -> # 367 "doclexer.mll" ( ignore lexbuf ) # 804 "doclexer.ml" | 4 -> # 369 "doclexer.mll" ( backtrack lexbuf; in_documentation lexbuf ) # 810 "doclexer.ml" | 5 -> # 372 "doclexer.mll" ( in_documentation lexbuf ) # 815 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_start_of_documentation_rec lexbuf __ocaml_lex_state and start_of_yacc_documentation lexbuf = __ocaml_lex_start_of_yacc_documentation_rec lexbuf 52 and __ocaml_lex_start_of_yacc_documentation_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 376 "doclexer.mll" ( in_yacc_documentation lexbuf ) # 826 "doclexer.ml" | 1 -> # 378 "doclexer.mll" ( web_style := true; push_section (); section_beg := lexeme_start lexbuf; big_section := (lexeme_char lexbuf 0 == 'S'); in_yacc_documentation lexbuf ) # 834 "doclexer.ml" | 2 -> # 383 "doclexer.mll" ( let s = lexeme lexbuf in push_in_preamble (String.sub s 1 (String.length s - 3)) ) # 840 "doclexer.ml" | 3 -> # 386 "doclexer.mll" ( yacc_ignore lexbuf ) # 845 "doclexer.ml" | 4 -> # 388 "doclexer.mll" ( backtrack lexbuf; in_yacc_documentation lexbuf ) # 851 "doclexer.ml" | 5 -> # 391 "doclexer.mll" ( in_yacc_documentation lexbuf ) # 856 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_start_of_yacc_documentation_rec lexbuf __ocaml_lex_state and in_documentation lexbuf = __ocaml_lex_in_documentation_rec lexbuf 59 and __ocaml_lex_in_documentation_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 398 "doclexer.mll" ( push_string "(*"; in_documentation lexbuf; push_string "*)"; in_documentation lexbuf ) # 870 "doclexer.ml" | 1 -> # 403 "doclexer.mll" ( () ) # 875 "doclexer.ml" | 2 -> # 405 "doclexer.mll" ( push_char '\n'; in_documentation lexbuf ) # 880 "doclexer.ml" | 3 -> # 407 "doclexer.mll" ( push_char '"'; in_string lexbuf; in_documentation lexbuf ) # 885 "doclexer.ml" | 4 -> # 409 "doclexer.mll" ( push_string (lexeme lexbuf); in_documentation lexbuf ) # 890 "doclexer.ml" | 5 -> # 411 "doclexer.mll" ( push_first_char lexbuf; in_documentation lexbuf ) # 895 "doclexer.ml" | 6 -> # 413 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocaml comment\n"; exit 1 ) # 903 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_in_documentation_rec lexbuf __ocaml_lex_state and in_yacc_documentation lexbuf = __ocaml_lex_in_yacc_documentation_rec lexbuf 70 and __ocaml_lex_in_yacc_documentation_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 422 "doclexer.mll" ( () ) # 914 "doclexer.ml" | 1 -> # 424 "doclexer.mll" ( push_char '\n'; in_yacc_documentation lexbuf ) # 919 "doclexer.ml" | 2 -> # 426 "doclexer.mll" ( push_char '"'; in_string lexbuf; in_yacc_documentation lexbuf ) # 924 "doclexer.ml" | 3 -> # 428 "doclexer.mll" ( push_string (lexeme lexbuf); in_yacc_documentation lexbuf ) # 929 "doclexer.ml" | 4 -> # 430 "doclexer.mll" ( push_first_char lexbuf; in_yacc_documentation lexbuf ) # 934 "doclexer.ml" | 5 -> # 432 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocamlyacc comment\n"; exit 1 ) # 942 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_in_yacc_documentation_rec lexbuf __ocaml_lex_state and caml_subparagraph lexbuf = __ocaml_lex_caml_subparagraph_rec lexbuf 80 and __ocaml_lex_caml_subparagraph_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 442 "doclexer.mll" ( backtrack lexbuf ) # 953 "doclexer.ml" | 1 -> # 444 "doclexer.mll" ( backtrack lexbuf ) # 958 "doclexer.ml" | 2 -> # 446 "doclexer.mll" ( () ) # 963 "doclexer.ml" | 3 -> # 448 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; push_string "(*"; comment lexbuf; caml_subparagraph lexbuf ) # 971 "doclexer.ml" | 4 -> # 453 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; ignore lexbuf; caml_subparagraph lexbuf ) # 977 "doclexer.ml" | 5 -> # 455 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; push_char '"'; in_string lexbuf; caml_subparagraph lexbuf ) # 983 "doclexer.ml" | 6 -> # 457 "doclexer.mll" ( incr brace_depth; push_char '{'; caml_subparagraph lexbuf ) # 990 "doclexer.ml" | 7 -> # 461 "doclexer.mll" ( if !brace_depth = 0 then backtrack lexbuf else begin decr brace_depth; push_char '}'; caml_subparagraph lexbuf end ) # 1001 "doclexer.ml" | 8 -> # 469 "doclexer.mll" ( if !brace_depth = 0 then backtrack lexbuf else begin decr brace_depth; push_string "%}"; caml_subparagraph lexbuf end ) # 1012 "doclexer.ml" | 9 -> # 477 "doclexer.mll" ( push_string (lexeme lexbuf); caml_subparagraph lexbuf ) # 1017 "doclexer.ml" | 10 -> # 478 "doclexer.mll" ( push_first_char lexbuf; caml_subparagraph lexbuf ) # 1022 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_caml_subparagraph_rec lexbuf __ocaml_lex_state and lex_subparagraphs lexbuf = __ocaml_lex_lex_subparagraphs_rec lexbuf 98 and __ocaml_lex_lex_subparagraphs_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 486 "doclexer.mll" ( backtrack lexbuf ) # 1033 "doclexer.ml" | 1 -> # 488 "doclexer.mll" ( () ) # 1038 "doclexer.ml" | 2 -> # 490 "doclexer.mll" ( if !in_lexyacc_action then begin eprintf "File \"%s\", character %d\n" !current_file !lexyacc_brace_start; eprintf "Unclosed brace\n" ; exit 1 end ) # 1050 "doclexer.ml" | 3 -> # 499 "doclexer.mll" ( if !in_lexyacc_action then begin push_char '}'; in_lexyacc_action := false; lex_subparagraph lexbuf; push_lex_subpar(); lex_subparagraphs lexbuf end else begin eprintf "File \"%s\", character %d\n" !current_file (lexeme_start lexbuf); eprintf "Unexpected closing brace "; exit 1 end ) # 1070 "doclexer.ml" | 4 -> # 516 "doclexer.mll" ( backtrack lexbuf; if !in_lexyacc_action then begin caml_subparagraph lexbuf; push_caml_subpar() end else begin lex_subparagraph lexbuf; push_lex_subpar() end; lex_subparagraphs lexbuf ) # 1087 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_lex_subparagraphs_rec lexbuf __ocaml_lex_state and yacc_subparagraphs lexbuf = __ocaml_lex_yacc_subparagraphs_rec lexbuf 104 and __ocaml_lex_yacc_subparagraphs_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 532 "doclexer.mll" ( backtrack lexbuf ) # 1098 "doclexer.ml" | 1 -> # 534 "doclexer.mll" ( if !in_lexyacc_action then begin push_string "%%"; caml_subparagraph lexbuf; push_caml_subpar(); yacc_subparagraphs lexbuf end else begin push_yacc_subpar(); push_string "%%"; push_yacc_subpar(); incr doublepercentcounter; if !doublepercentcounter >= 2 then in_lexyacc_action := true end ) # 1115 "doclexer.ml" | 2 -> # 548 "doclexer.mll" ( if !in_lexyacc_action then () else begin push_string ";;"; yacc_subparagraph lexbuf; push_yacc_subpar(); yacc_subparagraphs lexbuf end ) # 1126 "doclexer.ml" | 3 -> # 556 "doclexer.mll" ( if !in_lexyacc_action && !doublepercentcounter <= 1 then begin eprintf "File \"%s\", character %d\n" !current_file !lexyacc_brace_start; eprintf "Unclosed brace\n" ; exit 1 end ) # 1138 "doclexer.ml" | 4 -> # 565 "doclexer.mll" ( if !in_lexyacc_action then begin push_char '}'; in_lexyacc_action := false; yacc_subparagraph lexbuf; push_yacc_subpar(); yacc_subparagraphs lexbuf end else begin eprintf "File \"%s\", character %d\n" !current_file (lexeme_start lexbuf); eprintf "Unexpected closing brace "; exit 1 end ) # 1158 "doclexer.ml" | 5 -> # 582 "doclexer.mll" ( if !in_lexyacc_action then begin push_string "%}"; in_lexyacc_action := false; yacc_subparagraph lexbuf; push_yacc_subpar(); yacc_subparagraphs lexbuf end else begin eprintf "File \"%s\", character %d\n" !current_file (lexeme_start lexbuf); eprintf "Unexpected closing brace "; exit 1 end ) # 1178 "doclexer.ml" | 6 -> # 599 "doclexer.mll" ( backtrack lexbuf; if !in_lexyacc_action then begin caml_subparagraph lexbuf; push_caml_subpar() end else begin yacc_subparagraph lexbuf; push_yacc_subpar() end; yacc_subparagraphs lexbuf ) # 1195 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_subparagraphs_rec lexbuf __ocaml_lex_state and lex_subparagraph lexbuf = __ocaml_lex_lex_subparagraph_rec lexbuf 111 and __ocaml_lex_lex_subparagraph_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 619 "doclexer.mll" ( backtrack lexbuf ) # 1206 "doclexer.ml" | 1 -> # 620 "doclexer.mll" ( backtrack lexbuf ) # 1211 "doclexer.ml" | 2 -> # 621 "doclexer.mll" ( () ) # 1216 "doclexer.ml" | 3 -> # 623 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; push_string "(*"; comment lexbuf; lex_subparagraph lexbuf ) # 1224 "doclexer.ml" | 4 -> # 628 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; ignore lexbuf; lex_subparagraph lexbuf ) # 1230 "doclexer.ml" | 5 -> # 630 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; push_char '"'; in_string lexbuf; lex_subparagraph lexbuf ) # 1236 "doclexer.ml" | 6 -> # 633 "doclexer.mll" ( lexyacc_brace_start := lexeme_start lexbuf; push_char '{'; in_lexyacc_action := true ) # 1243 "doclexer.ml" | 7 -> # 637 "doclexer.mll" ( push_string (lexeme lexbuf); lex_subparagraph lexbuf ) # 1248 "doclexer.ml" | 8 -> # 639 "doclexer.mll" ( push_first_char lexbuf; lex_subparagraph lexbuf ) # 1253 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_lex_subparagraph_rec lexbuf __ocaml_lex_state and yacc_subparagraph lexbuf = __ocaml_lex_yacc_subparagraph_rec lexbuf 126 and __ocaml_lex_yacc_subparagraph_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 644 "doclexer.mll" ( backtrack lexbuf ) # 1264 "doclexer.ml" | 1 -> # 645 "doclexer.mll" ( backtrack lexbuf ) # 1269 "doclexer.ml" | 2 -> # 646 "doclexer.mll" ( backtrack lexbuf ) # 1274 "doclexer.ml" | 3 -> # 647 "doclexer.mll" ( () ) # 1279 "doclexer.ml" | 4 -> # 649 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; push_string "/*"; yacc_comment lexbuf; yacc_subparagraph lexbuf ) # 1287 "doclexer.ml" | 5 -> # 654 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; yacc_ignore lexbuf; yacc_subparagraph lexbuf ) # 1293 "doclexer.ml" | 6 -> # 656 "doclexer.mll" ( comment_or_string_start := lexeme_start lexbuf; push_char '"'; in_string lexbuf; yacc_subparagraph lexbuf ) # 1299 "doclexer.ml" | 7 -> # 659 "doclexer.mll" ( lexyacc_brace_start := lexeme_start lexbuf; push_string "%{"; in_lexyacc_action := true ) # 1306 "doclexer.ml" | 8 -> # 663 "doclexer.mll" ( lexyacc_brace_start := lexeme_start lexbuf; push_char '{'; in_lexyacc_action := true ) # 1313 "doclexer.ml" | 9 -> # 667 "doclexer.mll" ( lexyacc_brace_start := lexeme_start lexbuf; push_char '<'; push_yacc_subpar (); yacc_type lexbuf; yacc_subparagraph lexbuf ) # 1322 "doclexer.ml" | 10 -> # 673 "doclexer.mll" ( push_string (lexeme lexbuf); yacc_subparagraph lexbuf ) # 1327 "doclexer.ml" | 11 -> # 675 "doclexer.mll" ( push_first_char lexbuf; yacc_subparagraph lexbuf ) # 1332 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_subparagraph_rec lexbuf __ocaml_lex_state and yacc_type lexbuf = __ocaml_lex_yacc_type_rec lexbuf 143 and __ocaml_lex_yacc_type_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 679 "doclexer.mll" ( push_string "->"; yacc_type lexbuf ) # 1343 "doclexer.ml" | 1 -> # 681 "doclexer.mll" ( push_caml_subpar(); push_char '>' ) # 1348 "doclexer.ml" | 2 -> # 683 "doclexer.mll" ( push_first_char lexbuf; yacc_type lexbuf ) # 1353 "doclexer.ml" | 3 -> # 685 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !lexyacc_brace_start; eprintf "Unclosed '<'"; exit 1 ) # 1361 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_type_rec lexbuf __ocaml_lex_state and skip_spaces_until_nl lexbuf = __ocaml_lex_skip_spaces_until_nl_rec lexbuf 145 and __ocaml_lex_skip_spaces_until_nl_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 692 "doclexer.mll" ( () ) # 1372 "doclexer.ml" | 1 -> # 693 "doclexer.mll" ( () ) # 1377 "doclexer.ml" | 2 -> # 694 "doclexer.mll" ( backtrack lexbuf ) # 1382 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_skip_spaces_until_nl_rec lexbuf __ocaml_lex_state and comment lexbuf = __ocaml_lex_comment_rec lexbuf 147 and __ocaml_lex_comment_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 700 "doclexer.mll" ( push_string "(*"; comment lexbuf; comment lexbuf ) # 1393 "doclexer.ml" | 1 -> # 702 "doclexer.mll" ( push_string "*)" ) # 1398 "doclexer.ml" | 2 -> # 704 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocaml comment\n"; exit 1 ) # 1406 "doclexer.ml" | 3 -> # 709 "doclexer.mll" ( push_first_char lexbuf; comment lexbuf ) # 1411 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_comment_rec lexbuf __ocaml_lex_state and yacc_comment lexbuf = __ocaml_lex_yacc_comment_rec lexbuf 151 and __ocaml_lex_yacc_comment_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 713 "doclexer.mll" ( push_string "*/" ) # 1422 "doclexer.ml" | 1 -> # 715 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocamlyacc comment\n"; exit 1 ) # 1430 "doclexer.ml" | 2 -> # 720 "doclexer.mll" ( push_first_char lexbuf; yacc_comment lexbuf ) # 1435 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_comment_rec lexbuf __ocaml_lex_state and ignore lexbuf = __ocaml_lex_ignore_rec lexbuf 153 and __ocaml_lex_ignore_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 726 "doclexer.mll" ( skip_spaces_until_nl lexbuf ) # 1446 "doclexer.ml" | 1 -> # 728 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocamlweb comment\n"; exit 1 ) # 1454 "doclexer.ml" | 2 -> # 733 "doclexer.mll" ( ignore lexbuf ) # 1459 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_ignore_rec lexbuf __ocaml_lex_state and yacc_ignore lexbuf = __ocaml_lex_yacc_ignore_rec lexbuf 156 and __ocaml_lex_yacc_ignore_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 737 "doclexer.mll" ( skip_spaces_until_nl lexbuf ) # 1470 "doclexer.ml" | 1 -> # 739 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocamlweb comment\n"; exit 1 ) # 1478 "doclexer.ml" | 2 -> # 744 "doclexer.mll" ( yacc_ignore lexbuf ) # 1483 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_yacc_ignore_rec lexbuf __ocaml_lex_state and in_string lexbuf = __ocaml_lex_in_string_rec lexbuf 159 and __ocaml_lex_in_string_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 749 "doclexer.mll" ( push_char '"' ) # 1494 "doclexer.ml" | 1 -> # 751 "doclexer.mll" ( push_string (lexeme lexbuf); in_string lexbuf ) # 1499 "doclexer.ml" | 2 -> # 753 "doclexer.mll" ( eprintf "File \"%s\", character %d\n" !current_file !comment_or_string_start; eprintf "Unterminated ocaml string\n"; exit 1 ) # 1507 "doclexer.ml" | 3 -> # 758 "doclexer.mll" ( push_first_char lexbuf; in_string lexbuf ) # 1512 "doclexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_in_string_rec lexbuf __ocaml_lex_state ;; # 761 "doclexer.mll" (*s \textbf{Caml files.} *) type caml_file = { caml_filename : string; caml_module : string } let module_name f = String.capitalize (Filename.basename f) let make_caml_file f = { caml_filename = f; caml_module = module_name (Filename.chop_extension f) } type file_type = | File_impl of caml_file | File_intf of caml_file | File_lex of caml_file | File_yacc of caml_file | File_other of string (*s \textbf{Reading Caml files.} *) let raw_read_file header entry f = reset_lexer f; let c = open_in f in let buf = Lexing.from_channel c in if !skip_header then header buf; entry buf; close_in c; List.rev !seclist let read header entry m = { content_file = m.caml_filename; content_name = m.caml_module; content_contents = raw_read_file header entry m.caml_filename; } let read_one_file = function | File_impl m -> Implem (read header caml_implementation m) | File_intf m -> Interf (read header caml_implementation m) | File_lex m -> Lex (read header lex_description m) | File_yacc m -> Yacc (read yacc_header yacc_description m) | File_other f -> Other f # 1562 "doclexer.ml"