A token holds items read from Istream. More...
Classes | |
class | compound |
Abstract base class for complex tokens. More... | |
class | Compound |
A templated class for holding compound tokens. More... | |
Public Types | |
enum | tokenType : char { UNDEFINED = 0, PUNCTUATION = char(128), WORD, FUNCTIONNAME, VARIABLE, STRING, VERBATIMSTRING, LABEL, FLOAT_SCALAR, DOUBLE_SCALAR, LONG_DOUBLE_SCALAR, COMPOUND, ERROR } |
Enumeration defining the types of token. More... | |
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 = ',', HASH = '#', BEGIN_STRING = '"', END_STRING = BEGIN_STRING, ASSIGN = '=', ADD = '+', SUBTRACT = '-', MULTIPLY = '*', DIVIDE = '/' } |
Standard punctuation tokens. More... | |
Static Public Attributes | |
static token | undefinedToken |
Static undefined token. More... | |
static const char *const | typeName = "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 > &) |
A token holds items read from Istream.
enum tokenType : char |
enum punctuationToken : char |
Copy constructor.
Definition at line 81 of file tokenI.H.
References token::COMPOUND, token::compoundTokenPtr_, token::DOUBLE_SCALAR, token::doubleScalarToken_, token::ERROR, token::FLOAT_SCALAR, token::floatScalarToken_, token::FUNCTIONNAME, token::functionNameTokenPtr_, token::LABEL, token::labelToken_, token::LONG_DOUBLE_SCALAR, token::longDoubleScalarTokenPtr_, token::PUNCTUATION, token::punctuationToken_, token::STRING, token::stringTokenPtr_, token::UNDEFINED, token::VARIABLE, token::variableTokenPtr_, token::VERBATIMSTRING, token::verbatimStringTokenPtr_, token::WORD, and token::wordTokenPtr_.
|
inline |
|
inline |
Construct verbatimString token.
|
inline |
|
inline |
|
inline |
Construct from Istream.
Definition at line 34 of file tokenIO.C.
References Istream::read().
|
inline |
Definition at line 218 of file tokenI.H.
Referenced by token::compound::compound(), and Foam::operator<<().
|
inline |
|
inline |
Definition at line 228 of file tokenI.H.
References token::ERROR, and token::UNDEFINED.
Referenced by dimensionSet::dimensionSet(), Foam::operator>>(), and primitiveEntry::read().
|
inline |
Definition at line 233 of file tokenI.H.
References token::UNDEFINED.
Definition at line 238 of file tokenI.H.
References token::ERROR.
|
inline |
Definition at line 243 of file tokenI.H.
References token::PUNCTUATION.
Referenced by blockDescriptor::blockDescriptor(), dictionaryListEntry::dictionaryListEntry(), dimensionSet::dimensionSet(), FixedList< Type, 3 >::FixedList(), genericFvPatchField< Type >::genericFvPatchField(), List< Field< scalar > >::List(), LList< Foam::chemPointISAT *>::LList(), blockVertex::New(), entry::New(), Foam::operator>>(), ListHashTable< T, Key, Hash >::printInfo(), Foam::blockMeshTools::read(), PtrList< transferModel >::read(), PackedList< 2 >::read(), IOPosition< CloudType >::readData(), functionEntry::readFuncNameArgs(), specieCoeffs::setLRhs(), and Foam::writeEntry().
|
inline |
Definition at line 248 of file tokenI.H.
References token::NULL_TOKEN, token::PUNCTUATION, and token::punctuationToken_.
Referenced by blockDescriptor::blockDescriptor(), dictionaryListEntry::dictionaryListEntry(), dimensionSet::dimensionSet(), List< Field< scalar > >::List(), LList< Foam::chemPointISAT *>::LList(), blockVertex::New(), entry::New(), Foam::operator<<(), Foam::operator>>(), ListHashTable< T, Key, Hash >::printInfo(), Foam::blockMeshTools::read(), PtrList< transferModel >::read(), PackedList< 2 >::read(), Istream::readBeginList(), IOPosition< CloudType >::readData(), Istream::readEndList(), functionEntry::readFuncNameArgs(), and Foam::writeEntry().
|
inline |
Definition at line 261 of file tokenI.H.
References token::WORD.
Referenced by blockDescriptor::blockDescriptor(), dimensionSet::dimensionSet(), Field< PointType >::Field(), genericFvPatchField< Type >::genericFvPatchField(), genericPointPatchField< Type >::genericPointPatchField(), blockVertex::New(), decomposedBlockData::numBlocks(), keyType::operator=(), Foam::operator>>(), Foam::blockMeshTools::read(), dimensionSet::read(), functionEntry::readFuncNameArgs(), IOobject::readHeader(), mappedPatchBase::readListOrField(), specieCoeffs::specieCoeffs(), and Foam::writeEntry().
|
inline |
Definition at line 266 of file tokenI.H.
References word::null, word::typeName, token::WORD, and token::wordTokenPtr_.
Referenced by blockDescriptor::blockDescriptor(), dimensionSet::dimensionSet(), Field< PointType >::Field(), genericFvPatchField< Type >::genericFvPatchField(), genericPointPatchField< Type >::genericPointPatchField(), blockVertex::New(), decomposedBlockData::numBlocks(), Foam::operator<<(), keyType::operator=(), token::operator==(), Foam::operator>>(), Foam::blockMeshTools::read(), dimensionSet::read(), functionEntry::readFuncNameArgs(), IOobject::readHeader(), mappedPatchBase::readListOrField(), and specieCoeffs::specieCoeffs().
|
inline |
Definition at line 279 of file tokenI.H.
References token::FUNCTIONNAME.
Referenced by ifeqEntry::execute(), keyType::operator=(), and Foam::operator>>().
|
inline |
Definition at line 284 of file tokenI.H.
References token::FUNCTIONNAME, token::functionNameTokenPtr_, functionName::null, and functionName::typeName.
Referenced by ifeqEntry::execute(), Foam::operator<<(), keyType::operator=(), token::operator==(), and Foam::operator>>().
|
inline |
Definition at line 297 of file tokenI.H.
References token::VARIABLE.
Referenced by keyType::operator=(), and Foam::operator>>().
|
inline |
Definition at line 302 of file tokenI.H.
References variable::null, variable::typeName, token::VARIABLE, and token::variableTokenPtr_.
Referenced by Foam::operator<<(), keyType::operator=(), token::operator==(), and Foam::operator>>().
|
inline |
Definition at line 315 of file tokenI.H.
References token::STRING.
Referenced by keyType::operator=(), Foam::operator>>(), and functionEntry::readFuncNameArgs().
|
inline |
Definition at line 320 of file tokenI.H.
References string::null, token::STRING, token::stringTokenPtr_, and string::typeName.
Referenced by Foam::operator<<(), keyType::operator=(), token::operator==(), Foam::operator>>(), and functionEntry::readFuncNameArgs().
|
inline |
Definition at line 333 of file tokenI.H.
References token::VERBATIMSTRING.
Referenced by Foam::operator>>().
|
inline |
Definition at line 338 of file tokenI.H.
References verbatimString::null, verbatimString::typeName, token::VERBATIMSTRING, and token::verbatimStringTokenPtr_.
Referenced by Foam::operator<<(), token::operator==(), and Foam::operator>>().
|
inline |
Definition at line 351 of file tokenI.H.
References token::FUNCTIONNAME, token::STRING, token::VARIABLE, token::VERBATIMSTRING, and token::WORD.
|
inline |
Definition at line 363 of file tokenI.H.
References token::FUNCTIONNAME, token::functionNameTokenPtr_, string::null, token::STRING, token::stringTokenPtr_, string::typeName, token::VARIABLE, token::variableTokenPtr_, token::VERBATIMSTRING, token::verbatimStringTokenPtr_, token::WORD, and token::wordTokenPtr_.
Referenced by functionEntry::readFuncNameArgs().
|
inline |
Definition at line 392 of file tokenI.H.
References token::LABEL.
Referenced by dictionaryListEntry::dictionaryListEntry(), FixedList< Type, 3 >::FixedList(), genericFvPatchField< Type >::genericFvPatchField(), genericPointPatchField< Type >::genericPointPatchField(), List< Field< scalar > >::List(), LList< Foam::chemPointISAT *>::LList(), entry::New(), decomposedBlockData::numBlocks(), Foam::operator>>(), ListHashTable< T, Key, Hash >::printInfo(), Foam::blockMeshTools::read(), PtrList< transferModel >::read(), PackedList< 2 >::read(), IOPosition< CloudType >::readData(), and Foam::writeEntry().
|
inline |
Definition at line 397 of file tokenI.H.
References token::LABEL, and token::labelToken_.
Referenced by dictionaryListEntry::dictionaryListEntry(), FixedList< Type, 3 >::FixedList(), genericFvPatchField< Type >::genericFvPatchField(), genericPointPatchField< Type >::genericPointPatchField(), List< Field< scalar > >::List(), LList< Foam::chemPointISAT *>::LList(), Foam::operator<<(), Foam::operator>>(), ListHashTable< T, Key, Hash >::printInfo(), Foam::blockMeshTools::read(), PtrList< transferModel >::read(), PackedList< 2 >::read(), IOPosition< CloudType >::readData(), and Foam::writeEntry().
|
inline |
Definition at line 410 of file tokenI.H.
References token::FLOAT_SCALAR.
|
inline |
Definition at line 415 of file tokenI.H.
References token::FLOAT_SCALAR, and token::floatScalarToken_.
Referenced by Foam::operator<<().
|
inline |
Definition at line 429 of file tokenI.H.
References token::DOUBLE_SCALAR.
|
inline |
Definition at line 434 of file tokenI.H.
References token::DOUBLE_SCALAR, and token::doubleScalarToken_.
Referenced by Foam::operator<<().
|
inline |
Definition at line 448 of file tokenI.H.
References token::LONG_DOUBLE_SCALAR.
|
inline |
Definition at line 453 of file tokenI.H.
References token::LONG_DOUBLE_SCALAR, and token::longDoubleScalarTokenPtr_.
Referenced by Foam::operator<<().
|
inline |
Definition at line 467 of file tokenI.H.
References token::DOUBLE_SCALAR, token::FLOAT_SCALAR, and token::LONG_DOUBLE_SCALAR.
Referenced by token::isNumber(), and token::number().
|
inline |
Definition at line 477 of file tokenI.H.
References token::DOUBLE_SCALAR, token::doubleScalarToken_, token::FLOAT_SCALAR, token::floatScalarToken_, token::LONG_DOUBLE_SCALAR, and token::longDoubleScalarTokenPtr_.
Referenced by token::number().
|
inline |
Definition at line 498 of file tokenI.H.
References token::isScalar(), and token::LABEL.
Referenced by CrankNicolsonDdtScheme< Type >::CrankNicolsonDdtScheme(), Foam::operator>>(), dimensionSet::read(), and specieCoeffs::specieCoeffs().
|
inline |
Definition at line 503 of file tokenI.H.
References token::isScalar(), token::LABEL, token::labelToken_, and token::scalarToken().
Referenced by CrankNicolsonDdtScheme< Type >::CrankNicolsonDdtScheme(), genericFvPatchField< Type >::genericFvPatchField(), Foam::operator>>(), dimensionSet::read(), and specieCoeffs::specieCoeffs().
|
inline |
Definition at line 520 of file tokenI.H.
References token::COMPOUND.
Referenced by FixedList< Type, 3 >::FixedList(), genericFvPatchField< Type >::genericFvPatchField(), genericPointPatchField< Type >::genericPointPatchField(), List< Field< scalar > >::List(), and Foam::writeEntry().
|
inline |
Definition at line 525 of file tokenI.H.
References token::COMPOUND, and token::compoundTokenPtr_.
Referenced by genericFvPatchField< Type >::genericFvPatchField(), genericPointPatchField< Type >::genericPointPatchField(), and Foam::operator<<().
Foam::token::compound & transferCompoundToken | ( | const Istream & | is | ) |
Definition at line 93 of file token.C.
References Foam::abort(), Foam::FatalIOError, and FatalIOErrorInFunction.
Referenced by FixedList< Type, 3 >::FixedList(), genericFvPatchField< Type >::genericFvPatchField(), genericPointPatchField< Type >::genericPointPatchField(), List< Field< scalar > >::List(), and Foam::writeEntry().
|
inline |
Definition at line 539 of file tokenI.H.
Referenced by Foam::operator<<(), UIPstream::read(), ISstream::read(), and ITstream::read().
|
inline |
|
inline |
Set bad.
Definition at line 550 of file tokenI.H.
References token::ERROR.
Referenced by UIPstream::read(), and ISstream::read().
Return info proxy.
Used to print token information to a stream
Definition at line 391 of file token.H.
Referenced by blockDescriptor::blockDescriptor(), dictionaryListEntry::dictionaryListEntry(), Field< PointType >::Field(), FixedList< Type, 3 >::FixedList(), List< Field< scalar > >::List(), LList< Foam::chemPointISAT *>::LList(), blockVertex::New(), Foam::operator>>(), ListHashTable< T, Key, Hash >::printInfo(), Foam::blockMeshTools::read(), PtrList< transferModel >::read(), PackedList< 2 >::read(), Istream::readBegin(), Istream::readBeginList(), IOPosition< CloudType >::readData(), Istream::readEnd(), Istream::readEndList(), specieCoeffs::specieCoeffs(), and Foam::writeEntry().
|
inline |
Definition at line 559 of file tokenI.H.
References token::COMPOUND, token::compoundTokenPtr_, token::DOUBLE_SCALAR, token::doubleScalarToken_, token::ERROR, token::FLOAT_SCALAR, token::floatScalarToken_, token::FUNCTIONNAME, token::functionNameTokenPtr_, token::LABEL, token::labelToken_, token::LONG_DOUBLE_SCALAR, token::longDoubleScalarTokenPtr_, token::PUNCTUATION, token::punctuationToken_, token::STRING, token::stringTokenPtr_, token::UNDEFINED, token::VARIABLE, token::variableTokenPtr_, token::VERBATIMSTRING, token::verbatimStringTokenPtr_, token::WORD, and token::wordTokenPtr_.
Referenced by token::operator=().
|
inline |
Definition at line 623 of file tokenI.H.
References p, token::PUNCTUATION, and token::punctuationToken_.
|
inline |
Definition at line 630 of file tokenI.H.
References token::WORD, and token::wordTokenPtr_.
|
inline |
Definition at line 637 of file tokenI.H.
References token::operator=().
|
inline |
Definition at line 642 of file tokenI.H.
References token::FUNCTIONNAME, and token::functionNameTokenPtr_.
|
inline |
Definition at line 649 of file tokenI.H.
References token::operator=().
|
inline |
Definition at line 654 of file tokenI.H.
References token::VARIABLE, and token::variableTokenPtr_.
|
inline |
Definition at line 661 of file tokenI.H.
References token::operator=().
|
inline |
Definition at line 666 of file tokenI.H.
References token::STRING, and token::stringTokenPtr_.
|
inline |
Definition at line 673 of file tokenI.H.
References token::operator=().
|
inline |
Definition at line 678 of file tokenI.H.
References token::VERBATIMSTRING, and token::verbatimStringTokenPtr_.
|
inline |
Definition at line 685 of file tokenI.H.
References token::operator=().
|
inline |
Definition at line 690 of file tokenI.H.
References token::LABEL, and token::labelToken_.
|
inline |
Definition at line 697 of file tokenI.H.
References token::FLOAT_SCALAR, token::floatScalarToken_, and s().
|
inline |
Definition at line 704 of file tokenI.H.
References token::DOUBLE_SCALAR, token::doubleScalarToken_, and s().
|
inline |
Definition at line 711 of file tokenI.H.
References token::LONG_DOUBLE_SCALAR, and token::longDoubleScalarTokenPtr_.
|
inline |
Definition at line 718 of file tokenI.H.
References token::COMPOUND, and token::compoundTokenPtr_.
Definition at line 726 of file tokenI.H.
References token::COMPOUND, token::compoundTokenPtr_, token::DOUBLE_SCALAR, token::doubleScalarToken_, Foam::equal(), token::ERROR, token::FLOAT_SCALAR, token::floatScalarToken_, token::FUNCTIONNAME, token::functionNameTokenPtr_, token::LABEL, token::labelToken_, token::LONG_DOUBLE_SCALAR, token::longDoubleScalarTokenPtr_, token::PUNCTUATION, token::punctuationToken_, token::STRING, token::stringTokenPtr_, token::UNDEFINED, token::VARIABLE, token::variableTokenPtr_, token::VERBATIMSTRING, token::verbatimStringTokenPtr_, token::WORD, and token::wordTokenPtr_.
Referenced by token::operator!=().
|
inline |
Definition at line 782 of file tokenI.H.
References token::PUNCTUATION, and token::punctuationToken_.
Definition at line 787 of file tokenI.H.
References token::WORD, and token::wordToken().
|
inline |
Definition at line 792 of file tokenI.H.
References token::FUNCTIONNAME, and token::functionNameToken().
Definition at line 797 of file tokenI.H.
References token::VARIABLE, and token::variableToken().
Definition at line 802 of file tokenI.H.
References token::STRING, and token::stringToken().
|
inline |
Definition at line 807 of file tokenI.H.
References token::VERBATIMSTRING, and token::verbatimStringToken().
Definition at line 812 of file tokenI.H.
References token::LABEL, and token::labelToken_.
|
inline |
Definition at line 817 of file tokenI.H.
References Foam::equal(), token::FLOAT_SCALAR, and token::floatScalarToken_.
|
inline |
Definition at line 822 of file tokenI.H.
References token::DOUBLE_SCALAR, token::doubleScalarToken_, and Foam::equal().
|
inline |
Definition at line 827 of file tokenI.H.
References Foam::equal(), token::LONG_DOUBLE_SCALAR, and token::longDoubleScalarTokenPtr_.
Definition at line 835 of file tokenI.H.
References token::operator==().
|
inline |
Definition at line 840 of file tokenI.H.
References token::operator==().
Definition at line 845 of file tokenI.H.
References token::operator==().
|
inline |
Definition at line 850 of file tokenI.H.
References token::operator==().
Definition at line 855 of file tokenI.H.
References token::operator==().
Definition at line 860 of file tokenI.H.
References token::operator==().
|
inline |
Definition at line 865 of file tokenI.H.
References token::operator==().
Definition at line 885 of file tokenI.H.
References token::operator==().
|
inline |
Definition at line 870 of file tokenI.H.
References token::operator==().
|
inline |
Definition at line 875 of file tokenI.H.
References token::operator==().
|
inline |
Definition at line 880 of file tokenI.H.
References token::operator==().
|
friend |
|
friend |
|
static |
Static undefined token.
Definition at line 237 of file token.H.
Referenced by Istream::peekBack(), and ITstream::read().
punctuationToken punctuationToken_ |
Definition at line 250 of file token.H.
Referenced by Foam::operator<<(), token::operator=(), token::operator==(), token::pToken(), and token::token().
word* wordTokenPtr_ |
Definition at line 251 of file token.H.
Referenced by token::anyStringToken(), Foam::operator<<(), token::operator=(), token::operator==(), token::token(), and token::wordToken().
functionName* functionNameTokenPtr_ |
Definition at line 252 of file token.H.
Referenced by token::anyStringToken(), token::functionNameToken(), Foam::operator<<(), token::operator=(), token::operator==(), and token::token().
variable* variableTokenPtr_ |
Definition at line 253 of file token.H.
Referenced by token::anyStringToken(), Foam::operator<<(), token::operator=(), token::operator==(), token::token(), and token::variableToken().
string* stringTokenPtr_ |
Definition at line 254 of file token.H.
Referenced by token::anyStringToken(), Foam::operator<<(), token::operator=(), token::operator==(), token::stringToken(), and token::token().
verbatimString* verbatimStringTokenPtr_ |
Definition at line 255 of file token.H.
Referenced by token::anyStringToken(), Foam::operator<<(), token::operator=(), token::operator==(), token::token(), and token::verbatimStringToken().
label labelToken_ |
Definition at line 256 of file token.H.
Referenced by token::labelToken(), token::number(), Foam::operator<<(), token::operator=(), token::operator==(), and token::token().
floatScalar floatScalarToken_ |
Definition at line 257 of file token.H.
Referenced by token::floatScalarToken(), Foam::operator<<(), token::operator=(), token::operator==(), token::scalarToken(), and token::token().
doubleScalar doubleScalarToken_ |
Definition at line 258 of file token.H.
Referenced by token::doubleScalarToken(), Foam::operator<<(), token::operator=(), token::operator==(), token::scalarToken(), and token::token().
longDoubleScalar* longDoubleScalarTokenPtr_ |
Definition at line 259 of file token.H.
Referenced by token::longDoubleScalarToken(), Foam::operator<<(), token::operator=(), token::operator==(), token::scalarToken(), and token::token().
|
mutable |
Definition at line 260 of file token.H.
Referenced by token::compoundToken(), Foam::operator<<(), token::operator=(), token::operator==(), and token::token().