48 void Foam::token::parseError(
const char* expected)
const 51 <<
"Parse error, expected a " << expected
60 const word& compoundType,
64 auto* ctorPtr = IstreamConstructorTable(compoundType);
73 *IstreamConstructorTablePtr_
87 IstreamConstructorTablePtr_
88 && IstreamConstructorTablePtr_->found(
name)
95 if (type_ != tokenType::COMPOUND)
97 parseError(
"compound");
100 if (data_.compoundPtr->moved())
103 <<
"compound has already been transferred from token\n " 108 data_.compoundPtr->moved(
true);
111 return *data_.compoundPtr;
117 if (type_ != tokenType::COMPOUND)
119 parseError(
"compound");
122 if (data_.compoundPtr->moved())
125 <<
"compound has already been transferred from token\n " 130 data_.compoundPtr->moved(
true);
133 return *data_.compoundPtr;
static const token undefinedToken
An undefined token.
compound & transferCompoundToken()
Return reference to compound and mark internally as released.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A token holds an item read from Istream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
token::compound tokenCompound
Abstract base class for complex tokens.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
static autoPtr< compound > New(const word &type, Istream &is)
Construct compound from Istream.
errorManip< error > abort(error &err)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
static bool isCompound(const word &name)
Test if name is a known (registered) compound type.
defineTypeNameAndDebug(combustionModel, 0)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
InfoProxy< token > info() const noexcept
Return info proxy, for printing token information to a stream.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...