From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=DNS_FROM_RFC_ABUSE, NO_REAL_NAME autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CB3CEBC6B for ; Sat, 4 Aug 2007 12:15:31 +0200 (CEST) Received: from mail5.dslextreme.com (mail5.dslextreme.com [66.51.199.81]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l74AFUBN030041 for ; Sat, 4 Aug 2007 12:15:31 +0200 Received: (qmail 22066 invoked from network); 4 Aug 2007 10:15:29 -0000 Received: from unknown (HELO www.dslextreme.com) (192.168.7.225) by mail5.dslextreme.com with SMTP; Sat, 04 Aug 2007 03:15:29 -0700 Message-ID: <6b94a12183a2ab7a191d6a.20070804031527.revpxg@www.dslextreme.com> Date: Sat, 4 Aug 2007 03:15:27 -0700 (PDT) Subject: ocamlbuild and bootstrapping projects From: erickt@dslextreme.com To: caml-list@yquem.inria.fr User-Agent: DSL Extreme Webmail (www.dslextreme.com) MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Miltered: at concorde with ID 46B451C2.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parser:01 mli:01 lexer:01 mll:01 parser:01 lexer:01 mll:01 linenum:01 mli:01 parsed:01 grammar:02 argument:02 tree:02 parse:02 external:03 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