Guest User

Untitled

a guest
Feb 18th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Index: ocaml_specific.ml
  2. ===================================================================
  3. --- ocaml_specific.ml (revision 15833)
  4. +++ ocaml_specific.ml (working copy)
  5. @@ -530,6 +530,21 @@
  6. flag [ "ocaml" ; "menhir" ; "explain" ] (S[A "--explain"]);;
  7. flag [ "ocaml" ; "menhir" ; "infer" ] (S[A "--infer"]);;
  8.  
  9. +(* Define two ocamlbuild flags [only_tokens] and [external_tokens(Foo)]
  10. + which correspond to menhir's [--only-tokens] and [--external-tokens Foo].
  11. + When they are used, these flags should be passed both to [menhir] and to
  12. + [menhir --raw-depend]. *)
  13. +let () =
  14. + List.iter (fun mode ->
  15. +
  16. + flag [ mode; "only_tokens" ] (S[A "--only-tokens"]);
  17. +
  18. + pflag [ mode ] "external_tokens" (fun name ->
  19. + S[A "--external-tokens"; A name]
  20. + )
  21. +
  22. + ) [ "menhir"; "menhir_ocamldep" ]
  23. +
  24. flag ["ocaml"; "ocamllex"] (atomize !Options.ocaml_lexflags);;
  25.  
  26. (* Tell ocamllex to generate ml code *)
Add Comment
Please, Sign In to add comment