Charj: modified antlr build task and ant rules for Java 1.6 compatibility
authorAaron Becker <akbecker@gmail.com>
Fri, 19 Mar 2010 15:32:58 +0000 (10:32 -0500)
committerAaron Becker <akbecker@gmail.com>
Fri, 19 Mar 2010 15:32:58 +0000 (10:32 -0500)
src/langs/charj/build.xml
src/langs/charj/lib/ant-antlr3.jar

index 72a70e117e6c9aa1fa878fb295c567edce097cbf..f3d52f8645c5adb55c7260f7e956d7f105b6edc1 100644 (file)
-<project name="Charj" default="dist" basedir=".">\r
-    <description>\r
-        A translator and standard library for Charj, a language based on the\r
-        Charm++ runtime system.\r
-    </description>\r
-    \r
-    <property name="project.name" value="Charj" />\r
-    \r
-    <!-- set global properties for this build -->\r
-    <property name="build" location="build"/>\r
-    <property name="src" location="src"/>\r
-    <property name="buildsrc" location="${build}/src"/>\r
-    <property name="buildlib" location="${build}/lib" />\r
-    <property name="classes" location="${build}/classes"/>\r
-    <property name="lib" location="lib" />\r
-    <property name="doc" location="docs"/>\r
-\r
-    <property name="package" value="charj"/>\r
-    \r
-    <!-- where to write/find token files -->\r
-    <property name="token.lib" location="${buildsrc}/${package}" />\r
-\r
-    <!-- Define path used for classpath later -->\r
-    <path id="project.class.path.3.0">\r
-        <pathelement location="lib/antlr-2.7.7.jar"/>\r
-        <pathelement location="lib/antlr-3.0.1.jar"/>\r
-        <pathelement location="lib/antlr-runtime-3.0.1.jar"/>\r
-        <pathelement location="lib/stringtemplate-3.1b1.jar"/>\r
-        <pathelement location="lib/gunit-1.0.2.jar"/>\r
-        <pathelement location="lib/JSAP-2.1.jar"/>\r
-    </path>\r
-    <path id="project.class.path.3.1">\r
-        <pathelement location="lib/antlr-2.7.7.jar"/>\r
-        <pathelement location="lib/antlr-3.1b1.jar"/>\r
-        <pathelement location="lib/antlr-runtime-3.1b1.jar"/>\r
-        <pathelement location="lib/stringtemplate-3.1.jar"/>\r
-        <pathelement location="lib/gunit-1.0.2.jar"/>\r
-        <pathelement location="lib/JSAP-2.1.jar"/>\r
-    </path>\r
-    <property name="classpath" value="project.class.path.3.1"/>\r
-\r
-    <!-- antlr options -->\r
-    <property name="profile" value="false" />\r
-    <property name="report" value="false" />\r
-    <property name="multithreaded" value="true" />\r
-    <property name="depend" value="true" />\r
-\r
-    <target name="init">\r
-        <tstamp />\r
-        <!-- Create the build directory structure used by compile -->\r
-        <copy todir="${buildsrc}">\r
-            <fileset dir="${src}"/>\r
-        </copy>\r
-        <mkdir dir="${classes}" />\r
-        <mkdir dir="${classes}/META-INF" />\r
-        <mkdir dir="${buildlib}" />\r
-        <mkdir dir="${doc}" />\r
-    </target>\r
-\r
-    <macrodef name="antlr3">\r
-        <attribute name="grammar.name"/>\r
-        <attribute name="grammar.path"/>\r
-        <sequential>\r
-            <echo message="antlr @{grammar.name}" />\r
-            <antlr:antlr3 xmlns:antlr="antlib:org/apache/tools/ant/antlr" \r
-                target="@{grammar.path}/@{grammar.name}" \r
-                outputdirectory="@{grammar.path}"\r
-                libdirectory="@{grammar.path}"\r
-                multithreaded="${multithreaded}"\r
-                report="${report}"\r
-                depend="${depend}"\r
-                profile="${profile}">\r
-                <classpath refid="${classpath}"/>\r
-            </antlr:antlr3>\r
-        </sequential>\r
-    </macrodef>\r
-    \r
-    <target name="Charj" depends="init">\r
-        <antlr3 grammar.name="Charj.g" \r
-            grammar.path="${buildsrc}/charj/translator"/>\r
-    </target>\r
-\r
-    <target name="CharjSemantics" depends="Charj">\r
-        <antlr3 grammar.name="CharjSemantics.g" \r
-            grammar.path="${buildsrc}/charj/translator"/>\r
-    </target>\r
-\r
-    <target name="CharjEmitter" depends="CharjSemantics">\r
-        <antlr3 grammar.name="CharjEmitter.g" \r
-            grammar.path="${buildsrc}/charj/translator"/>\r
-    </target>\r
-\r
-    <target name="compile" depends="CharjEmitter" description="compile">\r
-        <javac debug="true" srcdir="${buildsrc}" destdir="${classes}"\r
-               target="1.5" listfiles="Yes" deprecation="Yes">\r
-               <classpath refid="${classpath}"/>\r
-        </javac>\r
-    </target>\r
-\r
-    <target name="manifest">\r
-        <manifest file="${classes}/META-INF/MANIFEST.MF">\r
-            <attribute name="Main-Class" value="charj.Main" />\r
-        </manifest>\r
-    </target>\r
-\r
-    <target name="dist" depends="compile, manifest" \r
-       description="create jarfiles">\r
-       <jar jarfile="${buildlib}/charj.jar" \r
-           basedir="${classes}"\r
-           manifest="${classes}/META-INF/MANIFEST.MF">\r
-            <fileset dir="${buildsrc}" includes="**/*.stg" />\r
-        </jar>\r
-    </target>\r
-\r
-    <target name="doc" description="generate documentation">\r
-       <javadoc destdir="${doc}"\r
-                author="true"\r
-                version="true"\r
-                use="true"\r
-                windowtitle="${project.name}"\r
-                sourcepath="${src}"\r
-                Protected="All" Private="All"\r
-                Public="All"\r
-                Locale="de"\r
-                linksource="yes"\r
-                breakiterator="Yes">\r
-       </javadoc>\r
-    </target>\r
-\r
-    <target name="clean" description="clean up">\r
-        <echo message="removing build directory" />\r
-        <delete includeEmptyDirs="true" quiet="yes">\r
-            <fileset dir="${build}" />\r
-        </delete>\r
-    </target>\r
-    \r
-    <target name="all" depends="clean, dist, doc" \r
-        description="do all"/>\r
-            \r
-</project>\r
+<project name="Charj" default="dist" basedir=".">
+    <description>
+        A translator and standard library for Charj, a language based on the
+        Charm++ runtime system.
+    </description>
+
+    <property name="project.name" value="Charj" />
+
+    <!-- set global properties for this build -->
+    <property name="build" location="build"/>
+    <property name="src" location="src"/>
+    <property name="buildsrc" location="${build}/src"/>
+    <property name="buildlib" location="${build}/lib" />
+    <property name="classes" location="${build}/classes"/>
+    <property name="lib" location="lib" />
+    <property name="doc" location="docs"/>
+
+    <property name="package" value="charj"/>
+
+    <!-- where to write/find token files -->
+    <property name="token.lib" location="${buildsrc}/${package}" />
+
+    <!-- Define path used for classpath later -->
+    <path id="project.class.path.3.0">
+        <pathelement location="lib/antlr-2.7.7.jar"/>
+        <pathelement location="lib/antlr-3.0.1.jar"/>
+        <pathelement location="lib/antlr-runtime-3.0.1.jar"/>
+        <pathelement location="lib/stringtemplate-3.1b1.jar"/>
+        <pathelement location="lib/gunit-1.0.2.jar"/>
+        <pathelement location="lib/JSAP-2.1.jar"/>
+    </path>
+    <path id="project.class.path.3.1">
+        <pathelement location="lib/antlr-2.7.7.jar"/>
+        <pathelement location="lib/antlr-3.1b1.jar"/>
+        <pathelement location="lib/antlr-runtime-3.1b1.jar"/>
+        <pathelement location="lib/stringtemplate-3.1.jar"/>
+        <pathelement location="lib/gunit-1.0.2.jar"/>
+        <pathelement location="lib/JSAP-2.1.jar"/>
+    </path>
+    <property name="classpath" value="project.class.path.3.1"/>
+
+    <!-- antlr options -->
+    <property name="profile" value="false" />
+    <property name="report" value="false" />
+    <property name="multithreaded" value="true" />
+
+    <target name="init">
+        <tstamp />
+        <!-- Create the build directory structure used by compile -->
+        <copy todir="${buildsrc}">
+            <fileset dir="${src}"/>
+        </copy>
+        <mkdir dir="${classes}" />
+        <mkdir dir="${classes}/META-INF" />
+        <mkdir dir="${buildlib}" />
+        <mkdir dir="${doc}" />
+    </target>
+
+    <macrodef name="antlr3">
+        <attribute name="grammar.name"/>
+        <attribute name="grammar.path"/>
+        <sequential>
+            <echo message="antlr @{grammar.name}" />
+            <antlr:antlr3 xmlns:antlr="antlib:org/apache/tools/ant/antlr"
+                target="@{grammar.path}/@{grammar.name}"
+                outputdirectory="@{grammar.path}"
+                libdirectory="@{grammar.path}"
+                multithreaded="${multithreaded}"
+                report="${report}"
+                profile="${profile}">
+                <jvmarg value="-Xmx512M"/>
+                <classpath refid="${classpath}"/>
+            </antlr:antlr3>
+        </sequential>
+    </macrodef>
+
+    <target name="Charj" depends="init">
+        <antlr3 grammar.name="Charj.g"
+            grammar.path="${buildsrc}/charj/translator"/>
+    </target>
+
+    <target name="CharjSemantics" depends="Charj">
+        <antlr3 grammar.name="CharjSemantics.g"
+            grammar.path="${buildsrc}/charj/translator"/>
+    </target>
+
+    <target name="CharjEmitter" depends="CharjSemantics">
+        <antlr3 grammar.name="CharjEmitter.g"
+            grammar.path="${buildsrc}/charj/translator"/>
+    </target>
+
+    <target name="compile" depends="CharjEmitter" description="compile">
+        <javac debug="true" srcdir="${buildsrc}" destdir="${classes}"
+               target="1.5" listfiles="Yes" deprecation="Yes">
+               <classpath refid="${classpath}"/>
+        </javac>
+    </target>
+
+    <target name="manifest">
+        <manifest file="${classes}/META-INF/MANIFEST.MF">
+            <attribute name="Main-Class" value="charj.Main" />
+        </manifest>
+    </target>
+
+    <target name="dist" depends="compile, manifest"
+       description="create jarfiles">
+       <jar jarfile="${buildlib}/charj.jar"
+           basedir="${classes}"
+           manifest="${classes}/META-INF/MANIFEST.MF">
+            <fileset dir="${buildsrc}" includes="**/*.stg" />
+        </jar>
+    </target>
+
+    <target name="doc" description="generate documentation">
+       <javadoc destdir="${doc}"
+                author="true"
+                version="true"
+                use="true"
+                windowtitle="${project.name}"
+                sourcepath="${src}"
+                Protected="All" Private="All"
+                Public="All"
+                Locale="de"
+                linksource="yes"
+                breakiterator="Yes">
+       </javadoc>
+    </target>
+
+    <target name="clean" description="clean up">
+        <echo message="removing build directory" />
+        <delete includeEmptyDirs="true" quiet="yes">
+            <fileset dir="${build}" />
+        </delete>
+    </target>
+
+    <target name="all" depends="clean, dist, doc"
+        description="do all"/>
+
+</project>
index 6e7025afbb726ddbe27c53c6a8a08c7b565937c9..0525664a2d37a37f5dc61ae0338347d91883098c 100644 (file)
Binary files a/src/langs/charj/lib/ant-antlr3.jar and b/src/langs/charj/lib/ant-antlr3.jar differ