diff --git a/src/main/java/org/sablecc/sablecc/lexer/Lexer.java b/src/main/java/org/sablecc/sablecc/lexer/Lexer.java index 69e7501c94e72129c46c8b315d0a2b5631f510c4..16c2a2307a3eb5f90ce26c354b9b032863a8b377 100644 --- a/src/main/java/org/sablecc/sablecc/lexer/Lexer.java +++ b/src/main/java/org/sablecc/sablecc/lexer/Lexer.java @@ -410,14 +410,14 @@ public class Lexer @Deprecated protected void unread(Token tok) throws IOException { - String text = tok.getText(); - int length = text.length(); + String tokenText = tok.getText(); + int length = tokenText.length(); for(int i = length - 1; i >= 0; i--) { this.eof = false; - this.in.unread(text.charAt(i)); + this.in.unread(tokenText.charAt(i)); } this.pos = tok.getPos() - 1; diff --git a/src/main/resources/org/sablecc/sablecc/lexer.txt b/src/main/resources/org/sablecc/sablecc/lexer.txt index 7ca66cac7888a8a30934891d406a8d5c06c38cfa..3d482aa2128f095867d0b63b84017978f2a00376 100644 --- a/src/main/resources/org/sablecc/sablecc/lexer.txt +++ b/src/main/resources/org/sablecc/sablecc/lexer.txt @@ -299,14 +299,14 @@ Macro:LexerBody @Deprecated protected void unread(Token tok) throws IOException { - String text = tok.getText(); - int length = text.length(); + String tokenText = tok.getText(); + int length = tokenText.length(); for(int i = length - 1; i >= 0; i--) { this.eof = false; - this.in.unread(text.charAt(i)); + this.in.unread(tokenText.charAt(i)); } this.pos = tok.getPos() - 1;