<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="PetitParser" default="all" xmlns:ivy="antlib:org.apache.ivy.ant">

  <!-- external properties -->
  <property file="build.properties" />

  <!-- build properties -->
  <property name="app.name" value="PetitParser" />
  <property name="app.version" value="1.0" />
  <description>PetitParser -- Dynamic Grammars for Java</description>

  <!-- input directories -->
  <property name="src" location="src" />
  <property name="lib" location="lib" />
  <property name="test" location="test" />
  <property name="grammar" location="grammar" />

  <!-- output directories -->
  <property name="build" location="build" />
  <property name="build.bin" location="${build}/bin" />
  <property name="build.doc" location="${build}/doc" />
  <property name="build.test" location="${build}/test" />

  <!-- classpath definition -->
  <path id="classpath">
    <pathelement location="${build.bin}" />
    <pathelement location="${build.test}" />
    <fileset dir="${lib}">
      <include name="**/*.jar" />
    </fileset>
  </path>

  <!-- ivy -->
  <property name="ivy.version" value="2.2.0" />

  <target name="ivy" description="Bootstrap dependencies through Ivy.">
    <mkdir dir="${lib}" />
    <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" dest="${lib}/ivy-${ivy.version}.jar" usetimestamp="true" />
    <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${lib}/ivy-${ivy.version}.jar" />
    <ivy:retrieve sync="true" log="quiet" />
  </target>

  <!-- targets -->
  <target name="all" description="Create all build artifacts." depends="compile, test, javadoc" />

  <target name="clean" description="Delete all build artifacts.">
    <delete dir="${lib}" />
    <delete dir="${build}" />
  </target>

  <target name="compile" description="Compile source files." depends="ivy">
    <mkdir dir="${build.bin}" />
    <javac srcdir="${src}" destdir="${build.bin}" includeantruntime="false" classpathref="classpath" />
    <javac srcdir="${grammar}" destdir="${build.bin}" includeantruntime="false" classpathref="classpath" />
  </target>

  <target name="test" description="Run all JUnit tests." depends="compile">
    <mkdir dir="${build.test}" />
    <javac srcdir="${test}" destdir="${build.test}" includeantruntime="false" classpathref="classpath" />
    <junit haltonerror="no" haltonfailure="no">
      <classpath refid="classpath" />
      <batchtest todir="${build.test}">
        <formatter type="xml" />
        <formatter type="brief" usefile="false" />
        <fileset dir="${test}">
          <include name="**/*Test.java" />
        </fileset>
      </batchtest>
    </junit>
  </target>

  <target name="bench" description="Run a simple XML benchmark." depends="test">
    <java classname="org.petitparser.grammar.xml.XmlBenchmark" classpathref="classpath" /><commit_msg>- integrated Fabrizio's jar rule<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="PetitParser" default="all" xmlns:ivy="antlib:org.apache.ivy.ant">

  <!-- external properties -->
  <property file="build.properties" />

  <!-- build properties -->
  <property name="app.name" value="PetitParser" />
  <property name="app.version" value="1.0" />
  <description>PetitParser -- Dynamic Grammars for Java</description>

  <!-- input directories -->
  <property name="src" location="src" />
  <property name="lib" location="lib" />
  <property name="test" location="test" />
  <property name="grammar" location="grammar" />

  <!-- output directories -->
  <property name="build" location="build" />
  <property name="build.jar" location="${build}/jar" />
  <property name="build.bin" location="${build}/bin" />
  <property name="build.doc" location="${build}/doc" />
  <property name="build.test" location="${build}/test" />

  <!-- classpath definition -->
  <path id="classpath">
    <pathelement location="${build.bin}" />
    <pathelement location="${build.test}" />
    <fileset dir="${lib}">
      <include name="**/*.jar" />
    </fileset>
  </path>

  <!-- ivy -->
  <property name="ivy.version" value="2.2.0" />

  <target name="ivy" description="Bootstrap dependencies through Ivy.">
    <mkdir dir="${lib}" />
    <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" dest="${lib}/ivy-${ivy.version}.jar" usetimestamp="true" />
    <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${lib}/ivy-${ivy.version}.jar" />
    <ivy:retrieve sync="true" log="quiet" />
  </target>

  <!-- targets -->
  <target name="all" description="Create all build artifacts." depends="compile, test, javadoc" />

  <target name="clean" description="Delete all build artifacts.">
    <delete dir="${lib}" />
    <delete dir="${build}" />
  </target>

  <target name="compile" description="Compile source files." depends="ivy">
    <mkdir dir="${build.bin}" />
    <javac srcdir="${src}" destdir="${build.bin}" includeantruntime="false" classpathref="classpath" />
    <javac srcdir="${grammar}" destdir="${build.bin}" includeantruntime="false" classpathref="classpath" />
  </target>

  <target name="jar" description="Package into JAR." depends="compile">
    <jar destfile="${build.jar}/petitparser.jar" compress="true" >
      <fileset dir="${build.bin}" includes="**/*.class" />
      <fileset dir="${lib}" includes="**/*.jar" />
    </jar>
    <jar destfile="${build.jar}/petitparser-src.jar" compress="true" >
      <fileset dir="${src}" includes="**/*.java" />
      <fileset dir="${grammar}" includes="**/*.java" />
      <fileset dir="${test}" includes="**/*.java" />
    </jar>
  </target>

  <target name="test" description="Run all JUnit tests." depends="compile">
    <mkdir dir="${build.test}" />
    <javac srcdir="${test}" destdir="${build.test}" includeantruntime="false" classpathref="classpath" />
    <junit haltonerror="no" haltonfailure="no">
      <classpath refid="classpath" />
      <batchtest todir="${build.test}">
        <formatter type="xml" />
        <formatter type="brief" usefile="false" />
        <fileset dir="${test}">
          <include name="**/*Test.java" />
        </fileset>
      </batchtest>
    </junit>
  </target>

  <target name="bench" description="Run a simple XML benchmark." depends="test">
    <java classname="org.petitparser.grammar.xml.XmlBenchmark" classpathref="classpath" />
{'fraction_non_alphanumeric': 0.21593194122196444, 'fraction_numerical': 0.0030935808197989174, 'mean_word_length': 4.0279937791601865, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 2, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '1611345', 'n_tokens_mistral': 2099, 'n_tokens_neox': 2030, 'n_words': 387}