This commit is contained in:
Simon Petit 2024-12-11 08:33:41 +01:00
commit 5e37631c5a
139 changed files with 2280 additions and 0 deletions

BIN
_build/.db Normal file

Binary file not shown.

BIN
_build/.digest-db Normal file

Binary file not shown.

1
_build/.filesystem-clock Normal file
View File

@ -0,0 +1 @@
<dummy>

0
_build/.lock Normal file
View File

View File

@ -0,0 +1 @@
Escaping the Dune sandbox

View File

@ -0,0 +1,2 @@
(ocamlc /usr/bin/ocamlc.opt)
(ocaml_config_vars (afl_instrument false) (architecture amd64) (asm x86_64-linux-gnu-as) (asm_cfi_supported true) (ast_impl_magic_number Caml1999M030) (ast_intf_magic_number Caml1999N030) (bytecomp_c_compiler "x86_64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2") (bytecomp_c_libraries "-lm -lpthread") (c_compiler x86_64-linux-gnu-gcc) (ccomp_type cc) (cma_magic_number Caml1999A030) (cmi_magic_number Caml1999I030) (cmo_magic_number Caml1999O030) (cmt_magic_number Caml1999T030) (cmx_magic_number Caml1999Y030) (cmxa_magic_number Caml1999Z030) (cmxs_magic_number Caml1999D030) (default_executable_name a.out) (default_safe_string true) (exec_magic_number Caml1999X030) (ext_asm .s) (ext_dll .so) (ext_exe "") (ext_lib .a) (ext_obj .o) (flambda false) (flat_float_array true) (function_sections true) (host x86_64-pc-linux-gnu) (int_size 63) (linear_magic_number Caml1999L030) (model default) (native_c_compiler "x86_64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2") (native_c_libraries "-lm ") (native_pack_linker "x86_64-linux-gnu-ld -r -o ") (ocamlc_cflags "-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security") (ocamlc_cppflags "-D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2") (ocamlopt_cflags "-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security") (ocamlopt_cppflags "-D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2") (os_type Unix) (ranlib x86_64-linux-gnu-ranlib) (safe_string true) (standard_library /usr/lib/ocaml) (standard_library_default /usr/lib/ocaml) (supports_shared_libraries true) (system linux) (systhread_supported true) (target x86_64-pc-linux-gnu) (version 4.13.1) (windows_unicode false) (with_frame_pointers false) (word_size 64))

View File

@ -0,0 +1 @@
((6:ocamlc19:/usr/bin/ocamlc.opt)(17:ocaml_config_vars((14:afl_instrument5:false)(12:architecture5:amd64)(3:asm19:x86_64-linux-gnu-as)(17:asm_cfi_supported4:true)(21:ast_impl_magic_number12:Caml1999M030)(21:ast_intf_magic_number12:Caml1999N030)(19:bytecomp_c_compiler241:x86_64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2)(20:bytecomp_c_libraries14:-lm -lpthread)(10:c_compiler20:x86_64-linux-gnu-gcc)(10:ccomp_type2:cc)(16:cma_magic_number12:Caml1999A030)(16:cmi_magic_number12:Caml1999I030)(16:cmo_magic_number12:Caml1999O030)(16:cmt_magic_number12:Caml1999T030)(16:cmx_magic_number12:Caml1999Y030)(17:cmxa_magic_number12:Caml1999Z030)(17:cmxs_magic_number12:Caml1999D030)(23:default_executable_name5:a.out)(19:default_safe_string4:true)(17:exec_magic_number12:Caml1999X030)(7:ext_asm2:.s)(7:ext_dll3:.so)(7:ext_exe0:)(7:ext_lib2:.a)(7:ext_obj2:.o)(7:flambda5:false)(16:flat_float_array4:true)(17:function_sections4:true)(4:host19:x86_64-pc-linux-gnu)(8:int_size2:63)(19:linear_magic_number12:Caml1999L030)(5:model7:default)(17:native_c_compiler241:x86_64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2)(18:native_c_libraries4:-lm )(18:native_pack_linker26:x86_64-linux-gnu-ld -r -o )(13:ocamlc_cflags165:-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security)(15:ocamlc_cppflags54:-D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2)(15:ocamlopt_cflags165:-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -g -O2 -ffile-prefix-map=/build/ocaml-SC7b9w/ocaml-4.13.1=. -fstack-protector-strong -Wformat -Werror=format-security)(17:ocamlopt_cppflags54:-D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2)(7:os_type4:Unix)(6:ranlib23:x86_64-linux-gnu-ranlib)(11:safe_string4:true)(16:standard_library14:/usr/lib/ocaml)(24:standard_library_default14:/usr/lib/ocaml)(25:supports_shared_libraries4:true)(6:system5:linux)(19:systhread_supported4:true)(6:target19:x86_64-pc-linux-gnu)(7:version6:4.13.1)(15:windows_unicode5:false)(19:with_frame_pointers5:false)(9:word_size2:64))))

View File

Binary file not shown.

BIN
_build/default/bin/main.exe Executable file

Binary file not shown.

View File

@ -0,0 +1,8 @@
let () =
let path = Sys.argv.(1) in
let ic = open_in path in
let len = in_channel_length ic in
let config = really_input_string ic len in
let lexbuf = Lexing.from_string config in
let _ = Parser.main Lexer.read_token lexbuf in
Printf.printf("ok")

View File

@ -0,0 +1 @@
(* Auto-generated by Dune *)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
_build/default/lexer/lexer.cmxs Executable file

Binary file not shown.

View File

@ -0,0 +1,736 @@
# 1 "lexer/lexer.mll"
open Parser
# 6 "lexer/lexer.ml"
let __ocaml_lex_tables = {
Lexing.lex_base =
"\000\000\242\255\075\000\002\000\245\255\246\255\247\255\248\255\
\002\000\249\255\160\000\235\000\054\001\129\001\204\001\023\002\
\098\002\173\002\248\002\067\003\142\003\217\003\036\004\111\004\
\186\004\005\005\080\005\155\005\230\005\049\006\124\006\199\006\
\018\007\093\007\168\007\243\007\062\008\137\008";
Lexing.lex_backtrk =
"\012\000\255\255\012\000\011\000\255\255\255\255\255\255\255\255\
\255\255\255\255\012\000\012\000\012\000\012\000\012\000\012\000\
\012\000\012\000\000\000\012\000\001\000\012\000\012\000\012\000\
\012\000\002\000\012\000\012\000\003\000\012\000\012\000\012\000\
\004\000\012\000\012\000\012\000\012\000\005\000";
Lexing.lex_default =
"\255\255\000\000\255\255\255\255\000\000\000\000\000\000\000\000\
\255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255";
Lexing.lex_trans =
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\003\000\009\000\003\000\009\000\008\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\003\000\000\000\003\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\007\000\000\000\000\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\006\000\000\000\005\000\000\000\002\000\
\000\000\002\000\002\000\002\000\012\000\002\000\002\000\002\000\
\002\000\014\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\011\000\013\000\015\000\002\000\010\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\002\000\000\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\002\000\
\001\000\033\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\002\000\000\000\029\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\000\000\000\000\000\000\000\000\002\000\000\000\026\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\002\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\021\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\
\000\000\000\000\000\000\002\000\000\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\019\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\000\000\002\000\000\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\016\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\002\000\000\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\017\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000\000\000\000\000\000\000\002\000\000\000\002\000\002\000\
\002\000\002\000\018\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\002\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\002\000\000\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\020\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\000\000\000\000\000\000\000\000\002\000\000\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\002\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\022\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\
\000\000\000\000\000\000\002\000\000\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\023\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\000\000\002\000\000\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\024\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\002\000\000\000\002\000\002\000\002\000\002\000\002\000\
\002\000\025\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000\000\000\000\000\000\000\002\000\000\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\002\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\027\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\002\000\000\000\002\000\002\000\002\000\002\000\
\028\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\000\000\000\000\000\000\000\000\002\000\000\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\002\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\030\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\
\000\000\000\000\000\000\002\000\000\000\002\000\002\000\002\000\
\002\000\002\000\002\000\031\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\000\000\002\000\000\000\
\002\000\002\000\002\000\002\000\032\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\002\000\000\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000\000\000\000\000\000\000\002\000\000\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\034\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\002\000\
\000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\035\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\
\000\000\000\000\002\000\000\000\002\000\002\000\002\000\002\000\
\036\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\000\000\000\000\000\000\000\000\002\000\000\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\037\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\002\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000";
Lexing.lex_check =
"\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\000\000\000\000\003\000\008\000\000\000\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\000\000\255\255\003\000\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\000\000\255\255\255\255\255\255\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\255\255\255\255\255\255\000\000\255\255\255\255\
\255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\255\255\000\000\255\255\000\000\
\255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\255\255\255\255\
\255\255\255\255\002\000\255\255\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\
\002\000\002\000\002\000\002\000\002\000\002\000\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\010\000\010\000\010\000\010\000\010\000\010\000\010\000\010\000\
\010\000\010\000\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\010\000\010\000\010\000\010\000\010\000\010\000\010\000\
\010\000\010\000\010\000\010\000\010\000\010\000\010\000\010\000\
\010\000\010\000\010\000\010\000\010\000\010\000\010\000\010\000\
\010\000\010\000\010\000\255\255\255\255\255\255\255\255\010\000\
\000\000\010\000\010\000\010\000\010\000\010\000\010\000\010\000\
\010\000\010\000\010\000\010\000\010\000\010\000\010\000\010\000\
\010\000\010\000\010\000\010\000\010\000\010\000\010\000\010\000\
\010\000\010\000\010\000\011\000\011\000\011\000\011\000\011\000\
\011\000\011\000\011\000\011\000\011\000\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\011\000\011\000\011\000\011\000\
\011\000\011\000\011\000\011\000\011\000\011\000\011\000\011\000\
\011\000\011\000\011\000\011\000\011\000\011\000\011\000\011\000\
\011\000\011\000\011\000\011\000\011\000\011\000\255\255\255\255\
\255\255\255\255\011\000\255\255\011\000\011\000\011\000\011\000\
\011\000\011\000\011\000\011\000\011\000\011\000\011\000\011\000\
\011\000\011\000\011\000\011\000\011\000\011\000\011\000\011\000\
\011\000\011\000\011\000\011\000\011\000\011\000\012\000\012\000\
\012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\012\000\
\012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\
\012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\
\012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\
\012\000\255\255\255\255\255\255\255\255\012\000\255\255\012\000\
\012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\
\012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\
\012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\
\012\000\013\000\013\000\013\000\013\000\013\000\013\000\013\000\
\013\000\013\000\013\000\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\013\000\013\000\013\000\013\000\013\000\013\000\
\013\000\013\000\013\000\013\000\013\000\013\000\013\000\013\000\
\013\000\013\000\013\000\013\000\013\000\013\000\013\000\013\000\
\013\000\013\000\013\000\013\000\255\255\255\255\255\255\255\255\
\013\000\255\255\013\000\013\000\013\000\013\000\013\000\013\000\
\013\000\013\000\013\000\013\000\013\000\013\000\013\000\013\000\
\013\000\013\000\013\000\013\000\013\000\013\000\013\000\013\000\
\013\000\013\000\013\000\013\000\014\000\014\000\014\000\014\000\
\014\000\014\000\014\000\014\000\014\000\014\000\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\014\000\014\000\014\000\
\014\000\014\000\014\000\014\000\014\000\014\000\014\000\014\000\
\014\000\014\000\014\000\014\000\014\000\014\000\014\000\014\000\
\014\000\014\000\014\000\014\000\014\000\014\000\014\000\255\255\
\255\255\255\255\255\255\014\000\255\255\014\000\014\000\014\000\
\014\000\014\000\014\000\014\000\014\000\014\000\014\000\014\000\
\014\000\014\000\014\000\014\000\014\000\014\000\014\000\014\000\
\014\000\014\000\014\000\014\000\014\000\014\000\014\000\015\000\
\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\
\015\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\
\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\
\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\
\015\000\015\000\255\255\255\255\255\255\255\255\015\000\255\255\
\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\
\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\
\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\
\015\000\015\000\016\000\016\000\016\000\016\000\016\000\016\000\
\016\000\016\000\016\000\016\000\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\016\000\016\000\016\000\016\000\016\000\
\016\000\016\000\016\000\016\000\016\000\016\000\016\000\016\000\
\016\000\016\000\016\000\016\000\016\000\016\000\016\000\016\000\
\016\000\016\000\016\000\016\000\016\000\255\255\255\255\255\255\
\255\255\016\000\255\255\016\000\016\000\016\000\016\000\016\000\
\016\000\016\000\016\000\016\000\016\000\016\000\016\000\016\000\
\016\000\016\000\016\000\016\000\016\000\016\000\016\000\016\000\
\016\000\016\000\016\000\016\000\016\000\017\000\017\000\017\000\
\017\000\017\000\017\000\017\000\017\000\017\000\017\000\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\017\000\017\000\
\017\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\
\017\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\
\017\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\
\255\255\255\255\255\255\255\255\017\000\255\255\017\000\017\000\
\017\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\
\017\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\
\017\000\017\000\017\000\017\000\017\000\017\000\017\000\017\000\
\018\000\018\000\018\000\018\000\018\000\018\000\018\000\018\000\
\018\000\018\000\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\018\000\018\000\018\000\018\000\018\000\018\000\018\000\
\018\000\018\000\018\000\018\000\018\000\018\000\018\000\018\000\
\018\000\018\000\018\000\018\000\018\000\018\000\018\000\018\000\
\018\000\018\000\018\000\255\255\255\255\255\255\255\255\018\000\
\255\255\018\000\018\000\018\000\018\000\018\000\018\000\018\000\
\018\000\018\000\018\000\018\000\018\000\018\000\018\000\018\000\
\018\000\018\000\018\000\018\000\018\000\018\000\018\000\018\000\
\018\000\018\000\018\000\019\000\019\000\019\000\019\000\019\000\
\019\000\019\000\019\000\019\000\019\000\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\019\000\019\000\019\000\019\000\
\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\
\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\
\019\000\019\000\019\000\019\000\019\000\019\000\255\255\255\255\
\255\255\255\255\019\000\255\255\019\000\019\000\019\000\019\000\
\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\
\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\
\019\000\019\000\019\000\019\000\019\000\019\000\020\000\020\000\
\020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\020\000\
\020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\
\020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\
\020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\
\020\000\255\255\255\255\255\255\255\255\020\000\255\255\020\000\
\020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\
\020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\
\020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\
\020\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\
\021\000\021\000\021\000\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\021\000\021\000\021\000\021\000\021\000\021\000\
\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\
\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\
\021\000\021\000\021\000\021\000\255\255\255\255\255\255\255\255\
\021\000\255\255\021\000\021\000\021\000\021\000\021\000\021\000\
\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\
\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\
\021\000\021\000\021\000\021\000\022\000\022\000\022\000\022\000\
\022\000\022\000\022\000\022\000\022\000\022\000\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\022\000\022\000\022\000\
\022\000\022\000\022\000\022\000\022\000\022\000\022\000\022\000\
\022\000\022\000\022\000\022\000\022\000\022\000\022\000\022\000\
\022\000\022\000\022\000\022\000\022\000\022\000\022\000\255\255\
\255\255\255\255\255\255\022\000\255\255\022\000\022\000\022\000\
\022\000\022\000\022\000\022\000\022\000\022\000\022\000\022\000\
\022\000\022\000\022\000\022\000\022\000\022\000\022\000\022\000\
\022\000\022\000\022\000\022\000\022\000\022\000\022\000\023\000\
\023\000\023\000\023\000\023\000\023\000\023\000\023\000\023\000\
\023\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\023\000\023\000\023\000\023\000\023\000\023\000\023\000\023\000\
\023\000\023\000\023\000\023\000\023\000\023\000\023\000\023\000\
\023\000\023\000\023\000\023\000\023\000\023\000\023\000\023\000\
\023\000\023\000\255\255\255\255\255\255\255\255\023\000\255\255\
\023\000\023\000\023\000\023\000\023\000\023\000\023\000\023\000\
\023\000\023\000\023\000\023\000\023\000\023\000\023\000\023\000\
\023\000\023\000\023\000\023\000\023\000\023\000\023\000\023\000\
\023\000\023\000\024\000\024\000\024\000\024\000\024\000\024\000\
\024\000\024\000\024\000\024\000\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\024\000\024\000\024\000\024\000\024\000\
\024\000\024\000\024\000\024\000\024\000\024\000\024\000\024\000\
\024\000\024\000\024\000\024\000\024\000\024\000\024\000\024\000\
\024\000\024\000\024\000\024\000\024\000\255\255\255\255\255\255\
\255\255\024\000\255\255\024\000\024\000\024\000\024\000\024\000\
\024\000\024\000\024\000\024\000\024\000\024\000\024\000\024\000\
\024\000\024\000\024\000\024\000\024\000\024\000\024\000\024\000\
\024\000\024\000\024\000\024\000\024\000\025\000\025\000\025\000\
\025\000\025\000\025\000\025\000\025\000\025\000\025\000\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\025\000\025\000\
\025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\
\025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\
\025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\
\255\255\255\255\255\255\255\255\025\000\255\255\025\000\025\000\
\025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\
\025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\
\025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\
\026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\
\026\000\026\000\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\026\000\026\000\026\000\026\000\026\000\026\000\026\000\
\026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\
\026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\
\026\000\026\000\026\000\255\255\255\255\255\255\255\255\026\000\
\255\255\026\000\026\000\026\000\026\000\026\000\026\000\026\000\
\026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\
\026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\
\026\000\026\000\026\000\027\000\027\000\027\000\027\000\027\000\
\027\000\027\000\027\000\027\000\027\000\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\027\000\027\000\027\000\027\000\
\027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\
\027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\
\027\000\027\000\027\000\027\000\027\000\027\000\255\255\255\255\
\255\255\255\255\027\000\255\255\027\000\027\000\027\000\027\000\
\027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\
\027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\
\027\000\027\000\027\000\027\000\027\000\027\000\028\000\028\000\
\028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\028\000\
\028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\
\028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\
\028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\
\028\000\255\255\255\255\255\255\255\255\028\000\255\255\028\000\
\028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\
\028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\
\028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\
\028\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\
\029\000\029\000\029\000\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\029\000\029\000\029\000\029\000\029\000\029\000\
\029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\
\029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\
\029\000\029\000\029\000\029\000\255\255\255\255\255\255\255\255\
\029\000\255\255\029\000\029\000\029\000\029\000\029\000\029\000\
\029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\
\029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\
\029\000\029\000\029\000\029\000\030\000\030\000\030\000\030\000\
\030\000\030\000\030\000\030\000\030\000\030\000\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\030\000\030\000\030\000\
\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\
\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\
\030\000\030\000\030\000\030\000\030\000\030\000\030\000\255\255\
\255\255\255\255\255\255\030\000\255\255\030\000\030\000\030\000\
\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\
\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\
\030\000\030\000\030\000\030\000\030\000\030\000\030\000\031\000\
\031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\
\031\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\
\031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\
\031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\
\031\000\031\000\255\255\255\255\255\255\255\255\031\000\255\255\
\031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\
\031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\
\031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\
\031\000\031\000\032\000\032\000\032\000\032\000\032\000\032\000\
\032\000\032\000\032\000\032\000\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\032\000\032\000\032\000\032\000\032\000\
\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\
\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\
\032\000\032\000\032\000\032\000\032\000\255\255\255\255\255\255\
\255\255\032\000\255\255\032\000\032\000\032\000\032\000\032\000\
\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\
\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\
\032\000\032\000\032\000\032\000\032\000\033\000\033\000\033\000\
\033\000\033\000\033\000\033\000\033\000\033\000\033\000\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\033\000\033\000\
\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\
\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\
\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\
\255\255\255\255\255\255\255\255\033\000\255\255\033\000\033\000\
\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\
\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\
\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\
\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\
\034\000\034\000\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\034\000\034\000\034\000\034\000\034\000\034\000\034\000\
\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\
\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\
\034\000\034\000\034\000\255\255\255\255\255\255\255\255\034\000\
\255\255\034\000\034\000\034\000\034\000\034\000\034\000\034\000\
\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\
\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\
\034\000\034\000\034\000\035\000\035\000\035\000\035\000\035\000\
\035\000\035\000\035\000\035\000\035\000\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\035\000\035\000\035\000\035\000\
\035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\
\035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\
\035\000\035\000\035\000\035\000\035\000\035\000\255\255\255\255\
\255\255\255\255\035\000\255\255\035\000\035\000\035\000\035\000\
\035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\
\035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\
\035\000\035\000\035\000\035\000\035\000\035\000\036\000\036\000\
\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\036\000\
\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\
\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\
\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\
\036\000\255\255\255\255\255\255\255\255\036\000\255\255\036\000\
\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\
\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\
\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\
\036\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\
\037\000\037\000\037\000\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\037\000\037\000\037\000\037\000\037\000\037\000\
\037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\
\037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\
\037\000\037\000\037\000\037\000\255\255\255\255\255\255\255\255\
\037\000\255\255\037\000\037\000\037\000\037\000\037\000\037\000\
\037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\
\037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\
\037\000\037\000\037\000\037\000\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255";
Lexing.lex_base_code =
"";
Lexing.lex_backtrk_code =
"";
Lexing.lex_default_code =
"";
Lexing.lex_trans_code =
"";
Lexing.lex_check_code =
"";
Lexing.lex_code =
"";
}
let rec read_token lexbuf =
__ocaml_lex_read_token_rec lexbuf 0
and __ocaml_lex_read_token_rec lexbuf __ocaml_lex_state =
match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with
| 0 ->
# 12 "lexer/lexer.mll"
( TYPE )
# 661 "lexer/lexer.ml"
| 1 ->
# 13 "lexer/lexer.mll"
( INT )
# 666 "lexer/lexer.ml"
| 2 ->
# 14 "lexer/lexer.mll"
( STRING )
# 671 "lexer/lexer.ml"
| 3 ->
# 15 "lexer/lexer.mll"
( DATE )
# 676 "lexer/lexer.ml"
| 4 ->
# 16 "lexer/lexer.mll"
( RANGE )
# 681 "lexer/lexer.ml"
| 5 ->
# 17 "lexer/lexer.mll"
( VALUES )
# 686 "lexer/lexer.ml"
| 6 ->
# 18 "lexer/lexer.mll"
( LF )
# 691 "lexer/lexer.ml"
| 7 ->
# 19 "lexer/lexer.mll"
( EQUALS )
# 696 "lexer/lexer.ml"
| 8 ->
# 20 "lexer/lexer.mll"
( LEFT_BRACKET )
# 701 "lexer/lexer.ml"
| 9 ->
# 21 "lexer/lexer.mll"
( RIGHT_BRACKET )
# 706 "lexer/lexer.ml"
| 10 ->
# 22 "lexer/lexer.mll"
( COMMA )
# 711 "lexer/lexer.ml"
| 11 ->
# 23 "lexer/lexer.mll"
( read_token lexbuf )
# 716 "lexer/lexer.ml"
| 12 ->
let
# 24 "lexer/lexer.mll"
ident
# 722 "lexer/lexer.ml"
= Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos lexbuf.Lexing.lex_curr_pos in
# 24 "lexer/lexer.mll"
( IDENT ident )
# 726 "lexer/lexer.ml"
| 13 ->
# 25 "lexer/lexer.mll"
( EOF )
# 731 "lexer/lexer.ml"
| __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf;
__ocaml_lex_read_token_rec lexbuf __ocaml_lex_state
;;

View File

@ -0,0 +1,25 @@
{
open Parser
}
let whitespace = [' ' '\t']+
let newline = ('\n'|"\r\n")
let digit = ['0'-'9']
let alpha = ['a'-'z' 'A'-'Z' '_']
let alphanumeric = (alpha|digit)
rule read_token = parse
| "type" { TYPE }
| "int" { INT }
| "string" { STRING }
| "date" { DATE }
| "range" { RANGE }
| "values" { VALUES }
| newline { LF }
| '=' { EQUALS }
| '[' { LEFT_BRACKET }
| ']' { RIGHT_BRACKET }
| ',' { COMMA }
| whitespace { read_token lexbuf }
| alphanumeric* as ident { IDENT ident }
| eof { EOF }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
_build/default/lib/ast.a Normal file

Binary file not shown.

BIN
_build/default/lib/ast.cma Normal file

Binary file not shown.

BIN
_build/default/lib/ast.cmxa Normal file

Binary file not shown.

BIN
_build/default/lib/ast.cmxs Executable file

Binary file not shown.

73
_build/default/lib/ast.ml Normal file
View File

@ -0,0 +1,73 @@
type data =
| Columns of column list
and column =
| Column of string * data_type * values (*name * type * value/range *)
and data_type =
| Int
| String
| Date
and values =
| Range of string * string
| Values of string list
let random_int lower_bound upper_bound =
let i = Random.int (upper_bound +1 - lower_bound) + lower_bound in
string_of_int i
let random_string values =
let len = List.length values in
let idx = Random.int len in
List.nth values idx
let generate_row column =
match column with
| Column(_, Int, Range(min, max)) ->
let lower_bound = int_of_string min in
let upper_bound = int_of_string max in
random_int lower_bound upper_bound
| Column(_, String, Values(values)) ->
random_string values
| _ -> failwith "Invalid column"
let get_headers columns =
let rec aux cols =
match cols with
| [] -> []
| [Column(name, _, _)] -> [name]
| Column(name, _, _)::l -> name::(aux l)
in
match columns with
| Columns(cols) -> aux cols
let generate_rows columns n =
let aux col =
match col with
| Column(_, Int, Range(min, max)) ->
let lower_bound = int_of_string min in
let upper_bound = int_of_string max in
random_int lower_bound upper_bound
| Column(_, String, Values(values)) ->
random_string values
| _ -> failwith "Wrong column specification"
in
let rec aux1 cols =
match cols with
| [] -> []
| [col] -> [aux col]
| col :: l -> (aux col)::(aux1 l)
in
let rec aux2 cols n =
match n with
| 0 -> []
| n -> (aux1 cols)::(aux2 cols (n-1))
in
aux2 columns n
let generate_csv columns delim =
let header_list = get_headers columns in
let header = String.concat delim header_list in
print_string header

View File

@ -0,0 +1,4 @@
(lang dune 3.16)
(name mock_csv)
(sections (lib .) (bin ../../bin))
(files (lib (META dune-package opam)) (bin (mock_csv)))

View File

@ -0,0 +1,8 @@
lib: [
"_build/install/default/lib/mock_csv/META"
"_build/install/default/lib/mock_csv/dune-package"
"_build/install/default/lib/mock_csv/opam"
]
bin: [
"_build/install/default/bin/mock_csv"
]

View File

@ -0,0 +1,31 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "A short synopsis"
description: "A longer description"
maintainer: ["Simon Petit"]
authors: ["Simon Petit"]
license: "LICENSE"
tags: ["topics" "to describe" "your" "project"]
homepage: "https://github.com/username/reponame"
doc: "https://url/to/documentation"
bug-reports: "https://github.com/username/reponame/issues"
depends: [
"ocaml"
"dune" {>= "3.16"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/username/reponame.git"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
parser/parser__mock.ml.mock: Ast Lexing List

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
_build/default/parser/parser.cmxs Executable file

Binary file not shown.

View File

View File

@ -0,0 +1,463 @@
module MenhirBasics = struct
exception Error
let _eRR =
fun _s ->
raise Error
type token =
| VALUES
| TYPE
| STRING
| RIGHT_BRACKET
| RANGE
| LF
| LEFT_BRACKET
| INT
| IDENT of (
# 9 "parser/parser.mly"
(string)
# 23 "parser/parser.ml"
)
| EQUALS
| EOF
| DATE
| COMMA
end
include MenhirBasics
# 1 "parser/parser.mly"
(* Header: Define the AST type *)
open Ast
# 39 "parser/parser.ml"
type ('s, 'r) _menhir_state =
| MenhirState00 : ('s, _menhir_box_main) _menhir_state
(** State 00.
Stack shape : .
Start symbol: main. *)
| MenhirState07 : (('s, _menhir_box_main) _menhir_cell1_columns, _menhir_box_main) _menhir_state
(** State 07.
Stack shape : columns.
Start symbol: main. *)
| MenhirState19 : (('s, _menhir_box_main) _menhir_cell1_column_name _menhir_cell0_column_type, _menhir_box_main) _menhir_state
(** State 19.
Stack shape : column_name column_type.
Start symbol: main. *)
| MenhirState23 : ((('s, _menhir_box_main) _menhir_cell1_column_name _menhir_cell0_column_type, _menhir_box_main) _menhir_cell1_values, _menhir_box_main) _menhir_state
(** State 23.
Stack shape : column_name column_type values.
Start symbol: main. *)
and ('s, 'r) _menhir_cell1_column_name =
| MenhirCell1_column_name of 's * ('s, 'r) _menhir_state * (string)
and 's _menhir_cell0_column_type =
| MenhirCell0_column_type of 's * (Ast.data_type)
and ('s, 'r) _menhir_cell1_columns =
| MenhirCell1_columns of 's * ('s, 'r) _menhir_state * (Ast.column list)
and ('s, 'r) _menhir_cell1_values =
| MenhirCell1_values of 's * ('s, 'r) _menhir_state * (string list)
and _menhir_box_main =
| MenhirBox_main of (Ast.data) [@@unboxed]
let _menhir_action_01 =
fun _1 _3 _5 ->
(
# 25 "parser/parser.mly"
( Column(_1, _3, _5) )
# 83 "parser/parser.ml"
: (Ast.column))
let _menhir_action_02 =
fun _2 ->
(
# 29 "parser/parser.mly"
( _2 )
# 91 "parser/parser.ml"
: (string))
let _menhir_action_03 =
fun () ->
(
# 33 "parser/parser.mly"
( Int )
# 99 "parser/parser.ml"
: (Ast.data_type))
let _menhir_action_04 =
fun () ->
(
# 34 "parser/parser.mly"
( String )
# 107 "parser/parser.ml"
: (Ast.data_type))
let _menhir_action_05 =
fun () ->
(
# 35 "parser/parser.mly"
( Date )
# 115 "parser/parser.ml"
: (Ast.data_type))
let _menhir_action_06 =
fun _4 ->
(
# 39 "parser/parser.mly"
( Values(List.rev(_4)) )
# 123 "parser/parser.ml"
: (Ast.values))
let _menhir_action_07 =
fun _4 ->
(
# 40 "parser/parser.mly"
( _4 )
# 131 "parser/parser.ml"
: (Ast.values))
let _menhir_action_08 =
fun _1 ->
(
# 20 "parser/parser.mly"
( [_1] )
# 139 "parser/parser.ml"
: (Ast.column list))
let _menhir_action_09 =
fun _1 _4 ->
(
# 21 "parser/parser.mly"
( _4::_1 )
# 147 "parser/parser.ml"
: (Ast.column list))
let _menhir_action_10 =
fun _1 ->
(
# 17 "parser/parser.mly"
( Columns(List.rev(_1)) )
# 155 "parser/parser.ml"
: (Ast.data))
let _menhir_action_11 =
fun _1 _3 ->
(
# 49 "parser/parser.mly"
( Range(_1, _3) )
# 163 "parser/parser.ml"
: (Ast.values))
let _menhir_action_12 =
fun _1 ->
(
# 53 "parser/parser.mly"
( _1 )
# 171 "parser/parser.ml"
: (string))
let _menhir_action_13 =
fun _1 ->
(
# 44 "parser/parser.mly"
( [_1] )
# 179 "parser/parser.ml"
: (string list))
let _menhir_action_14 =
fun _1 _3 ->
(
# 45 "parser/parser.mly"
( _3::_1 )
# 187 "parser/parser.ml"
: (string list))
let _menhir_print_token : token -> string =
fun _tok ->
match _tok with
| COMMA ->
"COMMA"
| DATE ->
"DATE"
| EOF ->
"EOF"
| EQUALS ->
"EQUALS"
| IDENT _ ->
"IDENT"
| INT ->
"INT"
| LEFT_BRACKET ->
"LEFT_BRACKET"
| LF ->
"LF"
| RANGE ->
"RANGE"
| RIGHT_BRACKET ->
"RIGHT_BRACKET"
| STRING ->
"STRING"
| TYPE ->
"TYPE"
| VALUES ->
"VALUES"
let _menhir_fail : unit -> 'a =
fun () ->
Printf.eprintf "Internal failure -- please contact the parser generator's developers.\n%!";
assert false
include struct
[@@@ocaml.warning "-4-37"]
let rec _menhir_run_01 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_main) _menhir_state -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
match (_tok : MenhirBasics.token) with
| IDENT _v ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| RIGHT_BRACKET ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _2 = _v in
let _v = _menhir_action_02 _2 in
let _menhir_stack = MenhirCell1_column_name (_menhir_stack, _menhir_s, _v) in
(match (_tok : MenhirBasics.token) with
| LF ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TYPE ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| EQUALS ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| STRING ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_04 () in
_menhir_goto_column_type _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| INT ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_03 () in
_menhir_goto_column_type _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| DATE ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_05 () in
_menhir_goto_column_type _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ()
and _menhir_goto_column_type : type ttv_stack. (ttv_stack, _menhir_box_main) _menhir_cell1_column_name -> _ -> _ -> _ -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
let _menhir_stack = MenhirCell0_column_type (_menhir_stack, _v) in
match (_tok : MenhirBasics.token) with
| LF ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| VALUES ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| EQUALS ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| LEFT_BRACKET ->
let _menhir_s = MenhirState19 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| IDENT _v ->
_menhir_run_20 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| RANGE ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| EQUALS ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| LEFT_BRACKET ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| IDENT _v_1 ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| COMMA ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| IDENT _v_2 ->
let _tok = _menhir_lexer _menhir_lexbuf in
let (_3, _1) = (_v_2, _v_1) in
let _v = _menhir_action_11 _1 _3 in
(match (_tok : MenhirBasics.token) with
| RIGHT_BRACKET ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _4 = _v in
let _v = _menhir_action_07 _4 in
_menhir_goto_column_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ()
and _menhir_run_20 : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_main) _menhir_state -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _1 = _v in
let _v = _menhir_action_12 _1 in
_menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_goto_value : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_main) _menhir_state -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
match _menhir_s with
| MenhirState19 ->
_menhir_run_25 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
| MenhirState23 ->
_menhir_run_24 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| _ ->
_menhir_fail ()
and _menhir_run_25 : type ttv_stack. ((ttv_stack, _menhir_box_main) _menhir_cell1_column_name _menhir_cell0_column_type as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_main) _menhir_state -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
let _1 = _v in
let _v = _menhir_action_13 _1 in
_menhir_goto_values _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_goto_values : type ttv_stack. ((ttv_stack, _menhir_box_main) _menhir_cell1_column_name _menhir_cell0_column_type as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_main) _menhir_state -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
match (_tok : MenhirBasics.token) with
| RIGHT_BRACKET ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _4 = _v in
let _v = _menhir_action_06 _4 in
_menhir_goto_column_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| COMMA ->
let _menhir_stack = MenhirCell1_values (_menhir_stack, _menhir_s, _v) in
let _menhir_s = MenhirState23 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| IDENT _v ->
_menhir_run_20 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
| _ ->
_eRR ())
| _ ->
_eRR ()
and _menhir_goto_column_value : type ttv_stack. (ttv_stack, _menhir_box_main) _menhir_cell1_column_name _menhir_cell0_column_type -> _ -> _ -> _ -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
let MenhirCell0_column_type (_menhir_stack, _3) = _menhir_stack in
let MenhirCell1_column_name (_menhir_stack, _menhir_s, _1) = _menhir_stack in
let _5 = _v in
let _v = _menhir_action_01 _1 _3 _5 in
_menhir_goto_column _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_goto_column : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_main) _menhir_state -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
match _menhir_s with
| MenhirState00 ->
_menhir_run_37 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
| MenhirState07 ->
_menhir_run_35 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| _ ->
_menhir_fail ()
and _menhir_run_37 : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_main) _menhir_state -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
let _1 = _v in
let _v = _menhir_action_08 _1 in
_menhir_goto_columns _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_goto_columns : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_main) _menhir_state -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
match (_tok : MenhirBasics.token) with
| LF ->
let _menhir_stack = MenhirCell1_columns (_menhir_stack, _menhir_s, _v) in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| LF ->
let _menhir_s = MenhirState07 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| LEFT_BRACKET ->
_menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| _ ->
_eRR ())
| _ ->
_eRR ())
| EOF ->
let _1 = _v in
let _v = _menhir_action_10 _1 in
MenhirBox_main _v
| _ ->
_eRR ()
and _menhir_run_35 : type ttv_stack. (ttv_stack, _menhir_box_main) _menhir_cell1_columns -> _ -> _ -> _ -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
let MenhirCell1_columns (_menhir_stack, _menhir_s, _1) = _menhir_stack in
let _4 = _v in
let _v = _menhir_action_09 _1 _4 in
_menhir_goto_columns _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_run_24 : type ttv_stack. ((ttv_stack, _menhir_box_main) _menhir_cell1_column_name _menhir_cell0_column_type, _menhir_box_main) _menhir_cell1_values -> _ -> _ -> _ -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
let MenhirCell1_values (_menhir_stack, _menhir_s, _1) = _menhir_stack in
let _3 = _v in
let _v = _menhir_action_14 _1 _3 in
_menhir_goto_values _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
let _menhir_run_00 : type ttv_stack. ttv_stack -> _ -> _ -> _menhir_box_main =
fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
let _menhir_s = MenhirState00 in
let _tok = _menhir_lexer _menhir_lexbuf in
match (_tok : MenhirBasics.token) with
| LEFT_BRACKET ->
_menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| _ ->
_eRR ()
end
let main =
fun _menhir_lexer _menhir_lexbuf ->
let _menhir_stack = () in
let MenhirBox_main v = _menhir_run_00 _menhir_stack _menhir_lexbuf _menhir_lexer in
v

View File

@ -0,0 +1,25 @@
(* The type of tokens. *)
type token =
| VALUES
| TYPE
| STRING
| RIGHT_BRACKET
| RANGE
| LF
| LEFT_BRACKET
| INT
| IDENT of (string)
| EQUALS
| EOF
| DATE
| COMMA
(* This exception is raised by the monolithic API functions. *)
exception Error
(* The monolithic API. *)
val main: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Ast.data)

View File

@ -0,0 +1,53 @@
%{
(* Header: Define the AST type *)
open Ast
%}
%token EQUALS COMMA LEFT_BRACKET RIGHT_BRACKET LF
%token INT STRING DATE
%token TYPE RANGE VALUES
%token <string> IDENT
%token EOF
%start main
%type <data> main
%%
main:
| columns EOF { Columns(List.rev($1)) }
columns:
| column { [$1] }
| columns LF LF column { $4::$1 }
column :
| column_name LF column_type LF column_value { Column($1, $3, $5) }
column_name :
| LEFT_BRACKET IDENT RIGHT_BRACKET { $2 }
column_type:
| TYPE EQUALS INT { Int }
| TYPE EQUALS STRING { String }
| TYPE EQUALS DATE { Date }
column_value:
| VALUES EQUALS LEFT_BRACKET values RIGHT_BRACKET { Values(List.rev($4)) }
| RANGE EQUALS LEFT_BRACKET range RIGHT_BRACKET { $4 }
values :
| value { [$1] }
| values COMMA value { $3::$1 }
range :
| IDENT COMMA IDENT { Range($1, $3) }
value:
| IDENT { $1 }

View File

@ -0,0 +1,307 @@
type token =
| VALUES
| TYPE
| STRING
| RIGHT_BRACKET
| RANGE
| LF
| LEFT_BRACKET
| INT
| IDENT of (
# 9 "parser/parser.mly"
(string)
# 15 "parser/parser__mock.ml.mock"
)
| EQUALS
| EOF
| DATE
| COMMA
# 1 "parser/parser.mly"
(* Header: Define the AST type *)
open Ast
# 27 "parser/parser__mock.ml.mock"
let menhir_begin_marker =
0
and (xv_values, xv_value, xv_range, xv_main, xv_columns, xv_column_value, xv_column_type, xv_column_name, xv_column) =
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 45 "parser/parser.mly"
_3
# 36 "parser/parser__mock.ml.mock"
: 'tv_value) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 45 "parser/parser.mly"
_2
# 40 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 45 "parser/parser.mly"
_1
# 44 "parser/parser__mock.ml.mock"
: 'tv_values) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_values ->
# 45 "parser/parser.mly"
( _3::_1 )
# 49 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 44 "parser/parser.mly"
_1
# 54 "parser/parser__mock.ml.mock"
: 'tv_value) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_values ->
# 44 "parser/parser.mly"
( [_1] )
# 59 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 53 "parser/parser.mly"
_1
# 64 "parser/parser__mock.ml.mock"
: (
# 9 "parser/parser.mly"
(string)
# 68 "parser/parser__mock.ml.mock"
)) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_value ->
# 53 "parser/parser.mly"
( _1 )
# 73 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 49 "parser/parser.mly"
_3
# 78 "parser/parser__mock.ml.mock"
: (
# 9 "parser/parser.mly"
(string)
# 82 "parser/parser__mock.ml.mock"
)) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 49 "parser/parser.mly"
_2
# 86 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 49 "parser/parser.mly"
_1
# 90 "parser/parser__mock.ml.mock"
: (
# 9 "parser/parser.mly"
(string)
# 94 "parser/parser__mock.ml.mock"
)) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_range ->
# 49 "parser/parser.mly"
( Range(_1, _3) )
# 99 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 17 "parser/parser.mly"
_2
# 104 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 17 "parser/parser.mly"
_1
# 108 "parser/parser__mock.ml.mock"
: 'tv_columns) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : (
# 12 "parser/parser.mly"
(data)
# 112 "parser/parser__mock.ml.mock"
) ->
(
# 17 "parser/parser.mly"
( Columns(List.rev(_1)) )
# 117 "parser/parser__mock.ml.mock"
: 'tv_main) in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 21 "parser/parser.mly"
_4
# 122 "parser/parser__mock.ml.mock"
: 'tv_column) (_startpos__4_ : Lexing.position) (_endpos__4_ : Lexing.position) (_startofs__4_ : int) (_endofs__4_ : int) (_loc__4_ : Lexing.position * Lexing.position) (
# 21 "parser/parser.mly"
_3
# 126 "parser/parser__mock.ml.mock"
: unit) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 21 "parser/parser.mly"
_2
# 130 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 21 "parser/parser.mly"
_1
# 134 "parser/parser__mock.ml.mock"
: 'tv_columns) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_columns ->
# 21 "parser/parser.mly"
( _4::_1 )
# 139 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 20 "parser/parser.mly"
_1
# 144 "parser/parser__mock.ml.mock"
: 'tv_column) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_columns ->
# 20 "parser/parser.mly"
( [_1] )
# 149 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 40 "parser/parser.mly"
_5
# 154 "parser/parser__mock.ml.mock"
: unit) (_startpos__5_ : Lexing.position) (_endpos__5_ : Lexing.position) (_startofs__5_ : int) (_endofs__5_ : int) (_loc__5_ : Lexing.position * Lexing.position) (
# 40 "parser/parser.mly"
_4
# 158 "parser/parser__mock.ml.mock"
: 'tv_range) (_startpos__4_ : Lexing.position) (_endpos__4_ : Lexing.position) (_startofs__4_ : int) (_endofs__4_ : int) (_loc__4_ : Lexing.position * Lexing.position) (
# 40 "parser/parser.mly"
_3
# 162 "parser/parser__mock.ml.mock"
: unit) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 40 "parser/parser.mly"
_2
# 166 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 40 "parser/parser.mly"
_1
# 170 "parser/parser__mock.ml.mock"
: unit) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_column_value ->
# 40 "parser/parser.mly"
( _4 )
# 175 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 39 "parser/parser.mly"
_5
# 180 "parser/parser__mock.ml.mock"
: unit) (_startpos__5_ : Lexing.position) (_endpos__5_ : Lexing.position) (_startofs__5_ : int) (_endofs__5_ : int) (_loc__5_ : Lexing.position * Lexing.position) (
# 39 "parser/parser.mly"
_4
# 184 "parser/parser__mock.ml.mock"
: 'tv_values) (_startpos__4_ : Lexing.position) (_endpos__4_ : Lexing.position) (_startofs__4_ : int) (_endofs__4_ : int) (_loc__4_ : Lexing.position * Lexing.position) (
# 39 "parser/parser.mly"
_3
# 188 "parser/parser__mock.ml.mock"
: unit) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 39 "parser/parser.mly"
_2
# 192 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 39 "parser/parser.mly"
_1
# 196 "parser/parser__mock.ml.mock"
: unit) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_column_value ->
# 39 "parser/parser.mly"
( Values(List.rev(_4)) )
# 201 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 35 "parser/parser.mly"
_3
# 206 "parser/parser__mock.ml.mock"
: unit) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 35 "parser/parser.mly"
_2
# 210 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 35 "parser/parser.mly"
_1
# 214 "parser/parser__mock.ml.mock"
: unit) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_column_type ->
# 35 "parser/parser.mly"
( Date )
# 219 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 34 "parser/parser.mly"
_3
# 224 "parser/parser__mock.ml.mock"
: unit) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 34 "parser/parser.mly"
_2
# 228 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 34 "parser/parser.mly"
_1
# 232 "parser/parser__mock.ml.mock"
: unit) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_column_type ->
# 34 "parser/parser.mly"
( String )
# 237 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 33 "parser/parser.mly"
_3
# 242 "parser/parser__mock.ml.mock"
: unit) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 33 "parser/parser.mly"
_2
# 246 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 33 "parser/parser.mly"
_1
# 250 "parser/parser__mock.ml.mock"
: unit) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_column_type ->
# 33 "parser/parser.mly"
( Int )
# 255 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 29 "parser/parser.mly"
_3
# 260 "parser/parser__mock.ml.mock"
: unit) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 29 "parser/parser.mly"
_2
# 264 "parser/parser__mock.ml.mock"
: (
# 9 "parser/parser.mly"
(string)
# 268 "parser/parser__mock.ml.mock"
)) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 29 "parser/parser.mly"
_1
# 272 "parser/parser__mock.ml.mock"
: unit) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_column_name ->
# 29 "parser/parser.mly"
( _2 )
# 277 "parser/parser__mock.ml.mock"
in
let _ = fun (_startpos : Lexing.position) (_endpos : Lexing.position) (_endpos__0_ : Lexing.position) (_symbolstartpos : Lexing.position) (_startofs : int) (_endofs : int) (_endofs__0_ : int) (_symbolstartofs : int) (_sloc : Lexing.position * Lexing.position) (_loc : Lexing.position * Lexing.position) (
# 25 "parser/parser.mly"
_5
# 282 "parser/parser__mock.ml.mock"
: 'tv_column_value) (_startpos__5_ : Lexing.position) (_endpos__5_ : Lexing.position) (_startofs__5_ : int) (_endofs__5_ : int) (_loc__5_ : Lexing.position * Lexing.position) (
# 25 "parser/parser.mly"
_4
# 286 "parser/parser__mock.ml.mock"
: unit) (_startpos__4_ : Lexing.position) (_endpos__4_ : Lexing.position) (_startofs__4_ : int) (_endofs__4_ : int) (_loc__4_ : Lexing.position * Lexing.position) (
# 25 "parser/parser.mly"
_3
# 290 "parser/parser__mock.ml.mock"
: 'tv_column_type) (_startpos__3_ : Lexing.position) (_endpos__3_ : Lexing.position) (_startofs__3_ : int) (_endofs__3_ : int) (_loc__3_ : Lexing.position * Lexing.position) (
# 25 "parser/parser.mly"
_2
# 294 "parser/parser__mock.ml.mock"
: unit) (_startpos__2_ : Lexing.position) (_endpos__2_ : Lexing.position) (_startofs__2_ : int) (_endofs__2_ : int) (_loc__2_ : Lexing.position * Lexing.position) (
# 25 "parser/parser.mly"
_1
# 298 "parser/parser__mock.ml.mock"
: 'tv_column_name) (_startpos__1_ : Lexing.position) (_endpos__1_ : Lexing.position) (_startofs__1_ : int) (_endofs__1_ : int) (_loc__1_ : Lexing.position * Lexing.position) : 'tv_column ->
# 25 "parser/parser.mly"
( Column(_1, _3, _5) )
# 303 "parser/parser__mock.ml.mock"
in
((let rec diverge() = diverge() in diverge()) : 'tv_values * 'tv_value * 'tv_range * 'tv_main * 'tv_columns * 'tv_column_value * 'tv_column_type * 'tv_column_name * 'tv_column)
and menhir_end_marker =
0

View File

@ -0,0 +1,25 @@
type token =
VALUES
| TYPE
| STRING
| RIGHT_BRACKET
| RANGE
| LF
| LEFT_BRACKET
| INT
| IDENT of string
| EQUALS
| EOF
| DATE
| COMMA
val menhir_begin_marker : int
val xv_values : string list
val xv_value : string
val xv_range : Ast.values
val xv_main : Ast.data
val xv_columns : Ast.column list
val xv_column_value : Ast.values
val xv_column_type : Ast.data_type
val xv_column_name : string
val xv_column : Ast.column
val menhir_end_marker : int

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,13 @@
(* generated by dune *)
(** @canonical Dune__exe.Test_generate_row *)
module Test_generate_row = Dune__exe__Test_generate_row
(** @canonical Dune__exe.Test_header *)
module Test_header = Dune__exe__Test_header
(** @canonical Dune__exe.Test_mock_csv *)
module Test_mock_csv = Dune__exe__Test_mock_csv
(** @canonical Dune__exe.Test_random_int *)
module Test_random_int = Dune__exe__Test_random_int

View File

@ -0,0 +1 @@
test/test_header.ml: Ast

View File

@ -0,0 +1 @@
test/test_header.mli:

View File

@ -0,0 +1,13 @@
(* generated by dune *)
(** @canonical Dune__exe.Test_generate_row *)
module Test_generate_row = Dune__exe__Test_generate_row
(** @canonical Dune__exe.Test_header *)
module Test_header = Dune__exe__Test_header
(** @canonical Dune__exe.Test_mock_csv *)
module Test_mock_csv = Dune__exe__Test_mock_csv
(** @canonical Dune__exe.Test_random_int *)
module Test_random_int = Dune__exe__Test_random_int

View File

@ -0,0 +1 @@
test/test_mock_csv.ml: Ast Lexer Lexing Parser

View File

@ -0,0 +1 @@
test/test_mock_csv.mli:

View File

@ -0,0 +1,13 @@
(* generated by dune *)
(** @canonical Dune__exe.Test_generate_row *)
module Test_generate_row = Dune__exe__Test_generate_row
(** @canonical Dune__exe.Test_header *)
module Test_header = Dune__exe__Test_header
(** @canonical Dune__exe.Test_mock_csv *)
module Test_mock_csv = Dune__exe__Test_mock_csv
(** @canonical Dune__exe.Test_random_int *)
module Test_random_int = Dune__exe__Test_random_int

Some files were not shown because too many files have changed in this diff Show More