# 1 "wikicreole_client.mll" (* Ocsimore * Copyright (C) 2008 * Laboratoire PPS - Université Paris Diderot - CNRS * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) (** Parser for Wikicreole @author Jérôme Vouillon @author Vincent Balat *) exception Eof exception Unrecognized_char type attribs = (string * string) list type ('a, 'b, 'c) ext_kind = | Block of 'a | A_content of 'b | Link_plugin of 'c type ('flow, 'inline, 'a_content, 'param, 'sp) builder = { chars : string -> 'a_content; strong_elem : attribs -> 'inline list -> 'a_content; em_elem : attribs -> 'inline list -> 'a_content; br_elem : attribs -> 'a_content; img_elem : attribs -> string -> string -> 'a_content; tt_elem : attribs -> 'inline list -> 'a_content; monospace_elem : attribs -> 'inline list -> 'a_content; underlined_elem : attribs -> 'inline list -> 'a_content; linethrough_elem : attribs -> 'inline list -> 'a_content; subscripted_elem : attribs -> 'inline list -> 'a_content; superscripted_elem : attribs -> 'inline list -> 'a_content; nbsp : 'a_content; a_elem : attribs -> 'sp -> string -> 'a_content list -> 'inline; make_href : 'sp -> string -> string; p_elem : attribs -> 'inline list -> 'flow; pre_elem : attribs -> string list -> 'flow; h1_elem : attribs -> 'inline list -> 'flow; h2_elem : attribs -> 'inline list -> 'flow; h3_elem : attribs -> 'inline list -> 'flow; h4_elem : attribs -> 'inline list -> 'flow; h5_elem : attribs -> 'inline list -> 'flow; h6_elem : attribs -> 'inline list -> 'flow; ul_elem : attribs -> ('inline list * 'flow option * attribs) list -> 'flow; ol_elem : attribs -> ('inline list * 'flow option * attribs) list -> 'flow; dl_elem : attribs -> (bool * 'inline list * attribs) list -> 'flow; hr_elem : attribs -> 'flow; table_elem : attribs -> ((bool * attribs * 'inline list) list * attribs) list -> 'flow; inline : 'a_content -> 'inline; plugin : string -> (bool * ('param -> (string * string) list -> string option -> (('flow, 'a_content, (string * attribs * 'a_content)) ext_kind))); plugin_action : string -> int -> int -> 'param -> (string * string) list -> string option -> unit; error : string -> 'a_content; } type style = Bold | Italic | Underlined | Linethrough | Monospace | Superscripted | Subscripted type list_kind = Unordered | Ordered type ('inline, 'flow) stack = Style of style * 'inline list * attribs * ('inline, 'flow) stack | Link of string * attribs * ('inline, 'flow) stack (* Not that we do not save anything in the case of links, as links cannot be nested *) | Paragraph of attribs | Heading of int * attribs | List_item of attribs * ('inline, 'flow) stack | List of list_kind * ('inline list * 'flow option * attribs) list * attribs * ('inline, 'flow) stack | Descr_def of attribs * ('inline, 'flow) stack | Descr_title of attribs * ('inline, 'flow) stack | Descr of attribs * ('inline, 'flow) stack | Table of ((bool * attribs * 'inline list) list * attribs) list * attribs | Row of (bool * attribs * 'inline list) list * attribs * ('inline, 'flow) stack | Entry of bool * attribs * ('inline, 'flow) stack type ('flow, 'inline, 'a_content, 'param, 'sp) ctx = { build : ('flow, 'inline, 'a_content, 'param, 'sp) builder; param : 'param; sp : 'sp; mutable italic : bool; mutable bold : bool; mutable monospace : bool; mutable underlined : bool; mutable linethrough : bool; mutable subscripted : bool; mutable superscripted : bool; mutable heading : bool; mutable link : bool; mutable list_level : int; mutable inline_mix : 'inline list; mutable link_content : 'a_content list; mutable pre_content : string list; mutable list : ('inline list * 'flow option * attribs) list; mutable descr : (bool * 'inline list * attribs) list; mutable flow : 'flow list; mutable stack : ('inline, 'flow) stack } let count c s = let n = ref 0 in for i = 0 to String.length s - 1 do if s.[i] = c then incr n done; !n let push c v = match c.stack with Link _ -> c.link_content <- v :: c.link_content | _ -> c.inline_mix <- c.build.inline v :: c.inline_mix let push_string c s = push c (c.build.chars s) let push_chars c lexbuf = push_string c (Lexing.lexeme lexbuf) let read_attribs att parse_attribs c lexbuf = try if att = "@@" then match parse_attribs 1 [] [] c lexbuf with | [] -> [] | a::_ -> a else [] with Eof -> [] (*VVV ??? *) let read_list_attribs att parse_attribs c lexbuf = try if att = "@@" then match parse_attribs 2 [] [] c lexbuf with | [] -> ([], []) | a::b::_ -> (b, a) | [a] -> ([], a) else ([], []) with Eof -> ([], []) (*VVV ??? *) let read_table_attribs att parse_attribs c lexbuf = try if att = "@@" then match parse_attribs 3 [] [] c lexbuf with | [] -> ([], [], []) | a::b::c::_ -> (c, b, a) | [a; b] -> ([], b, a) | [a] -> ([], [], a) else ([], [], []) with Eof -> ([], [], []) (*VVV ??? *) let get_style c style = match style with | Bold -> c.bold | Italic -> c.italic | Monospace -> c.monospace | Underlined -> c.underlined | Linethrough -> c.linethrough | Subscripted -> c.subscripted | Superscripted -> c.superscripted let set_style c style v = match style with | Bold -> c.bold <- v | Italic -> c.italic <- v | Monospace -> c.monospace <- v | Underlined -> c.underlined <- v | Linethrough -> c.linethrough <- v | Subscripted -> c.subscripted <- v | Superscripted -> c.superscripted <- v let pop_style c style inline attribs stack = let elt = match style with | Bold -> c.build.strong_elem attribs | Italic -> c.build.em_elem attribs | Monospace -> c.build.monospace_elem attribs | Underlined -> c.build.underlined_elem attribs | Linethrough -> c.build.linethrough_elem attribs | Subscripted -> c.build.subscripted_elem attribs | Superscripted -> c.build.superscripted_elem attribs in let inline' = c.inline_mix in c.stack <- stack; c.inline_mix <- inline; push c (elt (List.rev inline')); set_style c style false let style_change c style att parse_attribs lexbuf = let atts = read_attribs att parse_attribs c lexbuf in if get_style c style then begin match c.stack with Style (s, inline, attribs, stack) when s = style -> pop_style c style inline attribs stack; | _ -> push_string c "**"; push_string c att end else begin c.stack <- Style (style, c.inline_mix, atts, c.stack); c.inline_mix <- []; set_style c style true end let pop_link c addr attribs stack = c.stack <- stack; c.inline_mix <- c.build.a_elem attribs c.sp addr (List.rev c.link_content) :: c.inline_mix; c.link_content <- []; c.link <- false let close_entry c = match c.stack with Entry (heading, attribs, Row (entries, row_attribs, stack)) -> c.stack <- Row ((heading, attribs, List.rev c.inline_mix) :: entries, row_attribs, stack); c.inline_mix <- []; true | Row _ | Table _ -> true | _ -> false let close_row c = close_entry c && match c.stack with Row (entries, row_attribs, Table (rows, table_attribs)) -> c.stack <- Table (((List.rev entries, row_attribs) :: rows), table_attribs); true | Table _ -> true | _ -> assert false let close_descr_entry c = match c.stack with | Descr_def (attribs, stack) -> c.stack <- stack; c.descr <- (false, List.rev c.inline_mix, attribs) :: c.descr; c.inline_mix <- []; true | Descr_title (attribs, stack) -> c.stack <- stack; c.descr <- (true, List.rev c.inline_mix, attribs) :: c.descr; c.inline_mix <- []; true | _ -> false let rec end_paragraph c lev = match c.stack with Style (style, inline, attribs, stack) -> pop_style c style inline attribs stack; end_paragraph c lev | Link (addr, attribs, stack) -> pop_link c addr attribs stack; end_paragraph c lev | Paragraph attribs -> if c.inline_mix <> [] then begin c.flow <- c.build.p_elem attribs (List.rev c.inline_mix) :: c.flow; c.inline_mix <- [] end; c.stack <- Paragraph [] | Heading (l, attribs) -> let f = match l with | 1 -> c.build.h1_elem | 2 -> c.build.h2_elem | 3 -> c.build.h3_elem | 4 -> c.build.h4_elem | 5 -> c.build.h5_elem | _ -> c.build.h6_elem in c.flow <- f attribs (List.rev c.inline_mix) :: c.flow; c.inline_mix <- []; c.heading <- false; c.stack <- Paragraph [] | List_item (attribs, stack) -> c.list <- (List.rev c.inline_mix, None, attribs) :: c.list; c.stack <- stack; c.inline_mix <- []; end_paragraph c lev | List (kind, lst, attribs, stack) -> if lev < c.list_level then begin c.list_level <- c.list_level - 1; let elt = match kind with Unordered -> c.build.ul_elem | Ordered -> c.build.ol_elem in let cur_lst = elt attribs (List.rev c.list) in if c.list_level = 0 then c.flow <- cur_lst :: c.flow else begin match lst with (l, None, attribs) :: rem -> c.list <- (l, Some cur_lst, attribs) :: rem; | _ -> assert false end; c.stack <- stack; end_paragraph c lev end | Descr_def (attribs, stack) -> c.descr <- (false, List.rev c.inline_mix, attribs) :: c.descr; c.stack <- stack; c.inline_mix <- []; end_paragraph c lev | Descr_title (attribs, stack) -> c.descr <- (true, List.rev c.inline_mix, attribs) :: c.descr; c.stack <- stack; c.inline_mix <- []; end_paragraph c lev | Descr (attribs, stack) -> let lst = c.build.dl_elem attribs (List.rev c.descr) in c.flow <- lst :: c.flow; c.stack <- stack; end_paragraph c lev | Entry _ -> ignore (close_row c); end_paragraph c lev | Row _ -> assert false | Table (rows, attribs) -> c.flow <- c.build.table_elem attribs (List.rev rows) :: c.flow; c.stack <- Paragraph [] let rec correct_kind_rec stack kind n = match stack with List_item (_, stack) -> correct_kind_rec stack kind n | List (k, _lst, _, stack) -> if n = 0 then k = kind else correct_kind_rec stack kind (n - 1) | Style (_, _, _, stack) -> correct_kind_rec stack kind n | Link _ | Heading _ | Paragraph _ | Entry _ | Row _ | Table _ | Descr _ | Descr_title _ | Descr_def _ -> assert false let correct_kind c kind lev = lev = c.list_level + 1 || (lev <= c.list_level && correct_kind_rec c.stack kind (c.list_level - lev)) let start_list_item c kind lev att parse_attribs lexbuf = let correct = correct_kind c kind lev in if lev = 1 || correct then begin (* If we have an item of a different kind at level 1, we close the previous list and start a new one of the right kind *) end_paragraph c (if correct then lev else 0); let (list_attribs, item_attribs) = read_list_attribs att parse_attribs c lexbuf in if lev = c.list_level then begin c.stack <- List_item (item_attribs, c.stack) end else (* if lev = c.list_level + 1 then *) begin c.list_level <- lev; c.stack <- List_item (item_attribs, List (kind, c.list, list_attribs, c.stack)); c.list <- [] end; true end else false let start_table_row c heading (table_attribs, row_attribs, entry_attribs) = if not (close_row c) then begin end_paragraph c 0; c.stack <- Table ([], table_attribs) end; c.stack <- Entry (heading, entry_attribs, Row ([], row_attribs, c.stack)) let build_extension lexbuf start name ext_info args c content = let args = List.rev args in c.build.plugin_action name start (Lexing.lexeme_end lexbuf) c.param args content; ext_info c.param args content # 403 "wikicreole_client.ml" let __ocaml_lex_tables = { Lexing.lex_base = "\000\000\001\000\002\000\002\000\001\000\003\000\004\000\005\000\ \006\000\010\000\040\000\001\000\255\255\009\000\015\000\016\000\ \017\000\022\000\020\000\254\255\023\000\253\255\024\000\252\255\ \025\000\251\255\026\000\250\255\002\000\005\000\028\000\249\255\ \002\000\007\000\027\000\003\000\041\000\248\255\004\000\029\000\ \005\000\030\000\031\000\247\255\032\000\246\255\245\255\087\000\ \232\255\093\000\098\000\012\000\183\000\222\000\020\001\093\001\ \132\001\186\001\240\001\055\002\109\002\163\002\202\002\000\003\ \054\003\093\003\147\003\009\000\255\255\038\000\045\000\254\255\ \046\000\048\000\253\255\049\000\050\000\252\255\051\000\052\000\ \251\255\053\000\054\000\250\255\055\000\056\000\249\255\057\000\ \063\000\248\255\247\255\013\000\201\003\069\000\072\000\246\255\ \245\255\240\003\038\004\111\004\184\004\212\004\219\004\024\005\ \075\000\077\000\243\255\078\000\079\000\080\000\242\255\081\000\ \240\255\239\000\238\255\239\255\082\000\085\000\237\255\014\000\ \158\000\236\255\086\000\235\255\237\000\254\255\249\000\033\001\ \255\255\042\000\148\000\163\000\194\000\255\255\202\000\213\000\ \241\000\004\001\030\000\197\001\016\000\253\255\023\000\254\255\ \039\001\003\002\089\001\117\001\147\000\255\255\017\000\126\001\ \159\000\018\000\129\002\190\000\218\002\021\000\043\000\166\000\ \109\003\254\255\000\000\166\003\028\002\003\004\252\255\072\002\ \141\001\251\001\251\255\094\000\045\000\051\000\117\000\132\000\ \255\255\254\255\060\000\253\255\077\000\252\255\169\000\178\000\ \143\000\255\255\144\000\146\000\254\255\049\001\131\001\253\255\ \166\001\255\255\254\255\093\004\248\255\145\000\186\002\191\003\ \223\000\224\000\045\001\104\004\253\255\043\003\150\000\156\000\ \249\255"; Lexing.lex_backtrk = "\010\000\255\255\008\000\255\255\255\255\005\000\004\000\003\000\ \002\000\001\000\010\000\000\000\255\255\255\255\001\000\001\000\ \001\000\001\000\001\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\ \006\000\255\255\255\255\255\255\255\255\255\255\007\000\255\255\ \255\255\009\000\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\021\000\019\000\021\000\021\000\021\000\021\000\021\000\ \021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\ \021\000\021\000\021\000\000\000\255\255\001\000\255\255\255\255\ \002\000\255\255\255\255\003\000\255\255\255\255\004\000\255\255\ \255\255\005\000\255\255\255\255\006\000\255\255\255\255\007\000\ \255\255\255\255\255\255\008\000\021\000\009\000\255\255\255\255\ \255\255\021\000\021\000\021\000\255\255\011\000\021\000\021\000\ \012\000\255\255\255\255\013\000\015\000\255\255\255\255\255\255\ \255\255\014\000\255\255\255\255\020\000\255\255\255\255\018\000\ \255\255\255\255\255\255\255\255\002\000\255\255\255\255\255\255\ \255\255\001\000\255\255\255\255\255\255\255\255\001\000\255\255\ \255\255\255\255\000\000\255\255\002\000\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\000\000\255\255\ \255\255\001\000\002\000\004\000\004\000\002\000\002\000\002\000\ \002\000\255\255\004\000\000\000\255\255\255\255\255\255\255\255\ \255\255\005\000\255\255\006\000\006\000\006\000\006\000\006\000\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\002\000\ \003\000\255\255\003\000\255\255\255\255\003\000\003\000\255\255\ \002\000\255\255\255\255\000\000\255\255\004\000\255\255\255\255\ \001\000\001\000\001\000\001\000\255\255\255\255\003\000\005\000\ \255\255"; Lexing.lex_default = "\255\255\255\255\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\255\255\ \255\255\255\255\255\255\000\000\255\255\000\000\255\255\000\000\ \255\255\000\000\255\255\000\000\255\255\255\255\255\255\000\000\ \255\255\255\255\255\255\255\255\255\255\000\000\255\255\255\255\ \255\255\255\255\255\255\000\000\255\255\000\000\000\000\049\000\ \000\000\049\000\255\255\115\000\049\000\049\000\049\000\049\000\ \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ \049\000\049\000\049\000\255\255\000\000\255\255\255\255\000\000\ \255\255\255\255\000\000\255\255\255\255\000\000\255\255\255\255\ \000\000\255\255\255\255\000\000\255\255\255\255\000\000\255\255\ \255\255\000\000\000\000\255\255\049\000\255\255\255\255\000\000\ \000\000\049\000\049\000\049\000\101\000\101\000\049\000\049\000\ \255\255\255\255\000\000\255\255\255\255\255\255\000\000\255\255\ \000\000\113\000\000\000\000\000\255\255\255\255\000\000\255\255\ \255\255\000\000\255\255\000\000\126\000\000\000\126\000\126\000\ \000\000\130\000\130\000\131\000\131\000\000\000\135\000\135\000\ \135\000\135\000\255\255\142\000\255\255\000\000\142\000\000\000\ \142\000\142\000\142\000\142\000\142\000\000\000\255\255\142\000\ \142\000\255\255\156\000\255\255\165\000\255\255\255\255\255\255\ \165\000\000\000\255\255\165\000\255\255\165\000\000\000\255\255\ \169\000\169\000\000\000\255\255\255\255\255\255\255\255\255\255\ \000\000\000\000\255\255\000\000\255\255\000\000\183\000\183\000\ \255\255\000\000\255\255\255\255\000\000\190\000\190\000\000\000\ \255\255\000\000\000\000\199\000\000\000\255\255\255\255\199\000\ \255\255\255\255\255\255\199\000\000\000\255\255\255\255\255\255\ \000\000"; Lexing.lex_trans = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\010\000\012\000\012\000\031\000\011\000\037\000\037\000\ \033\000\031\000\038\000\068\000\032\000\255\255\255\255\090\000\ \118\000\255\255\141\000\149\000\143\000\000\000\000\000\158\000\ \010\000\141\000\157\000\007\000\140\000\033\000\031\000\033\000\ \007\000\032\000\008\000\000\000\114\000\004\000\028\000\029\000\ \008\000\010\000\030\000\037\000\255\255\158\000\038\000\255\255\ \157\000\000\000\005\000\006\000\033\000\009\000\161\000\041\000\ \001\000\046\000\042\000\026\000\024\000\022\000\020\000\014\000\ \010\000\019\000\013\000\007\000\015\000\016\000\017\000\013\000\ \013\000\013\000\008\000\018\000\013\000\004\000\013\000\021\000\ \023\000\025\000\027\000\033\000\034\000\040\000\044\000\043\000\ \045\000\068\000\005\000\006\000\067\000\009\000\070\000\255\255\ \001\000\039\000\255\255\120\000\118\000\071\000\073\000\119\000\ \074\000\076\000\077\000\079\000\080\000\082\000\083\000\085\000\ \086\000\088\000\064\000\003\000\002\000\035\000\036\000\089\000\ \255\255\066\000\120\000\062\000\060\000\094\000\065\000\255\255\ \095\000\255\255\255\255\105\000\255\255\106\000\109\000\111\000\ \110\000\112\000\122\000\052\000\059\000\121\000\123\000\255\255\ \255\255\255\255\255\255\138\000\170\000\149\000\255\255\116\000\ \150\000\255\255\117\000\003\000\002\000\255\255\255\255\120\000\ \118\000\143\000\180\000\119\000\153\000\255\255\178\000\159\000\ \255\255\177\000\058\000\054\000\057\000\063\000\061\000\179\000\ \255\255\255\255\255\255\255\255\255\255\055\000\120\000\056\000\ \176\000\255\255\176\000\255\255\255\255\255\255\159\000\164\000\ \164\000\108\000\181\000\167\000\255\255\188\000\187\000\255\255\ \185\000\206\000\053\000\050\000\255\255\051\000\207\000\255\255\ \255\255\255\255\255\255\255\255\208\000\000\000\164\000\255\255\ \166\000\255\255\255\255\255\255\255\255\166\000\255\255\184\000\ \255\255\201\000\201\000\255\255\200\000\200\000\000\000\000\000\ \255\255\255\255\255\255\113\000\255\255\000\000\000\000\255\255\ \255\255\255\255\255\255\255\255\255\255\000\000\255\255\000\000\ \000\000\255\255\176\000\255\255\000\000\037\000\255\255\031\000\ \255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\ \131\000\255\255\255\255\255\255\255\255\255\255\255\255\141\000\ \255\255\255\255\255\255\255\255\031\000\255\255\255\255\255\255\ \132\000\255\255\000\000\000\000\000\000\000\000\000\000\186\000\ \000\000\037\000\255\255\255\255\000\000\255\255\255\255\000\000\ \255\255\141\000\255\255\255\255\140\000\255\255\202\000\255\255\ \000\000\255\255\255\255\255\255\255\255\255\255\255\255\133\000\ \255\255\255\255\000\000\255\255\255\255\000\000\255\255\136\000\ \000\000\000\000\127\000\000\000\000\000\202\000\255\255\255\255\ \255\255\255\255\136\000\191\000\000\000\000\000\127\000\048\000\ \191\000\107\000\255\255\000\000\255\255\255\255\000\000\000\000\ \000\000\000\000\118\000\141\000\000\000\000\000\140\000\255\255\ \000\000\125\000\255\255\255\255\000\000\000\000\137\000\255\255\ \104\000\255\255\255\255\255\255\000\000\125\000\000\000\000\000\ \000\000\000\000\255\255\000\000\255\255\000\000\128\000\141\000\ \255\255\138\000\140\000\000\000\000\000\000\000\000\000\255\255\ \141\000\255\255\255\255\140\000\255\255\000\000\255\255\255\255\ \255\255\255\255\255\255\149\000\255\255\000\000\000\000\255\255\ \255\255\255\255\255\255\000\000\000\000\255\255\118\000\143\000\ \000\000\000\000\000\000\255\255\151\000\255\255\000\000\255\255\ \000\000\185\000\255\255\000\000\000\000\000\000\255\255\192\000\ \255\255\255\255\255\255\255\255\000\000\000\000\000\000\255\255\ \255\255\255\255\255\255\255\255\255\255\000\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\000\000\255\255\ \194\000\174\000\255\255\171\000\000\000\194\000\145\000\141\000\ \000\000\102\000\140\000\000\000\000\000\255\255\147\000\000\000\ \255\255\255\255\000\000\255\255\000\000\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\145\000\255\255\255\255\ \000\000\255\255\255\255\000\000\255\255\255\255\000\000\255\255\ \000\000\255\255\148\000\000\000\255\255\255\255\255\255\255\255\ \097\000\255\255\255\255\152\000\000\000\255\255\000\000\255\255\ \255\255\255\255\255\255\000\000\255\255\000\000\000\000\000\000\ \173\000\000\000\172\000\175\000\145\000\141\000\000\000\000\000\ \140\000\000\000\000\000\255\255\255\255\255\255\255\255\096\000\ \255\255\255\255\255\255\000\000\255\255\255\255\000\000\255\255\ \255\255\255\255\255\255\145\000\194\000\164\000\164\000\141\000\ \000\000\167\000\255\255\255\255\255\255\255\255\000\000\000\000\ \000\000\193\000\000\000\000\000\000\000\255\255\255\255\255\255\ \255\255\255\255\000\000\000\000\164\000\000\000\166\000\000\000\ \092\000\090\000\144\000\166\000\091\000\000\000\000\000\000\000\ \000\000\000\000\000\000\093\000\255\255\255\255\255\255\255\255\ \000\000\164\000\164\000\000\000\000\000\167\000\255\255\092\000\ \255\255\141\000\255\255\000\000\000\000\255\255\000\000\000\000\ \000\000\255\255\000\000\255\255\255\255\000\000\255\255\000\000\ \164\000\000\000\166\000\255\255\255\255\000\000\255\255\166\000\ \000\000\255\255\255\255\255\255\059\000\141\000\255\255\255\255\ \255\255\255\255\255\255\000\000\000\000\000\000\141\000\000\000\ \146\000\000\000\000\000\255\255\255\255\000\000\000\000\000\000\ \000\000\000\000\159\000\158\000\000\000\170\000\157\000\000\000\ \255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\ \000\000\255\255\087\000\000\000\255\255\255\255\000\000\255\255\ \000\000\159\000\000\000\000\000\000\000\000\000\193\000\255\255\ \255\255\255\255\255\255\000\000\000\000\255\255\000\000\000\000\ \255\255\000\000\255\255\255\255\000\000\255\255\000\000\000\000\ \000\000\000\000\255\255\000\000\160\000\000\000\155\000\162\000\ \000\000\000\000\000\000\198\000\198\000\143\000\255\255\205\000\ \255\255\255\255\255\255\255\255\255\255\255\255\000\000\255\255\ \255\255\000\000\255\255\255\255\255\255\255\255\000\000\255\255\ \000\000\000\000\198\000\000\000\204\000\255\255\255\255\255\255\ \255\255\204\000\000\000\255\255\255\255\000\000\000\000\255\255\ \255\255\255\255\000\000\255\255\000\000\255\255\000\000\000\000\ \255\255\000\000\000\000\000\000\255\255\000\000\081\000\255\255\ \000\000\255\255\255\255\255\255\000\000\163\000\255\255\255\255\ \255\255\255\255\084\000\141\000\255\255\255\255\255\255\255\255\ \000\000\255\255\255\255\255\255\000\000\255\255\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\000\ \255\255\000\000\000\000\000\000\000\000\000\000\255\255\255\255\ \000\000\255\255\000\000\255\255\000\000\255\255\255\255\255\255\ \255\255\255\255\255\255\000\000\255\255\255\255\000\000\255\255\ \255\255\000\000\255\255\000\000\198\000\198\000\000\000\090\000\ \205\000\000\000\255\255\255\255\255\255\255\255\000\000\000\000\ \255\255\000\000\000\000\255\255\000\000\255\255\255\255\000\000\ \255\255\000\000\000\000\198\000\000\000\204\000\000\000\000\000\ \000\000\000\000\204\000\000\000\000\000\000\000\000\000\000\000\ \000\000\075\000\000\000\255\255\255\255\255\255\078\000\255\255\ \255\255\000\000\255\255\255\255\000\000\255\255\255\255\255\255\ \255\255\000\000\255\255\000\000\000\000\255\255\000\000\000\000\ \255\255\255\255\255\255\255\255\000\000\000\000\255\255\255\255\ \000\000\000\000\255\255\255\255\255\255\000\000\255\255\000\000\ \255\255\161\000\000\000\000\000\000\000\000\000\000\000\255\255\ \000\000\255\255\255\255\000\000\072\000\255\255\000\000\000\000\ \000\000\255\255\255\255\255\255\255\255\255\255\000\000\255\255\ \255\255\255\255\255\255\000\000\255\255\255\255\255\255\000\000\ \255\255\000\000\000\000\255\255\000\000\000\000\000\000\000\000\ \160\000\000\000\164\000\255\255\000\000\000\000\000\000\255\255\ \255\255\255\255\255\255\255\255\255\255\000\000\255\255\000\000\ \255\255\255\255\255\255\255\255\255\255\069\000\000\000\255\255\ \255\255\000\000\255\255\255\255\000\000\255\255\255\255\000\000\ \255\255\255\255\255\255\000\000\255\255\255\255\255\255\255\255\ \255\255\000\000\092\000\090\000\000\000\000\000\091\000\000\000\ \255\255\255\255\255\255\255\255\000\000\000\000\000\000\255\255\ \000\000\000\000\000\000\164\000\255\255\000\000\000\000\000\000\ \000\000\092\000\000\000\000\000\255\255\000\000\255\255\255\255\ \255\255\255\255\255\255\255\255\000\000\255\255\255\255\000\000\ \255\255\255\255\255\255\255\255\198\000\255\255\000\000\255\255\ \255\255\000\000\000\000\255\255\255\255\255\255\255\255\000\000\ \000\000\000\000\000\000\000\000\255\255\255\255\255\255\255\255\ \255\255\255\255\000\000\255\255\000\000\000\000\000\000\000\000\ \000\000\000\000\255\255\000\000\255\255\255\255\000\000\255\255\ \000\000\000\000\000\000\255\255\255\255\255\255\255\255\255\255\ \255\255\000\000\255\255\255\255\255\255\255\255\000\000\255\255\ \255\255\255\255\000\000\255\255\000\000\000\000\255\255\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \164\000\255\255\000\000\000\000\255\255\255\255\000\000\255\255\ \000\000\255\255\000\000\255\255\255\255\255\255\255\255\255\255\ \255\255\000\000\255\255\255\255\000\000\255\255\255\255\000\000\ \255\255\000\000\000\000\000\000\000\000\255\255\000\000\000\000\ \255\255\255\255\255\255\255\255\098\000\000\000\202\000\201\000\ \000\000\000\000\200\000\255\255\255\255\255\255\255\255\000\000\ \000\000\255\255\255\255\000\000\000\000\255\255\000\000\000\000\ \000\000\255\255\000\000\000\000\255\255\202\000\000\000\000\000\ \000\000\255\255\255\255\255\255\255\255\255\255\000\000\000\000\ \255\255\000\000\000\000\000\000\255\255\000\000\255\255\000\000\ \000\000\000\000\255\255\255\255\000\000\000\000\099\000\000\000\ \203\000\255\255\198\000\255\255\255\255\197\000\255\255\000\000\ \000\000\255\255\255\255\203\000\255\255\198\000\255\255\000\000\ \255\255\100\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\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\255\ \000\000\255\255\255\255\000\000\000\000\255\255\000\000\000\000\ \000\000\090\000\255\255\255\255\255\255\255\255\255\255\000\000\ \000\000\000\000\000\000\000\000\000\000\255\255\000\000\255\255\ \255\255\100\000\100\000\000\000\000\000\255\255\255\255\100\000\ \000\000\255\255\000\000\000\000\100\000\255\255\100\000\000\000\ \255\255\000\000\255\255\255\255\000\000\255\255\000\000\000\000\ \255\255\000\000\100\000\100\000\255\255\100\000\100\000\100\000\ \000\000\000\000\000\000\100\000\000\000\000\000\255\255\000\000\ \100\000\000\000\100\000\255\255\000\000\255\255\000\000\255\255\ \255\255\000\000\255\255\000\000\000\000\000\000\100\000\100\000\ \000\000\000\000\000\000\100\000\000\000\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\255\255\000\000\000\000\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\255\255\255\255\ \255\255\255\255\255\255\255\255\000\000\000\000\000\000\000\000\ \000\000\255\255\255\255\255\255\255\255\255\255\000\000\255\255\ \000\000\000\000\000\000\103\000\000\000\000\000\000\000\000\000\ \000\000\000\000\100\000\255\255\255\255\255\255\255\255\255\255\ \000\000\255\255\000\000\000\000\000\000\196\000\000\000\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\000\000\255\255\ \000\000\000\000\000\000\255\255\255\255\255\255\255\255\255\255\ \000\000\000\000\000\000\000\000\000\000\000\000\255\255\000\000\ \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\255\255\255\255\000\000\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\ \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\255\255\000\000\000\000\000\000\ \000\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\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \255\255"; 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\011\000\032\000\000\000\038\000\040\000\ \033\000\033\000\040\000\067\000\033\000\051\000\051\000\091\000\ \119\000\051\000\140\000\150\000\153\000\255\255\255\255\157\000\ \000\000\142\000\157\000\000\000\142\000\030\000\030\000\033\000\ \007\000\030\000\000\000\255\255\051\000\000\000\004\000\028\000\ \008\000\010\000\029\000\036\000\129\000\158\000\036\000\129\000\ \158\000\255\255\000\000\000\000\030\000\000\000\162\000\002\000\ \000\000\001\000\002\000\005\000\006\000\007\000\008\000\009\000\ \010\000\013\000\009\000\010\000\014\000\015\000\016\000\014\000\ \015\000\016\000\010\000\017\000\018\000\010\000\017\000\020\000\ \022\000\024\000\026\000\034\000\030\000\039\000\041\000\042\000\ \044\000\047\000\010\000\010\000\047\000\010\000\069\000\049\000\ \010\000\036\000\049\000\050\000\050\000\070\000\072\000\050\000\ \073\000\075\000\076\000\078\000\079\000\081\000\082\000\084\000\ \085\000\087\000\047\000\000\000\000\000\003\000\035\000\088\000\ \049\000\047\000\050\000\047\000\047\000\093\000\047\000\049\000\ \094\000\049\000\049\000\104\000\049\000\105\000\107\000\108\000\ \109\000\111\000\116\000\047\000\047\000\117\000\122\000\049\000\ \049\000\049\000\049\000\138\000\171\000\148\000\130\000\050\000\ \148\000\130\000\050\000\010\000\010\000\129\000\129\000\120\000\ \120\000\152\000\172\000\120\000\152\000\131\000\173\000\159\000\ \131\000\174\000\047\000\047\000\047\000\047\000\047\000\178\000\ \049\000\049\000\049\000\049\000\049\000\047\000\120\000\047\000\ \175\000\052\000\175\000\049\000\052\000\049\000\159\000\155\000\ \155\000\107\000\180\000\155\000\132\000\184\000\186\000\132\000\ \187\000\197\000\047\000\047\000\134\000\047\000\206\000\134\000\ \049\000\049\000\052\000\049\000\207\000\255\255\155\000\135\000\ \155\000\052\000\135\000\052\000\052\000\155\000\052\000\182\000\ \053\000\200\000\201\000\053\000\200\000\201\000\255\255\255\255\ \183\000\052\000\052\000\052\000\052\000\255\255\255\255\124\000\ \113\000\113\000\124\000\136\000\113\000\255\255\136\000\255\255\ \255\255\053\000\175\000\126\000\255\255\040\000\126\000\033\000\ \053\000\255\255\053\000\053\000\051\000\053\000\137\000\113\000\ \130\000\137\000\052\000\052\000\052\000\052\000\052\000\142\000\ \053\000\053\000\053\000\053\000\030\000\052\000\054\000\052\000\ \131\000\054\000\255\255\255\255\255\255\255\255\255\255\182\000\ \255\255\036\000\129\000\127\000\255\255\113\000\127\000\255\255\ \183\000\144\000\052\000\052\000\144\000\052\000\202\000\054\000\ \255\255\053\000\053\000\053\000\053\000\053\000\054\000\132\000\ \054\000\054\000\255\255\054\000\053\000\255\255\053\000\134\000\ \255\255\255\255\124\000\255\255\255\255\202\000\054\000\054\000\ \054\000\054\000\135\000\189\000\255\255\255\255\126\000\047\000\ \189\000\053\000\053\000\255\255\053\000\049\000\255\255\255\255\ \255\255\255\255\050\000\146\000\255\255\255\255\146\000\055\000\ \255\255\124\000\055\000\113\000\255\255\255\255\136\000\054\000\ \054\000\054\000\054\000\054\000\255\255\126\000\255\255\255\255\ \255\255\255\255\054\000\255\255\054\000\255\255\127\000\147\000\ \055\000\137\000\147\000\255\255\255\255\255\255\255\255\055\000\ \151\000\055\000\055\000\151\000\055\000\255\255\056\000\054\000\ \054\000\056\000\054\000\148\000\130\000\255\255\255\255\055\000\ \055\000\055\000\055\000\255\255\255\255\127\000\120\000\152\000\ \255\255\255\255\255\255\131\000\144\000\190\000\255\255\056\000\ \255\255\182\000\190\000\255\255\255\255\255\255\056\000\189\000\ \056\000\056\000\183\000\056\000\255\255\255\255\255\255\052\000\ \055\000\055\000\055\000\055\000\055\000\255\255\056\000\056\000\ \056\000\056\000\132\000\055\000\057\000\055\000\255\255\057\000\ \192\000\168\000\134\000\168\000\255\255\192\000\139\000\139\000\ \255\255\055\000\139\000\255\255\255\255\135\000\146\000\255\255\ \055\000\055\000\255\255\055\000\255\255\057\000\053\000\056\000\ \056\000\056\000\056\000\056\000\057\000\139\000\057\000\057\000\ \255\255\057\000\056\000\255\255\056\000\124\000\255\255\113\000\ \255\255\136\000\147\000\255\255\057\000\057\000\057\000\057\000\ \056\000\126\000\058\000\151\000\255\255\058\000\255\255\056\000\ \056\000\190\000\056\000\255\255\137\000\255\255\255\255\255\255\ \168\000\255\255\168\000\168\000\145\000\145\000\255\255\255\255\ \145\000\255\255\255\255\058\000\054\000\057\000\057\000\057\000\ \057\000\057\000\058\000\255\255\058\000\058\000\255\255\058\000\ \057\000\127\000\057\000\145\000\192\000\164\000\164\000\144\000\ \255\255\164\000\058\000\058\000\058\000\058\000\255\255\255\255\ \255\255\189\000\255\255\255\255\255\255\057\000\057\000\169\000\ \057\000\169\000\255\255\255\255\164\000\255\255\164\000\255\255\ \059\000\059\000\139\000\164\000\059\000\255\255\255\255\255\255\ \255\255\255\255\255\255\058\000\058\000\058\000\058\000\058\000\ \255\255\167\000\167\000\255\255\255\255\167\000\058\000\059\000\ \058\000\146\000\059\000\255\255\255\255\055\000\255\255\255\255\ \255\255\059\000\255\255\059\000\059\000\255\255\059\000\255\255\ \167\000\255\255\167\000\058\000\058\000\255\255\058\000\167\000\ \255\255\059\000\059\000\059\000\059\000\147\000\169\000\060\000\ \169\000\169\000\060\000\255\255\255\255\255\255\151\000\255\255\ \145\000\255\255\255\255\190\000\056\000\255\255\255\255\255\255\ \255\255\255\255\154\000\154\000\255\255\168\000\154\000\255\255\ \060\000\255\255\059\000\059\000\059\000\059\000\059\000\060\000\ \255\255\060\000\060\000\255\255\060\000\059\000\255\255\059\000\ \255\255\154\000\255\255\255\255\255\255\255\255\192\000\060\000\ \060\000\060\000\060\000\255\255\255\255\061\000\255\255\255\255\ \061\000\255\255\059\000\059\000\255\255\059\000\255\255\255\255\ \255\255\255\255\057\000\255\255\154\000\255\255\154\000\154\000\ \255\255\255\255\255\255\198\000\198\000\139\000\061\000\198\000\ \060\000\060\000\060\000\060\000\060\000\061\000\255\255\061\000\ \061\000\255\255\061\000\060\000\062\000\060\000\255\255\062\000\ \255\255\255\255\198\000\255\255\198\000\061\000\061\000\061\000\ \061\000\198\000\255\255\156\000\156\000\255\255\255\255\156\000\ \060\000\060\000\255\255\060\000\255\255\062\000\255\255\255\255\ \058\000\255\255\255\255\255\255\062\000\255\255\062\000\062\000\ \255\255\062\000\156\000\169\000\255\255\154\000\061\000\061\000\ \061\000\061\000\061\000\145\000\062\000\062\000\062\000\062\000\ \255\255\061\000\063\000\061\000\255\255\063\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\156\000\ \156\000\255\255\255\255\255\255\255\255\255\255\061\000\061\000\ \255\255\061\000\255\255\063\000\255\255\062\000\062\000\062\000\ \062\000\062\000\063\000\255\255\063\000\063\000\255\255\063\000\ \062\000\255\255\062\000\255\255\205\000\205\000\255\255\059\000\ \205\000\255\255\063\000\063\000\063\000\063\000\255\255\255\255\ \064\000\255\255\255\255\064\000\255\255\062\000\062\000\255\255\ \062\000\255\255\255\255\205\000\255\255\205\000\255\255\255\255\ \255\255\255\255\205\000\255\255\255\255\255\255\255\255\255\255\ \255\255\064\000\255\255\063\000\063\000\063\000\063\000\063\000\ \064\000\255\255\064\000\064\000\255\255\064\000\063\000\065\000\ \063\000\255\255\065\000\255\255\255\255\060\000\255\255\255\255\ \064\000\064\000\064\000\064\000\255\255\255\255\160\000\160\000\ \255\255\255\255\160\000\063\000\063\000\255\255\063\000\255\255\ \065\000\154\000\255\255\255\255\255\255\255\255\255\255\065\000\ \255\255\065\000\065\000\255\255\065\000\160\000\255\255\255\255\ \255\255\064\000\064\000\064\000\064\000\064\000\255\255\065\000\ \065\000\065\000\065\000\255\255\064\000\066\000\064\000\255\255\ \066\000\255\255\255\255\061\000\255\255\255\255\255\255\255\255\ \160\000\255\255\160\000\160\000\255\255\255\255\255\255\163\000\ \163\000\064\000\064\000\163\000\064\000\255\255\066\000\255\255\ \065\000\065\000\065\000\065\000\065\000\066\000\255\255\066\000\ \066\000\255\255\066\000\065\000\255\255\065\000\163\000\255\255\ \199\000\199\000\062\000\255\255\199\000\066\000\066\000\066\000\ \066\000\255\255\092\000\092\000\255\255\255\255\092\000\255\255\ \065\000\065\000\156\000\065\000\255\255\255\255\255\255\199\000\ \255\255\255\255\255\255\163\000\163\000\255\255\255\255\255\255\ \255\255\092\000\255\255\255\255\092\000\255\255\066\000\066\000\ \066\000\066\000\066\000\092\000\255\255\092\000\092\000\255\255\ \092\000\066\000\097\000\066\000\199\000\097\000\255\255\199\000\ \063\000\255\255\255\255\092\000\092\000\092\000\092\000\255\255\ \255\255\255\255\255\255\255\255\165\000\165\000\066\000\066\000\ \165\000\066\000\255\255\097\000\255\255\255\255\255\255\255\255\ \255\255\255\255\097\000\255\255\097\000\097\000\255\255\097\000\ \255\255\255\255\255\255\165\000\092\000\092\000\092\000\092\000\ \092\000\255\255\097\000\097\000\097\000\097\000\255\255\092\000\ \098\000\092\000\255\255\098\000\255\255\255\255\064\000\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \165\000\165\000\255\255\255\255\092\000\092\000\255\255\092\000\ \255\255\098\000\255\255\097\000\097\000\097\000\097\000\097\000\ \098\000\255\255\098\000\098\000\255\255\098\000\097\000\255\255\ \097\000\255\255\255\255\255\255\255\255\065\000\255\255\255\255\ \098\000\098\000\098\000\098\000\097\000\255\255\195\000\195\000\ \255\255\255\255\195\000\097\000\097\000\160\000\097\000\255\255\ \255\255\203\000\203\000\255\255\255\255\203\000\255\255\255\255\ \255\255\099\000\255\255\255\255\099\000\195\000\255\255\255\255\ \255\255\098\000\098\000\098\000\098\000\098\000\255\255\255\255\ \203\000\255\255\255\255\255\255\098\000\255\255\098\000\255\255\ \255\255\255\255\099\000\066\000\255\255\255\255\098\000\255\255\ \195\000\099\000\195\000\099\000\099\000\195\000\099\000\255\255\ \255\255\098\000\098\000\203\000\098\000\203\000\163\000\255\255\ \203\000\099\000\099\000\099\000\099\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\199\000\ \255\255\100\000\100\000\255\255\255\255\100\000\255\255\255\255\ \255\255\092\000\099\000\099\000\099\000\099\000\099\000\255\255\ \255\255\255\255\255\255\255\255\255\255\099\000\255\255\099\000\ \100\000\100\000\100\000\255\255\255\255\101\000\101\000\100\000\ \255\255\101\000\255\255\255\255\100\000\102\000\100\000\255\255\ \102\000\255\255\099\000\099\000\255\255\099\000\255\255\255\255\ \097\000\255\255\100\000\100\000\101\000\101\000\101\000\100\000\ \255\255\255\255\255\255\101\000\255\255\255\255\102\000\255\255\ \101\000\255\255\101\000\165\000\255\255\102\000\255\255\102\000\ \102\000\255\255\102\000\255\255\255\255\255\255\101\000\101\000\ \255\255\255\255\255\255\101\000\255\255\102\000\102\000\102\000\ \102\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\103\000\255\255\255\255\103\000\098\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\102\000\102\000\ \102\000\102\000\102\000\103\000\255\255\255\255\255\255\255\255\ \255\255\102\000\103\000\102\000\103\000\103\000\255\255\103\000\ \255\255\255\255\255\255\102\000\255\255\255\255\255\255\255\255\ \255\255\255\255\103\000\103\000\103\000\103\000\102\000\102\000\ \255\255\102\000\255\255\255\255\255\255\195\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \203\000\255\255\255\255\255\255\255\255\255\255\255\255\099\000\ \255\255\255\255\255\255\103\000\103\000\103\000\103\000\103\000\ \255\255\255\255\255\255\255\255\255\255\255\255\103\000\255\255\ \103\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\103\000\103\000\255\255\103\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\ \100\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\101\000\255\255\255\255\255\255\ \255\255\255\255\255\255\102\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\ \103\000"; Lexing.lex_base_code = "\000\000\000\000\001\000\000\000\000\000\000\000\000\000\001\000\ \001\000\002\000\006\000\000\000\000\000\000\000\005\000\007\000\ \008\000\009\000\000\000\043\000\000\000\040\000\000\000\037\000\ \000\000\034\000\000\000\031\000\000\000\000\000\000\000\051\000\ \000\000\000\000\007\000\000\000\000\000\064\000\000\000\008\000\ \000\000\000\000\000\000\025\000\000\000\072\000\001\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000"; Lexing.lex_backtrk_code = "\001\000\000\000\025\000\000\000\000\000\031\000\034\000\037\000\ \040\000\043\000\001\000\000\000\000\000\000\000\043\000\043\000\ \043\000\043\000\043\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \051\000\000\000\000\000\000\000\000\000\000\000\064\000\000\000\ \000\000\072\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000"; Lexing.lex_default_code = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000"; Lexing.lex_trans_code = "\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\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\ \004\000\000\000\000\000\007\000\007\000\000\000\004\000\000\000\ \000\000\007\000\010\000\010\000\000\000\046\000\000\000\000\000\ \010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\013\000\016\000\000\000\019\000\028\000\019\000\ \013\000\016\000\019\000\019\000\019\000\019\000\019\000\056\000\ \069\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\059\000\022\000\000\000\000\000\000\000\ \000\000\000\000\022\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000"; Lexing.lex_check_code = "\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\000\000\255\255\255\255\255\255\255\255\255\255\010\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\ \000\000\255\255\255\255\000\000\007\000\255\255\010\000\255\255\ \255\255\010\000\000\000\008\000\255\255\029\000\255\255\255\255\ \010\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\000\000\000\000\255\255\000\000\002\000\009\000\ \010\000\010\000\014\000\010\000\015\000\016\000\017\000\034\000\ \039\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\035\000\000\000\255\255\255\255\255\255\ \255\255\255\255\010\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\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255"; Lexing.lex_code = "\255\000\002\255\002\255\255\006\255\255\007\255\255\004\255\255\ \005\255\255\008\255\255\003\255\255\000\003\255\013\255\255\000\ \004\255\000\005\255\000\006\255\000\007\255\000\008\255\010\255\ \009\255\255\000\009\001\010\255\010\255\255\012\255\011\255\255\ \000\011\001\012\255\012\255\255\000\013\255"; } let rec parse_bol c lexbuf = lexbuf.Lexing.lex_mem <- Array.create 14 (-1) ; (* L=1 [2] <- p ; *) lexbuf.Lexing.lex_mem.(2) <- lexbuf.Lexing.lex_curr_pos ; __ocaml_lex_parse_bol_rec c lexbuf 0 and __ocaml_lex_parse_bol_rec c lexbuf __ocaml_lex_state = match Lexing.new_engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 417 "wikicreole_client.mll" ( end_paragraph c 0; parse_bol c lexbuf ) # 1057 "wikicreole_client.ml" | 1 -> let # 422 "wikicreole_client.mll" att # 1063 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 422 "wikicreole_client.mll" ( end_paragraph c 0; assert (match c.stack with Paragraph _ -> true | _ -> false); let l = count '=' (Lexing.lexeme lexbuf) in c.stack <- Heading (l, read_attribs att parse_attribs c lexbuf); c.heading <- true; parse_rem c lexbuf ) # 1074 "wikicreole_client.ml" | 2 -> let # 430 "wikicreole_client.mll" att # 1080 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 430 "wikicreole_client.mll" ( let lev = count '*' (Lexing.lexeme lexbuf) in if not (start_list_item c Unordered lev att parse_attribs lexbuf) then begin let s = Lexing.lexeme lexbuf in let l = String.index s '*' in if l > 0 then push_string c (String.sub s 0 l); for i = 1 to lev / 2 - 1 do style_change c Bold "" parse_attribs lexbuf done; if lev land 1 = 1 then begin style_change c Bold "" parse_attribs lexbuf; push_string c "*"; push_string c att; end else style_change c Bold att parse_attribs lexbuf end; parse_rem c lexbuf ) # 1104 "wikicreole_client.ml" | 3 -> let # 451 "wikicreole_client.mll" att # 1110 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 451 "wikicreole_client.mll" ( let lev = count '#' (Lexing.lexeme lexbuf) in if not (start_list_item c Ordered lev att parse_attribs lexbuf) then begin let s = Lexing.lexeme lexbuf in let l = String.index s '#' in if l > 0 then push_string c (String.sub s 0 l); for i = 1 to lev / 2 - 1 do style_change c Monospace "" parse_attribs lexbuf done; if lev land 1 = 1 then begin style_change c Monospace "" parse_attribs lexbuf; push_string c "#"; push_string c att; end else style_change c Bold att parse_attribs lexbuf end; parse_rem c lexbuf ) # 1134 "wikicreole_client.ml" | 4 -> let # 472 "wikicreole_client.mll" att # 1140 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 472 "wikicreole_client.mll" ( let (list_attribs, item_attribs) = read_list_attribs att parse_attribs c lexbuf in if close_descr_entry c then c.stack <- Descr_title (item_attribs, c.stack) else begin end_paragraph c 0; c.stack <- Descr_title (item_attribs, Descr (list_attribs, c.stack)); c.descr <- [] end; parse_rem c lexbuf ) # 1156 "wikicreole_client.ml" | 5 -> let # 485 "wikicreole_client.mll" att # 1162 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 485 "wikicreole_client.mll" ( let (list_attribs, item_attribs) = read_list_attribs att parse_attribs c lexbuf in if close_descr_entry c then c.stack <- Descr_def (item_attribs, c.stack) else begin end_paragraph c 0; c.stack <- Descr_def (item_attribs, Descr (list_attribs, c.stack)); c.descr <- [] end; parse_rem c lexbuf ) # 1178 "wikicreole_client.ml" | 6 -> let # 498 "wikicreole_client.mll" att # 1184 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_mem.(1) in # 498 "wikicreole_client.mll" ( end_paragraph c 0; c.flow <- c.build.hr_elem (read_attribs att parse_attribs c lexbuf) :: c.flow; parse_bol c lexbuf ) # 1193 "wikicreole_client.ml" | 7 -> let # 504 "wikicreole_client.mll" att # 1199 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_mem.(1) in # 504 "wikicreole_client.mll" ( end_paragraph c 0; parse_nowiki c (read_attribs att parse_attribs c lexbuf) lexbuf ) # 1206 "wikicreole_client.ml" | 8 -> let # 508 "wikicreole_client.mll" att # 1212 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 508 "wikicreole_client.mll" ( start_table_row c false (read_table_attribs att parse_attribs c lexbuf); parse_rem c lexbuf ) # 1220 "wikicreole_client.ml" | 9 -> let # 513 "wikicreole_client.mll" att # 1226 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 513 "wikicreole_client.mll" ( start_table_row c true (read_table_attribs att parse_attribs c lexbuf); parse_rem c lexbuf ) # 1234 "wikicreole_client.ml" | 10 -> let # 518 "wikicreole_client.mll" att # 1240 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in # 518 "wikicreole_client.mll" ( let attribs = read_attribs att parse_attribs c lexbuf in if attribs <> [] then (match c.stack with | Paragraph _ -> c.stack <- Paragraph attribs | _ -> ()); parse_rem c lexbuf ) # 1252 "wikicreole_client.ml" | 11 -> # 527 "wikicreole_client.mll" ( parse_rem c lexbuf ) # 1259 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_bol_rec c lexbuf __ocaml_lex_state and parse_rem c lexbuf = __ocaml_lex_parse_rem_rec c lexbuf 47 and __ocaml_lex_parse_rem_rec c lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 533 "wikicreole_client.mll" ( (* Headings are single lines *) if c.heading then end_paragraph c 0 else push_chars c lexbuf; parse_bol c lexbuf ) # 1277 "wikicreole_client.ml" | 1 -> let # 541 "wikicreole_client.mll" att # 1283 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 541 "wikicreole_client.mll" ( style_change c Bold att parse_attribs lexbuf; parse_rem c lexbuf ) # 1290 "wikicreole_client.ml" | 2 -> let # 545 "wikicreole_client.mll" att # 1296 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 545 "wikicreole_client.mll" ( style_change c Italic att parse_attribs lexbuf; parse_rem c lexbuf ) # 1303 "wikicreole_client.ml" | 3 -> let # 549 "wikicreole_client.mll" att # 1309 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 549 "wikicreole_client.mll" ( style_change c Monospace att parse_attribs lexbuf; parse_rem c lexbuf ) # 1316 "wikicreole_client.ml" | 4 -> let # 553 "wikicreole_client.mll" att # 1322 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 553 "wikicreole_client.mll" ( style_change c Superscripted att parse_attribs lexbuf; parse_rem c lexbuf ) # 1329 "wikicreole_client.ml" | 5 -> let # 557 "wikicreole_client.mll" att # 1335 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 557 "wikicreole_client.mll" ( style_change c Subscripted att parse_attribs lexbuf; parse_rem c lexbuf ) # 1342 "wikicreole_client.ml" | 6 -> let # 561 "wikicreole_client.mll" att # 1348 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 561 "wikicreole_client.mll" ( style_change c Underlined att parse_attribs lexbuf; parse_rem c lexbuf ) # 1355 "wikicreole_client.ml" | 7 -> let # 565 "wikicreole_client.mll" att # 1361 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 565 "wikicreole_client.mll" ( style_change c Linethrough att parse_attribs lexbuf; parse_rem c lexbuf ) # 1368 "wikicreole_client.ml" | 8 -> # 569 "wikicreole_client.mll" ( if c.heading then end_paragraph c 0 else push_chars c lexbuf; parse_bol c lexbuf ) # 1379 "wikicreole_client.ml" | 9 -> let # 576 "wikicreole_client.mll" att # 1385 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 577 "wikicreole_client.mll" ( parse_link c (read_attribs att parse_attribs c lexbuf) lexbuf ) # 1389 "wikicreole_client.ml" | 10 -> # 578 "wikicreole_client.mll" ( begin match c.stack with Link (addr, attribs, stack) -> pop_link c addr attribs stack | _ -> push_chars c lexbuf end; parse_rem c lexbuf ) # 1402 "wikicreole_client.ml" | 11 -> # 588 "wikicreole_client.mll" ( if c.link then push_chars c lexbuf else let addr = Lexing.lexeme lexbuf in c.inline_mix <- c.build.a_elem [] c.sp addr [c.build.chars addr] :: c.inline_mix; parse_rem c lexbuf ) # 1415 "wikicreole_client.ml" | 12 -> let # 597 "wikicreole_client.mll" att # 1421 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 597 "wikicreole_client.mll" ( push c (c.build.br_elem (read_attribs att parse_attribs c lexbuf)); parse_rem c lexbuf ) # 1428 "wikicreole_client.ml" | 13 -> let # 601 "wikicreole_client.mll" att # 1434 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 602 "wikicreole_client.mll" ( parse_image c (read_attribs att parse_attribs c lexbuf) lexbuf ) # 1438 "wikicreole_client.ml" | 14 -> # 603 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in let l = String.length s in let name = String.sub s 2 (l - 2) in let start = Lexing.lexeme_start lexbuf in let (wiki_content, ext_info) = c.build.plugin name in let content, args = parse_extension start name wiki_content [] c lexbuf in match build_extension lexbuf start name ext_info args c content with | A_content i -> push c i; parse_rem c lexbuf | Link_plugin (addr, attribs, content) -> c.link_content <- [ content ]; pop_link c addr attribs c.stack; parse_rem c lexbuf | Block b -> end_paragraph c 0; c.flow <- b :: c.flow; parse_bol c lexbuf ) # 1464 "wikicreole_client.ml" | 15 -> let # 625 "wikicreole_client.mll" att # 1470 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 3) lexbuf.Lexing.lex_curr_pos in # 626 "wikicreole_client.mll" ( parse_tt c (read_attribs att parse_attribs c lexbuf) lexbuf ) # 1474 "wikicreole_client.ml" | 16 -> # 627 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in (* It amounts to the same to quote a UTF-8 char or its first byte *) push_string c (String.sub s 1 1); parse_rem c lexbuf ) # 1484 "wikicreole_client.ml" | 17 -> # 633 "wikicreole_client.mll" ( push c c.build.nbsp; parse_rem c lexbuf ) # 1492 "wikicreole_client.ml" | 18 -> # 637 "wikicreole_client.mll" ( if not (close_row c) then push_chars c lexbuf; parse_bol c lexbuf ) # 1501 "wikicreole_client.ml" | 19 -> let # 642 "wikicreole_client.mll" att # 1507 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 1) lexbuf.Lexing.lex_curr_pos in # 642 "wikicreole_client.mll" ( if close_entry c then c.stack <- Entry (false, read_attribs att parse_attribs c lexbuf, c.stack) else push_chars c lexbuf; parse_rem c lexbuf ) # 1519 "wikicreole_client.ml" | 20 -> let # 651 "wikicreole_client.mll" att # 1525 "wikicreole_client.ml" = Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) lexbuf.Lexing.lex_curr_pos in # 651 "wikicreole_client.mll" ( if close_entry c then c.stack <- Entry (true, read_attribs att parse_attribs c lexbuf, c.stack) else push_chars c lexbuf; parse_rem c lexbuf ) # 1537 "wikicreole_client.ml" | 21 -> # 660 "wikicreole_client.mll" ( push_chars c lexbuf; parse_rem c lexbuf ) # 1545 "wikicreole_client.ml" | 22 -> # 664 "wikicreole_client.mll" ( Js.alert ("Wikicreole: Unrecognized char "^(Lexing.lexeme lexbuf)^"."); raise Unrecognized_char ) # 1554 "wikicreole_client.ml" | 23 -> # 669 "wikicreole_client.mll" ( end_paragraph c 0 ) # 1561 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_rem_rec c lexbuf __ocaml_lex_state and parse_link c attribs lexbuf = __ocaml_lex_parse_link_rec c attribs lexbuf 124 and __ocaml_lex_parse_link_rec c attribs lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 675 "wikicreole_client.mll" ( if c.link then begin push_string c "[["; (*VVV We loose attributes *) push_chars c lexbuf end else let s = Lexing.lexeme lexbuf in let addr = c.build.make_href c.sp (String.sub s 0 (String.length s - 2)) in c.inline_mix <- c.build.a_elem attribs c.sp addr [c.build.chars addr] :: c.inline_mix; parse_rem c lexbuf ) # 1585 "wikicreole_client.ml" | 1 -> # 689 "wikicreole_client.mll" ( if c.link then begin push_string c "[["; (*VVV We loose attributes *) push_chars c lexbuf end else begin let s = Lexing.lexeme lexbuf in let addr = c.build.make_href c.sp (String.sub s 0 (String.length s - 1)) in c.stack <- Link (addr, attribs, c.stack); c.link <- true end; parse_rem c lexbuf ) # 1602 "wikicreole_client.ml" | 2 -> # 702 "wikicreole_client.mll" ( push_string c "[["; (*VVV We loose attributes *) parse_rem c lexbuf ) # 1610 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_link_rec c attribs lexbuf __ocaml_lex_state and parse_image c attribs lexbuf = __ocaml_lex_parse_image_rec c attribs lexbuf 129 and __ocaml_lex_parse_image_rec c attribs lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 710 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in let i = String.index s '|' in let url = c.build.make_href c.sp (String.sub s 0 i) in let alt = String.sub s (i + 1) (String.length s - i - 3) in push c (c.build.img_elem attribs url alt); parse_rem c lexbuf ) # 1628 "wikicreole_client.ml" | 1 -> # 718 "wikicreole_client.mll" ( push_string c "{{"; (*VVV We loose attributes *) parse_rem c lexbuf ) # 1636 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_image_rec c attribs lexbuf __ocaml_lex_state and parse_tt c attribs lexbuf = __ocaml_lex_parse_tt_rec c attribs lexbuf 134 and __ocaml_lex_parse_tt_rec c attribs lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 725 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in let txt = String.sub s 0 (String.length s - 3) in push c (c.build.tt_elem attribs [c.build.inline (c.build.chars txt)]); parse_rem c lexbuf ) # 1652 "wikicreole_client.ml" | 1 -> # 731 "wikicreole_client.mll" ( push_string c "{{{"; (*VVV We loose attributes *) parse_rem c lexbuf ) # 1660 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_tt_rec c attribs lexbuf __ocaml_lex_state and parse_nowiki c attribs lexbuf = __ocaml_lex_parse_nowiki_rec c attribs lexbuf 139 and __ocaml_lex_parse_nowiki_rec c attribs lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 738 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in c.pre_content <- String.sub s 1 (String.length s - 1) :: c.pre_content; parse_nowiki c attribs lexbuf ) # 1675 "wikicreole_client.ml" | 1 -> # 743 "wikicreole_client.mll" ( c.flow <- c.build.pre_elem attribs (List.rev c.pre_content) :: c.flow; c.pre_content <- []; parse_bol c lexbuf ) # 1684 "wikicreole_client.ml" | 2 -> # 748 "wikicreole_client.mll" ( c.pre_content <- Lexing.lexeme lexbuf :: c.pre_content; parse_nowiki c attribs lexbuf ) # 1692 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_nowiki_rec c attribs lexbuf __ocaml_lex_state and parse_extension start name wiki_content args c lexbuf = __ocaml_lex_parse_extension_rec start name wiki_content args c lexbuf 154 and __ocaml_lex_parse_extension_rec start name wiki_content args c lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 755 "wikicreole_client.mll" ( if wiki_content then ((parse_extension_content_wiki start 0 false name "" c lexbuf), args) else ((parse_extension_content_nowiki start name "" c lexbuf), args) ) # 1708 "wikicreole_client.ml" | 1 -> # 761 "wikicreole_client.mll" ( (None, args) ) # 1715 "wikicreole_client.ml" | 2 -> # 764 "wikicreole_client.mll" ( parse_extension start name wiki_content args c lexbuf ) # 1722 "wikicreole_client.ml" | 3 -> let # 768 "wikicreole_client.mll" quote # 1728 "wikicreole_client.ml" = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_curr_pos + -1) in # 768 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in let i = String.index s '=' in let arg_name = String.sub s 0 i in let arg_value = parse_arg_value quote "" c lexbuf in parse_extension start name wiki_content ((arg_name, arg_value)::args) c lexbuf ) # 1739 "wikicreole_client.ml" | 4 -> # 776 "wikicreole_client.mll" ( ignore (if wiki_content then ((parse_extension_content_wiki start 0 false name "" c lexbuf), args) else ((parse_extension_content_nowiki start name "" c lexbuf), args)); (Some ("Syntax error in extension "^name), args) ) # 1751 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_extension_rec start name wiki_content args c lexbuf __ocaml_lex_state and parse_extension_content_wiki start lev nowiki name beg c lexbuf = __ocaml_lex_parse_extension_content_wiki_rec start lev nowiki name beg c lexbuf 168 and __ocaml_lex_parse_extension_content_wiki_rec start lev nowiki name beg c lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> let # 787 "wikicreole_client.mll" ch # 1763 "wikicreole_client.ml" = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 1) in # 787 "wikicreole_client.mll" ( parse_extension_content_wiki start lev nowiki name (beg^"~"^(String.make 1 ch)) c lexbuf ) # 1770 "wikicreole_client.ml" | 1 -> # 791 "wikicreole_client.mll" ( if nowiki then parse_extension_content_wiki start lev nowiki name (beg^"<<") c lexbuf else parse_extension_content_wiki start (lev+1) nowiki name (beg^"<<") c lexbuf ) # 1783 "wikicreole_client.ml" | 2 -> # 800 "wikicreole_client.mll" ( parse_extension_content_wiki start lev true name (beg^"{{{") c lexbuf ) # 1791 "wikicreole_client.ml" | 3 -> # 804 "wikicreole_client.mll" ( (*VVV Warning: not quotable! *) parse_extension_content_wiki start lev false name (beg^"}}}") c lexbuf ) # 1800 "wikicreole_client.ml" | 4 -> # 809 "wikicreole_client.mll" ( if nowiki then parse_extension_content_wiki start lev nowiki name (beg^">>") c lexbuf else if lev>0 then parse_extension_content_wiki start (lev-1) nowiki name (beg^">>") c lexbuf else Some beg ) # 1816 "wikicreole_client.ml" | 5 -> # 821 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in parse_extension_content_wiki start lev nowiki name (beg^s) c lexbuf ) # 1824 "wikicreole_client.ml" | 6 -> # 825 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in parse_extension_content_wiki start lev nowiki name (beg^s) c lexbuf ) # 1832 "wikicreole_client.ml" | 7 -> # 829 "wikicreole_client.mll" ( Js.alert ("Wikicreole: Unrecognized char in extension "^ (Lexing.lexeme lexbuf)^"."); raise Unrecognized_char ) # 1842 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_extension_content_wiki_rec start lev nowiki name beg c lexbuf __ocaml_lex_state and parse_extension_content_nowiki start name beg c lexbuf = __ocaml_lex_parse_extension_content_nowiki_rec start name beg c lexbuf 182 and __ocaml_lex_parse_extension_content_nowiki_rec start name beg c lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 838 "wikicreole_client.mll" ( parse_extension_content_nowiki start name (beg^">>") c lexbuf ) # 1856 "wikicreole_client.ml" | 1 -> # 842 "wikicreole_client.mll" ( Some beg ) # 1863 "wikicreole_client.ml" | 2 -> # 845 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in parse_extension_content_nowiki start name (beg^s) c lexbuf ) # 1871 "wikicreole_client.ml" | 3 -> # 849 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in parse_extension_content_nowiki start name (beg^s) c lexbuf ) # 1879 "wikicreole_client.ml" | 4 -> # 853 "wikicreole_client.mll" ( Js.alert ("Wikicreole: Unrecognized char in extension "^ (Lexing.lexeme lexbuf)^"."); raise Unrecognized_char ) # 1889 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_extension_content_nowiki_rec start name beg c lexbuf __ocaml_lex_state and parse_arg_value quote beg c lexbuf = __ocaml_lex_parse_arg_value_rec quote beg c lexbuf 189 and __ocaml_lex_parse_arg_value_rec quote beg c lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 863 "wikicreole_client.mll" ( raise Eof ) # 1902 "wikicreole_client.ml" | 1 -> let # 866 "wikicreole_client.mll" ch # 1908 "wikicreole_client.ml" = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 1) in # 866 "wikicreole_client.mll" ( parse_arg_value quote (beg^(String.make 1 ch)) c lexbuf ) # 1914 "wikicreole_client.ml" | 2 -> let # 869 "wikicreole_client.mll" ch # 1920 "wikicreole_client.ml" = Lexing.sub_lexeme_char lexbuf lexbuf.Lexing.lex_start_pos in # 869 "wikicreole_client.mll" ( if ch = quote then beg else parse_arg_value quote (beg^(String.make 1 ch)) c lexbuf ) # 1928 "wikicreole_client.ml" | 3 -> # 874 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in parse_arg_value quote (beg^s) c lexbuf ) # 1936 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_arg_value_rec quote beg c lexbuf __ocaml_lex_state and parse_attribs depth args oldargs c lexbuf = __ocaml_lex_parse_attribs_rec depth args oldargs c lexbuf 195 and __ocaml_lex_parse_attribs_rec depth args oldargs c lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 881 "wikicreole_client.mll" ( args::oldargs ) # 1949 "wikicreole_client.ml" | 1 -> # 884 "wikicreole_client.mll" ( parse_attribs depth args oldargs c lexbuf ) # 1956 "wikicreole_client.ml" | 2 -> let # 888 "wikicreole_client.mll" quote # 1962 "wikicreole_client.ml" = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_curr_pos + -1) in # 888 "wikicreole_client.mll" ( let s = Lexing.lexeme lexbuf in let i = String.index s '=' in let arg_name = String.sub s 0 i in let arg_value = parse_arg_value quote "" c lexbuf in parse_attribs depth ((arg_name, arg_value)::args) oldargs c lexbuf ) # 1972 "wikicreole_client.ml" | 3 -> # 895 "wikicreole_client.mll" ( args::oldargs ) # 1977 "wikicreole_client.ml" | 4 -> # 896 "wikicreole_client.mll" ( if depth > 1 then parse_attribs (depth - 1) [] (args::oldargs) c lexbuf else args::oldargs ) # 1986 "wikicreole_client.ml" | 5 -> # 901 "wikicreole_client.mll" ( []::args::oldargs ) # 1991 "wikicreole_client.ml" | 6 -> # 902 "wikicreole_client.mll" ( []::[]::args::oldargs ) # 1996 "wikicreole_client.ml" | 7 -> # 903 "wikicreole_client.mll" ( raise Eof ) # 2003 "wikicreole_client.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_parse_attribs_rec depth args oldargs c lexbuf __ocaml_lex_state ;; # 908 "wikicreole_client.mll" let context sp param b = { build = b; param = param; sp = sp; italic = false; bold = false; monospace = false; underlined = false; linethrough = false; subscripted = false; superscripted = false; heading = false; link = false; list_level = 0; inline_mix = []; link_content = []; pre_content = []; list = []; descr = []; flow = []; stack = Paragraph [] } let from_lexbuf sp param b lexbuf = let c = context sp param b in parse_bol c lexbuf; List.rev c.flow let from_string sp param b s = from_lexbuf sp param b (Lexing.from_string s) # 2042 "wikicreole_client.ml"