summaryrefslogtreecommitdiffstats
path: root/bin/main.ml
diff options
context:
space:
mode:
authorScott Lawrence <scott+git@ineffectivetheory.com>2024-06-25 23:33:59 -0700
committerScott Lawrence <scott+git@ineffectivetheory.com>2024-06-25 23:33:59 -0700
commit490ab998999e033e91929f63d2deae4900c90375 (patch)
tree08ce565459a78073013d82e1a3bd61bfa179b0a1 /bin/main.ml
parent062d3944ee86c273ad3919993185d5901768ef2d (diff)
downloadagate-490ab998999e033e91929f63d2deae4900c90375.tar.gz
agate-490ab998999e033e91929f63d2deae4900c90375.tar.bz2
agate-490ab998999e033e91929f63d2deae4900c90375.zip
Stub of using angstrom
Diffstat (limited to 'bin/main.ml')
-rw-r--r--bin/main.ml14
1 files changed, 4 insertions, 10 deletions
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 ""