Classes | |
union | content |
Public Types | |
enum | tokenType { UNDEFINED = 0, FLAG, PUNCTUATION, BOOL, INT64, FLOAT, DOUBLE, WORD, STRING, DIRECTIVE, VARIABLE, ERROR } |
enum | flagType { NO_FLAG = 0, ASCII = 1, BINARY = 2 } |
enum | punctuationToken : char { NULL_TOKEN = '\0', SPACE = ' ', TAB = '\t', NL = '\n', END_STATEMENT = ';', BEGIN_LIST = '(', END_LIST = ')', BEGIN_SQR = '[', END_SQR = ']', BEGIN_BLOCK = '{', END_BLOCK = '}', COLON = ':', COMMA = ',', DOLLAR = '$', SQUOTE = '\'', DQUOTE = '"', SUBTRACT = '-', DIVIDE = '/', BEGIN_STRING = DQUOTE, END_STRING = DQUOTE } |
Public Member Functions | |
constexpr | token () noexcept |
token (const token &t) | |
token (token &&t) | |
token (punctuationToken p, int32 lineNumber=0) | |
token (const label val, int32 lineNumber=0) | |
token (const uint32 val, int32 lineNumber=0) | |
token (const int64 val, int32 lineNumber=0) | |
token (const int32 val, int32 lineNumber=0) | |
token (const float val, int32 lineNumber=0) | |
token (const double val, int32 lineNumber=0) | |
token (const word &w, int32 lineNumber=0, bool isString=false) | |
token (word &&w, int32 lineNumber=0, bool isString=false) | |
token (iIstream &is) | |
~token () | |
word | name () const |
tokenType | type () const |
bool | setType (const tokenType tokType) |
int32 | lineNumber () const |
int32 & | lineNumber () |
bool | good () const |
bool | undefined () const |
bool | error () const |
bool | isBool () const |
bool | isFlag () const |
bool | isPunctuation () const |
bool | isSeparator () const |
bool | isEndStatement () const |
bool | isEndBlock () const |
bool | isInt64 () const |
bool | isInt32 () const |
bool | isFloat () const |
bool | isDouble () const |
bool | isReal () const |
bool | isNumber () const |
bool | isWord () const |
bool | isDirective () const |
bool | isString () const |
bool | isVariable () const |
bool | isStringType () const |
bool | boolToken () const |
int | flagToken () const |
punctuationToken | pToken () const |
int64 | int64Token () const |
int32 | int32Token () const |
float | floatToken () const |
double | doubleToken () const |
real | realToken () const |
real | number () const |
const word & | wordToken () const |
const word & | stringToken () const |
void | reset () |
void | setBad () |
void | swap (token &tok) |
void | operator= (const token &tok) |
void | operator= (token &&tok) |
void | operator= (const punctuationToken p) |
void | operator= (const int64 val) |
void | operator= (const int32 val) |
void | operator= (const float val) |
void | operator= (const double val) |
void | operator= (const word &w) |
void | operator= (word &&w) |
bool | operator== (const token &tok) const |
bool | operator== (const punctuationToken p) const |
bool | operator== (const int64 val) const |
bool | operator== (const int32 val) const |
bool | operator== (const float val) const |
bool | operator== (const double val) const |
bool | operator== (const word &w) const |
bool | operator!= (const token &tok) const |
bool | operator!= (const punctuationToken p) const |
bool | operator!= (const int64 val) const |
bool | operator!= (const int32 val) const |
bool | operator!= (const float val) const |
bool | operator!= (const double val) const |
bool | operator!= (const word &w) const |
iOstream & | printInfo (iOstream &os) const |
std::ostream & | printInfo (std::ostream &os) const |
void | operator= (word *)=delete |
Static Public Member Functions | |
static const token | undefinedToken () |
static token | endList () |
static token | beginList () |
static token | endStatement () |
static token | beginBlock () |
static token | endBlocK () |
static token | beginSquare () |
static token | endSquare () |
static token | space () |
static token | newLine () |
static token | boolean (bool on) |
static token | flag (int bitmask) |
static bool | isseparator (int c) |
Private Member Functions | |
void | setUndefined () |
void | parseError (const char *expected) const |
Private Attributes | |
content | data_ |
tokenType | type_ |
int32 | lineNumber_ |
Friends | |
iOstream & | operator<< (iOstream &os, const token &tok) |
iOstream & | operator<< (iOstream &os, const punctuationToken &pt) |
std::ostream & | operator<< (std::ostream &os, const token &tok) |
std::ostream & | operator<< (std::ostream &os, const punctuationToken &pt) |
enum tokenType |
Enumerator | |
---|---|
UNDEFINED | An undefined token-type. |
FLAG | stream flag (1-byte bitmask) |
PUNCTUATION | single character punctuation |
BOOL | boolean type |
INT64 | int64 (integer) type |
FLOAT | float (single-precision) type |
DOUBLE | double (double-precision) type |
WORD | A pFlow::word. |
STRING | A string whth double quuote. |
DIRECTIVE | A dictionary |
VARIABLE | A dictionary |
ERROR | A token error encountered. |
enum flagType |
enum punctuationToken : char |
Enumerator | |
---|---|
NULL_TOKEN | Nul character. |
SPACE | Space [isspace]. |
TAB | Tab [isspace]. |
NL | Newline [isspace]. |
END_STATEMENT | End entry [isseparator]. |
BEGIN_LIST | Begin list [isseparator]. |
END_LIST | End list [isseparator]. |
BEGIN_SQR | Begin dimensions [isseparator]. |
END_SQR | End dimensions [isseparator]. |
BEGIN_BLOCK | Begin block [isseparator]. |
END_BLOCK | End block [isseparator]. |
COLON | Colon [isseparator]. |
COMMA | Comma [isseparator]. |
DOLLAR | Dollar - start variable. |
SQUOTE | Single quote. |
DQUOTE | Double quote. |
SUBTRACT | Subtract or start of negative number. |
DIVIDE | Divide [isseparator]. |
BEGIN_STRING | Begin string with double quote. |
END_STRING | End string with double quote. |
|
inlineconstexprnoexcept |
Definition at line 89 of file tokenI.hpp.
Referenced by token::beginBlock(), token::beginList(), token::beginSquare(), token::endBlocK(), token::endList(), token::endSquare(), token::endStatement(), token::newLine(), and token::space().
Definition at line 97 of file tokenI.hpp.
References token::data_, token::content::stringPtr, token::type_, and token::content::wordPtr.
Definition at line 127 of file tokenI.hpp.
|
inlineexplicit |
Definition at line 138 of file tokenI.hpp.
References token::data_, and token::content::punctuationVal.
Definition at line 147 of file tokenI.hpp.
References token::data_, and token::content::int64Val.
Definition at line 156 of file tokenI.hpp.
References token::data_, and token::content::int64Val.
Definition at line 165 of file tokenI.hpp.
References token::data_, and token::content::int64Val.
Definition at line 174 of file tokenI.hpp.
References token::data_, and token::content::int64Val.
Definition at line 183 of file tokenI.hpp.
References token::data_, and token::content::floatVal.
Definition at line 193 of file tokenI.hpp.
References token::data_, and token::content::doubleVal.
Definition at line 203 of file tokenI.hpp.
References token::data_, token::isString(), token::content::stringPtr, token::type_, and token::content::wordPtr.
Definition at line 220 of file tokenI.hpp.
References token::data_, token::isString(), token::content::stringPtr, token::type_, and token::content::wordPtr.
Definition at line 100 of file tokenIO.cpp.
References iIstream::read().
|
inline |
Definition at line 237 of file tokenI.hpp.
|
inlinestatic |
|
inlinestatic |
Definition at line 111 of file token.hpp.
References token::token().
Referenced by pFlow::endListToken().
|
inlinestatic |
Definition at line 116 of file token.hpp.
References token::token().
Referenced by pFlow::beginListToken().
|
inlinestatic |
Definition at line 121 of file token.hpp.
References token::token().
Referenced by pFlow::endStatementToken().
|
inlinestatic |
Definition at line 126 of file token.hpp.
References token::token().
Referenced by pFlow::beginBlockToken().
|
inlinestatic |
Definition at line 131 of file token.hpp.
References token::token().
Referenced by pFlow::endBlocKToken().
|
inlinestatic |
Definition at line 136 of file token.hpp.
References token::token().
|
inlinestatic |
Definition at line 141 of file token.hpp.
References token::token().
|
inlinestatic |
Definition at line 146 of file token.hpp.
References token::token().
Referenced by pFlow::spaceToken().
|
inlinestatic |
Definition at line 151 of file token.hpp.
References token::token().
Referenced by pFlow::newLineToken().
|
inlineprivate |
Definition at line 79 of file tokenI.hpp.
|
private |
Definition at line 30 of file token.cpp.
References pFlow::endl(), and fatalError.
|
inlinestatic |
Definition at line 28 of file tokenI.hpp.
References token::data_, token::content::int64Val, and token::type_.
|
inlinestatic |
Definition at line 38 of file tokenI.hpp.
References token::data_, token::content::flagVal, and token::type_.
|
inlinestatic |
Definition at line 48 of file tokenI.hpp.
References token::BEGIN_BLOCK, token::BEGIN_LIST, token::BEGIN_SQR, token::COLON, token::COMMA, token::DIVIDE, token::END_BLOCK, token::END_LIST, token::END_SQR, and token::END_STATEMENT.
pFlow::word name | ( | ) | const |
Definition at line 110 of file tokenIO.cpp.
|
inline |
Definition at line 284 of file tokenI.hpp.
Referenced by pFlow::printTokenInfo(), and Ostream::write().
|
inline |
Definition at line 290 of file tokenI.hpp.
Referenced by Istream::read().
|
inline |
Definition at line 360 of file tokenI.hpp.
Referenced by pFlow::printTokenInfo(), iTstream::read(), and Istream::read().
|
inline |
|
inline |
Definition at line 372 of file tokenI.hpp.
Referenced by pFlow::badInput(), iEntry< Key, T * >::createEntry(), iIstream::findKeywordAndVal(), iIstream::nextData(), pFlow::operator>>(), Logical::read(), dataEntry::readDataEntry(), iEntry< Key, T * >::readKeyword(), and oTstream::write().
|
inline |
Definition at line 378 of file tokenI.hpp.
|
inline |
Definition at line 384 of file tokenI.hpp.
Referenced by iIstream::findToken(), iIstream::findTokenAndNext(), iIstream::findTokenAndNextSilent(), iIstream::findTokenSilent(), and iIstream::nextData().
|
inline |
Definition at line 390 of file tokenI.hpp.
|
inline |
Definition at line 408 of file tokenI.hpp.
|
inline |
Definition at line 426 of file tokenI.hpp.
Referenced by dataEntry::readDataEntry(), List< word >::readList(), and Vector< word, vecAllocator< word > >::readVector().
|
inline |
Definition at line 464 of file tokenI.hpp.
|
inline |
Definition at line 431 of file tokenI.hpp.
Referenced by iIstream::findKeywordAndVal(), iIstream::findToken(), iIstream::findTokenAndNext(), iIstream::findTokenAndNextSilent(), iIstream::findTokenSilent(), iIstream::nextData(), and iIstream::readEndStatement().
|
inline |
Definition at line 442 of file tokenI.hpp.
Referenced by iIstream::findToken(), and iIstream::findTokenSilent().
|
inline |
Definition at line 474 of file tokenI.hpp.
|
inline |
Definition at line 479 of file tokenI.hpp.
|
inline |
Definition at line 500 of file tokenI.hpp.
|
inline |
Definition at line 518 of file tokenI.hpp.
|
inline |
Definition at line 536 of file tokenI.hpp.
|
inline |
Definition at line 562 of file tokenI.hpp.
Referenced by pFlow::checkNumberToken(), and pFlow::operator>>().
|
inline |
Definition at line 584 of file tokenI.hpp.
Referenced by pFlow::checkWordToken(), iIstream::findToken(), iIstream::findTokenAndNext(), iIstream::findTokenAndNextSilent(), iIstream::findTokenSilent(), iIstream::nextData(), pFlow::operator>>(), Logical::read(), and iEntry< Key, T * >::readKeyword().
|
inline |
Definition at line 594 of file tokenI.hpp.
|
inline |
Definition at line 615 of file tokenI.hpp.
Referenced by pFlow::operator>>(), Logical::read(), and token::token().
|
inline |
Definition at line 648 of file tokenI.hpp.
|
inline |
Definition at line 653 of file tokenI.hpp.
|
inline |
Definition at line 396 of file tokenI.hpp.
|
inline |
Definition at line 414 of file tokenI.hpp.
|
inline |
Definition at line 452 of file tokenI.hpp.
Referenced by pFlow::operator<<(), pFlow::printTokenInfo(), iIstream::readBeginList(), dataEntry::readDataEntry(), iIstream::readEndList(), and iIstream::readEndStatement().
|
inline |
Definition at line 484 of file tokenI.hpp.
Referenced by pFlow::operator<<(), and pFlow::printTokenInfo().
|
inline |
Definition at line 495 of file tokenI.hpp.
|
inline |
Definition at line 506 of file tokenI.hpp.
Referenced by pFlow::operator<<(), and pFlow::printTokenInfo().
|
inline |
Definition at line 524 of file tokenI.hpp.
Referenced by pFlow::operator<<(), and pFlow::printTokenInfo().
|
inline |
Definition at line 546 of file tokenI.hpp.
|
inline |
Definition at line 568 of file tokenI.hpp.
Referenced by pFlow::checkNumberToken(), and pFlow::operator>>().
|
inline |
Definition at line 600 of file tokenI.hpp.
References pFlow::nullWord.
Referenced by pFlow::checkWordToken(), iIstream::findToken(), iIstream::findTokenAndNext(), iIstream::findTokenAndNextSilent(), iIstream::findTokenSilent(), iIstream::nextData(), pFlow::operator<<(), pFlow::operator>>(), pFlow::printTokenInfo(), Logical::read(), iEntry< Key, T * >::readKeyword(), and Ostream::write().
|
inline |
Definition at line 624 of file tokenI.hpp.
References pFlow::nullWord.
Referenced by pFlow::operator<<(), pFlow::operator>>(), pFlow::printTokenInfo(), and Logical::read().
|
inline |
Definition at line 245 of file tokenI.hpp.
Referenced by pFlow::operator>>(), iIstream::peekBack(), iTstream::read(), and iIstream::resetPutBack().
|
inline |
Definition at line 658 of file tokenI.hpp.
Referenced by Istream::read(), and Istream::readWordToken().
|
inline |
Definition at line 271 of file tokenI.hpp.
References token::data_, token::lineNumber_, and token::type_.
|
inline |
Definition at line 667 of file tokenI.hpp.
References token::data_, token::lineNumber_, token::content::stringPtr, token::type_, and token::content::wordPtr.
|
inline |
Definition at line 705 of file tokenI.hpp.
|
inline |
Definition at line 718 of file tokenI.hpp.
|
inline |
Definition at line 726 of file tokenI.hpp.
|
inline |
Definition at line 733 of file tokenI.hpp.
|
inline |
Definition at line 741 of file tokenI.hpp.
|
inline |
Definition at line 749 of file tokenI.hpp.
|
inline |
Definition at line 757 of file tokenI.hpp.
|
inline |
Definition at line 765 of file tokenI.hpp.
|
inline |
Definition at line 773 of file tokenI.hpp.
References token::data_, token::content::doubleVal, pFlow::equal(), token::content::flagVal, token::content::floatVal, token::content::int64Val, token::content::punctuationVal, token::content::stringPtr, token::type_, and token::content::wordPtr.
|
inline |
Definition at line 819 of file tokenI.hpp.
|
inline |
Definition at line 825 of file tokenI.hpp.
|
inline |
Definition at line 834 of file tokenI.hpp.
|
inline |
Definition at line 844 of file tokenI.hpp.
References pFlow::equal().
|
inline |
Definition at line 854 of file tokenI.hpp.
References pFlow::equal().
|
inline |
Definition at line 863 of file tokenI.hpp.
|
inline |
Definition at line 872 of file tokenI.hpp.
References operator==().
|
inline |
Definition at line 878 of file tokenI.hpp.
References operator==().
|
inline |
Definition at line 884 of file tokenI.hpp.
References operator==().
|
inline |
Definition at line 889 of file tokenI.hpp.
References operator==().
|
inline |
Definition at line 895 of file tokenI.hpp.
References operator==().
|
inline |
Definition at line 901 of file tokenI.hpp.
References operator==().
|
inline |
Definition at line 907 of file tokenI.hpp.
References operator==().
pFlow::iOstream & printInfo | ( | iOstream & | os | ) | const |
Definition at line 224 of file tokenIO.cpp.
References pFlow::printTokenInfo().
std::ostream & printInfo | ( | std::ostream & | os | ) | const |
Definition at line 229 of file tokenIO.cpp.
References pFlow::printTokenInfo().
|
delete |
|
friend |
|
friend |
|
friend |
|
private |
Definition at line 179 of file token.hpp.
Referenced by token::boolean(), token::flag(), token::operator=(), token::operator==(), token::swap(), and token::token().
|
private |
Definition at line 182 of file token.hpp.
Referenced by token::boolean(), token::flag(), pFlow::operator<<(), token::operator=(), token::operator==(), token::swap(), and token::token().
|
private |
Definition at line 185 of file token.hpp.
Referenced by token::operator=(), and token::swap().