(* 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 MParser open Exapunks open Host_parser open 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]; } } |}