14 lines
353 B
OCaml
14 lines
353 B
OCaml
open Fmlib_parse
|
|
open Term_parser
|
|
|
|
include
|
|
Parse_with_lexer.Make (State) (Token) (Final) (Semantic) (Lexer) (Term_parser)
|
|
|
|
let state : state =
|
|
{
|
|
binders = [ "x"; "y"; "z" ];
|
|
constants = StringSet.of_list [ "Z" ];
|
|
functions = StringMap.of_list [ ("S", 1); ("plus", 2) ];
|
|
}
|
|
|
|
let start = make Lexer.start (Term_parser.token_parser state)
|