Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1004 Bytes

README.md

File metadata and controls

37 lines (26 loc) · 1004 Bytes

Parsers

Prerequisites

brew install opam
opam init
eval $(opam env)
opam switch create 4.12.0
opam install utop menhir

Quickstart

Use opal inside of utop:

utop
utop # #use "opal.ml";;
utop # let input = LazyStream.of_string "foo is great" in
let foo = token "foo" in
parse foo input;;
- : string option = None

Run cedict_parser.ml as script:

ocaml cedict_parser.ml

Run cedict_parser.ml inside of utop:

utop
utop # #use "cedict_parser.ml";;

Links