summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/dune3
-rw-r--r--bin/main.ml14
2 files changed, 5 insertions, 12 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 ""