2022-03-08 06:16:27 +00:00
|
|
|
(library
|
2022-03-08 09:20:19 +00:00
|
|
|
(name e0)
|
|
|
|
(libraries menhirLib)
|
|
|
|
(preprocess
|
|
|
|
(pps ppx_deriving.show ppx_deriving.ord)))
|
2022-03-08 06:16:27 +00:00
|
|
|
|
|
|
|
(ocamllex lexer)
|
|
|
|
|
|
|
|
(menhir
|
2022-03-08 09:20:19 +00:00
|
|
|
(flags --table)
|
|
|
|
(modules parser))
|
2022-03-08 08:52:20 +00:00
|
|
|
|
|
|
|
; https://baturin.org/blog/declarative-parse-error-reporting-with-menhir/
|
2022-03-08 09:20:19 +00:00
|
|
|
|
2022-03-08 08:52:20 +00:00
|
|
|
(rule
|
2022-03-08 09:20:19 +00:00
|
|
|
(targets parser_messages.ml)
|
|
|
|
(deps parser.messages parser.mly)
|
|
|
|
(action
|
|
|
|
(with-stdout-to
|
|
|
|
%{targets}
|
|
|
|
(run menhir --compile-errors %{deps}))))
|