summaryrefslogtreecommitdiff
path: root/src/myocamlbuild.ml
diff options
context:
space:
mode:
authorBrian Campbell2017-08-11 15:04:59 +0100
committerBrian Campbell2017-08-11 15:04:59 +0100
commitc46c1ef29c08dc3e959228783d34e9c6ac464455 (patch)
tree69ea9502f5204748f4a2480f01613470254950c2 /src/myocamlbuild.ml
parentf97c4dac4a900a4b8b19522425a6df4f48a5b940 (diff)
Menhir for new parser, ocamlyacc for old
Diffstat (limited to 'src/myocamlbuild.ml')
-rw-r--r--src/myocamlbuild.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/myocamlbuild.ml b/src/myocamlbuild.ml
index 765553d3..697ee9bd 100644
--- a/src/myocamlbuild.ml
+++ b/src/myocamlbuild.ml
@@ -101,5 +101,11 @@ dispatch begin function
mv (basename (env "%.lem")) (dirname (env "%.lem"))
]);
+ rule "old parser"
+ ~insert:(`top)
+ ~prods: ["parser.ml"; "parser.mli"]
+ ~dep: "parser.mly"
+ (fun env builder -> Cmd(S[V"OCAMLYACC"; T(tags_of_pathname "parser.mly"++"ocaml"++"parser"++"ocamlyacc"); Px "parser.mly"]));
+
| _ -> ()
end ;;