<commit_before><!--
 Targets for working from terminal window:
       build (default) - generates java files and compiles them
       clean           - removes all generated files and class files
 Targets for working from Eclipse:
       gen             - generates java files
       genClean        - removes all generated files and their class files
-->
<project name="Java1.4Frontend" default="build" basedir=".">

<!-- "package" is the directory where generated files will be stored -->
<property name="package" value="AST"/>

<!-- "tools" is the directory where generators and libraries are located. -->
<property name="tools" value="tools"/>
	
<!-- "jflex" is an ant task class for the scanner generator in JFlex.jar -->
<taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="tools/JFlex.jar"/>
<!-- "beaver" is an ant task class for the parser generator in beaver.jar -->
<taskdef name="beaver" classname="beaver.comp.run.AntTask" classpath="tools/beaver.jar"/>
<!-- "jastadd" is an ant task class in jastadd2.jar -->
<taskdef name="jastadd" classname="jastadd.JastAddTask" classpath="tools/jastadd2.jar"/>

<!-- compile sources -->
<target name="build" depends="gen">
	<javac debug="true" nowarn="true" srcdir="." includes="**/*.java" excludes="test/**" classpath=".:${tools}/beaver-rt.jar:${tools}/junit.jar"
   fork="true"/>
</target>
	
<!-- generate compiler source files -->
<target name="gen" depends="scanner,parser">
	<!-- create AST node types and weave aspect modules -->
		<echo message = "Running JastAdd"/>
		<jastadd package="${package}" rewrite="true" beaver="true" novisitcheck="true" lazyMaps="true" outdir="${basedir}">
			<fileset dir=".">
				<include name="**/*.ast"/>
				<include name="**/*.jrag"/>
				<include name="**/*.jadd"/>
			</fileset>
		</jastadd>
</target>

<target name="scanner">
		<!-- compose the scanner -->
		<concat destfile="scanner/JavaScanner.flex" binary="true" force="false">
      <filelist dir="scanner">
        <file name="preamble.flex"/>
        <file name="macros.flex"/>
        <file name="rules_preamble.flex"/>
        <file name="WhiteSpace.flex"/>
        <file name="Comments.flex"/>
        <file name="Keywords.flex"/>
        <file name="Literals.flex"/>
        <file name="Separators.flex"/>
        <file name="Operators.flex"/>
        <file name="Identifiers.flex"/>
        <file name="postamble.flex"/>
      </filelist>
    </concat>
	  <!-- generate the scanner -->
		<echo message = "Running jflex"/>
		<jflex file="scanner/JavaScanner.flex" outdir="scanner" nobak="yes"/>
</target>

<target name="parser">
	<!-- generate the parser phase 1, create a full .lalr specification from fragments-->
		<echo message = "Running parser phase 1"/>
		<concat destfile="parser/JavaParser.all" binary="true" force="false">
	    <filelist dir=".">
	      <file name="parser/preamble.parser"/>
	      <file name="parser/java14.parser"/>
	      <file name="parser/errorrecovery.parser"/>
	    </filelist>
	</concat>
	<!-- generate the parser phase 2, translating .lalr to .beaver -->
		<java fork="true" dir="${basedir}" classpath="${tools}/JastAddParser.jar:${tools}/beaver-rt.jar" classname="Main">
			<arg line="parser/JavaParser.all parser/JavaParser.beaver"/>
		</java>
	<!-- generate the parser phase 3, translating .beaver to .java -->
	<beaver file="parser/JavaParser.beaver" terminalNames="yes" compress="no" useSwitch="yes"/>
</target>

<!-- remove generated source files and .class files -->
<target name="clean" depends="cleanGen">
     <!-- delete all .class files recursively -->
    <delete>
      <fileset dir="." includes="**/*.class"/>
    </delete>
	 <delete file="Java1.4Frontend-src.jar"/>
</target>

<target name="jar" depends="build">
  <jar destfile="PrettyPrint.jar" basedir="." includes="**/*.class" excludes="test/**">
    <manifest>
      <attribute name="Main-Class" value="JavaPrettyPrinter"/>
    </manifest>
  </jar>
</target>

<!-- remove generated source files and their .class files -->
<target name="cleanGen">
	 <delete dir="${package}"/>
   <delete>
      <fileset dir="scanner" includes="JavaScanner.flex"/>
      <fileset dir="scanner" includes="JavaScanner.java"/>
      <fileset dir="parser" includes="JavaParser.java"/>
      <fileset dir="parser" includes="JavaParser.beaver"/>
      <fileset dir="parser" includes="JavaParser.all"/>
   </delete>

</target>

<!-- build a source distribution -->
<target name="source" depends="build">
  <jar destfile="Java1.4Frontend-src.jar">
			<fileset dir="..">
        <!-- include frontend source file -->
				<include name="Java1.4Frontend/JavaPrettyPrinter.java"/>
				<include name="Java1.4Frontend/JavaChecker.java"/>
				<include name="Java1.4Frontend/Frontend.java"/>
				<include name="Java1.4Frontend/**/*.ast"/>
				<include name="Java1.4Frontend/**/*.jrag"/>
				<include name="Java1.4Frontend/**/*.jadd"/>
        <!-- include parser and scanner -->
				<include name="Java1.4Frontend/beaver/**/*.java"/>
				<include name="Java1.4Frontend/scanner/*.flex"/>
				<exclude name="Java1.4Frontend/scanner/JavaScanner.flex"/>
				<include name="Java1.4Frontend/scanner/Unicode.java"/>
				<include name="Java1.4Frontend/parser/*.parser"/>
        <!-- include class file reader -->
				<include name="Java1.4Frontend/bytecode/*.java"/>
        <!-- include tools and buildfile used to build the front-end -->
				<include name="Java1.4Frontend/tools/*.jar"/>
				<include name="Java1.4Frontend/build.xml"/>
        <!-- include readme and licences -->
				<include name="Java1.4Frontend/README"/>
				<include name="Java1.4Frontend/licences/BSD"/>
				<include name="Java1.4Frontend/licences/CPL"/>
				<include name="Java1.4Frontend/licences/GPL"/>
			</fileset>
      <manifest>
      </manifest>
  </jar>
</target>

</project>


<commit_msg>*** empty log message ***<commit_after><!--
 Targets for working from terminal window:
       build (default) - generates java files and compiles them
       clean           - removes all generated files and class files
 Targets for working from Eclipse:
       gen             - generates java files
       genClean        - removes all generated files and their class files
-->
<project name="Java1.4Frontend" default="build" basedir=".">

<!-- "package" is the directory where generated files will be stored -->
<property name="package" value="AST"/>

<!-- "tools" is the directory where generators and libraries are located. -->
<property name="tools" value="tools"/>
	
<!-- "jflex" is an ant task class for the scanner generator in JFlex.jar -->
<taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="tools/JFlex.jar"/>
<!-- "beaver" is an ant task class for the parser generator in beaver.jar -->
<taskdef name="beaver" classname="beaver.comp.run.AntTask" classpath="tools/beaver.jar"/>
<!-- "jastadd" is an ant task class in jastadd2.jar -->
<taskdef name="jastadd" classname="jastadd.JastAddTask" classpath="tools/jastadd2.jar"/>

<!-- compile sources -->
<target name="build" depends="gen">
	<javac debug="true" nowarn="true" srcdir="." includes="**/*.java" excludes="test/**" classpath=".:${tools}/beaver-rt.jar:${tools}/junit.jar"
   fork="true"/>
</target>
	
<!-- generate compiler source files -->
<target name="gen" depends="scanner,parser">
	<!-- create AST node types and weave aspect modules -->
		<echo message = "Running JastAdd"/>
		<jastadd package="${package}" rewrite="true" beaver="true" novisitcheck="true" lazyMaps="true" outdir="${basedir}">
			<fileset dir=".">
				<include name="**/*.ast"/>
				<include name="**/*.jrag"/>
				<include name="**/*.jadd"/>
			</fileset>
		</jastadd>
</target>

<target name="scanner">
		<!-- compose the scanner -->
		<concat destfile="scanner/JavaScanner.flex" binary="true" force="false">
      <filelist dir="scanner">
        <file name="preamble.flex"/>
        <file name="macros.flex"/>
        <file name="rules_preamble.flex"/>
        <file name="WhiteSpace.flex"/>
        <file name="Comments.flex"/>
        <file name="Keywords.flex"/>
        <file name="Literals.flex"/>
        <file name="Separators.flex"/>
        <file name="Operators.flex"/>
        <file name="Identifiers.flex"/>
        <file name="postamble.flex"/>
      </filelist>
    </concat>
	  <!-- generate the scanner -->
		<echo message = "Running jflex"/>
		<jflex file="scanner/JavaScanner.flex" outdir="scanner" nobak="yes"/>
</target>

<target name="parser">
	<!-- generate the parser phase 1, create a full .lalr specification from fragments-->
		<echo message = "Running parser phase 1"/>
		<concat destfile="parser/JavaParser.all" binary="true" force="false">
	    <filelist dir=".">
	      <file name="parser/preamble.parser"/>
	      <file name="parser/java14.parser"/>
	      <file name="parser/errorrecovery.parser"/>
	    </filelist>
	</concat>
	<!-- generate the parser phase 2, translating .lalr to .beaver -->
		<java fork="true" dir="${basedir}" classpath="${tools}/JastAddParser.jar:${tools}/beaver-rt.jar" classname="Main">
			<arg line="parser/JavaParser.all parser/JavaParser.beaver"/>
		</java>
	<!-- generate the parser phase 3, translating .beaver to .java -->
	<beaver file="parser/JavaParser.beaver" terminalNames="yes" compress="no" useSwitch="yes"/>
</target>

<!-- remove generated source files and .class files -->
<target name="clean" depends="cleanGen">
     <!-- delete all .class files recursively -->
    <delete>
      <fileset dir="." includes="**/*.class"/>
    </delete>
	 <delete file="Java1.4Frontend-src.jar"/>
</target>

<target name="jar" depends="build">
  <jar destfile="PrettyPrint.jar" basedir="." includes="**/*.class" excludes="test/**">
    <manifest>
      <attribute name="Main-Class" value="JavaPrettyPrinter"/>
    </manifest>
  </jar>
</target>

<!-- remove generated source files and their .class files -->
<target name="cleanGen">
	 <delete dir="${package}"/>
   <delete>
      <fileset dir="scanner" includes="JavaScanner.flex"/>
      <fileset dir="scanner" includes="JavaScanner.java"/>
      <fileset dir="parser" includes="JavaParser.java"/>
      <fileset dir="parser" includes="JavaParser.beaver"/>
      <fileset dir="parser" includes="JavaParser.all"/>
   </delete>

</target>

<!-- build a source distribution -->
<target name="source" depends="build">
  <jar destfile="Java1.4Frontend-src.jar">
			<fileset dir="..">
        <!-- include frontend source file -->
				<include name="Java1.4Frontend/JavaPrettyPrinter.java"/>
				<include name="Java1.4Frontend/JavaChecker.java"/>
				<include name="Java1.4Frontend/Frontend.java"/>
				<include name="Java1.4Frontend/**/*.ast"/>
				<include name="Java1.4Frontend/**/*.jrag"/>
				<include name="Java1.4Frontend/**/*.jadd"/>
        <!-- include parser and scanner -->
				<include name="Java1.4Frontend/beaver/**/*.java"/>
				<include name="Java1.4Frontend/scanner/*.flex"/>
				<exclude name="Java1.4Frontend/scanner/JavaScanner.flex"/>
				<include name="Java1.4Frontend/scanner/Unicode.java"/>
				<include name="Java1.4Frontend/parser/*.parser"/>
        <!-- include tools and buildfile used to build the front-end -->
				<include name="Java1.4Frontend/tools/*.jar"/>
				<include name="Java1.4Frontend/build.xml"/>
        <!-- include readme and licences -->
				<include name="Java1.4Frontend/README"/>
				<include name="Java1.4Frontend/licences/BSD"/>
				<include name="Java1.4Frontend/licences/CPL"/>
				<include name="Java1.4Frontend/licences/GPL"/>
			</fileset>
      <manifest>
      </manifest>
  </jar>
</target>

</project>



{'fraction_non_alphanumeric': 0.17946768060836502, 'fraction_numerical': 0.008280523869877482, 'mean_word_length': 3.1384615384615384, 'pattern_counts': {'":': 0, '<': 251, '<?xml version=': 0, '>': 251, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1845920', 'n_tokens_mistral': 3989, 'n_tokens_neox': 3579, 'n_words': 850}