mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
fdcdefd4d0
`LAW_TEXT` tokens are now returned one per line, so we need an associativity rule to correctly aggregate them.
76 lines
1.1 KiB
Plaintext
76 lines
1.1 KiB
Plaintext
(library
|
|
(name surface)
|
|
(public_name catala.surface)
|
|
(libraries
|
|
utils
|
|
menhirLib
|
|
sedlex
|
|
re
|
|
desugared
|
|
scopelang
|
|
zarith
|
|
zarith_stubs_js
|
|
calendar)
|
|
(preprocess
|
|
(pps sedlex.ppx visitors.ppx)))
|
|
|
|
(menhir
|
|
(modules tokens)
|
|
(flags --only-tokens))
|
|
|
|
(menhir
|
|
(modules tokens parser)
|
|
(merge_into parser)
|
|
(flags --external-tokens Tokens --table --explain))
|
|
|
|
(documentation
|
|
(package catala)
|
|
(mld_files surface))
|
|
|
|
;; No built-in support for Menhir's parser messages yet
|
|
|
|
(rule
|
|
(with-stdout-to
|
|
parser.messages.new
|
|
(run
|
|
menhir
|
|
%{dep:tokens.mly}
|
|
%{dep:parser.mly}
|
|
--base
|
|
parser
|
|
--list-errors)))
|
|
|
|
(rule
|
|
(with-stdout-to
|
|
parser_errors.ml
|
|
(run
|
|
menhir
|
|
%{dep:tokens.mly}
|
|
%{dep:parser.mly}
|
|
--base
|
|
parser
|
|
--compile-errors
|
|
%{dep:parser.messages})))
|
|
|
|
(rule
|
|
(with-stdout-to
|
|
parser.messages.updated
|
|
(run
|
|
menhir
|
|
%{dep:tokens.mly}
|
|
%{dep:parser.mly}
|
|
--base
|
|
parser
|
|
--update-errors
|
|
%{dep:parser.messages})))
|
|
|
|
(rule
|
|
(alias update-parser-messages)
|
|
(action
|
|
(diff parser.messages parser.messages.updated)))
|
|
|
|
(rule
|
|
(alias create-parser-messages)
|
|
(action
|
|
(diff parser.messages parser.messages.new)))
|