<commit_before><?xml version='1.0' encoding='ISO-8859-1' ?>

<!--

Copyright (c) 2006, Sun Microsystems, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the Sun Microsystems, Inc. nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

-->

<project name="javacc" default="jar" basedir=".">

  <property name="version" value="4.1d1" />

  <target name="compile" depends="generated-files,classes,javacc-compile,jjtree-compile,jjdoc-compile" />

  <target name="generated-files">
    <ant antfile="build.xml" target="parser-files" dir="src/org/javacc/parser" />
    <ant antfile="build.xml" target="tree-files" dir="src/org/javacc/jjtree" />
  </target>

  <target name="classes">
    <mkdir dir="classes"/>
  </target>

  <target name="javacc-compile">
    <ant antfile="build.xml" target="compile-nojar" dir="src/org/javacc/parser" />
  </target>

  <target name="jjdoc-compile">
    <ant antfile="build.xml" target="compile-nojar" dir="src/org/javacc/jjdoc" />
  </target>

  <target name="jjtree-compile">
    <ant antfile="build.xml" target="compile-nojar" dir="src/org/javacc/jjtree" />
  </target>

  <target name="jar" depends="compile">
    <antcall target="jar-nocompile" />
  </target>

  <!-- Be careful not to include the test files in the distribution. -->
  <target name="jar-nocompile" depends="jar-check" unless="jar.uptodate">
    <mkdir dir="bin/lib" />
    <jar jarfile="bin/lib/javacc.jar" basedir="classes" compress="true" excludes="**/*Test.class" />
  </target>

  <target name="jar-check">
    <uptodate property="jar.uptodate" targetfile="bin/lib/javacc.jar">
      <srcfiles dir="classes" />
    </uptodate>
  </target>

  <target name="clean">
    <delete dir="classes" />
    <delete dir="bin/lib" />
    <delete file="javacc-${version}.*" />
  </target>

  <target name="realclean" depends="clean">
    <ant antfile="build.xml" target="realclean" dir="src/org/javacc/parser" />
    <ant antfile="build.xml" target="realclean" dir="src/org/javacc/jjtree" />
  </target>

  <target name="binary-distribution" depends="realclean,jar,test">
    <property name="install-name" value="javacc-${version}" />
    <exec executable="./makedist" dir=".">
      <arg line="${version}" />
    </exec>
  </target>

  <target name="unittest" depends="compile" description="run JUnit unit test cases">
    <junit printsummary="yes" haltonfailure="yes">
      <classpath>
       <pathelement path="classes" />
      </classpath>
      <batchtest fork="no" todir=".">
        <fileset dir="classes">
          <include name="**/*Test.*" />
        </fileset>
      </batchtest><commit_msg>Add OS check to binary distribution<commit_after><?xml version='1.0' encoding='ISO-8859-1' ?>

<!--

Copyright (c) 2006, Sun Microsystems, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the Sun Microsystems, Inc. nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

-->

<project name="javacc" default="jar" basedir=".">

  <property name="version" value="4.1d1" />

  <target name="compile" depends="generated-files,classes,javacc-compile,jjtree-compile,jjdoc-compile" />

  <target name="generated-files">
    <ant antfile="build.xml" target="parser-files" dir="src/org/javacc/parser" />
    <ant antfile="build.xml" target="tree-files" dir="src/org/javacc/jjtree" />
  </target>

  <target name="classes">
    <mkdir dir="classes"/>
  </target>

  <target name="javacc-compile">
    <ant antfile="build.xml" target="compile-nojar" dir="src/org/javacc/parser" />
  </target>

  <target name="jjdoc-compile">
    <ant antfile="build.xml" target="compile-nojar" dir="src/org/javacc/jjdoc" />
  </target>

  <target name="jjtree-compile">
    <ant antfile="build.xml" target="compile-nojar" dir="src/org/javacc/jjtree" />
  </target>

  <target name="jar" depends="compile">
    <antcall target="jar-nocompile" />
  </target>

  <!-- Be careful not to include the test files in the distribution. -->
  <target name="jar-nocompile" depends="jar-check" unless="jar.uptodate">
    <mkdir dir="bin/lib" />
    <jar jarfile="bin/lib/javacc.jar" basedir="classes" compress="true" excludes="**/*Test.class" />
  </target>

  <target name="jar-check">
    <uptodate property="jar.uptodate" targetfile="bin/lib/javacc.jar">
      <srcfiles dir="classes" />
    </uptodate>
  </target>

  <target name="clean">
    <delete dir="classes" />
    <delete dir="bin/lib" />
    <delete file="javacc-${version}.*" />
  </target>

  <target name="realclean" depends="clean">
    <ant antfile="build.xml" target="realclean" dir="src/org/javacc/parser" />
    <ant antfile="build.xml" target="realclean" dir="src/org/javacc/jjtree" />
  </target>

  <condition property="isUnix">
    <os family="unix"/>
  </condition>
  <target name="osCheck" unless="isUnix">
    <echo message="Binary Distribution is only buildable on Unix systems." />
  </target>  
  <target name="binary-distribution" depends="realclean,jar,test,osCheck" if="isUnix">
    <property name="install-name" value="javacc-${version}" />
    <exec executable="./makedist" dir=".">
      <arg line="${version}" />
    </exec>
  </target>

  <target name="unittest" depends="compile" description="run JUnit unit test cases">
    <junit printsummary="yes" haltonfailure="yes">
      <classpath>
       <pathelement path="classes" />
      </classpath>
      <batchtest fork="no" todir=".">
        <fileset dir="classes">
          <include name="**/*Test.*" />
        </fileset>
      </batchtest>
{'fraction_non_alphanumeric': 0.13525742937507643, 'fraction_numerical': 0.0034242387183563653, 'mean_word_length': 4.032615384615385, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 2, '>': 127, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, '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': '4372044', 'n_tokens_mistral': 2519, 'n_tokens_neox': 2363, 'n_words': 761}