ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunil Mishra <smis...@AI.SRI.COM>
Subject Re: ANTLR task doesn't update its output
Date Mon, 28 Jun 2004 22:15:21 GMT
Here's the compileParser target definition:

   <target name="compileParser" depends="copyLib">
     <antlr target="${parser.dir}/KIFParser.g">
       <classpath>
         <pathelement location="lib/antlr.jar"/>
       </classpath>
     </antlr>
     <antlr target="${parser.dir}/cnf.g">
       <classpath>
         <pathelement location="lib/antlr.jar"/>
       </classpath>
     </antlr>
     <antlr target="${parser.dir}/codegen.g">
       <classpath>
         <pathelement location="lib/antlr.jar"/>
       </classpath>
     </antlr>
     <antlr target="${parser.dir}/simplify.g">
       <classpath>
         <pathelement location="lib/antlr.jar"/>
       </classpath>
     </antlr>
   </target>

The documentation leads me to believe that specifying the classpath 
this way has the same effect as putting the antlr jar in the ant lib 
directory. Is that correct?

Sunil

On Jun 28, 2004, at 2:59 PM, Matt Benson wrote:

> Looks like you need to add the ANTLR release jar(s) to
> (most simply) $ANT_HOME/lib, or specify them to Ant
> using the -lib ... option.
>
> -Matt
>
> --- Sunil Mishra <smishra@AI.SRI.COM> wrote:
>> Here's the output with the verbose flag...
>>
>> Sunil
>>
>>
>>
>>
>> $ ant -v -f antlr-build.xml compileParser
>> Apache Ant version 1.6.1 compiled on February 12
>> 2004
>> Buildfile: antlr-build.xml
>> Detected Java version: 1.4 in:
>>
> /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
>> Detected OS: Mac OS X
>> parsing buildfile
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/antlr-build.xml
>> with
>> URI =
>>
> file:///Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/antlr-
>>
>> build.xml
>> Project base dir set to:
>> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java
>> Build sequence for target `compileParser' is
>> [copyLib, compileParser]
>> Complete build sequence is [copyLib, compileParser,
>> clean, init,
>> compile, all, ]
>>
>> copyLib:
>>       [copy] antlr.jar omitted as antlr.jar is up to
>> date.
>>       [copy] concurrent.jar omitted as
>> concurrent.jar is up to date.
>>       [copy] icu4j.jar omitted as icu4j.jar is up to
>> date.
>>       [copy] jakarta-oro-2.0.5.jar omitted as
>> jakarta-oro-2.0.5.jar is
>> up to date.
>>       [copy] jdom.jar omitted as jdom.jar is up to
>> date.
>>       [copy] jena.jar omitted as jena.jar is up to
>> date.
>>       [copy] junit.jar omitted as junit.jar is up to
>> date.
>>       [copy] log4j.jar omitted as log4j.jar is up to
>> date.
>>       [copy] xercesImpl.jar omitted as
>> xercesImpl.jar is up to date.
>>       [copy] xmlParserAPIs.jar omitted as
>> xmlParserAPIs.jar is up to
>> date.
>>
>> compileParser:
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Setting target to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> KIFParser.g
>>      [antlr] Setting output directory to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif
>>      [antlr] Compiling
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> KIFParser.g as it is newer than
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> KIFParser.java
>>      [antlr] Executing
>>
> '/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/
>>
>> java' with arguments:
>>      [antlr] '-classpath'
>>      [antlr]
>>
> '/Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/lib/antlr.jar'
>>      [antlr] 'antlr.Tool'
>>      [antlr] '-o'
>>      [antlr]
>>
> '/Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif'
>>      [antlr]
>>
> '/Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> KIFParser.g'
>>      [antlr]
>>      [antlr] The ' characters around the executable
>> and arguments are
>>      [antlr] not part of the command.
>>      [antlr] ANTLR Parser Generator   Version 2.7.2
>>  1989-2003 jGuru.com
>>
>>
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Setting target to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> cnf.g
>>      [antlr] Setting output directory to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif
>>      [antlr] Skipped grammar file. Generated file
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> CNFConverter.javais newer.
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Setting target to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> codegen.g
>>      [antlr] Setting output directory to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif
>>      [antlr] Skipped grammar file. Generated file
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> CodeGenerator.javais newer.
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Couldn't find
>> antlr/ANTLRGrammarParseBehavior.class
>>      [antlr] Setting target to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> simplify.g
>>      [antlr] Setting output directory to:
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif
>>      [antlr] Skipped grammar file. Generated file
>>
> /Volumes/Unix/users/smishra/devl/aic/jtp/beta/java/src/jtp/fol/kif/
>>
>> Simplifier.javais newer.
>>
>> BUILD SUCCESSFUL
>> Total time: 3 seconds
>>
>> On Jun 28, 2004, at 1:23 PM, Matt Benson wrote:
>>
>>> When you run this with Ant's -verbose flag, what
>> is
>>> the resulting output?
>>>
>>> -Matt
>>>
>>> --- Sunil Mishra <smishra@AI.SRI.COM> wrote:
>>>> Hi,
>>>>
>>>> I had posted this previously, and didn't get any
>>>> responses. I'm hoping
>>>> it was accidentally ignored. I'd be interested in
>>>> hearing from anyone
>>>> with experience using the antlr task.
>>>>
>>>> Thanks!
>>>>
>>>> Sunil
>>>>
>>>> On Jun 25, 2004, at 3:07 PM, Sunil Mishra wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I've got the following ANTLR in my build.xml:
>>>>>
>>>>>     <antlr target="${parser.dir}/KIFParser.g">
>>>>>       <classpath>
>>>>> 	<pathelement location="lib/antlr.jar"/>
>>>>>       </classpath>
>>>>>     </antlr>
>>>>>
>>>>> The transcript below starts at a state where
>>>> everything has been
>>>>> compiled. Note that when I touch KIFParser.g and
>>>> call ant again, ANTLR
>>>>> is re-invoked. But the output files are not
>>>> updated. Futher
>>>>> invocations of ant again invoke ANTLR. Hoping
>> I've
>>>> made an error as
>>>>> silly as the last one I had posted?
>>>>>
>>>>> Again, I'm using ant 1.6.1 on mac os x.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Sunil
>>>>>
>>>>>
>>>>>
>>>>> $ ant -f antlr-build.xml
>>>>> Buildfile: antlr-build.xml
>>>>>
>>>>> init:
>>>>>
>>>>> copyLib:
>>>>>
>>>>> compileParser:
>>>>>     [antlr] ANTLR Parser Generator   Version
>> 2.7.2
>>
> === message truncated ===
>
>
>
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message