
module MenhirBasics = struct
  
  exception Error
  
  let _eRR =
    fun _s ->
      raise Error
  
  type token = 
    | STRING of 
# 103 "src/menhir_parser.mly"
       (string)
# 15 "src/menhir_parser.ml"
  
    | RBRACK
    | RBRACE
    | LBRACK
    | LBRACE
    | KEY of 
# 105 "src/menhir_parser.mly"
       (string)
# 24 "src/menhir_parser.ml"
  
    | INTEGER of 
# 101 "src/menhir_parser.mly"
       (int)
# 29 "src/menhir_parser.ml"
  
    | FLOAT of 
# 102 "src/menhir_parser.mly"
       (float)
# 34 "src/menhir_parser.ml"
  
    | EQUAL
    | EOF
    | DOT
    | DATE of 
# 104 "src/menhir_parser.mly"
       (float)
# 42 "src/menhir_parser.ml"
  
    | COMMA
    | BOOL of 
# 100 "src/menhir_parser.mly"
       (bool)
# 48 "src/menhir_parser.ml"
  
  
end

include MenhirBasics

# 1 "src/menhir_parser.mly"
  
open Types

type t = Value of value
       | Table of (Table.Key.t, t) Hashtbl.t
       | Tables of ((Table.Key.t, t) Hashtbl.t) list

(* Indicate if the given table is a [Regular] table (i.e. its name
 * is its real name), or if it is a [ArrayElement] (i.e. its name
 * is the name of the array containing the table). *)
type table_tag = Regular | ArrayElement

(* [lookup_table root keys]
 * For a given path [keys], look over [root] and fetch a table.
 * Creates empty subtables all along the way if needed. *)
let lookup_table root keys =
  List.fold_left
    (fun t k ->
       try match Hashtbl.find t k with
         | Table t   -> t
         | Value _   -> failwith ("lookup_table.")
         | Tables [] -> let sub = Hashtbl.create 0 in
           Hashtbl.replace t k (Tables [sub]) ;
           sub
         (* Return the last table defined *)
         | Tables t -> List.hd (List.rev t)
       with Not_found -> let sub = Hashtbl.create 0 in
         Hashtbl.add t k (Table sub) ;
         sub)
    root keys

(* [add_value t k v] add to the value [v], at the key [k],
 * in the table [t]. Fails if a value is already binded to [k]. *)
let add_value t k v =
  if Hashtbl.mem t k
  then failwith ("add_value")
  else Hashtbl.add t k (Value v)

(* [add_to_table root ks kvs] add [kvs] to table found following path
 * [ks] from [root] table.
 * Use it for a table not in array of tables. *)
let add_to_table root ks kvs =
  let t = lookup_table root ks in
  List.iter (fun (k, v) -> add_value t k v) kvs

(* [add_to_nested_table root ks kvs] add [kvs] to nested
 * table found following path [ks] from [root].
 * Use it for a table which is in an array of tables.  *)
let add_to_nested_table root ks kvs =

  (* [ts] are intermediate tables key,
   * [k] is the value key. *)
  let (ts, k) = let rec aux acc = function
      | [ x ]  -> (List.rev acc, x)
      | h :: q -> aux (h :: acc) q
      | []     -> assert false
    in aux [] ks in

  let t = lookup_table root ts in

  (* [insert_in_new_table ts kvs] create a new table, insert
   * [kvs], a (key * value) list into it, and pakc it with
   * tables [ts] into an array of table. *)
  let insert_table ts kvs =
    let t = Hashtbl.create 0 in
    List.iter(fun (k, v) -> add_value t k v) kvs ;
    Tables (ts @ [ t ]) in

  try match Hashtbl.find t k with
    | Tables ts -> Hashtbl.replace t k (insert_table ts kvs);
    | Table _   -> failwith (Printf.sprintf "%s is a table, not an array of tables" (Table.Key.to_string k))
    | Value _   -> failwith ("add_to_nested_table")
  with Not_found  -> Hashtbl.add t k (insert_table [] kvs)

(* Convert a value of local type [t] into a [Value.value]  *)
let rec convert = function
  | Table t   -> TTable (htbl_to_map t)
  | Value v   -> v
  | Tables ts ->
    TArray (NodeTable (List.filter (fun t -> Hashtbl.length t > 0) ts
                       |> List.map htbl_to_map))

and htbl_to_map h =
  Hashtbl.fold (fun k v map -> Table.add k (convert v) map)
    h Table.empty

let to_table key_values key_value_groups =
  let t = Hashtbl.create 0 in
  List.iter (fun ((tag, ks), kvs) ->
      match tag with
      | Regular      -> add_to_table t ks kvs
      | ArrayElement -> add_to_nested_table t ks kvs)
    (* Create a dummy table with empty key for values
     * which are direct children of root table.  *)
    (((Regular, []), key_values) :: key_value_groups) ;
  match convert (Table t) with TTable t -> t | _ -> assert false

# 153 "src/menhir_parser.ml"

type ('s, 'r) _menhir_state = 
  | MenhirState00 : ('s, _menhir_box_toml) _menhir_state
    (** State 00.
        Stack shape : <empty>.
        Start symbol: toml. *)

  | MenhirState04 : (('s, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_state
    (** State 04.
        Stack shape : list(keyValue).
        Start symbol: toml. *)

  | MenhirState05 : ((('s, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_state
    (** State 05.
        Stack shape : list(keyValue) LBRACK.
        Start symbol: toml. *)

  | MenhirState06 : (((('s, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_state
    (** State 06.
        Stack shape : list(keyValue) LBRACK LBRACK.
        Start symbol: toml. *)

  | MenhirState12 : (('s, _menhir_box_toml) _menhir_cell1_key, _menhir_box_toml) _menhir_state
    (** State 12.
        Stack shape : key.
        Start symbol: toml. *)

  | MenhirState18 : ((('s, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_group_header, _menhir_box_toml) _menhir_state
    (** State 18.
        Stack shape : list(keyValue) group_header.
        Start symbol: toml. *)

  | MenhirState19 : (((('s, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_group_header, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_state
    (** State 19.
        Stack shape : list(keyValue) group_header list(keyValue).
        Start symbol: toml. *)

  | MenhirState21 : (('s, _menhir_box_toml) _menhir_cell1_keyValue, _menhir_box_toml) _menhir_state
    (** State 21.
        Stack shape : keyValue.
        Start symbol: toml. *)

  | MenhirState24 : (('s, _menhir_box_toml) _menhir_cell1_key, _menhir_box_toml) _menhir_state
    (** State 24.
        Stack shape : key.
        Start symbol: toml. *)

  | MenhirState26 : ((('s, _menhir_box_toml) _menhir_cell1_key, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_state
    (** State 26.
        Stack shape : key LBRACK.
        Start symbol: toml. *)

  | MenhirState27 : (('s, _menhir_box_toml) _menhir_cell1_STRING, _menhir_box_toml) _menhir_state
    (** State 27.
        Stack shape : STRING.
        Start symbol: toml. *)

  | MenhirState29 : (('s, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_STRING, _menhir_box_toml) _menhir_state
    (** State 29.
        Stack shape : COMMA STRING.
        Start symbol: toml. *)

  | MenhirState35 : (('s, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_state
    (** State 35.
        Stack shape : LBRACK.
        Start symbol: toml. *)

  | MenhirState36 : (('s, _menhir_box_toml) _menhir_cell1_LBRACE, _menhir_box_toml) _menhir_state
    (** State 36.
        Stack shape : LBRACE.
        Start symbol: toml. *)

  | MenhirState40 : (('s, _menhir_box_toml) _menhir_cell1_keyValue, _menhir_box_toml) _menhir_state
    (** State 40.
        Stack shape : keyValue.
        Start symbol: toml. *)

  | MenhirState44 : (('s, _menhir_box_toml) _menhir_cell1_INTEGER, _menhir_box_toml) _menhir_state
    (** State 44.
        Stack shape : INTEGER.
        Start symbol: toml. *)

  | MenhirState46 : (('s, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_INTEGER, _menhir_box_toml) _menhir_state
    (** State 46.
        Stack shape : COMMA INTEGER.
        Start symbol: toml. *)

  | MenhirState51 : (('s, _menhir_box_toml) _menhir_cell1_FLOAT, _menhir_box_toml) _menhir_state
    (** State 51.
        Stack shape : FLOAT.
        Start symbol: toml. *)

  | MenhirState53 : (('s, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_FLOAT, _menhir_box_toml) _menhir_state
    (** State 53.
        Stack shape : COMMA FLOAT.
        Start symbol: toml. *)

  | MenhirState58 : (('s, _menhir_box_toml) _menhir_cell1_DATE, _menhir_box_toml) _menhir_state
    (** State 58.
        Stack shape : DATE.
        Start symbol: toml. *)

  | MenhirState60 : (('s, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_DATE, _menhir_box_toml) _menhir_state
    (** State 60.
        Stack shape : COMMA DATE.
        Start symbol: toml. *)

  | MenhirState65 : (('s, _menhir_box_toml) _menhir_cell1_BOOL, _menhir_box_toml) _menhir_state
    (** State 65.
        Stack shape : BOOL.
        Start symbol: toml. *)

  | MenhirState67 : (('s, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_BOOL, _menhir_box_toml) _menhir_state
    (** State 67.
        Stack shape : COMMA BOOL.
        Start symbol: toml. *)

  | MenhirState72 : (('s, _menhir_box_toml) _menhir_cell1_inline_table, _menhir_box_toml) _menhir_state
    (** State 72.
        Stack shape : inline_table.
        Start symbol: toml. *)

  | MenhirState73 : ((('s, _menhir_box_toml) _menhir_cell1_inline_table, _menhir_box_toml) _menhir_cell1_COMMA, _menhir_box_toml) _menhir_state
    (** State 73.
        Stack shape : inline_table COMMA.
        Start symbol: toml. *)

  | MenhirState74 : (((('s, _menhir_box_toml) _menhir_cell1_inline_table, _menhir_box_toml) _menhir_cell1_COMMA, _menhir_box_toml) _menhir_cell1_inline_table, _menhir_box_toml) _menhir_state
    (** State 74.
        Stack shape : inline_table COMMA inline_table.
        Start symbol: toml. *)

  | MenhirState79 : ((('s, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_cell1_array_start, _menhir_box_toml) _menhir_state
    (** State 79.
        Stack shape : LBRACK array_start.
        Start symbol: toml. *)

  | MenhirState81 : ((('s, _menhir_box_toml) _menhir_cell1_array_start, _menhir_box_toml) _menhir_cell1_COMMA, _menhir_box_toml) _menhir_state
    (** State 81.
        Stack shape : array_start COMMA.
        Start symbol: toml. *)

  | MenhirState82 : (((('s, _menhir_box_toml) _menhir_cell1_array_start, _menhir_box_toml) _menhir_cell1_COMMA, _menhir_box_toml) _menhir_cell1_array_start, _menhir_box_toml) _menhir_state
    (** State 82.
        Stack shape : array_start COMMA array_start.
        Start symbol: toml. *)


and ('s, 'r) _menhir_cell1_array_start = 
  | MenhirCell1_array_start of 's * ('s, 'r) _menhir_state * (Types.array)

and ('s, 'r) _menhir_cell1_group_header = 
  | MenhirCell1_group_header of 's * ('s, 'r) _menhir_state * (table_tag * Types.Table.key list)

and ('s, 'r) _menhir_cell1_inline_table = 
  | MenhirCell1_inline_table of 's * ('s, 'r) _menhir_state * (Types.table)

and ('s, 'r) _menhir_cell1_key = 
  | MenhirCell1_key of 's * ('s, 'r) _menhir_state * (Types.Table.key)

and ('s, 'r) _menhir_cell1_keyValue = 
  | MenhirCell1_keyValue of 's * ('s, 'r) _menhir_state * (Types.Table.key * Types.value)

and ('s, 'r) _menhir_cell1_list_keyValue_ = 
  | MenhirCell1_list_keyValue_ of 's * ('s, 'r) _menhir_state * ((Types.Table.key * Types.value) list)

and ('s, 'r) _menhir_cell1_BOOL = 
  | MenhirCell1_BOOL of 's * ('s, 'r) _menhir_state * 
# 100 "src/menhir_parser.mly"
       (bool)
# 324 "src/menhir_parser.ml"


and 's _menhir_cell0_BOOL = 
  | MenhirCell0_BOOL of 's * 
# 100 "src/menhir_parser.mly"
       (bool)
# 331 "src/menhir_parser.ml"


and ('s, 'r) _menhir_cell1_COMMA = 
  | MenhirCell1_COMMA of 's * ('s, 'r) _menhir_state

and ('s, 'r) _menhir_cell1_DATE = 
  | MenhirCell1_DATE of 's * ('s, 'r) _menhir_state * 
# 104 "src/menhir_parser.mly"
       (float)
# 341 "src/menhir_parser.ml"


and 's _menhir_cell0_DATE = 
  | MenhirCell0_DATE of 's * 
# 104 "src/menhir_parser.mly"
       (float)
# 348 "src/menhir_parser.ml"


and ('s, 'r) _menhir_cell1_FLOAT = 
  | MenhirCell1_FLOAT of 's * ('s, 'r) _menhir_state * 
# 102 "src/menhir_parser.mly"
       (float)
# 355 "src/menhir_parser.ml"


and 's _menhir_cell0_FLOAT = 
  | MenhirCell0_FLOAT of 's * 
# 102 "src/menhir_parser.mly"
       (float)
# 362 "src/menhir_parser.ml"


and ('s, 'r) _menhir_cell1_INTEGER = 
  | MenhirCell1_INTEGER of 's * ('s, 'r) _menhir_state * 
# 101 "src/menhir_parser.mly"
       (int)
# 369 "src/menhir_parser.ml"


and 's _menhir_cell0_INTEGER = 
  | MenhirCell0_INTEGER of 's * 
# 101 "src/menhir_parser.mly"
       (int)
# 376 "src/menhir_parser.ml"


and ('s, 'r) _menhir_cell1_LBRACE = 
  | MenhirCell1_LBRACE of 's * ('s, 'r) _menhir_state

and ('s, 'r) _menhir_cell1_LBRACK = 
  | MenhirCell1_LBRACK of 's * ('s, 'r) _menhir_state

and ('s, 'r) _menhir_cell1_STRING = 
  | MenhirCell1_STRING of 's * ('s, 'r) _menhir_state * 
# 103 "src/menhir_parser.mly"
       (string)
# 389 "src/menhir_parser.ml"


and 's _menhir_cell0_STRING = 
  | MenhirCell0_STRING of 's * 
# 103 "src/menhir_parser.mly"
       (string)
# 396 "src/menhir_parser.ml"


and _menhir_box_toml = 
  | MenhirBox_toml of (Types.table) [@@unboxed]

let _menhir_action_01 =
  fun _2 _3 ->
    (
# 160 "src/menhir_parser.mly"
                                 ( _2 :: _3 )
# 407 "src/menhir_parser.ml"
     : (bool list))

let _menhir_action_02 =
  fun () ->
    (
# 161 "src/menhir_parser.mly"
                  ( [] )
# 415 "src/menhir_parser.ml"
     : (bool list))

let _menhir_action_03 =
  fun _2 _3 ->
    (
# 160 "src/menhir_parser.mly"
                                 ( _2 :: _3 )
# 423 "src/menhir_parser.ml"
     : (float list))

let _menhir_action_04 =
  fun () ->
    (
# 161 "src/menhir_parser.mly"
                  ( [] )
# 431 "src/menhir_parser.ml"
     : (float list))

let _menhir_action_05 =
  fun _2 _3 ->
    (
# 160 "src/menhir_parser.mly"
                                 ( _2 :: _3 )
# 439 "src/menhir_parser.ml"
     : (float list))

let _menhir_action_06 =
  fun () ->
    (
# 161 "src/menhir_parser.mly"
                  ( [] )
# 447 "src/menhir_parser.ml"
     : (float list))

let _menhir_action_07 =
  fun _2 _3 ->
    (
# 160 "src/menhir_parser.mly"
                                 ( _2 :: _3 )
# 455 "src/menhir_parser.ml"
     : (int list))

let _menhir_action_08 =
  fun () ->
    (
# 161 "src/menhir_parser.mly"
                  ( [] )
# 463 "src/menhir_parser.ml"
     : (int list))

let _menhir_action_09 =
  fun _2 _3 ->
    (
# 160 "src/menhir_parser.mly"
                                 ( _2 :: _3 )
# 471 "src/menhir_parser.ml"
     : (string list))

let _menhir_action_10 =
  fun () ->
    (
# 161 "src/menhir_parser.mly"
                  ( [] )
# 479 "src/menhir_parser.ml"
     : (string list))

let _menhir_action_11 =
  fun _2 _3 ->
    (
# 160 "src/menhir_parser.mly"
                                 ( _2 :: _3 )
# 487 "src/menhir_parser.ml"
     : (Types.table list))

let _menhir_action_12 =
  fun () ->
    (
# 161 "src/menhir_parser.mly"
                  ( [] )
# 495 "src/menhir_parser.ml"
     : (Types.table list))

let _menhir_action_13 =
  fun () ->
    (
# 150 "src/menhir_parser.mly"
           ( NodeEmpty )
# 503 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_14 =
  fun _1 _2 ->
    (
# 151 "src/menhir_parser.mly"
                         ( NodeBool(_1 :: _2) )
# 511 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_15 =
  fun _1 _2 ->
    (
# 152 "src/menhir_parser.mly"
                               ( NodeInt(_1 :: _2) )
# 519 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_16 =
  fun _1 _2 ->
    (
# 153 "src/menhir_parser.mly"
                           ( NodeFloat(_1 :: _2) )
# 527 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_17 =
  fun _1 _2 ->
    (
# 154 "src/menhir_parser.mly"
                             ( NodeString(_1 :: _2) )
# 535 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_18 =
  fun _1 _2 ->
    (
# 155 "src/menhir_parser.mly"
                         ( NodeDate(_1 :: _2) )
# 543 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_19 =
  fun _2 _3 ->
    (
# 156 "src/menhir_parser.mly"
                                        ( NodeArray(_2 :: _3) )
# 551 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_20 =
  fun _1 _2 ->
    (
# 157 "src/menhir_parser.mly"
                                         ( NodeTable(_1 :: _2) )
# 559 "src/menhir_parser.ml"
     : (Types.array))

let _menhir_action_21 =
  fun _3 ->
    (
# 121 "src/menhir_parser.mly"
                                        ( ArrayElement, _3 )
# 567 "src/menhir_parser.ml"
     : (table_tag * Types.Table.key list))

let _menhir_action_22 =
  fun _2 ->
    (
# 122 "src/menhir_parser.mly"
                                        ( Regular, _2 )
# 575 "src/menhir_parser.ml"
     : (table_tag * Types.Table.key list))

let _menhir_action_23 =
  fun key_values ->
    (
# 143 "src/menhir_parser.mly"
                                                       (
  to_table key_values [] )
# 584 "src/menhir_parser.ml"
     : (Types.table))

let _menhir_action_24 =
  fun xs ->
    let key_values = 
# 241 "<standard.mly>"
    ( xs )
# 592 "src/menhir_parser.ml"
     in
    (
# 147 "src/menhir_parser.mly"
                                               ( key_values )
# 597 "src/menhir_parser.ml"
     : ((Types.Table.key * Types.value) list))

let _menhir_action_25 =
  fun _1 ->
    (
# 125 "src/menhir_parser.mly"
          ( Table.Key.of_string _1 )
# 605 "src/menhir_parser.ml"
     : (Types.Table.key))

let _menhir_action_26 =
  fun _1 ->
    (
# 126 "src/menhir_parser.mly"
          ( Table.Key.of_string _1 )
# 613 "src/menhir_parser.ml"
     : (Types.Table.key))

let _menhir_action_27 =
  fun _1 _3 ->
    (
# 131 "src/menhir_parser.mly"
                    ( (_1, _3) )
# 621 "src/menhir_parser.ml"
     : (Types.Table.key * Types.value))

let _menhir_action_28 =
  fun k ->
    (
# 128 "src/menhir_parser.mly"
                                                 ( k )
# 629 "src/menhir_parser.ml"
     : (Types.Table.key list))

let _menhir_action_29 =
  fun () ->
    (
# 216 "<standard.mly>"
    ( [] )
# 637 "src/menhir_parser.ml"
     : ((Types.Table.key * Types.value) list))

let _menhir_action_30 =
  fun x xs ->
    (
# 219 "<standard.mly>"
    ( x :: xs )
# 645 "src/menhir_parser.ml"
     : ((Types.Table.key * Types.value) list))

let _menhir_action_31 =
  fun () ->
    (
# 216 "<standard.mly>"
    ( [] )
# 653 "src/menhir_parser.ml"
     : (((table_tag * Types.Table.key list) * (Types.Table.key * Types.value) list)
  list))

let _menhir_action_32 =
  fun x xs y ->
    let x = 
# 172 "<standard.mly>"
    ( (x, y) )
# 662 "src/menhir_parser.ml"
     in
    (
# 219 "<standard.mly>"
    ( x :: xs )
# 667 "src/menhir_parser.ml"
     : (((table_tag * Types.Table.key list) * (Types.Table.key * Types.value) list)
  list))

let _menhir_action_33 =
  fun () ->
    (
# 145 "<standard.mly>"
    ( [] )
# 676 "src/menhir_parser.ml"
     : ((Types.Table.key * Types.value) list))

let _menhir_action_34 =
  fun x ->
    (
# 148 "<standard.mly>"
    ( x )
# 684 "src/menhir_parser.ml"
     : ((Types.Table.key * Types.value) list))

let _menhir_action_35 =
  fun _3 _4 ->
    (
# 164 "src/menhir_parser.mly"
                                              ( _3 :: _4 )
# 692 "src/menhir_parser.ml"
     : (Types.array list))

let _menhir_action_36 =
  fun () ->
    (
# 165 "src/menhir_parser.mly"
                  ( [] )
# 700 "src/menhir_parser.ml"
     : (Types.array list))

let _menhir_action_37 =
  fun () ->
    (
# 111 "<standard.mly>"
    ( None )
# 708 "src/menhir_parser.ml"
     : (unit option))

let _menhir_action_38 =
  fun x ->
    (
# 114 "<standard.mly>"
    ( Some x )
# 716 "src/menhir_parser.ml"
     : (unit option))

let _menhir_action_39 =
  fun x ->
    (
# 250 "<standard.mly>"
    ( [ x ] )
# 724 "src/menhir_parser.ml"
     : ((Types.Table.key * Types.value) list))

let _menhir_action_40 =
  fun x xs ->
    (
# 253 "<standard.mly>"
    ( x :: xs )
# 732 "src/menhir_parser.ml"
     : ((Types.Table.key * Types.value) list))

let _menhir_action_41 =
  fun x ->
    (
# 250 "<standard.mly>"
    ( [ x ] )
# 740 "src/menhir_parser.ml"
     : (Types.Table.key list))

let _menhir_action_42 =
  fun x xs ->
    (
# 253 "<standard.mly>"
    ( x :: xs )
# 748 "src/menhir_parser.ml"
     : (Types.Table.key list))

let _menhir_action_43 =
  fun _1 _2 ->
    (
# 118 "src/menhir_parser.mly"
   ( to_table _1 _2 )
# 756 "src/menhir_parser.ml"
     : (Types.table))

let _menhir_action_44 =
  fun _1 ->
    (
# 134 "src/menhir_parser.mly"
         ( TBool(_1) )
# 764 "src/menhir_parser.ml"
     : (Types.value))

let _menhir_action_45 =
  fun _1 ->
    (
# 135 "src/menhir_parser.mly"
            ( TInt(_1) )
# 772 "src/menhir_parser.ml"
     : (Types.value))

let _menhir_action_46 =
  fun _1 ->
    (
# 136 "src/menhir_parser.mly"
          ( TFloat(_1) )
# 780 "src/menhir_parser.ml"
     : (Types.value))

let _menhir_action_47 =
  fun _1 ->
    (
# 137 "src/menhir_parser.mly"
           ( TString(_1) )
# 788 "src/menhir_parser.ml"
     : (Types.value))

let _menhir_action_48 =
  fun _1 ->
    (
# 138 "src/menhir_parser.mly"
         ( TDate _1 )
# 796 "src/menhir_parser.ml"
     : (Types.value))

let _menhir_action_49 =
  fun _2 ->
    (
# 139 "src/menhir_parser.mly"
                       ( TArray(_2) )
# 804 "src/menhir_parser.ml"
     : (Types.value))

let _menhir_action_50 =
  fun _1 ->
    (
# 140 "src/menhir_parser.mly"
                 ( TTable(_1) )
# 812 "src/menhir_parser.ml"
     : (Types.value))

let _menhir_print_token : token -> string =
  fun _tok ->
    match _tok with
    | STRING _ ->
        "STRING"
    | RBRACK ->
        "RBRACK"
    | RBRACE ->
        "RBRACE"
    | LBRACK ->
        "LBRACK"
    | LBRACE ->
        "LBRACE"
    | KEY _ ->
        "KEY"
    | INTEGER _ ->
        "INTEGER"
    | FLOAT _ ->
        "FLOAT"
    | EQUAL ->
        "EQUAL"
    | EOF ->
        "EOF"
    | DOT ->
        "DOT"
    | DATE _ ->
        "DATE"
    | COMMA ->
        "COMMA"
    | BOOL _ ->
        "BOOL"

let _menhir_fail : unit -> 'a =
  fun () ->
    Printf.eprintf "Internal failure -- please contact the parser generator's developers.\n%!";
    assert false

include struct
  
  [@@@ocaml.warning "-4-37"]
  
  let _menhir_run_16 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_ -> _ -> _menhir_box_toml =
    fun _menhir_stack _v ->
      let MenhirCell1_list_keyValue_ (_menhir_stack, _, _1) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_43 _1 _2 in
      MenhirBox_toml _v
  
  let rec _menhir_run_20 : type  ttv_stack. (((ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_group_header, _menhir_box_toml) _menhir_cell1_list_keyValue_ -> _ -> _menhir_box_toml =
    fun _menhir_stack _v ->
      let MenhirCell1_list_keyValue_ (_menhir_stack, _, y) = _menhir_stack in
      let MenhirCell1_group_header (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_32 x xs y in
      _menhir_goto_list_pair_group_header_list_keyValue___ _menhir_stack _v _menhir_s
  
  and _menhir_goto_list_pair_group_header_list_keyValue___ : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_ as 'stack) -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _v _menhir_s ->
      match _menhir_s with
      | MenhirState04 ->
          _menhir_run_16 _menhir_stack _v
      | MenhirState19 ->
          _menhir_run_20 _menhir_stack _v
      | _ ->
          _menhir_fail ()
  
  let rec _menhir_run_01 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _1 = _v in
      let _v = _menhir_action_25 _1 in
      _menhir_goto_key _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_key : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState05 ->
          _menhir_run_11 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState06 ->
          _menhir_run_11 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState12 ->
          _menhir_run_11 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState00 ->
          _menhir_run_23 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState18 ->
          _menhir_run_23 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState21 ->
          _menhir_run_23 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState36 ->
          _menhir_run_23 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState40 ->
          _menhir_run_23 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_11 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | DOT ->
          let _menhir_stack = MenhirCell1_key (_menhir_stack, _menhir_s, _v) in
          let _menhir_s = MenhirState12 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | STRING _v ->
              _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | KEY _v ->
              _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | _ ->
              _eRR ())
      | RBRACK ->
          let x = _v in
          let _v = _menhir_action_41 x in
          _menhir_goto_separated_nonempty_list_DOT_key_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_02 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _1 = _v in
      let _v = _menhir_action_26 _1 in
      _menhir_goto_key _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_separated_nonempty_list_DOT_key_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState05 ->
          _menhir_run_07 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | MenhirState06 ->
          _menhir_run_07 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | MenhirState12 ->
          _menhir_run_13 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_07 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_LBRACK as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let k = _v in
      let _v = _menhir_action_28 k in
      _menhir_goto_key_path _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_key_path : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_LBRACK as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState06 ->
          _menhir_run_08 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState05 ->
          _menhir_run_14 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_08 : type  ttv_stack. (((ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_cell1_LBRACK -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | RBRACK ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          let MenhirCell1_LBRACK (_menhir_stack, _) = _menhir_stack in
          let MenhirCell1_LBRACK (_menhir_stack, _menhir_s) = _menhir_stack in
          let _3 = _v in
          let _v = _menhir_action_21 _3 in
          _menhir_goto_group_header _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_goto_group_header : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_ as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_group_header (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | STRING _v_0 ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState18
      | KEY _v_1 ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState18
      | EOF | LBRACK ->
          let _v_2 = _menhir_action_29 () in
          _menhir_run_19 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2 MenhirState18 _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_19 : type  ttv_stack. (((ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_group_header as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_list_keyValue_ (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | LBRACK ->
          _menhir_run_05 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState19
      | EOF ->
          let _v_0 = _menhir_action_31 () in
          _menhir_run_20 _menhir_stack _v_0
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_05 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_ as 'stack) -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _menhir_stack = MenhirCell1_LBRACK (_menhir_stack, _menhir_s) in
      let _menhir_s = MenhirState05 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | STRING _v ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | LBRACK ->
          let _menhir_stack = MenhirCell1_LBRACK (_menhir_stack, _menhir_s) in
          let _menhir_s = MenhirState06 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | STRING _v ->
              _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | KEY _v ->
              _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | _ ->
              _eRR ())
      | KEY _v ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_14 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_list_keyValue_, _menhir_box_toml) _menhir_cell1_LBRACK -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell1_LBRACK (_menhir_stack, _menhir_s) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_22 _2 in
      _menhir_goto_group_header _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_13 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_key -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell1_key (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_42 x xs in
      _menhir_goto_separated_nonempty_list_DOT_key_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_run_23 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_key (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | EQUAL ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | STRING _v_0 ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              let _1 = _v_0 in
              let _v = _menhir_action_47 _1 in
              _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
          | LBRACK ->
              let _menhir_stack = MenhirCell1_LBRACK (_menhir_stack, MenhirState24) in
              let _menhir_s = MenhirState26 in
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | STRING _v ->
                  _menhir_run_27 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
              | RBRACK ->
                  _menhir_run_34 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | LBRACK ->
                  _menhir_run_35 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | LBRACE ->
                  _menhir_run_36 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | INTEGER _v ->
                  _menhir_run_44 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
              | FLOAT _v ->
                  _menhir_run_51 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
              | DATE _v ->
                  _menhir_run_58 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
              | BOOL _v ->
                  _menhir_run_65 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
              | _ ->
                  _eRR ())
          | LBRACE ->
              _menhir_run_36 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState24
          | INTEGER _v_7 ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              let _1 = _v_7 in
              let _v = _menhir_action_45 _1 in
              _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
          | FLOAT _v_9 ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              let _1 = _v_9 in
              let _v = _menhir_action_46 _1 in
              _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
          | DATE _v_11 ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              let _1 = _v_11 in
              let _v = _menhir_action_48 _1 in
              _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
          | BOOL _v_13 ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              let _1 = _v_13 in
              let _v = _menhir_action_44 _1 in
              _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_goto_value : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_key -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_key (_menhir_stack, _menhir_s, _1) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_27 _1 _3 in
      _menhir_goto_keyValue _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_keyValue : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState00 ->
          _menhir_run_21 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState18 ->
          _menhir_run_21 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState21 ->
          _menhir_run_21 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState36 ->
          _menhir_run_39 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState40 ->
          _menhir_run_39 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_21 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_keyValue (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | STRING _v_0 ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState21
      | KEY _v_1 ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState21
      | EOF | LBRACK ->
          let _v_2 = _menhir_action_29 () in
          _menhir_run_22 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2 _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_22 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_keyValue -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_keyValue (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_30 x xs in
      _menhir_goto_list_keyValue_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_list_keyValue_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState00 ->
          _menhir_run_04 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState18 ->
          _menhir_run_19 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState21 ->
          _menhir_run_22 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_04 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_list_keyValue_ (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | LBRACK ->
          _menhir_run_05 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState04
      | EOF ->
          let _v_0 = _menhir_action_31 () in
          _menhir_run_16 _menhir_stack _v_0
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_39 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          let _menhir_stack = MenhirCell1_keyValue (_menhir_stack, _menhir_s, _v) in
          let _menhir_s = MenhirState40 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | STRING _v ->
              _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | KEY _v ->
              _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | _ ->
              _eRR ())
      | RBRACE ->
          let x = _v in
          let _v = _menhir_action_39 x in
          _menhir_goto_separated_nonempty_list_COMMA_keyValue_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_goto_separated_nonempty_list_COMMA_keyValue_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState36 ->
          _menhir_run_37 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState40 ->
          _menhir_run_41 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_37 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_LBRACE -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let x = _v in
      let _v = _menhir_action_34 x in
      _menhir_goto_loption_separated_nonempty_list_COMMA_keyValue__ _menhir_stack _menhir_lexbuf _menhir_lexer _v
  
  and _menhir_goto_loption_separated_nonempty_list_COMMA_keyValue__ : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_LBRACE -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let xs = _v in
      let _v = _menhir_action_24 xs in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell1_LBRACE (_menhir_stack, _menhir_s) = _menhir_stack in
      let key_values = _v in
      let _v = _menhir_action_23 key_values in
      _menhir_goto_inline_table _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_inline_table : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState26 ->
          _menhir_run_72 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState35 ->
          _menhir_run_72 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState81 ->
          _menhir_run_72 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState73 ->
          _menhir_run_74 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState24 ->
          _menhir_run_93 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_72 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_inline_table (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_73 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState72
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_75 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState72
      | _ ->
          _eRR ()
  
  and _menhir_run_73 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_inline_table as 'stack) -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LBRACE ->
          let _menhir_stack = MenhirCell1_COMMA (_menhir_stack, _menhir_s) in
          _menhir_run_36 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState73
      | RBRACK ->
          let x = () in
          let _ = _menhir_action_38 x in
          _menhir_goto_option_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_36 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _menhir_stack = MenhirCell1_LBRACE (_menhir_stack, _menhir_s) in
      let _menhir_s = MenhirState36 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | STRING _v ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | KEY _v ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | RBRACE ->
          let _v = _menhir_action_33 () in
          _menhir_goto_loption_separated_nonempty_list_COMMA_keyValue__ _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _eRR ()
  
  and _menhir_goto_option_COMMA_ : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      match _menhir_s with
      | MenhirState27 ->
          _menhir_run_30 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState29 ->
          _menhir_run_30 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState44 ->
          _menhir_run_47 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState46 ->
          _menhir_run_47 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState51 ->
          _menhir_run_54 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState53 ->
          _menhir_run_54 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState58 ->
          _menhir_run_61 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState60 ->
          _menhir_run_61 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState65 ->
          _menhir_run_68 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState67 ->
          _menhir_run_68 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState72 ->
          _menhir_run_75 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState74 ->
          _menhir_run_75 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState79 ->
          _menhir_run_83 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | MenhirState82 ->
          _menhir_run_83 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_30 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_10 () in
      _menhir_goto_array_end_STRING_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_array_end_STRING_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState29 ->
          _menhir_run_32 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState27 ->
          _menhir_run_33 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_32 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_STRING -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell0_STRING (_menhir_stack, _2) = _menhir_stack in
      let MenhirCell1_COMMA (_menhir_stack, _menhir_s) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_09 _2 _3 in
      _menhir_goto_array_end_STRING_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_33 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_STRING -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_STRING (_menhir_stack, _menhir_s, _1) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_17 _1 _2 in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_array_start : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState35 ->
          _menhir_run_79 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState81 ->
          _menhir_run_82 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState26 ->
          _menhir_run_87 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_79 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_LBRACK as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_array_start (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_80 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState79
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_83 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState79
      | _ ->
          _eRR ()
  
  and _menhir_run_80 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_array_start as 'stack) -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LBRACK ->
          let _menhir_stack = MenhirCell1_COMMA (_menhir_stack, _menhir_s) in
          let _menhir_s = MenhirState81 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | STRING _v ->
              _menhir_run_27 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | RBRACK ->
              _menhir_run_34 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | LBRACK ->
              _menhir_run_35 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | LBRACE ->
              _menhir_run_36 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | INTEGER _v ->
              _menhir_run_44 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | FLOAT _v ->
              _menhir_run_51 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | DATE _v ->
              _menhir_run_58 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | BOOL _v ->
              _menhir_run_65 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | _ ->
              _eRR ())
      | RBRACK ->
          let x = () in
          let _ = _menhir_action_38 x in
          _menhir_goto_option_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_27 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _menhir_stack = MenhirCell1_STRING (_menhir_stack, _menhir_s, _v) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_28 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState27
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_30 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState27
      | _ ->
          _eRR ()
  
  and _menhir_run_28 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | STRING _v ->
          let _menhir_stack = MenhirCell1_COMMA (_menhir_stack, _menhir_s) in
          let _menhir_stack = MenhirCell0_STRING (_menhir_stack, _v) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | COMMA ->
              _menhir_run_28 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState29
          | RBRACK ->
              let _ = _menhir_action_37 () in
              _menhir_run_30 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState29
          | _ ->
              _eRR ())
      | RBRACK ->
          let x = () in
          let _ = _menhir_action_38 x in
          _menhir_goto_option_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_34 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_13 () in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_35 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _menhir_stack = MenhirCell1_LBRACK (_menhir_stack, _menhir_s) in
      let _menhir_s = MenhirState35 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | STRING _v ->
          _menhir_run_27 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | RBRACK ->
          _menhir_run_34 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | LBRACK ->
          _menhir_run_35 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | LBRACE ->
          _menhir_run_36 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | INTEGER _v ->
          _menhir_run_44 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | FLOAT _v ->
          _menhir_run_51 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | DATE _v ->
          _menhir_run_58 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | BOOL _v ->
          _menhir_run_65 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_44 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _menhir_stack = MenhirCell1_INTEGER (_menhir_stack, _menhir_s, _v) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_45 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState44
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_47 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState44
      | _ ->
          _eRR ()
  
  and _menhir_run_45 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | INTEGER _v ->
          let _menhir_stack = MenhirCell1_COMMA (_menhir_stack, _menhir_s) in
          let _menhir_stack = MenhirCell0_INTEGER (_menhir_stack, _v) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | COMMA ->
              _menhir_run_45 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState46
          | RBRACK ->
              let _ = _menhir_action_37 () in
              _menhir_run_47 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState46
          | _ ->
              _eRR ())
      | RBRACK ->
          let x = () in
          let _ = _menhir_action_38 x in
          _menhir_goto_option_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_47 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_08 () in
      _menhir_goto_array_end_INTEGER_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_array_end_INTEGER_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState46 ->
          _menhir_run_49 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState44 ->
          _menhir_run_50 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_49 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_INTEGER -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell0_INTEGER (_menhir_stack, _2) = _menhir_stack in
      let MenhirCell1_COMMA (_menhir_stack, _menhir_s) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_07 _2 _3 in
      _menhir_goto_array_end_INTEGER_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_50 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_INTEGER -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_INTEGER (_menhir_stack, _menhir_s, _1) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_15 _1 _2 in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_51 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _menhir_stack = MenhirCell1_FLOAT (_menhir_stack, _menhir_s, _v) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_52 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState51
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_54 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState51
      | _ ->
          _eRR ()
  
  and _menhir_run_52 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | FLOAT _v ->
          let _menhir_stack = MenhirCell1_COMMA (_menhir_stack, _menhir_s) in
          let _menhir_stack = MenhirCell0_FLOAT (_menhir_stack, _v) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | COMMA ->
              _menhir_run_52 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState53
          | RBRACK ->
              let _ = _menhir_action_37 () in
              _menhir_run_54 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState53
          | _ ->
              _eRR ())
      | RBRACK ->
          let x = () in
          let _ = _menhir_action_38 x in
          _menhir_goto_option_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_54 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_06 () in
      _menhir_goto_array_end_FLOAT_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_array_end_FLOAT_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState53 ->
          _menhir_run_56 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState51 ->
          _menhir_run_57 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_56 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_FLOAT -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell0_FLOAT (_menhir_stack, _2) = _menhir_stack in
      let MenhirCell1_COMMA (_menhir_stack, _menhir_s) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_05 _2 _3 in
      _menhir_goto_array_end_FLOAT_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_57 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_FLOAT -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_FLOAT (_menhir_stack, _menhir_s, _1) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_16 _1 _2 in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_58 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _menhir_stack = MenhirCell1_DATE (_menhir_stack, _menhir_s, _v) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_59 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState58
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_61 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState58
      | _ ->
          _eRR ()
  
  and _menhir_run_59 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | DATE _v ->
          let _menhir_stack = MenhirCell1_COMMA (_menhir_stack, _menhir_s) in
          let _menhir_stack = MenhirCell0_DATE (_menhir_stack, _v) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | COMMA ->
              _menhir_run_59 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState60
          | RBRACK ->
              let _ = _menhir_action_37 () in
              _menhir_run_61 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState60
          | _ ->
              _eRR ())
      | RBRACK ->
          let x = () in
          let _ = _menhir_action_38 x in
          _menhir_goto_option_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_61 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_04 () in
      _menhir_goto_array_end_DATE_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_array_end_DATE_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState60 ->
          _menhir_run_63 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState58 ->
          _menhir_run_64 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_63 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_DATE -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell0_DATE (_menhir_stack, _2) = _menhir_stack in
      let MenhirCell1_COMMA (_menhir_stack, _menhir_s) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_03 _2 _3 in
      _menhir_goto_array_end_DATE_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_64 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_DATE -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_DATE (_menhir_stack, _menhir_s, _1) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_18 _1 _2 in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_65 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _menhir_stack = MenhirCell1_BOOL (_menhir_stack, _menhir_s, _v) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_66 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState65
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_68 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState65
      | _ ->
          _eRR ()
  
  and _menhir_run_66 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | BOOL _v ->
          let _menhir_stack = MenhirCell1_COMMA (_menhir_stack, _menhir_s) in
          let _menhir_stack = MenhirCell0_BOOL (_menhir_stack, _v) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | COMMA ->
              _menhir_run_66 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState67
          | RBRACK ->
              let _ = _menhir_action_37 () in
              _menhir_run_68 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState67
          | _ ->
              _eRR ())
      | RBRACK ->
          let x = () in
          let _ = _menhir_action_38 x in
          _menhir_goto_option_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_68 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_02 () in
      _menhir_goto_array_end_BOOL_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_array_end_BOOL_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState67 ->
          _menhir_run_70 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState65 ->
          _menhir_run_71 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_70 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_COMMA _menhir_cell0_BOOL -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell0_BOOL (_menhir_stack, _2) = _menhir_stack in
      let MenhirCell1_COMMA (_menhir_stack, _menhir_s) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_01 _2 _3 in
      _menhir_goto_array_end_BOOL_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_71 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_BOOL -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_BOOL (_menhir_stack, _menhir_s, _1) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_14 _1 _2 in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_83 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_array_start as 'stack) -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_36 () in
      _menhir_goto_nested_array_end _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_nested_array_end : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_array_start as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState82 ->
          _menhir_run_85 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState79 ->
          _menhir_run_86 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_85 : type  ttv_stack. (((ttv_stack, _menhir_box_toml) _menhir_cell1_array_start, _menhir_box_toml) _menhir_cell1_COMMA, _menhir_box_toml) _menhir_cell1_array_start -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_array_start (_menhir_stack, _, _3) = _menhir_stack in
      let MenhirCell1_COMMA (_menhir_stack, _menhir_s) = _menhir_stack in
      let _4 = _v in
      let _v = _menhir_action_35 _3 _4 in
      _menhir_goto_nested_array_end _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_86 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_LBRACK, _menhir_box_toml) _menhir_cell1_array_start -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_array_start (_menhir_stack, _, _2) = _menhir_stack in
      let MenhirCell1_LBRACK (_menhir_stack, _menhir_s) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_19 _2 _3 in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_82 : type  ttv_stack. (((ttv_stack, _menhir_box_toml) _menhir_cell1_array_start, _menhir_box_toml) _menhir_cell1_COMMA as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_array_start (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_80 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState82
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_83 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState82
      | _ ->
          _eRR ()
  
  and _menhir_run_87 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_key, _menhir_box_toml) _menhir_cell1_LBRACK -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_LBRACK (_menhir_stack, _) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_49 _2 in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
  
  and _menhir_run_75 : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_inline_table as 'stack) -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      let _v = _menhir_action_12 () in
      _menhir_goto_array_end_inline_table_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_array_end_inline_table_ : type  ttv_stack. ((ttv_stack, _menhir_box_toml) _menhir_cell1_inline_table as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState74 ->
          _menhir_run_77 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState72 ->
          _menhir_run_78 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_77 : type  ttv_stack. (((ttv_stack, _menhir_box_toml) _menhir_cell1_inline_table, _menhir_box_toml) _menhir_cell1_COMMA, _menhir_box_toml) _menhir_cell1_inline_table -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_inline_table (_menhir_stack, _, _2) = _menhir_stack in
      let MenhirCell1_COMMA (_menhir_stack, _menhir_s) = _menhir_stack in
      let _3 = _v in
      let _v = _menhir_action_11 _2 _3 in
      _menhir_goto_array_end_inline_table_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_78 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_inline_table -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_inline_table (_menhir_stack, _menhir_s, _1) = _menhir_stack in
      let _2 = _v in
      let _v = _menhir_action_20 _1 _2 in
      _menhir_goto_array_start _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_74 : type  ttv_stack. (((ttv_stack, _menhir_box_toml) _menhir_cell1_inline_table, _menhir_box_toml) _menhir_cell1_COMMA as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_toml) _menhir_state -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_inline_table (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          _menhir_run_73 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState74
      | RBRACK ->
          let _ = _menhir_action_37 () in
          _menhir_run_75 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState74
      | _ ->
          _eRR ()
  
  and _menhir_run_93 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_key -> _ -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let _1 = _v in
      let _v = _menhir_action_50 _1 in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
  
  and _menhir_run_41 : type  ttv_stack. (ttv_stack, _menhir_box_toml) _menhir_cell1_keyValue -> _ -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell1_keyValue (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_40 x xs in
      _menhir_goto_separated_nonempty_list_COMMA_keyValue_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  let _menhir_run_00 : type  ttv_stack. ttv_stack -> _ -> _ -> _menhir_box_toml =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | STRING _v ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState00
      | KEY _v ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState00
      | EOF | LBRACK ->
          let _v = _menhir_action_29 () in
          _menhir_run_04 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState00 _tok
      | _ ->
          _eRR ()
  
end

let toml =
  fun _menhir_lexer _menhir_lexbuf ->
    let _menhir_stack = () in
    let MenhirBox_toml v = _menhir_run_00 _menhir_stack _menhir_lexbuf _menhir_lexer in
    v

# 167 "src/menhir_parser.mly"
  

# 1870 "src/menhir_parser.ml"
