Scanner does not clean zzFin appropriately
The fast lexer generator for Java
Brought to you by:
lsf37,
steve_rowe
I think, there is a bug on the line 1207 of the Emitter.java
Instead of " println(" if ((zzAttrL[zzFState] & 1) == 1) { zzFinL[zzFPos] = true; } ");"
it should read " println(" zzFinL[zzFPos] = ((zzAttrL[zzFState] & 1) == 1;");"
Otherwise, zzFin buffer is not cleared correctly (it is reused, but in the current code elements are never reset to false. See the patch attached.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
patch
Is this related to http://sourceforge.net/p/jflex/bugs/110/ ?
I committed a fix in r723.
The patch for Emitter.java was a bit more involved though, since zzFin wasn't being fully updated with the original patch on this issue - here's what I committed:
I also added a new test case named genlook2 that failed without the above patch and succeeded with it.