mirror of https://github.com/apache/lucene.git
LUCENE-4335: ant regenerate
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1506516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
commit
7dfaf2e5fb
17
build.xml
17
build.xml
|
@ -422,5 +422,20 @@
|
|||
<target name="run-clover"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="regenerate" description="Runs all code regenerators">
|
||||
<subant target="regenerate" inheritall="false" failonerror="false">
|
||||
<fileset dir="lucene" includes="build.xml" />
|
||||
<!-- todo:
|
||||
<fileset dir="solr" includes="build.xml" />-->
|
||||
</subant>
|
||||
</target>
|
||||
|
||||
<target name="-check-after-regeneration">
|
||||
<subant buildpath="." antfile="extra-targets.xml" target="-check-after-regeneration" inheritall="false" failonerror="true"/>
|
||||
</target>
|
||||
|
||||
<!-- TODO: remove me when jenkins works -->
|
||||
<target name="regenerateAndCheck" depends="regenerate,-check-after-regeneration"/>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -62,9 +62,23 @@
|
|||
</mvn>
|
||||
</target>
|
||||
|
||||
<target xmlns:ivy="antlib:org.apache.ivy.ant" name="-check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy">
|
||||
<target name="-check-svn-working-copy" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy">
|
||||
<svn-checker failonmodifications="false"/>
|
||||
</target>
|
||||
|
||||
<!-- should only be called by jenkins, not precommit! -->
|
||||
<target name="-check-after-regeneration" depends="ivy-availability-check,ivy-fail,ivy-configure,resolve-groovy">
|
||||
<svn-checker failonmodifications="true"/>
|
||||
</target>
|
||||
|
||||
<macrodef xmlns:ivy="antlib:org.apache.ivy.ant" name="svn-checker">
|
||||
<attribute name="failonmodifications" default="true"/> <!-- false if file modifications are allowed -->
|
||||
<sequential>
|
||||
<ivy:cachepath organisation="org.tmatesoft.svnkit" module="svnkit" revision="1.7.8"
|
||||
inline="true" conf="default" transitive="true" pathid="svnkit.classpath"/>
|
||||
<local name="svn.checkprops.failed"/>
|
||||
<local name="svn.unversioned.failed"/>
|
||||
<local name="svn.changed.failed"/>
|
||||
<script language="groovy" taskname="svn">
|
||||
<classpath>
|
||||
<path refid="groovy.classpath"/>
|
||||
|
@ -83,7 +97,7 @@
|
|||
file -> file.getAbsolutePath().substring(baseLen + 1).replace(File.separatorChar, (char)'/');
|
||||
}
|
||||
|
||||
Set missingProps = new TreeSet(), unversioned = new TreeSet();
|
||||
Set missingProps = new TreeSet(), unversioned = new TreeSet(), changed = new TreeSet();
|
||||
|
||||
self.log('Getting all versioned and unversioned files...');
|
||||
statusClient.doStatus(basedir, SVNRevision.WORKING, SVNDepth.fromRecurse(true), false, true, false, false, {
|
||||
|
@ -94,6 +108,10 @@
|
|||
} else if (status.getKind() == SVNNodeKind.FILE && nodeStatus != SVNStatusType.STATUS_DELETED) {
|
||||
missingProps.add(convertRelative(status.getFile()));
|
||||
}
|
||||
if (nodeStatus == SVNStatusType.STATUS_MODIFIED || nodeStatus == SVNStatusType.STATUS_REPLACED ||
|
||||
nodeStatus == SVNStatusType.STATUS_DELETED || nodeStatus == SVNStatusType.STATUS_ADDED) {
|
||||
changed.add(convertRelative(status.getFile()));
|
||||
}
|
||||
} as ISVNStatusHandler, null);
|
||||
|
||||
self.log('Filtering files with existing svn:eol-style...');
|
||||
|
@ -115,10 +133,20 @@
|
|||
};
|
||||
project.setProperty('svn.checkprops.failed', convertSet2String(missingProps));
|
||||
project.setProperty('svn.unversioned.failed', convertSet2String(unversioned));
|
||||
project.setProperty('svn.changed.failed', convertSet2String(changed));
|
||||
]]></script>
|
||||
<fail if="svn.checkprops.failed"
|
||||
message="The following files are missing svn:eol-style (or binary svn:mime-type):${line.separator}${svn.checkprops.failed}"/>
|
||||
<fail if="svn.unversioned.failed"
|
||||
message="Source checkout is dirty after running tests!!! Offending files:${line.separator}${svn.unversioned.failed}"/>
|
||||
</target>
|
||||
<fail message="Source checkout is modified !!! Offending files:${line.separator}${svn.changed.failed}">
|
||||
<condition>
|
||||
<and>
|
||||
<istrue value="@{failonmodifications}"/>
|
||||
<isset property="svn.changed.failed"/>
|
||||
</and>
|
||||
</condition>
|
||||
</fail>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</project>
|
||||
|
|
|
@ -134,5 +134,9 @@
|
|||
<target name="-ecj-javadoc-lint">
|
||||
<forall-analyzers target="-ecj-javadoc-lint"/>
|
||||
</target>
|
||||
|
||||
<target name="regenerate">
|
||||
<forall-analyzers target="regenerate"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -29,24 +29,23 @@
|
|||
|
||||
<import file="../analysis-module-build.xml"/>
|
||||
|
||||
<target name="compile-core" depends="jflex-notice, common.compile-core"/>
|
||||
<target name="jflex" depends="jflex-check,clean-jflex,-gen-uax29-supp-macros,
|
||||
-jflex-StandardAnalyzer,-jflex-UAX29URLEmailTokenizer,
|
||||
-jflex-wiki-tokenizer,-jflex-HTMLStripCharFilter"/>
|
||||
|
||||
<target name="jflex" depends="jflex-check,clean-jflex,gen-uax29-supp-macros,
|
||||
jflex-StandardAnalyzer,jflex-UAX29URLEmailTokenizer,
|
||||
jflex-wiki-tokenizer,jflex-HTMLStripCharFilter"/>
|
||||
|
||||
<target name="gen-uax29-supp-macros">
|
||||
<target name="-gen-uax29-supp-macros">
|
||||
<subant target="gen-uax29-supp-macros">
|
||||
<fileset dir="../icu" includes="build.xml"/>
|
||||
</subant>
|
||||
</target>
|
||||
|
||||
<target name="jflex-HTMLStripCharFilter"
|
||||
<target name="-jflex-HTMLStripCharFilter"
|
||||
depends="init,jflex-check,generate-jflex-html-char-entities"
|
||||
if="jflex.present">
|
||||
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
|
||||
<classpath refid="jflex.classpath"/>
|
||||
</taskdef>
|
||||
<!-- this logic below looks duplicated with run-jflex, but its not, the regexp is different! -->
|
||||
<jflex file="src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex"
|
||||
outdir="src/java/org/apache/lucene/analysis/charfilter"
|
||||
nobak="on"/>
|
||||
|
@ -54,6 +53,9 @@
|
|||
<replaceregexp file="src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java"
|
||||
match="/\*\*\s*\*\s*Creates a new scanner.*this\(new java\.io\.InputStreamReader\(in\)\);\s*\}"
|
||||
replace="" flags="sg"/>
|
||||
<replaceregexp file="src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java"
|
||||
match="\/\*\s*The following code was generated by JFlex.*"
|
||||
replace="\/\* The following code was generated by JFlex. \*\/" flags=""/>
|
||||
</target>
|
||||
|
||||
<target name="generate-jflex-html-char-entities">
|
||||
|
@ -67,14 +69,14 @@
|
|||
<fixcrlf file="src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex" encoding="UTF-8"/>
|
||||
</target>
|
||||
|
||||
<target name="jflex-wiki-tokenizer" depends="init,jflex-check" if="jflex.present">
|
||||
<target name="-jflex-wiki-tokenizer" depends="init,jflex-check" if="jflex.present">
|
||||
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
|
||||
<classpath refid="jflex.classpath"/>
|
||||
</taskdef>
|
||||
<run-jflex dir="src/java/org/apache/lucene/analysis/wikipedia" name="WikipediaTokenizerImpl"/>
|
||||
</target>
|
||||
|
||||
<target name="jflex-StandardAnalyzer" depends="init,jflex-check" if="jflex.present">
|
||||
<target name="-jflex-StandardAnalyzer" depends="init,jflex-check" if="jflex.present">
|
||||
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
|
||||
<classpath refid="jflex.classpath"/>
|
||||
</taskdef>
|
||||
|
@ -82,7 +84,7 @@
|
|||
<run-jflex dir="src/java/org/apache/lucene/analysis/standard" name="ClassicTokenizerImpl"/>
|
||||
</target>
|
||||
|
||||
<target name="jflex-UAX29URLEmailTokenizer" depends="jflex-check" if="jflex.present">
|
||||
<target name="-jflex-UAX29URLEmailTokenizer" depends="jflex-check" if="jflex.present">
|
||||
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
|
||||
<classpath refid="jflex.classpath"/>
|
||||
</taskdef>
|
||||
|
@ -100,6 +102,9 @@
|
|||
<replaceregexp file="@{dir}/@{name}.java"
|
||||
match="/\*\*\s*\*\s*Creates a new scanner\..*this\(new java\.io\.InputStreamReader\(in\)\);\s*\}"
|
||||
replace="" flags="sg"/>
|
||||
<replaceregexp file="@{dir}/@{name}.java"
|
||||
match="\/\*\s*The following code was generated by JFlex.*"
|
||||
replace="\/\* The following code was generated by JFlex. \*\/" flags=""/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
|
@ -143,4 +148,6 @@
|
|||
</target>
|
||||
|
||||
<target name="javadocs" depends="module-build.javadocs"/>
|
||||
|
||||
<target name="regenerate" depends="jflex"/>
|
||||
</project>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Generated using ICU4J 49.1.0.0 on Sunday, July 15, 2012 5:42:00 AM UTC
|
||||
// Generated using ICU4J 49.1.0.0
|
||||
// by org.apache.lucene.analysis.icu.GenerateHTMLStripCharFilterSupplementaryMacros
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/19/12 6:24 PM */
|
||||
/* The following code was generated by JFlex. */
|
||||
|
||||
package org.apache.lucene.analysis.charfilter;
|
||||
|
||||
|
@ -31,18 +31,11 @@ import org.apache.lucene.analysis.util.CharArrayMap;
|
|||
import org.apache.lucene.analysis.util.CharArraySet;
|
||||
import org.apache.lucene.analysis.util.OpenStringBuilder;
|
||||
|
||||
|
||||
@SuppressWarnings("fallthrough")
|
||||
/**
|
||||
* A CharFilter that wraps another Reader and attempts to strip out HTML constructs.
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
|
||||
/**
|
||||
* This class is a scanner generated by
|
||||
* <a href="http://www.jflex.de/">JFlex</a> 1.5.0-SNAPSHOT
|
||||
* on 9/19/12 6:24 PM from the specification file
|
||||
* <tt>C:/svn/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex</tt>
|
||||
*/
|
||||
public final class HTMLStripCharFilter extends BaseCharFilter {
|
||||
|
||||
/** This character denotes the end of file */
|
||||
|
|
|
@ -29,11 +29,10 @@ import org.apache.lucene.analysis.util.CharArrayMap;
|
|||
import org.apache.lucene.analysis.util.CharArraySet;
|
||||
import org.apache.lucene.analysis.util.OpenStringBuilder;
|
||||
|
||||
|
||||
@SuppressWarnings("fallthrough")
|
||||
/**
|
||||
* A CharFilter that wraps another Reader and attempts to strip out HTML constructs.
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
%%
|
||||
|
||||
%unicode 6.1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/19/12 6:23 PM */
|
||||
/* The following code was generated by JFlex. */
|
||||
|
||||
package org.apache.lucene.analysis.standard;
|
||||
|
||||
|
@ -29,13 +29,10 @@ WARNING: if you change ClassicTokenizerImpl.jflex and need to regenerate
|
|||
import java.io.Reader;
|
||||
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
||||
|
||||
|
||||
/**
|
||||
* This class is a scanner generated by
|
||||
* <a href="http://www.jflex.de/">JFlex</a> 1.5.0-SNAPSHOT
|
||||
* on 9/19/12 6:23 PM from the specification file
|
||||
* <tt>C:/svn/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex</tt>
|
||||
* This class implements the classic lucene StandardTokenizer up until 3.0
|
||||
*/
|
||||
|
||||
class ClassicTokenizerImpl implements StandardTokenizerInterface {
|
||||
|
||||
/** This character denotes the end of file */
|
||||
|
@ -359,7 +356,6 @@ public static final int ACRONYM_DEP = StandardTokenizer.ACRONYM_DEP;
|
|||
|
||||
public static final String [] TOKEN_TYPES = StandardTokenizer.TOKEN_TYPES;
|
||||
|
||||
@Override
|
||||
public final int yychar()
|
||||
{
|
||||
return yychar;
|
||||
|
@ -368,7 +364,6 @@ public final int yychar()
|
|||
/**
|
||||
* Fills CharTermAttribute with the current token text.
|
||||
*/
|
||||
@Override
|
||||
public final void getText(CharTermAttribute t) {
|
||||
t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
|
||||
}
|
||||
|
@ -484,7 +479,6 @@ public final void getText(CharTermAttribute t) {
|
|||
*
|
||||
* @param reader the new input stream
|
||||
*/
|
||||
@Override
|
||||
public final void yyreset(java.io.Reader reader) {
|
||||
zzReader = reader;
|
||||
zzAtBOL = true;
|
||||
|
@ -544,7 +538,6 @@ public final void getText(CharTermAttribute t) {
|
|||
/**
|
||||
* Returns the length of the matched text region.
|
||||
*/
|
||||
@Override
|
||||
public final int yylength() {
|
||||
return zzMarkedPos-zzStartRead;
|
||||
}
|
||||
|
@ -600,7 +593,6 @@ public final void getText(CharTermAttribute t) {
|
|||
* @return the next token
|
||||
* @exception java.io.IOException if any I/O-Error occurs
|
||||
*/
|
||||
@Override
|
||||
public int getNextToken() throws java.io.IOException {
|
||||
int zzInput;
|
||||
int zzAction;
|
||||
|
|
|
@ -27,6 +27,9 @@ WARNING: if you change ClassicTokenizerImpl.jflex and need to regenerate
|
|||
import java.io.Reader;
|
||||
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
||||
|
||||
/**
|
||||
* This class implements the classic lucene StandardTokenizer up until 3.0
|
||||
*/
|
||||
%%
|
||||
|
||||
%class ClassicTokenizerImpl
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Generated using ICU4J 49.1.0.0 on Wednesday, September 19, 2012 10:23:34 PM UTC
|
||||
// Generated using ICU4J 49.1.0.0
|
||||
// by org.apache.lucene.analysis.icu.GenerateJFlexSupplementaryMacros
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/19/12 6:23 PM */
|
||||
/* The following code was generated by JFlex. */
|
||||
|
||||
package org.apache.lucene.analysis.standard;
|
||||
|
||||
|
@ -843,7 +843,6 @@ public final class StandardTokenizerImpl implements StandardTokenizerInterface {
|
|||
|
||||
public static final int HANGUL_TYPE = StandardTokenizer.HANGUL;
|
||||
|
||||
@Override
|
||||
public final int yychar()
|
||||
{
|
||||
return yychar;
|
||||
|
@ -852,7 +851,6 @@ public final class StandardTokenizerImpl implements StandardTokenizerInterface {
|
|||
/**
|
||||
* Fills CharTermAttribute with the current token text.
|
||||
*/
|
||||
@Override
|
||||
public final void getText(CharTermAttribute t) {
|
||||
t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
|
||||
}
|
||||
|
@ -967,7 +965,6 @@ public final class StandardTokenizerImpl implements StandardTokenizerInterface {
|
|||
*
|
||||
* @param reader the new input stream
|
||||
*/
|
||||
@Override
|
||||
public final void yyreset(java.io.Reader reader) {
|
||||
zzReader = reader;
|
||||
zzAtBOL = true;
|
||||
|
@ -1027,7 +1024,6 @@ public final class StandardTokenizerImpl implements StandardTokenizerInterface {
|
|||
/**
|
||||
* Returns the length of the matched text region.
|
||||
*/
|
||||
@Override
|
||||
public final int yylength() {
|
||||
return zzMarkedPos-zzStartRead;
|
||||
}
|
||||
|
@ -1083,7 +1079,6 @@ public final class StandardTokenizerImpl implements StandardTokenizerInterface {
|
|||
* @return the next token
|
||||
* @exception java.io.IOException if any I/O-Error occurs
|
||||
*/
|
||||
@Override
|
||||
public int getNextToken() throws java.io.IOException {
|
||||
int zzInput;
|
||||
int zzAction;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/19/12 6:23 PM */
|
||||
/* The following code was generated by JFlex. */
|
||||
|
||||
package org.apache.lucene.analysis.standard;
|
||||
|
||||
|
@ -4033,7 +4033,6 @@ public final class UAX29URLEmailTokenizerImpl implements StandardTokenizerInterf
|
|||
|
||||
public static final int URL_TYPE = UAX29URLEmailTokenizer.URL;
|
||||
|
||||
@Override
|
||||
public final int yychar()
|
||||
{
|
||||
return yychar;
|
||||
|
@ -4042,7 +4041,6 @@ public final class UAX29URLEmailTokenizerImpl implements StandardTokenizerInterf
|
|||
/**
|
||||
* Fills CharTermAttribute with the current token text.
|
||||
*/
|
||||
@Override
|
||||
public final void getText(CharTermAttribute t) {
|
||||
t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
|
||||
}
|
||||
|
@ -4157,7 +4155,6 @@ public final class UAX29URLEmailTokenizerImpl implements StandardTokenizerInterf
|
|||
*
|
||||
* @param reader the new input stream
|
||||
*/
|
||||
@Override
|
||||
public final void yyreset(java.io.Reader reader) {
|
||||
zzReader = reader;
|
||||
zzAtBOL = true;
|
||||
|
@ -4217,7 +4214,6 @@ public final class UAX29URLEmailTokenizerImpl implements StandardTokenizerInterf
|
|||
/**
|
||||
* Returns the length of the matched text region.
|
||||
*/
|
||||
@Override
|
||||
public final int yylength() {
|
||||
return zzMarkedPos-zzStartRead;
|
||||
}
|
||||
|
@ -4273,7 +4269,6 @@ public final class UAX29URLEmailTokenizerImpl implements StandardTokenizerInterf
|
|||
* @return the next token
|
||||
* @exception java.io.IOException if any I/O-Error occurs
|
||||
*/
|
||||
@Override
|
||||
public int getNextToken() throws java.io.IOException {
|
||||
int zzInput;
|
||||
int zzAction;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/19/12 6:23 PM */
|
||||
/* The following code was generated by JFlex. */
|
||||
|
||||
package org.apache.lucene.analysis.wikipedia;
|
||||
|
||||
|
@ -21,13 +21,10 @@ package org.apache.lucene.analysis.wikipedia;
|
|||
|
||||
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
||||
|
||||
|
||||
/**
|
||||
* This class is a scanner generated by
|
||||
* <a href="http://www.jflex.de/">JFlex</a> 1.5.0-SNAPSHOT
|
||||
* on 9/19/12 6:23 PM from the specification file
|
||||
* <tt>C:/svn/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex</tt>
|
||||
* JFlex-generated tokenizer that is aware of Wikipedia syntax.
|
||||
*/
|
||||
|
||||
class WikipediaTokenizerImpl {
|
||||
|
||||
/** This character denotes the end of file */
|
||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.lucene.analysis.wikipedia;
|
|||
|
||||
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
||||
|
||||
/**
|
||||
* JFlex-generated tokenizer that is aware of Wikipedia syntax.
|
||||
*/
|
||||
%%
|
||||
|
||||
%class WikipediaTokenizerImpl
|
||||
|
|
|
@ -150,4 +150,6 @@ are part of the ICU4C package. See http://site.icu-project.org/ </echo>
|
|||
</compile>
|
||||
</target>
|
||||
|
||||
<target name="regenerate" depends="gen-html-strip-charfilter-supp-macros,gen-uax29-supp-macros,gen-utr30-data-files,gennorm2,genrbbi"/>
|
||||
|
||||
</project>
|
||||
|
|
Binary file not shown.
|
@ -60,8 +60,7 @@ public class GenerateHTMLStripCharFilterSupplementaryMacros {
|
|||
|
||||
static void outputHeader() {
|
||||
System.out.print(APACHE_LICENSE);
|
||||
System.out.print("// Generated using ICU4J " + VersionInfo.ICU_VERSION.toString() + " on ");
|
||||
System.out.println(DATE_FORMAT.format(new Date()));
|
||||
System.out.println("// Generated using ICU4J " + VersionInfo.ICU_VERSION.toString());
|
||||
System.out.println("// by " + GenerateHTMLStripCharFilterSupplementaryMacros.class.getName());
|
||||
System.out.print(NL + NL);
|
||||
}
|
||||
|
|
|
@ -74,8 +74,7 @@ public class GenerateJFlexSupplementaryMacros {
|
|||
|
||||
static void outputHeader() {
|
||||
System.out.print(APACHE_LICENSE);
|
||||
System.out.print("// Generated using ICU4J " + VersionInfo.ICU_VERSION.toString() + " on ");
|
||||
System.out.println(DATE_FORMAT.format(new Date()));
|
||||
System.out.println("// Generated using ICU4J " + VersionInfo.ICU_VERSION.toString());
|
||||
System.out.println("// by " + GenerateJFlexSupplementaryMacros.class.getName());
|
||||
System.out.print(NL + NL);
|
||||
}
|
||||
|
|
|
@ -139,4 +139,6 @@
|
|||
<!-- TODO: not until we properly make 'test-tools' work with clover etc
|
||||
<target name="test" depends="module-build.test, test-tools"/> -->
|
||||
|
||||
<target name="regenerate" depends="build-dict"/>
|
||||
|
||||
</project>
|
||||
|
|
Binary file not shown.
|
@ -610,4 +610,13 @@
|
|||
<jar-checksum-macro srcdir="${common.dir}" dstdir="${common.dir}/licenses"/>
|
||||
</target>
|
||||
|
||||
<target name="regenerate">
|
||||
<subant target="regenerate" failonerror="true" inheritall="false">
|
||||
<propertyset refid="uptodate.and.compiled.properties"/>
|
||||
<fileset dir="core" includes="build.xml"/>
|
||||
<fileset dir="test-framework" includes="build.xml"/>
|
||||
</subant>
|
||||
<modules-crawl target="regenerate"/>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -445,20 +445,6 @@
|
|||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="jflex-uptodate-check">
|
||||
<uptodate property="jflex.files.uptodate">
|
||||
<srcfiles dir="${src.dir}" includes="**/*.jflex" />
|
||||
<mapper type="glob" from="*.jflex" to="*.java"/>
|
||||
</uptodate>
|
||||
</target>
|
||||
|
||||
<target name="jflex-notice" depends="jflex-uptodate-check" unless="jflex.files.uptodate">
|
||||
<echo>
|
||||
One or more of the JFlex .jflex files is newer than its corresponding
|
||||
.java file. Run the "jflex" target to regenerate the artifacts.
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<target name="jflex-check">
|
||||
<available property="jflex.present" classname="jflex.anttask.JFlexTask">
|
||||
<classpath refid="jflex.classpath"/>
|
||||
|
@ -471,7 +457,7 @@
|
|||
Please install the jFlex 1.5 version (currently not released)
|
||||
from its SVN repository:
|
||||
|
||||
svn co http://jflex.svn.sourceforge.net/svnroot/jflex/trunk jflex
|
||||
svn co -r 623 http://jflex.svn.sourceforge.net/svnroot/jflex/trunk jflex
|
||||
cd jflex
|
||||
mvn install
|
||||
|
||||
|
@ -2100,6 +2086,8 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
<property name="pegdown.loaded" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="regenerate"/>
|
||||
|
||||
<macrodef name="pegdown">
|
||||
<attribute name="todir"/>
|
||||
<attribute name="flatten" default="false"/>
|
||||
|
|
|
@ -141,4 +141,7 @@
|
|||
<arg value="${moman.rev}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="regenerate" depends="createLevAutomata,createPackedIntSources"/>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -586,4 +586,4 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ if __name__ == '__main__':
|
|||
return values[index]%s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(final int index, final long value) {
|
||||
values[index] = %s(value);
|
||||
}
|
||||
|
@ -100,6 +101,7 @@ if __name__ == '__main__':
|
|||
+ RamUsageEstimator.sizeOf(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
Arrays.fill(values, %s0L);
|
||||
}
|
||||
|
@ -128,6 +130,7 @@ if __name__ == '__main__':
|
|||
return gets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int set(int index, long[] arr, int off, int len) {
|
||||
assert len > 0 : "len must be > 0 (got " + len + ")";
|
||||
assert index >= 0 && index < valueCount;
|
||||
|
@ -158,6 +161,7 @@ if __name__ == '__main__':
|
|||
return gets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int set(int index, long[] arr, int off, int len) {
|
||||
assert len > 0 : "len must be > 0 (got " + len + ")";
|
||||
assert index >= 0 && index < valueCount;
|
||||
|
|
|
@ -77,8 +77,13 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
|
|||
Arrays.fill(blocks, 0L);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long ramBytesUsed() {
|
||||
return RamUsageEstimator.sizeOf(blocks);
|
||||
return RamUsageEstimator.alignObjectSize(
|
||||
RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
|
||||
+ 2 * RamUsageEstimator.NUM_BYTES_INT // valueCount,bitsPerValue
|
||||
+ RamUsageEstimator.NUM_BYTES_OBJECT_REF) // blocks ref
|
||||
+ RamUsageEstimator.sizeOf(blocks);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -106,8 +111,8 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
|
|||
// bulk get
|
||||
assert index %% valuesPerBlock == 0;
|
||||
final PackedInts.Decoder decoder = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
|
||||
assert decoder.blockCount() == 1;
|
||||
assert decoder.valueCount() == valuesPerBlock;
|
||||
assert decoder.longBlockCount() == 1;
|
||||
assert decoder.longValueCount() == valuesPerBlock;
|
||||
final int blockIndex = index / valuesPerBlock;
|
||||
final int nblocks = (index + len) / valuesPerBlock - blockIndex;
|
||||
decoder.decode(blocks, blockIndex, arr, off, nblocks);
|
||||
|
@ -150,8 +155,8 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
|
|||
// bulk set
|
||||
assert index %% valuesPerBlock == 0;
|
||||
final BulkOperation op = BulkOperation.of(PackedInts.Format.PACKED_SINGLE_BLOCK, bitsPerValue);
|
||||
assert op.blockCount() == 1;
|
||||
assert op.valueCount() == valuesPerBlock;
|
||||
assert op.longBlockCount() == 1;
|
||||
assert op.longValueCount() == valuesPerBlock;
|
||||
final int blockIndex = index / valuesPerBlock;
|
||||
final int nblocks = (index + len) / valuesPerBlock - blockIndex;
|
||||
op.encode(arr, off, blocks, blockIndex, nblocks);
|
||||
|
|
|
@ -152,4 +152,6 @@ import org.apache.lucene.queryparser.flexible.core.messages.*;"
|
|||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="regenerate" depends="javacc"/>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -112,4 +112,4 @@ interface CharStream {
|
|||
void Done();
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=c847dd1920bf7901125a7244125682ad (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=30b94cad7b10d0d81e3a59a1083939d0 (do not edit this line) */
|
||||
|
|
|
@ -184,4 +184,4 @@ public class ParseException extends Exception {
|
|||
}
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=61602edcb3a15810cbc58f5593eba40d (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=b187d97d5bb75c3fc63d642c1c26ac6e (do not edit this line) */
|
||||
|
|
|
@ -128,4 +128,4 @@ public class Token implements java.io.Serializable {
|
|||
}
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=c1e1418b35aa9e47ef8dc98b87423d70 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=405bb5d2fcd84e94ac1c8f0b12c1f914 (do not edit this line) */
|
||||
|
|
|
@ -144,4 +144,4 @@ public class TokenMgrError extends Error
|
|||
this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
|
||||
}
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=0c275864a1972d9a01601ab81426872d (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=f433e1a52b8eadbf12f3fbbbf87fd140 (do not edit this line) */
|
||||
|
|
|
@ -112,4 +112,4 @@ interface CharStream {
|
|||
void Done();
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=c95f1720d9b38046dc5d294b741c44cb (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=53b2ec7502d50e2290e86187a6c01270 (do not edit this line) */
|
||||
|
|
|
@ -187,4 +187,4 @@ public class ParseException extends QueryNodeParseException {
|
|||
}
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=81401c29cf6f9909761c636b4778ccc0 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=4263a02db9988d7a863aa97ad2f6dc67 (do not edit this line) */
|
||||
|
|
|
@ -128,4 +128,4 @@ public class Token implements java.io.Serializable {
|
|||
}
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=30bbd23e0dec26f141130dc62a4f6e9d (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=ea8b1e55950603be28e2f63dcd544ab4 (do not edit this line) */
|
||||
|
|
|
@ -144,4 +144,4 @@ public class TokenMgrError extends Error
|
|||
this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
|
||||
}
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=3ca7fbf7de9f2424b131a5499b0a78d0 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=be88283d82a985d82a34dda46bcf42d5 (do not edit this line) */
|
||||
|
|
|
@ -112,4 +112,4 @@ interface CharStream {
|
|||
void Done();
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=5ca20c9145f29a0f8909470a7f949fe4 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=242ae59b965491e225a44534cbc73b42 (do not edit this line) */
|
||||
|
|
|
@ -184,4 +184,4 @@ public class ParseException extends Exception {
|
|||
}
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=be6f55e3bf157e8c96b4c06cca5ec81b (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=bd8163f41bf2fd1bb00f025fce3dcaaf (do not edit this line) */
|
||||
|
|
|
@ -128,4 +128,4 @@ public class Token implements java.io.Serializable {
|
|||
}
|
||||
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=db38f23b3674db52ff034369707a0ac3 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=f2df701e24da1cf2d025118ce6efdd2f (do not edit this line) */
|
||||
|
|
|
@ -144,4 +144,4 @@ public class TokenMgrError extends Error
|
|||
this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
|
||||
}
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=dcdd5ccde13b91bcd8f76a86ca618852 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=8c69a370d9a9893140562c8bb911678c (do not edit this line) */
|
||||
|
|
Loading…
Reference in New Issue