summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/dune3
-rw-r--r--bin/main.ml14
-rw-r--r--dune-project2
3 files changed, 6 insertions, 13 deletions
diff --git a/bin/dune b/bin/dune
index edad4dc..3891864 100644
--- a/bin/dune
+++ b/bin/dune
@@ -1,5 +1,4 @@
(executable
(public_name agate)
(name main)
- (libraries agate sedlex)
- (preprocess (pps sedlex.ppx)))
+ (libraries agate angstrom))
diff --git a/bin/main.ml b/bin/main.ml
index de7cd87..2472a93 100644
--- a/bin/main.ml
+++ b/bin/main.ml
@@ -1,11 +1,5 @@
-let rec token buf =
- match%sedlex buf with
- | white_space -> token buf
- | "a" -> token buf
- | "b" -> 2
- | eof -> 0
- | _ -> failwith "Unknown token"
+open Angstrom
-let () =
- let lexbuf = Sedlexing.Utf8.from_string "ab" in
- print_newline (print_int (token lexbuf))
+let parse (str:string) : unit = num str
+
+let () = parse ""
diff --git a/dune-project b/dune-project
index d636dc5..43392bf 100644
--- a/dune-project
+++ b/dune-project
@@ -19,7 +19,7 @@
(name agate)
(synopsis "A strongly typed concatenative language")
(description "A strongly typed concatenative language")
- (depends ocaml dune sedlex)
+ (depends ocaml dune angstrom)
(tags
(topics "to describe" your project)))