ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: ANTLR: why processing stops?
Date Thu, 13 Dec 2001 19:16:20 GMT

Without checking the code I would say this is probably because Antlr does a
System.exit and thus stops Ant in noforked mode.

If you have <antlr fork="true" ...>

It should works OK.

I will try to commit some code to override the SecurityManager and intercept
calls to System.exit.

-- 
 Stephane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 



> -----Original Message-----
> From: Richard Emberson [mailto:emberson@phc.net]
> Sent: Thursday, December 13, 2001 7:09 PM
> To: sbailliez@imediation.com
> Subject: Re: ANTLR: why processing stops?
> 
> 
> Its not that antlr does not execute; its that for some 
> reason, the target
> which depends upon the
> antlr target does not execute. When I run ant again, then the 
> target that
> depends upon the antlr
> target does execute. Here is a snippit of the build.xml file:
> 
> 
>     <target name="javacc2_0"
> depends="prepare-src,check_for_optional_packages"
>                         if="javacc20.present"
>                         >
>         <!-- copy src files (because we use javacc (*.jj -> 
> *.java) -->
>         <copy todir="${javacc2_0.build.dir}">
>             <fileset
>                 dir="${javacc2_0.src.dir}"
>                 includes="**/*.java, **/*.jj"
>             />
>         </copy>
>         <javacc
>             target="${javacc2_0.build.dir}/JFParser.jj"
>             outputdirectory="${javacc2_0.build.dir}"
>             javacchome="${javacc2_0.home}"
>             static="${static}"
>             cachetokens="${cachetokens}"
>             commontokenaction="${commontokenaction}"
>             debuglookahead="${debuglookahead}"
>             debugparser="${debugparser}"
>             debugtokenmanager="${debugtokenmanager}"
>             errorreporting="${errorreporting}"
>         />
>     </target>
> 
>     <target name="antlr" 
> depends="prepare-src,check_for_optional_packages"
>                         if="antlr.present"
>                         >
>         <copy todir="${antlr.build.dir}">
>             <fileset
>                 dir="${antlr.src.dir}"
>                 includes="**/*.java, **/*.g"
>             />
>         </copy>
>         <antlr
>                 target="${antlr.build.dir}/java.g"
>                 outputdirectory="${antlr.build.dir}"
>             />
>     </target>
>     <target name="build" depends="javacc2_0,antlr"
>                                 description="-> compiles source code">
>         <javac srcdir="${build.src}"
>            destdir="${build.classes}"
>            debug="${debug}"
>            deprecation="${deprecation}"
>            optimize="${optimize}"
>            includeAntRuntime="false"
>         >
>             <classpath>
>                 <pathelement path="${compilation.classpath}"/>
>                 <pathelement path="${java_home}/jre/lib/rt.jar"/>
>                 <pathelement path="./lib/crimson.jar"/>
>                 <pathelement path="./lib/optional/antlrall.jar"/>
>                 <pathelement path="./lib/ant.jar"/>
>                 <pathelement path="./lib/optional.jar"/>
>             </classpath>
>         </javac>
>         <copy todir="${build.classes}">
>           <fileset dir="${main.dir}">
>             <include name="**/*.properties" />
>           </fileset>
>         </copy>
>     </target>
> 
> The antlr target is for some reason communicating a failure 
> to that part of
> ant that controls whether or
> not the next target executes .... I do not know where or how 
> this happens.
> 
> Richard Emberson
> 
> Stephane Bailliez wrote:
> 
> > > -----Original Message-----
> > > From: Richard Emberson [mailto:emberson@phc.net]
> >
> > >  * @author <a href="mailto:emeade@geekfarm.org">Erik Meade</a>
> > >  * @author <a href="mailto:sbailliez@apache.org>Stephane 
> Bailliez</a>
> >
> > [...]
> > > So whoever worked on the ANTLR.java file in the past 
> month, broke it.
> >
> > The whoever is obviouslly me even though I can't say what 
> could go wrong
> > since I did a simple test at home. Candidate for official testcase.
> >
> > Stephane
> >
> > --
> > To unsubscribe, e-mail:   
<mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message