<commit_before><?xml version="1.0"?>
<!--
  This file is part of SableCC ( http://sablecc.org ).

  See the NOTICE file distributed with this work for copyright information.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<project name="sablecc" default="development" basedir="..">

  <!-- Check dependencies -->

  <fail message="Ant version 1.7.0 or later is required.">
    <condition>
      <not>
        <antversion atleast="1.7.0" />
      </not>
    </condition>
  </fail>

  <fail message="You must add the SableCC 3 jar library in the $ANT_HOME/lib directory.">
    <condition>
      <not>
        <available classname="org.sablecc.ant.taskdef.Sablecc" />
      </not>
    </condition>
  </fail>

  <fail message="You must add the JUnit 4 jar library in the $ANT_HOME/lib directory.">
    <condition>
      <not>
        <available classname="org.junit.Test" />
      </not>
    </condition>
  </fail>

  <!-- Tasks -->

  <taskdef name="sablecc3" classname="org.sablecc.ant.taskdef.Sablecc" />

  <!-- Global Properties -->

  <property name="package.name" value="sablecc" />
  <property name="package.version" value="repository-snapshot" />

  <property name="src.dir" value="src" />
  <property name="grammars.dir" value="grammars" />
  <property name="macros.dir" value="macros" />
  <property name="junit-tests.dir" value="junit-tests" />
  <property name="regression-tests.dir" value="regression-tests" />
  <property name="manifest.dir" value="manifest" />

  <property name="examples.dir" value="examples" />
  <property name="tests.dir" value="tests" />

  <property name="classes.dir" value="classes" />
  <property name="test-classes.dir" value="test-classes" />
  <property name="lib.dir" value="lib" />

  <property name="dist.dir" value="${package.name}-${package.version}" />
  <property name="dist.file" value="${package.name}-${package.version}.zip" />

  <!-- Grammar Compilation -->

  <target name="compile-grammars" description="Compile grammars.">

    <delete dir="${src.dir}/org/sablecc/sablecc/syntax3" />
    <delete dir="${src.dir}/org/sablecc/sablecc/launcher/syntax3" />
    <delete dir="${src.dir}/org/sablecc/sablecc/intermediate/syntax3" />
    <delete dir="${src.dir}/org/sablecc/objectmacro/syntax3" />
    <delete dir="${src.dir}/org/sablecc/objectmacro/launcher/syntax3" />
    <delete dir="${src.dir}/org/sablecc/objectmacro/intermediate/syntax3" />

    <sablecc3 src="${grammars.dir}"
              includes="*.sablecc3"
              outputdirectory="${src.dir}" />

  </target>

  <!-- Source Compilation -->

  <target name="compile-sources"
          depends="compile-grammars"
          description="Compile the source code.">

    <delete dir="${classes.dir}" />

    <mkdir dir="${classes.dir}" />

    <delete file="${src.dir}/org/sablecc/sablecc/launcher/Version.java" />

    <echo file="${src.dir}/org/sablecc/sablecc/launcher/Version.java">/* Generated by build.xml */

package org.sablecc.sablecc.launcher;

import org.sablecc.exception.InternalException;

/**
 * This class provides the version.
 */
public class Version {

    /** The version. */
    public static final String VERSION = "${package.version}";

    /** Prevents instantiation of this class. */
    private Version() {

        throw new InternalException("no instance allowed");
    }
}
</echo>

    <delete file="${src.dir}/org/sablecc/objectmacro/launcher/Version.java" />

    <echo file="${src.dir}/org/sablecc/objectmacro/launcher/Version.java">/* Generated by build.xml */

package org.sablecc.objectmacro.launcher;

import org.sablecc.exception.InternalException;

/**
 * This class provides the version.
 */
public class Version {

    /** The version. */
    public static final String VERSION = "${package.version}";

    /** Prevents instantiation of this class. */
    private Version() {

        throw new InternalException("no instance allowed");
    }
}
</echo>

    <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" />

    <copy todir="${classes.dir}">
      <fileset dir="${src.dir}">
        <include name="**/*.dat" />
      </fileset><commit_msg>Fix ant build.<commit_after><?xml version="1.0"?>
<!--
  This file is part of SableCC ( http://sablecc.org ).

  See the NOTICE file distributed with this work for copyright information.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<project name="sablecc" default="development" basedir="..">

  <!-- Check dependencies -->

  <fail message="Ant version 1.7.0 or later is required.">
    <condition>
      <not>
        <antversion atleast="1.7.0" />
      </not>
    </condition>
  </fail>

  <fail message="You must add the SableCC 3 jar library in the $ANT_HOME/lib directory.">
    <condition>
      <not>
        <available classname="org.sablecc.ant.taskdef.Sablecc" />
      </not>
    </condition>
  </fail>

  <fail message="You must add the JUnit 4 jar library in the $ANT_HOME/lib directory.">
    <condition>
      <not>
        <available classname="org.junit.Test" />
      </not>
    </condition>
  </fail>

  <!-- Tasks -->

  <taskdef name="sablecc3" classname="org.sablecc.ant.taskdef.Sablecc" />

  <!-- Global Properties -->

  <property name="package.name" value="sablecc" />
  <property name="package.version" value="repository-snapshot" />

  <property name="src.dir" value="src" />
  <property name="grammars.dir" value="grammars" />
  <property name="macros.dir" value="macros" />
  <property name="junit-tests.dir" value="junit-tests" />
  <property name="regression-tests.dir" value="regression-tests" />
  <property name="manifest.dir" value="manifest" />

  <property name="examples.dir" value="examples" />
  <property name="tests.dir" value="tests" />

  <property name="classes.dir" value="classes" />
  <property name="test-classes.dir" value="test-classes" />
  <property name="lib.dir" value="lib" />

  <property name="dist.dir" value="${package.name}-${package.version}" />
  <property name="dist.file" value="${package.name}-${package.version}.zip" />

  <!-- Grammar Compilation -->

  <target name="compile-grammars" description="Compile grammars.">

    <delete dir="${src.dir}/org/sablecc/sablecc/syntax3" />
    <delete dir="${src.dir}/org/sablecc/sablecc/launcher/syntax3" />
    <delete dir="${src.dir}/org/sablecc/sablecc/intermediate/syntax3" />
    <delete dir="${src.dir}/org/sablecc/objectmacro/syntax3" />
    <delete dir="${src.dir}/org/sablecc/objectmacro/launcher/syntax3" />
    <delete dir="${src.dir}/org/sablecc/objectmacro/intermediate/syntax3" />

    <sablecc3 src="${grammars.dir}"
              includes="*.sablecc3"
              outputdirectory="${src.dir}" />

  </target>

  <!-- Source Compilation -->

  <target name="compile-sources"
          depends="compile-grammars"
          description="Compile the source code.">

    <delete dir="${classes.dir}" />

    <mkdir dir="${classes.dir}" />

    <delete file="${src.dir}/org/sablecc/sablecc/launcher/Version.java" />

    <echo file="${src.dir}/org/sablecc/sablecc/launcher/Version.java">/* Generated by build.xml */

package org.sablecc.sablecc.launcher;

import org.sablecc.exception.InternalException;

/**
 * This class provides the version.
 */
public class Version {

    /** The version. */
    public static final String VERSION = "${package.version}";

    /** Prevents instantiation of this class. */
    private Version() {

        throw new InternalException("no instance allowed");
    }
}
</echo>

    <delete file="${src.dir}/org/sablecc/objectmacro/launcher/Version.java" />

    <echo file="${src.dir}/org/sablecc/objectmacro/launcher/Version.java">/* Generated by build.xml */

package org.sablecc.objectmacro.launcher;

import org.sablecc.exception.InternalException;

/**
 * This class provides the version.
 */
public class Version {

    /** The version. */
    public static final String VERSION = "${package.version}";

    /** Prevents instantiation of this class. */
    private Version() {

        throw new InternalException("no instance allowed");
    }
}
</echo>

    <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" excludes="org/sablecc/sablecc/oldstructure/**,org/sablecc/sablecc/oldwalker/**,org/sablecc/sablecc/launcher/OldSableCC.java" />

    <copy todir="${classes.dir}">
      <fileset dir="${src.dir}">
        <include name="**/*.dat" />
      </fileset>
{'fraction_non_alphanumeric': 0.1639572192513369, 'fraction_numerical': 0.004919786096256685, 'mean_word_length': 3.361473880597015, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 2, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, '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': '2927523', 'n_tokens_mistral': 2987, 'n_tokens_neox': 2851, 'n_words': 676}