[
https://issues.apache.org/jira/browse/LUCENE-6243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14320057#comment-14320057
]
Dawid Weiss commented on LUCENE-6243:
-------------------------------------
Oh jeez... I now see the patch in full. Ok, nevermind.
{code}
<macrodef name="run-jflex-and-disable-buffer-expansion">
<attribute name="dir"/>
<attribute name="name"/>
<sequential>
<jflex file="@{dir}/@{name}.jflex" outdir="@{dir}" nobak="on"
inputstreamctor="false"/>
<!-- LUCENE-5897: Disallow scanner buffer expansion -->
<replaceregexp file="@{dir}/@{name}.java"
match="[ \t]*/\* is the buffer big enough\? \*/\s+if
\(zzCurrentPos >= zzBuffer\.length.*?\}[ \t]*\r?\n"
replace="" flags="s" />
<replaceregexp file="@{dir}/@{name}.java"
match="private static final int ZZ_BUFFERSIZE ="
replace="private int ZZ_BUFFERSIZE ="/>
<replaceregexp file="@{dir}/@{name}.java"
match="int requested = zzBuffer.length - zzEndRead;"
replace="int requested = zzBuffer.length - zzEndRead -
zzFinalHighSurrogate;"/>
<replaceregexp file="@{dir}/@{name}.java"
match="(zzFinalHighSurrogate = 1;)(\r?\n)"
replace="\1\2 if (totalRead == 1) { return true;
}\2"/>
</sequential>
</macrodef>
{code}
> jflex files are out of sync with the generated files
> ----------------------------------------------------
>
> Key: LUCENE-6243
> URL: https://issues.apache.org/jira/browse/LUCENE-6243
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Dawid Weiss
> Priority: Trivial
>
> This kind of sucks I think -- there have been a few changes to generated Java
> files that make the jflex sources out of sync. This means that if somebody
> regenerates those files he or she has to apply the same changes manually
> again. For example:
> https://svn.apache.org/viewvc?view=revision&revision=r1625586
> I understand some of these would require changes in jflex but just wanted to
> raise the issue.
> Also, ant jflex currently doesn't work for me on trunk:
> {code}
> cd lucene/analysis/common
> ant jflex
> -jflex-StandardAnalyzer:
> [jflex] Generated: StandardTokenizerImpl.java
> [jflex] Generated: ClassicTokenizerImpl.java
> -jflex-UAX29URLEmailTokenizer:
> [jflex] Generated: UAX29URLEmailTokenizerImpl.java
> -jflex-wiki-tokenizer:
> [jflex] Generated: WikipediaTokenizerImpl.java
> generate-jflex-html-char-entities:
> [exec] File "htmlentity.py", line 22
> [exec] print get_apache_license()
> [exec] ^
> [exec] SyntaxError: invalid syntax
> BUILD FAILED
> C:\Work\lucene-solr-svn\trunk\lucene\analysis\common\build.xml:49: exec
> returned: 1
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]