Skip to content

Commit 50e3dc3

Browse files
authored
Merge pull request #1107 from stanfordnlp/jflex
Jflex 1.8.2
2 parents 9a97826 + 0571edb commit 50e3dc3

24 files changed

+164324
-188262
lines changed

.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<classpathentry exported="true" kind="lib" path="lib/junit-4.13.1.jar" sourcepath="libsrc/junit-4.13.1-sources.jar"/>
1616
<classpathentry exported="true" kind="lib" path="lib/javax.servlet.jar" sourcepath="libsrc/tomcat/apache-tomcat-7.0.12-src.zip"/>
1717
<classpathentry exported="true" kind="lib" path="lib/AppleJavaExtensions.jar"/>
18-
<classpathentry exported="true" kind="lib" path="lib/jflex-1.6.1.jar" sourcepath="libsrc/jflex-1.6.1-src.zip"/>
18+
<classpathentry exported="true" kind="lib" path="lib/jflex-1.8.2.jar" sourcepath="libsrc/jflex-1.8.2-src.zip"/>
1919
<classpathentry exported="true" kind="lib" path="lib/xom-1.3.2.jar" sourcepath="libsrc/xom-1.3.2-sources.jar"/>
2020
<classpathentry exported="true" kind="lib" path="lib/joda-time.jar" sourcepath="libsrc/joda-time-2.10.5-sources.jar"/>
2121
<classpathentry exported="true" kind="lib" path="lib/jollyday-0.4.9.jar" sourcepath="libsrc/jollyday-0.4.9-sources.jar"/>

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
7979
<classpath>
80-
<pathelement location="${project.core}/lib/jflex-1.6.1.jar"/>
80+
<pathelement location="${project.core}/lib/jflex-full-1.8.2.jar"/>
8181
</classpath>
8282
</taskdef>
8383

lib/README

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,15 @@ LAST UPDATE: 2013-11-12
218218
LAST UPDATE BY: John Bauer
219219

220220
-----------------------------------------------------------------------
221-
jflex-1.6.1.jar
221+
jflex-full-1.8.2.jar
222222

223-
ORIGINAL JAR NAME: jflex-1.6.1.jar
223+
ORIGINAL JAR NAME: jflex-full-1.8.2.jar
224224

225-
VERSION: 1.6.1
225+
VERSION: 1.8.2
226226

227-
RELEASE DATE: 2015-03-16
227+
RELEASE DATE: 2020-05-03
228228

229-
SOURCE AVAILABLE: yes, jflex-1.6.1-src.zip
229+
SOURCE AVAILABLE: yes, jflex-1.8.2-src.zip
230230

231231
DESCRIPTION: compiles .flex files into .java
232232

@@ -235,9 +235,9 @@ URL: http://jflex.de/
235235
USED BY: Compiling PTBTokenizer, etc.
236236
Not needed by CoreNLP distributions
237237

238-
LAST UPDATE: 2017-05-06
238+
LAST UPDATE: 2020-11-04
239239

240-
LAST UPDATE BY: Chris Manning
240+
LAST UPDATE BY: John Bauer
241241

242242
-----------------------------------------------------------------------
243243
log4j-1.2.16.jar

lib/jflex-1.6.1.jar

-1 MB
Binary file not shown.

lib/jflex-full-1.8.2.jar

1.74 MB
Binary file not shown.

libsrc/jflex-1.6.1.zip

-2.96 MB
Binary file not shown.

libsrc/jflex-1.8.2.zip

2.56 MB
Binary file not shown.

src/edu/stanford/nlp/international/arabic/process/ArabicLexer.flex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,14 @@ import edu.stanford.nlp.util.PropertiesUtils;
289289
if (invertible) {
290290
String str = prevWordAfter.toString();
291291
prevWordAfter.setLength(0);
292-
CoreLabel word = (CoreLabel) tokenFactory.makeToken(txt, yychar, yylength());
292+
CoreLabel word = (CoreLabel) tokenFactory.makeToken(txt, Math.toIntExact(yychar), yylength());
293293
word.set(CoreAnnotations.OriginalTextAnnotation.class, originalText);
294294
word.set(CoreAnnotations.BeforeAnnotation.class, str);
295295
prevWord.set(CoreAnnotations.AfterAnnotation.class, str);
296296
prevWord = word;
297297
return word;
298298
} else {
299-
return tokenFactory.makeToken(txt, yychar, yylength());
299+
return tokenFactory.makeToken(txt, Math.toIntExact(yychar), yylength());
300300
}
301301
}
302302

src/edu/stanford/nlp/international/arabic/process/ArabicLexer.java

Lines changed: 717 additions & 769 deletions
Large diffs are not rendered by default.

src/edu/stanford/nlp/international/french/process/FrenchLexer.flex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ import edu.stanford.nlp.util.logging.Redwood;
253253

254254
private Object getNext(String txt, String originalText, String annotation) {
255255
txt = LexerUtils.removeSoftHyphens(txt);
256-
Label w = (Label) tokenFactory.makeToken(txt, yychar, yylength());
256+
Label w = (Label) tokenFactory.makeToken(txt, Math.toIntExact(yychar), yylength());
257257
if (invertible || annotation != null) {
258258
CoreLabel word = (CoreLabel) w;
259259
if (invertible) {

0 commit comments

Comments
 (0)