![]() |
|
Public Types | |
enum | tokenType { UNDEFINED, PUNCTUATION, WORD, STRING, LABEL, FLOAT_SCALAR, DOUBLE_SCALAR, COMPOUND, ERROR } |
Enumeration defining the types of token. More... | |
enum | punctuationToken { NULL_TOKEN = '\0', SPACE = ' ', TAB = '\t', NL = '\n', END_STATEMENT = ';', BEGIN_LIST = '(', END_LIST = ')', BEGIN_SQR = '[', END_SQR = ']', BEGIN_BLOCK = '{', END_BLOCK = '}', COLON = ':', COMMA = ',', BEGIN_STRING = '"', END_STRING = '"', ASSIGN = '=', ADD = '+', SUBTRACT = '-', MULTIPLY = '*', DIVIDE = '/' } |
Standard punctuation tokens. More... | |
Public Member Functions | |
token () | |
Construct null. | |
token (const token &) | |
Construct as copy. | |
token (punctuationToken p, label lineNumber=0) | |
Construct punctuation character token. | |
token (const word &w, label lineNumber=0) | |
Construct word token. | |
token (const string &s, label lineNumber=0) | |
Construct string token. | |
token (const label, label lineNumber=0) | |
Construct label token. | |
token (const floatScalar s, label lineNumber=0) | |
Construct floatScalar token. | |
token (const doubleScalar s, label lineNumber=0) | |
Construct doubleScalar token. | |
token (Istream &) | |
Construct from Istream. | |
~token () | |
tokenType | type () const |
bool | good () const |
bool | undefined () const |
bool | error () const |
bool | isPunctuation () const |
punctuationToken | pToken () const |
bool | isWord () const |
const word & | wordToken () const |
bool | isString () const |
const string & | stringToken () const |
bool | isLabel () const |
label | labelToken () const |
bool | isFloatScalar () const |
floatScalar | floatScalarToken () const |
bool | isDoubleScalar () const |
doubleScalar | doubleScalarToken () const |
bool | isScalar () const |
scalar | scalarToken () const |
bool | isNumber () const |
scalar | number () const |
bool | isCompound () const |
const compound & | compoundToken () const |
compound & | transferCompoundToken () |
label | lineNumber () const |
label & | lineNumber () |
void | setBad () |
Set bad. | |
InfoProxy< token > | info () const |
Return info proxy. | |
void | operator= (const token &) |
void | operator= (const punctuationToken) |
void | operator= (word *) |
void | operator= (const word &) |
void | operator= (string *) |
void | operator= (const string &) |
void | operator= (const label) |
void | operator= (const floatScalar) |
void | operator= (const doubleScalar) |
void | operator= (compound *) |
bool | operator== (const token &) const |
bool | operator== (const punctuationToken) const |
bool | operator== (const word &) const |
bool | operator== (const string &) const |
bool | operator== (const label) const |
bool | operator== (const floatScalar) const |
bool | operator== (const doubleScalar) const |
bool | operator!= (const token &) const |
bool | operator!= (const punctuationToken) const |
bool | operator!= (const word &) const |
bool | operator!= (const string &) const |
bool | operator!= (const label) const |
bool | operator!= (const floatScalar) const |
bool | operator!= (const doubleScalar) const |
Static Public Attributes | |
token | undefinedToken |
Static undefined token. | |
Friends | |
Istream & | operator>> (Istream &, token &) |
Ostream & | operator<< (Ostream &, const token &) |
Ostream & | operator<< (Ostream &, const punctuationToken &) |
ostream & | operator<< (ostream &, const punctuationToken &) |
ostream & | operator<< (ostream &, const InfoProxy< token > &) |
|
Standard punctuation tokens.
|
|
Enumeration defining the types of token.
|
|
Construct null.
|
|
Construct as copy.
Definition at line 78 of file tokenI.H. References token::COMPOUND, token::compoundTokenPtr_, token::DOUBLE_SCALAR, token::doubleScalarToken_, token::FLOAT_SCALAR, token::floatScalarToken_, token::LABEL, token::labelToken_, token::PUNCTUATION, token::punctuationToken_, token::STRING, token::stringTokenPtr_, token::WORD, and token::wordTokenPtr_. |
|
Construct punctuation character token.
|
|
Construct word token.
|
|
Construct string token.
|
|
Construct label token.
|
|
Construct floatScalar token.
|
|
Construct doubleScalar token.
|
|
Construct from Istream.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Return info proxy. Used to print token information to a stream |
|
|
|
Definition at line 293 of file tokenI.H. References Foam::doubleScalar. |
|
Definition at line 274 of file tokenI.H. References Foam::floatScalar. |
|
Definition at line 256 of file tokenI.H. References Foam::label. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 375 of file tokenI.H. References Foam::label. |
|
|
|
Definition at line 596 of file tokenI.H. References token::operator==(). |
Here is the call graph for this function:
|
Definition at line 591 of file tokenI.H. References token::operator==(). |
Here is the call graph for this function:
|
|
|
Definition at line 586 of file tokenI.H. References token::operator==(). |
Here is the call graph for this function:
|
Definition at line 581 of file tokenI.H. References token::operator==(). |
Here is the call graph for this function:
|
Definition at line 576 of file tokenI.H. References token::operator==(). |
Here is the call graph for this function:
|
Definition at line 571 of file tokenI.H. References token::operator==(), and p. |
Here is the call graph for this function:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 395 of file tokenI.H. References token::COMPOUND, token::compoundTokenPtr_, token::DOUBLE_SCALAR, token::doubleScalarToken_, token::FLOAT_SCALAR, token::floatScalarToken_, token::LABEL, token::labelToken_, token::PUNCTUATION, token::punctuationToken_, token::STRING, token::stringTokenPtr_, token::WORD, and token::wordTokenPtr_. |
|
Definition at line 566 of file tokenI.H. References token::operator==(). |
Here is the call graph for this function:
|
Definition at line 561 of file tokenI.H. References token::DOUBLE_SCALAR, and Foam::equal(). |
Here is the call graph for this function:
|
Definition at line 556 of file tokenI.H. References Foam::equal(), and token::FLOAT_SCALAR. |
Here is the call graph for this function:
|
Definition at line 551 of file tokenI.H. References token::LABEL. |
|
Definition at line 546 of file tokenI.H. References token::STRING, and token::stringToken(). |
Here is the call graph for this function:
|
Definition at line 541 of file tokenI.H. References token::WORD, and token::wordToken(). |
Here is the call graph for this function:
|
Definition at line 501 of file tokenI.H. Referenced by token::operator!=(), and token::operator==(). |
|
|
|
|
|
Set bad.
Definition at line 386 of file tokenI.H. References token::type_. |
|
Definition at line 243 of file tokenI.H. Referenced by token::operator==(). |
|
|
|
Definition at line 182 of file tokenI.H. References token::ERROR. |
|
|
|
Definition at line 225 of file tokenI.H. Referenced by token::operator==(). |
|
|
|
|
|
|
|
|
|
|
|
Static undefined token.
|