-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menhir: a new rule for the --compile-errors
support
#121
Comments
A first question is what the general naming convention should be. The parser Given that menhir generates the code to the standard output by default, it may not be intended as a self-contained complete OCaml source file -- I suppose that the workflow that @fpottier had in mind is that users would manually insert the function in their codebase? In that case, a name such as |
I have posted an answer on StackOverflow. In short, there are generic rules in Menhir's own myocamlbuild.ml, which could possibly move into ocamlbuild's standard set of rules. My naming convention is to store the code produced by the command |
I'm a bit frustrated by the current situation where I run after new Menhir features (I'm really glad Menhir is actively evolving) to encode them in upstream ocamlbuild in a worse way than what you are already doing yourself. (On the other hand there is an impedance mismatch in the sense that the code your write is less generic, it is partly only in the context of Menhir's own build system.) It would be nice to evolve in a situation where Menhir would provide an ocamlbuild plugin library, to be use by users of ocamlbuild+Menhir. But I don't see a way to make that translation smooth, except maybe by making On the other hand, you ( @fpottier ) have been forthcoming in the past in contributing flags for new Menhir options. Maybe the current arrangement can keep working: I'm of course happy to upstream any contributions on the Menhir support in ocamlbuild, but right now I don't have the time to do the work to digest your rules, generalize them, and push them in ocamlbuild myself, so a PR from you -- if you think this is a legitimate request for Menhir users would be warmly appreciated. I looked a bit more at your |
Hi Gabriel, Le 16/11/2016 23:12, Gabriel Scherer a écrit :
Sure, I could do that, if time permits. I am adding it to my todo list. If we copy some rules from Menhir's build system into ocamlbuild's (I could try to avoid the problem by removing the rules from Menhir's François Pottier |
ocamlbuild has some notion of rule priorities (you can actually specify stuff using the P.S.: Sorry for the somewhat grumpy tone of my previous message. |
See this Stackoverflow question: the last version of Menhir has an error-message-generation interface that can be used as follows:
it would be nice to have a generic ocamlbuild rule for that.
The text was updated successfully, but these errors were encountered: