Token Class Reference
#include <Token.hpp>
Inheritance diagram for Token:


Public Member Functions | |
| Token () | |
| Token (int t) | |
| Token (int t, const std::string &txt) | |
| virtual int | getColumn () const |
| virtual int | getLine () const |
| virtual std::string | getText () const |
| virtual int | getType () const |
| virtual void | setColumn (int c) |
| virtual void | setLine (int l) |
| virtual void | setText (const std::string &t) |
| virtual void | setType (int t) |
| virtual std::string | toString () const |
| virtual | ~Token () |
| Token () | |
| Token (int type, int position, int length, const QString &text) | |
| Token (const Token &source) | |
| Token & | operator= (const Token &source) |
| bool | operator== (const Token &token) const |
| operator int () const | |
| bool | isNull () const |
| int | type () const |
| void | setType (int type) |
| void | getStartPosition (int *line, int *column) const |
| void | setStartPosition (int line, int column) |
| void | getEndPosition (int *line, int *column) const |
| void | setEndPosition (int line, int column) |
| unsigned int | length () const |
| void | setLength (unsigned int length) |
| int | position () const |
| void | setPosition (int position) |
| QString | text () const |
Public Attributes | |
| int | type |
Static Public Attributes | |
| const int | MIN_USER_TYPE = 4 |
| const int | NULL_TREE_LOOKAHEAD = 3 |
| const int | INVALID_TYPE = 0 |
| const int | EOF_TYPE = 1 |
| const int | SKIP = -1 |
| RefToken | badToken = RefToken(new Token(Token::INVALID_TYPE, "<no text>")) |
Private Member Functions | |
| Token (const Token &) | |
| const Token & | operator= (const Token &) |
Private Attributes | |
| int | m_type |
| int | m_position |
| int | m_length |
| int | m_startLine |
| int | m_startColumn |
| int | m_endLine |
| int | m_endColumn |
| QString | m_text |
Friends | |
| class | Lexer |
| class | Parser |
Constructor & Destructor Documentation
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
Member Function Documentation
|
|
Reimplemented in CommonToken. |
|
||||||||||||
|
Definition at line 422 of file lexer.h. Referenced by Parser::parseDeclarationInternal(). |
|
|
Reimplemented in CommonToken. |
|
||||||||||||
|
Definition at line 416 of file lexer.h. Referenced by Lexer::getTokenPosition(), and Parser::parseDeclarationInternal(). |
|
|
Reimplemented in CommonToken. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 349 of file lexer.h. References m_endColumn, m_endLine, m_length, m_position, m_startColumn, m_startLine, m_text, and m_type. |
|
|
Definition at line 367 of file lexer.h. References m_endColumn, m_endLine, m_length, m_position, m_startColumn, m_startLine, m_text, and m_type. |
|
|
Definition at line 394 of file lexer.h. Referenced by Lexer::tokenPosition(). |
|
|
Reimplemented in CommonToken. |
|
||||||||||||
|
Definition at line 410 of file lexer.h. References m_endColumn, and m_endLine. Referenced by Lexer::nextToken(), Parser::parseDeclarationInternal(), and Lexer::tokenize(). |
|
|
Definition at line 438 of file lexer.h. References m_length. |
|
|
Reimplemented in CommonToken. |
|
|
Definition at line 428 of file lexer.h. References m_position. |
|
||||||||||||
|
Definition at line 404 of file lexer.h. References m_startColumn, and m_startLine. Referenced by Lexer::nextToken(), Parser::parseDeclarationInternal(), and Lexer::tokenize(). |
|
|
Reimplemented in CommonToken. Definition at line 61 of file Token.cpp. Referenced by Parser::parseDeclarationInternal(), and Token(). |
|
|
|
|
|
Definition at line 64 of file Token.cpp. References type. |
|
|
Definition at line 399 of file lexer.h. References m_length, m_position, and m_text. Referenced by Lexer::macroPrimary(), Lexer::nextToken(), Parser::parseOperator(), Parser::parseStringLiteral(), Parser::parseWinDeclSpec(), Lexer::processDefine(), Lexer::readArgument(), Parser::reportError(), Lexer::toInt(), and Parser::toString(). |
|
|
Reimplemented in CommonToken. |
|
|
|
Friends And Related Function Documentation
|
|
|
|
|
|
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
Definition at line 183 of file lexer.h. Referenced by operator=(), operator==(), and setEndPosition(). |
|
|
Definition at line 182 of file lexer.h. Referenced by operator=(), operator==(), and setEndPosition(). |
|
|
Definition at line 179 of file lexer.h. Referenced by isNull(), operator=(), operator==(), setLength(), and text(). |
|
|
Definition at line 178 of file lexer.h. Referenced by operator=(), operator==(), setPosition(), and text(). |
|
|
Definition at line 181 of file lexer.h. Referenced by operator=(), operator==(), and setStartPosition(). |
|
|
Definition at line 180 of file lexer.h. Referenced by operator=(), operator==(), and setStartPosition(). |
|
|
Definition at line 184 of file lexer.h. Referenced by operator=(), operator==(), and text(). |
|
|
Definition at line 177 of file lexer.h. Referenced by isNull(), operator=(), and operator==(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 384 of file lexer.h. Referenced by Lexer::macroPrimary(), Lexer::processDefine(), setType(), Lexer::toInt(), Token(), and Lexer::tokenize(). |
The documentation for this class was generated from the following files:
