01: package antlr.ASdebug;
02:
03: /**
04: * Provides offset info for a token.<br>
05: * All offsets are 0-based.
06: * @author Prashant Deva
07: */
08: public class TokenOffsetInfo {
09: public final int beginOffset, length;
10:
11: public TokenOffsetInfo(int offset, int length) {
12: this .beginOffset = offset;
13: this .length = length;
14: }
15:
16: public int getEndOffset() {
17: return beginOffset + length - 1;
18: }
19: }
|