~cypheon/ocaml-spice

3de675e172a2cccafb4f264ab19d159bab49a0f8 — Johann Rudloff 1 year, 10 months ago daf4982
FIx parser netlist creation.
1 files changed, 3 insertions(+), 3 deletions(-)

M lib/parser.ml
M lib/parser.ml => lib/parser.ml +3 -3
@@ 130,14 130,14 @@ let main_line nl =
    <|> skip comment
  )

let parse_netlist =
  let netlist = Netlist.create () in
let parse_netlist netlist =
  let* _header = one_line in
  many_until (main_line netlist) end_line >>
  eof >>
  return netlist

let netlist_of_string nl =
  match parse_string parse_netlist nl () with
  let netlist = Netlist.create () in
  match parse_string (parse_netlist netlist) nl () with
  | Success v -> v
  | Failed (msg, _err) -> failwith ("error: " ^ msg)