Something went wrong. Try again.
standalone exapunks vm in ocaml
Something went wrong. Try again.
839 B · 40 lines
OCaml
at main
1234567891011121314151617181920212223242526272829303132333435363738394041(* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. *)
open MParseropen Exapunksopen Host_parseropen Utils
let test str = match parse_string environment str (StrSet.empty) with | Success result -> Printf.printf "Success: %s" (show_parsed_environment result) | Failed (error, _) -> Printf.printf "Failure: %s" error
let () = test {|environment { hosts { home [9]; f1 [4]; f2 [4]; f3 [4]; f4 [4]; f5 [4]; } links { home [800] <-> [-1] f1; f1 [1] <-> [-1] f2; f2 [1] <-> [-1] f3; f3 [1] <-> [-1] f4; f4 [1] <-> [-1] f5; } files { #NERV [home]; #NERV [f5]; 199 [secret]: [foo, 1, bar, 25]; }}|}