Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlbuild and bootstrapping projects
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: erickt@d...
Subject: ocamlbuild and bootstrapping projects
I was trying to adapt the parser dypgen (http://dypgen.free.fr/)'s build
system to use ocamlbuild, but I ran into a problem. The final dypgen
grammar is generated by an internal intermediary generator called pgen.
The problem I'm having is that I don't know how to get ocamlbuild to
automatically build pgen before we can process a %.dyp file. I suppose I
could do this in two separate calls to ocamlbuild, but I feel like this
can be done using a plugin. Is this possible?

If this helps, here are all the files:

all the files shared between the two generators:
dyplib/automaton.ml
dyplib/dyp.ml
dyplib/dyp.mli
dyplib/dyplib.mllib
dyplib/gs.ml
dyplib/priority_by_relation.ml

the intermediary generator. This isn't supposed to be an external tool:
generators/pgen/pgen.ml
generators/pgen/pgen_lexer.mll
generators/pgen/pgen_parser_param.ml

the external parser:
generators/dypgen/argument.ml
generators/dypgen/dypgen.ml
generators/dypgen/dypgen_lexer.mll
generators/dypgen/dypgen_parser.dyp  <- the file that needs to be parsed
with pgen
generators/dypgen/insert_linenum.mll
generators/dypgen/parse_tree.mli


Thanks for any help!

-e