diff --git a/src/ligo/parser/camligo/.gitignore b/src/ligo/parser/camligo/.gitignore index 5ff5d89f9..5d2e66768 100644 --- a/src/ligo/parser/camligo/.gitignore +++ b/src/ligo/parser/camligo/.gitignore @@ -1 +1,2 @@ -ast.ml +ast_generated.ml +parser_generated.mly diff --git a/src/ligo/parser/camligo/ast.ml b/src/ligo/parser/camligo/ast.ml new file mode 100644 index 000000000..00523c894 --- /dev/null +++ b/src/ligo/parser/camligo/ast.ml @@ -0,0 +1 @@ +include Ast_generated diff --git a/src/ligo/parser/camligo/dune b/src/ligo/parser/camligo/dune index 3023c7f1c..f68d6a816 100644 --- a/src/ligo/parser/camligo/dune +++ b/src/ligo/parser/camligo/dune @@ -5,7 +5,7 @@ tezos-utils lex ) - (modules ast parser user) + (modules ast ast_generated parser user) (flags (:standard -w +1..62-4-9-44-40-42-48@39@33 -open Tezos_utils )) (preprocess (pps tezos-utils.ppx_let_generalized) @@ -16,14 +16,15 @@ (rule (targets parser.ml parser.mli) - (deps parser.mly ast.ml) - (action (system "menhir --explain --external-tokens Lex.Token lex/token.mly parser.mly --base parser")) + (deps parser_generated.mly ast.ml) + (action (system "menhir --explain --external-tokens Lex.Token lex/token.mly parser_generated.mly --base parser")) ) (rule - (targets parser.mly) + (targets parser_generated.mly) (deps partial_parser.mly pre_parser.mly) - (action (system "cat pre_parser.mly partial_parser.mly > parser.mly")) + (action (system "cat pre_parser.mly partial_parser.mly > parser_generated.mly")) + (mode promote-until-clean) ) (rule @@ -35,9 +36,9 @@ ;; Generating AST (rule - (targets ast.ml) + (targets ast_generated.ml) (deps generator.exe) - (action (system "./generator.exe ast > ast.ml")) + (action (system "./generator.exe ast > ast_generated.ml")) (mode promote-until-clean) )