From 54015bfbe98cfd850e1a6c142d8f514a9f48ddd9 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 7 Mar 2026 20:47:16 -0300 Subject: wip: drl executor --- lib/drl/parser.ml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/drl/parser.ml (limited to 'lib/drl/parser.ml') diff --git a/lib/drl/parser.ml b/lib/drl/parser.ml new file mode 100644 index 0000000..71d694b --- /dev/null +++ b/lib/drl/parser.ml @@ -0,0 +1,9 @@ +type error = ParseError of string + +let of_string s = + match Sexplib.Sexp.of_string s |> Ast.query_of_sexp with + | q -> Ok q + | exception exn -> Error (ParseError (Printexc.to_string exn)) + +let to_string q = + Ast.sexp_of_query q |> Sexplib.Sexp.to_string_hum -- cgit v1.2.3