110 explicit Lexer(
const llvm::MemoryBuffer *_buf);
Lexer - Interface for lexing tokens from a .kquery language file.
Token & SetTokenKind(Token &Result, Token::Kind k)
unsigned ColumnNumber
The current line.
unsigned LineNumber
The buffer end position.
const char * BufferEnd
The current lexer position.
int GetNextChar()
The current column.
Token & LexNumber(Token &Result)
LexNumber - Lex a number which does not have a base specifier.
Lexer(const llvm::MemoryBuffer *_buf)
Token & Lex(Token &Result)
Token & SetIdentifierTokenKind(Token &Result)
Token & LexIdentifier(Token &Result)
LexIdentifier - Lex an identifier.
const char * start
The token kind.
unsigned column
The line number of the start of this token.
unsigned line
The length of the token.
const char * getKindName() const
getKindName - The name of this token's kind.
unsigned length
The beginning of the token string.
bool isKeyword() const
isKeyword - True if this token is a keyword.
std::string getString() const
@ Number
[+-]?[0-9][a-zA-Z0-9_]+
@ Identifier
[a-zA-Z_][a-zA-Z0-9._]*
@ KWReserved
fp[0-9]+([.].*)?, i[0-9]+