私の質問は、ANTLR3でANTを使用することについてです。
ant-antlr3をダウンロードして、ディレクトリに配置しました
eclipse-jee-helios-SR2-win32-x86_64\eclipse\plugins\org.apache.ant_1.7.1.v20100518-1145\lib
私のbuild.xmlに入れてください:
`<path id="classpath">
<pathelement location="${lib}/antlr-3.4-complete.jar"/>
<pathelement location="${lib}/ant-antlr3.jar"/>
</ path>`
`<target name="antlr" depends="init">
<antlr: ant-antlr3 xmlns: antlr = "antlib: org / apache / tools / ant / antlr"
target = "$ {Analyzers} / AnalizadorLexer.g"
outputdirectory = "$ {AnalizadoresBuild}"
verbose = "true">
<classpath refid="classpath"/>
</ antlr: ant-antlr3>
</ target>`
antlrターゲットを実行すると、次のエラーが発生します。
BUILD FAILED
C: \ Users \ melmar \ Documents \ workspace \ PL \ Prac12 \ build_pol.xml: 68: Problem: failed to create task or type antlib: org / apache / tools / ant / antlr: ant-antlr3
Cause: The name is undefined.
Action: Check the spelling.
Action: Check That any custom tasks / types Have Been declared.
Action: Check That any <presetdef> / declarations have taken place <macrodef>.
No types or tasks Have Been In This namespace defined yet
This appears to be an antlib declaration.
Action: Check That the Implementing library exists in one of:
-C: \ Users \ melmar \. Ant \ lib (don´t exist)
-a directory added on the command line argument With The-lib
誰かが何をすべきか知っていることを喜ばせますか?、クラスパスでant-antlr3が見つかりませんでした