#include <token.h>
Collaboration diagram for Lex:
Public Methods | |
Lex (Program *) | |
int | GetToken (Token &) |
int | LookAhead (int) |
int | LookAhead (int, Token &) |
char * | Save () |
void | Restore (char *) |
void | GetOnlyClosingBracket (Token &) |
Ptree * | GetComments () |
Ptree * | GetComments2 () |
uint | LineNumber (char *, char *&, int &) |
Static Public Methods | |
bool | RecordKeyword (char *, int) |
bool | Reify (Ptree *, unsigned int &) |
bool | Reify (Ptree *t, char *&) |
Private Methods | |
uint | Tokenp () |
int | TokenLen () |
char * | TokenPosition () |
char | Ref (uint i) |
void | Rewind (char *) |
int | ReadToken (char *&, int &) |
void | SkipAttributeToken () |
int | SkipExtensionToken (char *&, int &) |
char | GetNextNonWhiteChar () |
int | ReadLine () |
bool | ReadCharConst (uint top) |
bool | ReadStrConst (uint top) |
int | ReadNumber (char c, uint top) |
int | ReadFloat (uint top) |
bool | ReadLineDirective () |
int | ReadIdentifier (uint top) |
int | Screening (char *identifier, int len) |
int | ReadSeparator (char c, uint top) |
int | SingleCharOp (unsigned char c) |
int | ReadComment (char c, uint top) |
Private Attributes | |
Program * | file |
TokenFifo | fifo |
uint | tokenp |
int | token_len |
int | last_token |
Static Private Attributes | |
HashTable * | user_keywords = 0 |
Ptree * | comments = 0 |
Friends | |
class | TokenFifo |
|
Definition at line 73 of file token.cc. References file, InitializeOtherKeywords(), last_token, Program::Rewind(), token_len, and tokenp. |
|
Definition at line 1029 of file token.cc. References comments. Referenced by Parser::rClassBody(), Parser::rClassSpec(), Parser::rCompoundStatement(), and Parser::rDefinition(). |
|
Definition at line 1035 of file token.cc. References comments. Referenced by Parser::rClassMember(), and Parser::rDefinition(). |
|
Definition at line 510 of file token.cc. References file, Program::Get(), is_blank, and Program::Unget(). Referenced by ReadLine(). |
|
Definition at line 104 of file token.cc. References Token::ptr, and Restore(). Referenced by Parser::rTemplateArgs(). |
|
|
Definition at line 109 of file token.cc. References file, Program::LineNumber(), and uint. Referenced by Parser::LineNumber(). |
|
Definition at line 125 of file token.cc. References fifo, Token::kind, Token::len, Lex::TokenFifo::Peek(), and Token::ptr. |
|
|
Definition at line 586 of file token.cc. References FALSE, file, Program::Get(), Program::GetCurPos(), token_len, TRUE, and uint. Referenced by ReadLine(). |
|
Definition at line 1002 of file token.cc. References comments, file, Program::Get(), Program::GetCurPos(), Ignore, Program::Read(), Ptree::Snoc(), token_len, uint, and Program::Unget(). Referenced by ReadSeparator(). |
|
Definition at line 679 of file token.cc. References Constant, file, Program::Get(), Program::GetCurPos(), is_digit(), is_eletter(), is_float_suffix(), Program::Rewind(), token, token_len, uint, and Program::Unget(). Referenced by ReadLine(), and ReadNumber(). |
|
Definition at line 732 of file token.cc. References file, Program::Get(), Program::GetCurPos(), is_digit(), is_letter(), Program::Read(), Screening(), token_len, uint, and Program::Unget(). Referenced by ReadLine(). |
|
Definition at line 532 of file token.cc. References CharConst, file, Program::Get(), Program::GetCurPos(), GetNextNonWhiteChar(), is_digit(), is_letter(), last_token, ReadCharConst(), ReadFloat(), ReadIdentifier(), ReadLineDirective(), ReadNumber(), ReadSeparator(), ReadStrConst(), Program::Rewind(), SingleCharOp(), StringL, token, token_len, tokenp, uint, and Program::Unget(). Referenced by ReadToken(). |
|
Definition at line 722 of file token.cc. References file, Program::Get(), and TRUE. Referenced by ReadLine(). |
|
Definition at line 644 of file token.cc. References Constant, file, Program::Get(), Program::GetCurPos(), is_digit(), is_eletter(), is_hexdigit(), is_int_suffix(), is_xletter(), ReadFloat(), token, token_len, uint, and Program::Unget(). Referenced by ReadLine(). |
|
Definition at line 899 of file token.cc. References ArrowOp, AssignOp, BadToken, Ellipsis, EqualOp, file, Program::Get(), IncOp, LogAndOp, LogOrOp, PmOp, ReadComment(), RelOp, Scope, ShiftOp, SingleCharOp(), token, token_len, uint, and Program::Unget(). Referenced by ReadLine(). |
|
Definition at line 611 of file token.cc. References FALSE, file, Program::Get(), Program::GetCurPos(), is_blank, Program::Rewind(), token_len, TRUE, and uint. Referenced by ReadLine(). |
|
Definition at line 331 of file token.cc. References ASM, ATTRIBUTE, DECLSPEC, EXTENSION, Ignore, last_token, ReadLine(), SkipAttributeToken(), SkipExtensionToken(), TokenLen(), and TokenPosition(). Referenced by Lex::TokenFifo::Peek2(), and Lex::TokenFifo::Pop(). |
|
Definition at line 146 of file token.cc. References HashTable::AddEntry(), FALSE, HashValue, HashTable::Peek(), token, TRUE, and user_keywords. Referenced by InitializeOtherKeywords(), Class::RegisterMetaclass(), Class::RegisterNewAccessSpecifier(), Class::RegisterNewClosureStatement(), Class::RegisterNewForStatement(), Class::RegisterNewMemberModifier(), Class::RegisterNewModifier(), and Class::RegisterNewWhileStatement(). |
|
Definition at line 136 of file token.cc. References file, Program::Ref(), and uint. |
|
Definition at line 210 of file token.cc. References FALSE, Ptree::GetLength(), Ptree::GetPosition(), Ptree::IsLeaf(), and TRUE. |
|
Definition at line 166 of file token.cc. References FALSE, Ptree::GetLength(), Ptree::GetPosition(), is_digit(), is_int_suffix(), is_xletter(), Ptree::IsLeaf(), and TRUE. Referenced by Ptree::Reify(). |
|
Definition at line 93 of file token.cc. References Lex::TokenFifo::Clear(), fifo, last_token, Rewind(), token_len, and tokenp. Referenced by GetOnlyClosingBracket(), Parser::rAllocateType(), Parser::rArgDeclListOrInit(), Parser::rCastExpr(), Parser::rClassMember(), Parser::rExprStatement(), Parser::rSizeofExpr(), and Parser::rTemplateArgs(). |
|
Definition at line 141 of file token.cc. References file, Program::Read(), and Program::Rewind(). Referenced by Restore(). |
|
Definition at line 84 of file token.cc. References fifo, and Lex::TokenFifo::Peek(). Referenced by Parser::rAllocateType(), Parser::rArgDeclListOrInit(), Parser::rCastExpr(), Parser::rClassMember(), Parser::rExprStatement(), Parser::rSizeofExpr(), and Parser::rTemplateArgs(). |
|
Definition at line 870 of file token.cc. References HashValue, Identifier, HashTable::Lookup(), rw_table::name, table, token, user_keywords, and rw_table::value. Referenced by ReadIdentifier(). |
|
Definition at line 987 of file token.cc. References BadToken, and token. Referenced by ReadLine(), and ReadSeparator(). |
|
Definition at line 377 of file token.cc. References file, and Program::Get(). Referenced by ReadToken(). |
|
Definition at line 399 of file token.cc. References file, Program::Get(), Identifier, Ignore, is_blank, TokenLen(), TokenPosition(), and Program::Unget(). Referenced by ReadToken(). |
|
Definition at line 105 of file token.h. References token_len. Referenced by ReadToken(), and SkipExtensionToken(). |
|
Definition at line 104 of file token.h. Referenced by TokenPosition(). |
|
Definition at line 131 of file token.cc. References file, Program::Read(), and Tokenp(). Referenced by ReadToken(), and SkipExtensionToken(). |
|
|
|
Definition at line 71 of file token.cc. Referenced by GetComments(), GetComments2(), and ReadComment(). |
|
Definition at line 134 of file token.h. Referenced by GetToken(), LookAhead(), Restore(), and Save(). |
|
Definition at line 133 of file token.h. Referenced by GetNextNonWhiteChar(), Lex(), LineNumber(), ReadCharConst(), ReadComment(), ReadFloat(), ReadIdentifier(), ReadLine(), ReadLineDirective(), ReadNumber(), ReadSeparator(), ReadStrConst(), Ref(), Rewind(), SkipAttributeToken(), SkipExtensionToken(), and TokenPosition(). |
|
Definition at line 137 of file token.h. Referenced by Lex(), ReadLine(), ReadToken(), and Restore(). |
|
Definition at line 136 of file token.h. Referenced by Lex(), ReadCharConst(), ReadComment(), ReadFloat(), ReadIdentifier(), ReadLine(), ReadNumber(), ReadSeparator(), ReadStrConst(), Restore(), and TokenLen(). |
|
|
|
Definition at line 70 of file token.cc. Referenced by RecordKeyword(), and Screening(). |