ligo/src/passes/1-parser/pascaligo/dune

72 lines
2.0 KiB
Plaintext
Raw Normal View History

;; Build of the lexer
2019-05-13 00:56:22 +04:00
(ocamllex LexToken)
;; Build of the parser
2019-05-13 00:56:22 +04:00
(menhir
(merge_into Parser)
(modules ParToken Parser)
(flags -la 1 --table --strict --explain --external-tokens LexToken))
;; Build of the parser as a library
2019-05-13 00:56:22 +04:00
(library
(name parser_pascaligo)
(public_name ligo.parser.pascaligo)
(modules
Scoping AST pascaligo Parser ParserLog LexToken ParErr)
(libraries
menhirLib
parser_shared
hex
simple-utils)
(preprocess
(pps bisect_ppx --conditional))
(flags (:standard -open Parser_shared -open Simple_utils)))
;; Build of the unlexer (for covering the
;; error states of the LR automaton)
(executable
(name Unlexer)
(libraries str)
(preprocess
(pps bisect_ppx --conditional))
(modules Unlexer))
;; Local build of a standalone lexer
(executable
(name LexerMain)
2019-11-06 20:23:49 +04:00
(libraries
hex simple-utils tezos-utils parser_pascaligo)
(modules LexerMain)
2019-12-11 22:07:52 +04:00
(preprocess
(pps bisect_ppx --conditional))
(flags (:standard -open Parser_shared -open Parser_pascaligo)))
2019-05-13 00:56:22 +04:00
;; Local build of a standalone parser
(executable
(name ParserMain)
(libraries parser_pascaligo)
(modules ParserMain)
2019-12-11 22:07:52 +04:00
(preprocess
(pps bisect_ppx --conditional))
(flags (:standard -open Simple_utils -open Parser_shared -open Parser_pascaligo)))
2020-01-09 10:41:16 +04:00
;; Build of the covering of error states in the LR automaton
2020-01-09 10:41:16 +04:00
(rule
(targets Parser.msg)
(deps (:script_messages ../../../../vendors/ligo-utils/simple-utils/messages.sh) Parser.mly LexToken.mli ParToken.mly)
(action (run %{script_messages} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly Parser.mly)))
;; Build of all the LIGO source file that cover all error states
2020-01-09 10:41:16 +04:00
(rule
(targets all.ligo)
(deps (:script_cover ../../../../vendors/ligo-utils/simple-utils/cover.sh) Parser.mly LexToken.mli ParToken.mly Parser.msg Unlexer.exe)
(action (run %{script_cover} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly --ext=ligo --unlexer=./Unlexer.exe --messages=Parser.msg --dir=. --concatenate Parser.mly)))