1 Reply Latest reply on Mar 23, 2005 12:31 PM by ryan.campbell

    javacc support

      I'm adding javacc support to jbossbuild. I think the way to do this is to allow source code to act as input to source nodes:

      <generatedsource id="jboss-ql-parser"
       javacc="org/jboss/ejb/plugins/cmp/ejbql/JBossQLParser.jjt"/>
       <generatedsource id="ejb-ql-parser"
       path="jboss-ql-parser"
       javacc="org/jboss/ejb/plugins/cmp/ejbql/EJBQLParser.jjt"/>
      
       <source id="main">
       <include input="jboss-ql-parser"/>
       <include input="ejb-ql-parser"/>
      
       <include input="commons"/>


      So this would create output/gen-src/jboss-ql-parser which would then be included as a src dir by javac.

      Thoughts?

        • 1. Re: javacc support

          I have implemented this, with some slight changes to the syntax (for future reference):

          <generatedsource id="jboss-ql-parser"
           srcdir="main"
           javacc="org/jboss/ejb/plugins/cmp/ejbql/JBossQLParser.jjt"/>
          
           <generatedsource id="ejb-ql-parser"
           srcdir="main"
           path="jboss-ql-parser"
           javacc="org/jboss/ejb/plugins/cmp/ejbql/EJBQLParser.jjt"/>
          
           <source id="main">
           <include input="jboss-ql-parser"/>
          
           <include input="commons"/>


          In this case, the ejb-ql-parser needs to output to the jboss-ql-parser output directory (output/gen-src/jboss-ql-parser), so you only need to include one as input to the source node. The source files from the generated code will be included in the javac call for the main source.