I’m trying to get a
jbuilder project to use
ocamlyacc to build a lexer and parser, but I can’t get things to work. I have files
Project_Parser.mly in my directory, and here is the
(jbuild_version 1) (ocamlyacc (Project_Parser.mly)) (ocamllex (Project_Lexer.mll)) (library ((name project) (public_name project) (libraries (various_things)) (preprocess (pps (ppx_jane)))))
jbuild file, I get an error saying that there is no
Project_Lexer.ml (and indeed there is no such file anywhere in
_build). I tried adding a dependency line to the
(preprocessor_deps (Project_Lexer.ml Project_Parser.ml))
but then I get an error saying
No rule found for _build/default/lib/Project_Lexer.ml. Reading the appropriate section of the jbuilder documentation, it seems like the ocamllex part above should have provided this rule.
I can’t tell what the proper incantations to get this working is from the jbuilder documentation. Any help?