45void Foam::token::parseError(
const char* expected)
const
48 <<
"Parse error, expected a " << expected
57 const word& compoundType,
61 auto* ctorPtr = IstreamConstructorTable(compoundType);
70 *IstreamConstructorTablePtr_
84 IstreamConstructorTablePtr_
85 && IstreamConstructorTablePtr_->found(
name)
92 if (type_ != tokenType::COMPOUND)
94 parseError(
"compound");
97 if (data_.compoundPtr->moved())
100 <<
"compound has already been transferred from token\n "
105 data_.compoundPtr->moved(
true);
108 return *data_.compoundPtr;
114 if (type_ != tokenType::COMPOUND)
116 parseError(
"compound");
119 if (data_.compoundPtr->moved())
122 <<
"compound has already been transferred from token\n "
127 data_.compoundPtr->moved(
true);
130 return *data_.compoundPtr;
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Abstract base class for complex tokens.
A token holds an item read from Istream.
compound & transferCompoundToken()
Return reference to compound and mark internally as released.
InfoProxy< token > info() const
Return info proxy for printing token information to a stream.
bool isCompound() const noexcept
Token is COMPOUND.
static const token undefinedToken
An undefined token.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
token::compound tokenCompound
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.