diff options
author | gjoranv <gjoranv@gmail.com> | 2018-08-28 10:39:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 10:39:23 +0200 |
commit | f65816fe02f63a3fabacd96b28960446df587848 (patch) | |
tree | 48729122f3deb8d8662d86dc94dd673fabcbc366 /vespajlib | |
parent | dfb3d41713fb28ad4aaf19487db1cefb4e00a099 (diff) | |
parent | e6264beb644bfc534b1ea0f0945b6eb0c3cc1a16 (diff) |
Merge pull request #6679 from vespa-engine/gjoranv/javacc-plugin
Gjoranv/javacc plugin
Diffstat (limited to 'vespajlib')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java b/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java index 4084115eb8f..57376734030 100644 --- a/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java +++ b/vespajlib/src/main/java/com/yahoo/javacc/FastCharStream.java @@ -14,6 +14,8 @@ public class FastCharStream { private final char[] inputArr; private int tokenPos = 0; private int readPos = 0; + private int tabSize = 1; + private boolean trackLineColumn = true; public FastCharStream(String input) { this.inputStr = input; @@ -27,16 +29,6 @@ public class FastCharStream { return inputArr[readPos++]; } - @Deprecated - public int getColumn() { - return getEndColumn(); - } - - @Deprecated - public int getLine() { - return getEndLine(); - } - public int getEndColumn() { return readPos + 1; } @@ -75,6 +67,14 @@ public class FastCharStream { } + public void setTabSize(int i) { tabSize = i; } + + public int getTabSize() { return tabSize; } + + public void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } + + public boolean getTrackLineColumn() { return trackLineColumn; } + public String formatException(String parseException) { int errPos = findErrPos(parseException); if (errPos < 0 || errPos > inputArr.length + 1) { |