Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated array style #1111

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jflex/src/main/resources/jflex/skeleton.default
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Error messages for {@link #ZZ_UNKNOWN_ERROR}, {@link #ZZ_NO_MATCH}, and
* {@link #ZZ_PUSHBACK_2BIG} respectively.
*/
private static final String ZZ_ERROR_MSG[] = {
private static final String[] ZZ_ERROR_MSG = {
"Unknown internal scanner error",
"Error: could not match input",
"Error: pushback value was too large"
Expand All @@ -39,7 +39,7 @@
* This buffer contains the current text to be matched and is the source of the {@link #yytext()}
* string.
*/
private char zzBuffer[] = new char[Math.min(ZZ_BUFFERSIZE, zzMaxBufferLen())];
private char[] zzBuffer = new char[Math.min(ZZ_BUFFERSIZE, zzMaxBufferLen())];

/** Text position at the last accepting state. */
private int zzMarkedPos;
Expand Down Expand Up @@ -97,7 +97,7 @@
/* is the buffer big enough? */
if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate && zzCanGrow()) {
/* if not, and it can grow: blow it up */
char newBuffer[] = new char[Math.min(zzBuffer.length * 2, zzMaxBufferLen())];
char[] newBuffer = new char[Math.min(zzBuffer.length * 2, zzMaxBufferLen())];
System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
zzBuffer = newBuffer;
zzEndRead += zzFinalHighSurrogate;
Expand Down
Loading