aboutsummaryrefslogtreecommitdiffstats
path: root/lib/drl/parser.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-09-26 22:09:11 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-09-26 22:09:11 -0300
commit320954996e921d7b34eb61f462799b5c6ab8ee09 (patch)
tree16697bc161faf27f0b4c1ba57f6fcc24d240801b /lib/drl/parser.ml
parentb555c28c7e6c315fc0394baf213ecb08b21ed959 (diff)
downloadSakura-320954996e921d7b34eb61f462799b5c6ab8ee09.tar.gz
Sakura-320954996e921d7b34eb61f462799b5c6ab8ee09.zip
new shrunk API for RNT on sakura
Diffstat (limited to 'lib/drl/parser.ml')
-rw-r--r--lib/drl/parser.ml10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/drl/parser.ml b/lib/drl/parser.ml
new file mode 100644
index 0000000..f7d4512
--- /dev/null
+++ b/lib/drl/parser.ml
@@ -0,0 +1,10 @@
+module Error = struct
+ open Condition
+
+ let parse_error msg = condition "parse-error" msg empty
+end
+
+let of_sexp sexp =
+ match Ast.query_of_sexp sexp with
+ | q -> Ok q
+ | exception exn -> Error (Error.parse_error (Printexc.to_string exn))