<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--

Make build.properties like this:

version=4.0b2

antlr3.jar=/usr/local/lib/antlr-3.5-complete.jar
build.sysclasspath=ignore
-->

<project name="ANTLR4" default="distribute" basedir=".">

    <property file="build.properties" />

	<property name="src.dir" value="${basedir}/src" />
	<property name="dist.dir" value="${basedir}/dist" />
    <property name="build.dir" value="${basedir}/build" />
    <property name="lib.dir" value="${basedir}/lib" />
    <property name="install.root.dir" value="${dist.dir}/antlr-${version}" />
    <property name="jar.file" value="${dist.dir}/antlr-${version}-complete.jar" />

	<path id="classpath">
        <pathelement location="${antlr3.jar}"/> <!-- general setup -->
		<pathelement location="${ant-antlr3.jar}"/>
		<pathelement location="${basedir}/runtime/Java/lib/org.abego.treelayout.core.jar"/>
	</path>

    <target name="clean">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
    </target>

    <target name="init">
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build.dir}/gen/org/antlr/v4" />
    </target>

	<target name="antlr" depends="init">
		<echo>parse grammars</echo>
		<java classname="org.antlr.Tool" fork="true" failonerror="false" maxmemory="300m"
			dir="${basedir}/tool/src/org/antlr/v4/parse">
			<arg value="-make"/>
			<arg value="ANTLRParser.g"/>
			<arg value="ANTLRLexer.g"/>
			<arg value="ActionSplitter.g"/>
			<arg value="ATNBuilder.g"/>
			<arg value="BlockSetTransformer.g"/>
			<arg value="GrammarTreeVisitor.g"/>
			<arg value="LeftRecursiveRuleWalker.g"/>
			<classpath>
				<pathelement location="${antlr3.jar}"/>
				<pathelement path="${java.class.path}"/>
			</classpath>
		</java>

		<echo>codegen grammars</echo>
		<java classname="org.antlr.Tool" fork="true" failonerror="false" maxmemory="300m"
			dir="${basedir}/tool/src/org/antlr/v4/codegen">
			<arg value="-make"/>
			<arg value="-lib"/>
			<arg value="../parse"/>
			<arg value="SourceGenTriggers.g"/>
			<classpath>
				<pathelement location="${antlr3.jar}"/>
				<pathelement path="${java.class.path}"/>
			</classpath>
		</java>

	</target>

    <target name="compile" depends="antlr" description="Compile for generic OS">
        <mkdir dir="${build.dir}/classes"/>
        <mkdir dir="${build.dir}/src"/>
		<copy todir="${build.dir}/src" >
			<fileset dir="${basedir}/tool/src/"/>
			<fileset dir="${basedir}/runtime/Java/src/"/>
		</copy>
		<replace dir="${build.dir}/src" token="@version@" value="${version}"/>
        <javac
                destdir="${build.dir}/classes"
                source="1.5"
                target="1.5"
                debug="true"
                excludes="org/antlr/v4/test/**">
            <compilerarg value="-Xlint"/><commit_msg>Ant build.xml: build fails if grammar compilation fails<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--

Make build.properties like this:

version=4.0b2

antlr3.jar=/usr/local/lib/antlr-3.5-complete.jar
build.sysclasspath=ignore
-->

<project name="ANTLR4" default="distribute" basedir=".">

    <property file="build.properties" />

	<property name="src.dir" value="${basedir}/src" />
	<property name="dist.dir" value="${basedir}/dist" />
    <property name="build.dir" value="${basedir}/build" />
    <property name="lib.dir" value="${basedir}/lib" />
    <property name="install.root.dir" value="${dist.dir}/antlr-${version}" />
    <property name="jar.file" value="${dist.dir}/antlr-${version}-complete.jar" />

	<path id="classpath">
        <pathelement location="${antlr3.jar}"/> <!-- general setup -->
		<pathelement location="${ant-antlr3.jar}"/>
		<pathelement location="${basedir}/runtime/Java/lib/org.abego.treelayout.core.jar"/>
	</path>

    <target name="clean">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
    </target>

    <target name="init">
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${build.dir}/gen/org/antlr/v4" />
    </target>

	<target name="antlr" depends="init">
		<echo>parse grammars</echo>
		<java classname="org.antlr.Tool" fork="true" failonerror="true" maxmemory="300m"
			dir="${basedir}/tool/src/org/antlr/v4/parse">
			<arg value="-make"/>
			<arg value="ANTLRParser.g"/>
			<arg value="ANTLRLexer.g"/>
			<arg value="ActionSplitter.g"/>
			<arg value="ATNBuilder.g"/>
			<arg value="BlockSetTransformer.g"/>
			<arg value="GrammarTreeVisitor.g"/>
			<arg value="LeftRecursiveRuleWalker.g"/>
			<classpath>
				<pathelement location="${antlr3.jar}"/>
				<pathelement path="${java.class.path}"/>
			</classpath>
		</java>

		<echo>codegen grammars</echo>
		<java classname="org.antlr.Tool" fork="true" failonerror="true" maxmemory="300m"
			dir="${basedir}/tool/src/org/antlr/v4/codegen">
			<arg value="-make"/>
			<arg value="-lib"/>
			<arg value="../parse"/>
			<arg value="SourceGenTriggers.g"/>
			<classpath>
				<pathelement location="${antlr3.jar}"/>
				<pathelement path="${java.class.path}"/>
			</classpath>
		</java>

	</target>

    <target name="compile" depends="antlr" description="Compile for generic OS">
        <mkdir dir="${build.dir}/classes"/>
        <mkdir dir="${build.dir}/src"/>
		<copy todir="${build.dir}/src" >
			<fileset dir="${basedir}/tool/src/"/>
			<fileset dir="${basedir}/runtime/Java/src/"/>
		</copy>
		<replace dir="${build.dir}/src" token="@version@" value="${version}"/>
        <javac
                destdir="${build.dir}/classes"
                source="1.5"
                target="1.5"
                debug="true"
                excludes="org/antlr/v4/test/**">
            <compilerarg value="-Xlint"/>
{'fraction_non_alphanumeric': 0.2153846153846154, 'fraction_numerical': 0.009790209790209791, 'mean_word_length': 3.357197258187357, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 2, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6086511', 'n_tokens_mistral': 2090, 'n_tokens_neox': 1912, 'n_words': 312}