antlr.IToken CreateToken(antlr.IToken prototype, int newTokenType, string newTokenText) { return(new BooToken(newTokenType, newTokenText, prototype.getFilename(), prototype.getLine(), prototype.getColumn() + SafeGetLength(prototype.getText()))); }
antlr.IToken BufferUntilNextNonWhiteSpaceToken() { antlr.IToken token = null; while (true) { token = _istream.nextToken(); int ttype = token.Type; if (antlr.Token.SKIP == ttype) { continue; } if (_wsTokenType == ttype) { _buffer.Append(token.getText()); continue; } break; } return(token); }
public static int ParseInt(antlr.IToken token) { return((int)ParseIntegerLiteralExpression(token, token.getText(), false).Value); }