# PhasicFlow: src/phasicFlow/streams/token/tokenI.hpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

tokenI.hpp
Go to the documentation of this file.
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
// based on OpenFOAM stream, with some modifications/simplifications
// to be tailored to our needs
#include <algorithm>
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
inline pFlow::token pFlow::token::boolean(bool on)
{
token tok;
tok.type_ = tokenType::BOOL;
tok.data_.int64Val = on;
return tok;
}
inline pFlow::token pFlow::token::flag(int bitmask)
{
token tok;
tok.type_ = tokenType::FLAG;
tok.data_.flagVal = bitmask;
return tok;
}
inline bool pFlow::token::isseparator(int c)
{
// NOTE: keep synchronized with ISstream::read(token&)
switch (c)
{
case token::END_STATEMENT :
case token::BEGIN_LIST :
case token::END_LIST :
case token::BEGIN_SQR :
case token::END_SQR :
case token::BEGIN_BLOCK :
case token::END_BLOCK :
case token::COLON :
case token::COMMA :
// Excluded token::SUBTRACT since it could start a number
case token::DIVIDE :
{
return true;
}
default:
break;
}
return false;
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
inline void pFlow::token::setUndefined()
{
type_ = tokenType::UNDEFINED;
data_.int64Val = 0; // bit-wise zero for union content
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
inline constexpr pFlow::token::token() noexcept
:
data_(), // bit-wise zero for union content
type_(tokenType::UNDEFINED),
lineNumber_(0)
{}
inline pFlow::token::token(const token& tok)
:
data_(tok.data_), // bit-wise copy of union content
type_(tok.type_),
lineNumber_(tok.lineNumber_)
{
// Fundamental: values already handled by bit-wise copy
// Pointer: duplicate content or increase refCount
switch (type_)
{
case tokenType::WORD:
case tokenType::DIRECTIVE:
{
data_.wordPtr = new word(*tok.data_.wordPtr);
break;
}
case tokenType::STRING:
case tokenType::VARIABLE:
{
data_.stringPtr = new word(*tok.data_.stringPtr);
break;
}
default:
break;
}
}
inline pFlow::token::token(token&& tok)
:
data_(tok.data_), // bit-wise copy of union content
type_(tok.type_),
lineNumber_(tok.lineNumber_)
{
tok.setUndefined(); // zero the union content without any checking
tok.lineNumber_ = 0;
}
inline pFlow::token::token(punctuationToken p, int32 lineNumber)
:
data_(),
type_(tokenType::PUNCTUATION),
lineNumber_(lineNumber)
{
data_.punctuationVal = p;
}
inline pFlow::token::token(const uint64 val, int32 lineNumber)
:
data_(),
type_(tokenType::INT64),
lineNumber_(lineNumber)
{
data_.int64Val = static_cast< int64 >(val);
}
inline pFlow::token::token(const uint32 val, int32 lineNumber)
:
data_(),
type_(tokenType::INT64),
lineNumber_(lineNumber)
{
data_.int64Val = static_cast< int64 >(val);
}
inline pFlow::token::token(const uint8 val, int32 lineNumber)
:
data_(),
type_(tokenType::INT64),
lineNumber_(lineNumber)
{
data_.int64Val = static_cast< int64 >(val);
}
inline pFlow::token::token(const int64 val, int32 lineNumber)
:
data_(),
type_(tokenType::INT64),
lineNumber_(lineNumber)
{
data_.int64Val = val;
}
inline pFlow::token::token(const int32 val, int32 lineNumber)
:
data_(),
type_(tokenType::INT64),
lineNumber_(lineNumber)
{
data_.int64Val = static_cast< int64 >(val);
}
inline pFlow::token::token(const int8 val, int32 lineNumber)
:
data_(),
type_(tokenType::INT64),
lineNumber_(lineNumber)
{
data_.int64Val = static_cast< int64 >(val);
}
inline pFlow::token::token(const float val, int32 lineNumber)
:
data_(),
type_(tokenType::FLOAT),
lineNumber_(lineNumber)
{
data_.floatVal = val;
}
inline pFlow::token::token(const double val, int32 lineNumber)
:
data_(),
type_(tokenType::DOUBLE),
lineNumber_(lineNumber)
{
data_.doubleVal = val;
}
inline pFlow::token::token(const word& w, int32 lineNumber, bool isString)
:
data_(),
type_(tokenType::WORD),
lineNumber_(lineNumber)
{
if(isString)
{
data_.stringPtr = new word(w);
type_ = tokenType::STRING;
} else
{
data_.wordPtr = new word(w);
}
}
inline pFlow::token::token(word&& w, int32 lineNumber, bool isString)
:
data_(),
type_(tokenType::WORD),
lineNumber_(lineNumber)
{
if(isString)
{
data_.stringPtr = new word(std::move(w));
type_ = tokenType::STRING;
} else
{
data_.wordPtr = new word(std::move(w));
}
}
inline pFlow::token::~token()
{
reset();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline void pFlow::token::reset()
{
switch (type_)
{
case tokenType::WORD:
case tokenType::DIRECTIVE:
{
delete data_.wordPtr;
break;
}
case tokenType::STRING:
case tokenType::VARIABLE:
{
delete data_.stringPtr;
break;
}
default:
break;
}
setUndefined();
}
inline void pFlow::token::swap(token& tok)
{
if (this == &tok)
{
return; // Self-swap is a no-op
}
std::swap(data_, tok.data_);
std::swap(type_, tok.type_);
std::swap(lineNumber_, tok.lineNumber_);
}
inline pFlow::token::tokenType pFlow::token::type() const
{
return type_;
}
inline bool pFlow::token::setType(token::tokenType tokType)
{
if (type_ == tokType)
{
// No change required
return true;
}
switch (tokType)
{
case tokenType::BOOL:
case tokenType::INT64:
{
switch (type_)
{
case tokenType::BOOL:
case tokenType::INT64:
type_ = tokType;
return true;
break;
default:
break;
}
}
break;
case tokenType::WORD:
case tokenType::DIRECTIVE:
{
switch (type_)
{
case tokenType::WORD:
case tokenType::DIRECTIVE:
type_ = tokType;
return true;
break;
default:
break;
}
}
break;
case tokenType::STRING:
case tokenType::VARIABLE:
{
switch (type_)
{
// could also go from WORD to STRING etc - to be decided
case tokenType::STRING:
case tokenType::VARIABLE:
type_ = tokType;
return true;
break;
default:
break;
}
}
break;
default:
break;
}
return false;
}
inline pFlow::int32 pFlow::token::lineNumber() const
{
return lineNumber_;
}
inline pFlow::int32& pFlow::token::lineNumber()
{
return lineNumber_;
}
inline bool pFlow::token::good() const
{
return (type_ != tokenType::UNDEFINED && type_ != tokenType::ERROR);
}
inline bool pFlow::token::undefined() const
{
return (type_ == tokenType::UNDEFINED);
}
inline bool pFlow::token::error() const
{
return (type_ == tokenType::ERROR);
}
inline bool pFlow::token::isBool() const
{
return (type_ == tokenType::BOOL);
}
inline bool pFlow::token::boolToken() const
{
if (type_ == tokenType::BOOL || type_ == tokenType::INT64)
{
return data_.int64Val;
}
parseError("bool");
return false;
}
inline bool pFlow::token::isFlag() const
{
return (type_ == tokenType::FLAG);
}
inline int pFlow::token::flagToken() const
{
if (type_ == tokenType::FLAG)
{
return data_.flagVal;
}
parseError("flag bitmask");
return NO_FLAG;
}
inline bool pFlow::token::isPunctuation() const
{
return (type_ == tokenType::PUNCTUATION);
}
inline bool pFlow::token::isEndStatement() const
{
if( type_ == tokenType::PUNCTUATION )
{
return pToken() == punctuationToken::END_STATEMENT;
}
return false;
}
inline bool pFlow::token::isEndBlock() const
{
if( type_ == tokenType::PUNCTUATION )
{
return pToken() == punctuationToken::END_BLOCK;
}
return false;
}
inline pFlow::token::punctuationToken pFlow::token::pToken() const
{
if (type_ == tokenType::PUNCTUATION)
{
return data_.punctuationVal;
}
parseError("punctuation character");
return punctuationToken::NULL_TOKEN;
}
inline bool pFlow::token::isSeparator() const
{
return
(
type_ == tokenType::PUNCTUATION
&& isseparator(data_.punctuationVal)
);
}
inline bool pFlow::token::isInt64() const
{
return (type_ == tokenType::INT64);
}
inline bool pFlow::token::isInt32() const
{
return (type_ == tokenType::INT64);
}
inline pFlow::int64 pFlow::token::int64Token() const
{
if (type_ == tokenType::INT64)
{
return data_.int64Val;
}
parseError("int64");
return 0;
}
inline pFlow::int32 pFlow::token::int32Token() const
{
return static_cast< int32 >(int64Token());
}
inline bool pFlow::token::isFloat() const
{
return (type_ == tokenType::FLOAT);
}
inline float pFlow::token::floatToken() const
{
if (type_ == tokenType::FLOAT)
{
return data_.floatVal;
}
parseError("float");
return 0;
}
inline bool pFlow::token::isDouble() const
{
return (type_ == tokenType::DOUBLE);
}
inline double pFlow::token::doubleToken() const
{
if (type_ == tokenType::DOUBLE)
{
return data_.doubleVal;
}
parseError("double");
return 0;
}
inline bool pFlow::token::isReal() const
{
return
(
type_ == tokenType::FLOAT
|| type_ == tokenType::DOUBLE
);
}
inline pFlow::real pFlow::token::realToken() const
{
if (type_ == tokenType::FLOAT)
{
return data_.floatVal;
}
else if (type_ == tokenType::DOUBLE)
{
return data_.doubleVal;
}
parseError("real");
return 0;
}
inline bool pFlow::token::isNumber() const
{
return (type_ == tokenType::INT64 || isReal());
}
inline pFlow::real pFlow::token::number() const
{
if (isInt64())
{
return int64Token();
}
if (isReal())
{
return realToken();
}
parseError("number (int64 or real)");
return 0;
}
inline bool pFlow::token::isWord() const
{
return
(
type_ == tokenType::WORD
|| type_ == tokenType::DIRECTIVE
);
}
inline bool pFlow::token::isDirective() const
{
return (type_ == tokenType::DIRECTIVE);
}
inline const pFlow::word& pFlow::token::wordToken() const
{
if
(
type_ == tokenType::WORD
|| type_ == tokenType::DIRECTIVE
)
{
return *data_.wordPtr;
}
parseError("word");
return nullWord;
}
inline bool pFlow::token::isString() const
{
return
(
type_ == tokenType::STRING
|| type_ == tokenType::VARIABLE
);
}
inline const pFlow::word& pFlow::token::stringToken() const
{
if
(
type_ == tokenType::STRING
|| type_ == tokenType::VARIABLE
)
{
return *data_.stringPtr;
}
else if
(
type_ == tokenType::WORD
|| type_ == tokenType::DIRECTIVE
)
{
// pFlow::word derives from pFlow::string, no need to cast.
return *data_.wordPtr;
}
parseError("string");
return nullWord;
}
inline bool pFlow::token::isVariable() const
{
return (type_ == tokenType::VARIABLE);
}
inline bool pFlow::token::isStringType() const
{
return (isWord() || isString());
}
inline void pFlow::token::setBad()
{
reset();
type_ = tokenType::ERROR;
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
inline void pFlow::token::operator=(const token& tok)
{
if (this == &tok)
{
return; // Self-assignment is a no-op
}
reset();
type_ = tok.type_;
data_ = tok.data_; // bit-wise copy of union content
lineNumber_ = tok.lineNumber_;
// Fundamental: values already handled by bit-wise copy
// Pointer: duplicate content or increase refCount
switch (type_)
{
case tokenType::WORD:
case tokenType::DIRECTIVE:
{
data_.wordPtr = new word(*tok.data_.wordPtr);
}
break;
case tokenType::STRING:
case tokenType::VARIABLE:
{
data_.stringPtr = new word(*tok.data_.stringPtr);
}
break;
default:
break;
}
}
inline void pFlow::token::operator=(token&& tok)
{
if (this == &tok)
{
return; // Self-assignment is a no-op
}
reset();
lineNumber_ = 0;
swap(tok);
}
inline void pFlow::token::operator=(const punctuationToken p)
{
reset();
type_ = tokenType::PUNCTUATION;
data_.punctuationVal = p;
}
inline void pFlow::token::operator=(const int64 val)
{
reset();
type_ = tokenType::INT64;
data_.int64Val = val;
}
inline void pFlow::token::operator=(const int32 val)
{
reset();
type_ = tokenType::INT64;
data_.int64Val = static_cast< int64 >(val);
}
inline void pFlow::token::operator=(const float val)
{
reset();
type_ = tokenType::FLOAT;
data_.floatVal = val;
}
inline void pFlow::token::operator=(const double val)
{
reset();
type_ = tokenType::DOUBLE;
data_.doubleVal = val;
}
inline void pFlow::token::operator=(const word& w)
{
reset();
type_ = tokenType::WORD;
data_.wordPtr = new word(w);
}
inline void pFlow::token::operator=(word&& w)
{
reset();
type_ = tokenType::WORD;
data_.wordPtr = new word(std::move(w));
}
inline bool pFlow::token::operator==(const token& tok) const
{
if (type_ != tok.type_)
{
return false;
}
switch (type_)
{
case tokenType::UNDEFINED:
return true;
case tokenType::BOOL:
return data_.int64Val == tok.data_.int64Val;
case tokenType::FLAG:
return data_.flagVal == tok.data_.flagVal;
case tokenType::PUNCTUATION:
return data_.punctuationVal == tok.data_.punctuationVal;
case tokenType::INT64:
return data_.int64Val == tok.data_.int64Val;
case tokenType::FLOAT:
return equal(data_.floatVal, tok.data_.floatVal);
case tokenType::DOUBLE:
return equal(static_cast< real >(data_.doubleVal), static_cast< real >(tok.data_.doubleVal));
case tokenType::WORD:
case tokenType::DIRECTIVE:
return *data_.wordPtr == *tok.data_.wordPtr;
case tokenType::STRING:
case tokenType::VARIABLE:
return *data_.stringPtr == *tok.data_.stringPtr;
case tokenType::ERROR:
return true;
}
return false;
}
inline bool pFlow::token::operator==(const punctuationToken p) const
{
return (type_ == tokenType::PUNCTUATION && data_.punctuationVal == p);
}
inline bool pFlow::token::operator==(const int64 val) const
{
return
(
type_ == tokenType::INT64
&& data_.int64Val == val
);
}
inline bool pFlow::token::operator==(const int32 val) const
{
return
(
type_ == tokenType::INT64
&& data_.int64Val == static_cast< int64 >(val)
);
}
inline bool pFlow::token::operator==(const float val) const
{
return
(
type_ == tokenType::FLOAT
&& equal(data_.floatVal, val)
);
}
inline bool pFlow::token::operator==(const double val) const
{
return
(
type_ == tokenType::DOUBLE
&& equal( static_cast< real >(data_.doubleVal), static_cast< real >(val))
);
}
inline bool pFlow::token::operator==(const word& w) const
{
return
(
type_== tokenType::WORD
&& *data_.wordPtr == w
);
}
inline bool pFlow::token::operator!=(const token& tok) const
{
return !operator==(tok);
}
inline bool pFlow::token::operator!=(const punctuationToken p) const
{
return !operator==(p);
}
inline bool pFlow::token::operator!=(const int64 val) const
{
return !operator==(val);
}
inline bool pFlow::token::operator!=(const int32 val) const
{
return !operator==(val);
}
inline bool pFlow::token::operator!=(const float val) const
{
return !operator==(val);
}
inline bool pFlow::token::operator!=(const double val) const
{
return !operator==(val);
}
inline bool pFlow::token::operator!=(const word& w) const
{
return !operator==(w);
}
// ************************************************************************* //
pFlow::token::setType
bool setType(const tokenType tokType)
Change the token type, for similar types.
Definition: tokenI.hpp:308
pFlow::token::isBool
bool isBool() const
Token is BOOL.
Definition: tokenI.hpp:408
pFlow::token::operator==
bool operator==(const token &tok) const
Definition: tokenI.hpp:791
pFlow::token::type
tokenType type() const
Return the token type.
Definition: tokenI.hpp:302
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::token
Token class based on OpenFOAM stream, with some modifications/simplifications to be tailored to our n...
Definition: token.hpp:44
pFlow::token::undefined
bool undefined() const
Token is UNDEFINED.
Definition: tokenI.hpp:396
pFlow::token::~token
~token()
Destructor.
Definition: tokenI.hpp:255
pFlow::token::data_
content data_
The data content (as a union).
Definition: token.hpp:181
pFlow::token::pToken
punctuationToken pToken() const
Return punctuation character.
Definition: tokenI.hpp:470
pFlow::token::isFloat
bool isFloat() const
Token is float.
Definition: tokenI.hpp:518
pFlow::token::punctuationToken
punctuationToken
Standard punctuation tokens (a character)
Definition: token.hpp:83
pFlow::token::content::stringPtr
word * stringPtr
Definition: token.hpp:173
pFlow::token::isEndBlock
bool isEndBlock() const
Token is end endBlock.
Definition: tokenI.hpp:460
pFlow::token::isPunctuation
bool isPunctuation() const
Token is PUNCTUATION.
Definition: tokenI.hpp:444
pFlow::token::stringToken
const word & stringToken() const
Return const reference to the string contents.
Definition: tokenI.hpp:642
pFlow::token::END_BLOCK
@ END_BLOCK
Begin block [isseparator].
Definition: token.hpp:96
pFlow::token::error
bool error() const
Token is ERROR.
Definition: tokenI.hpp:402
pFlow::equal
INLINE_FUNCTION_HD bool equal(const box &b1, const box &b2, real tol=smallValue)
Definition: box.hpp:135
pFlow::operator==
INLINE_FUNCTION_HD bool operator==(const box &b1, const box &b2)
Definition: box.hpp:142
pFlow::token::good
bool good() const
True if token is not UNDEFINED or ERROR.
Definition: tokenI.hpp:390
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::token::isDouble
bool isDouble() const
Token is double.
Definition: tokenI.hpp:536
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::token::number
real number() const
Return int64, float or double value.
Definition: tokenI.hpp:586
pFlow::token::isVariable
bool isVariable() const
Token is VARIABLE (string variant)
Definition: tokenI.hpp:666
pFlow::token::boolean
static token boolean(bool on)
Create a bool token.
Definition: tokenI.hpp:28
pFlow::int64
long long int int64
Definition: builtinTypes.hpp:52
pFlow::token::int64Token
int64 int64Token() const
Return int64 value.
Definition: tokenI.hpp:502
pFlow::token::isSeparator
bool isSeparator() const
Token is PUNCTUATION and isseparator.
Definition: tokenI.hpp:482
pFlow::token::content::punctuationVal
punctuationToken punctuationVal
Definition: token.hpp:167
pFlow::token::boolToken
bool boolToken() const
Return boolean token value.
Definition: tokenI.hpp:414
pFlow::token::isStringType
bool isStringType() const
Token is WORD, DIRECTIVE, STRING, VARIABLE or VERBATIM.
Definition: tokenI.hpp:671
pFlow::nullWord
const word nullWord
null/empty word
Definition: bTypesFunctions.hpp:49
pFlow::token::BEGIN_BLOCK
@ BEGIN_BLOCK
End dimensions [isseparator].
Definition: token.hpp:95
pFlow::token::setUndefined
void setUndefined()
Set as UNDEFINED and zero the union content without any checking.
Definition: tokenI.hpp:79
pFlow::token::flagToken
int flagToken() const
Return flag bitmask value.
Definition: tokenI.hpp:432
pFlow::token::reset
void reset()
Reset token to UNDEFINED and clear any allocated storage.
Definition: tokenI.hpp:263
pFlow::token::token
constexpr token() noexcept
Default construct, initialized to an UNDEFINED token.
Definition: tokenI.hpp:89
pFlow::token::doubleToken
double doubleToken() const
Return double value.
Definition: tokenI.hpp:542
pFlow::int32
int int32
Definition: builtinTypes.hpp:50
pFlow::token::realToken
real realToken() const
Return float or double value.
Definition: tokenI.hpp:564
pFlow::token::isseparator
static bool isseparator(int c)
True if the character is a punctuation separator (eg, in ISstream).
Definition: tokenI.hpp:48
pFlow::token::lineNumber_
int32 lineNumber_
Line number in the file the token was read from.
Definition: token.hpp:187
pFlow::token::flag
static token flag(int bitmask)
Create a token with stream flags, no sanity check.
Definition: tokenI.hpp:38
pFlow::token::content::flagVal
int flagVal
Definition: token.hpp:166
pFlow::token::END_LIST
@ END_LIST
Begin list [isseparator].
Definition: token.hpp:92
pFlow::token::floatToken
float floatToken() const
Return float value.
Definition: tokenI.hpp:524
pFlow::token::content::wordPtr
word * wordPtr
Definition: token.hpp:172
pFlow::token::isInt64
bool isInt64() const
Token is int64.
Definition: tokenI.hpp:492
pFlow::token::COLON
@ COLON
End block [isseparator].
Definition: token.hpp:97
pFlow::token::isInt32
bool isInt32() const
Token is int32.
Definition: tokenI.hpp:497
pFlow::token::END_STATEMENT
@ END_STATEMENT
Newline [isspace].
Definition: token.hpp:90
pFlow::token::isFlag
bool isFlag() const
Token is FLAG.
Definition: tokenI.hpp:426
pFlow::token::content::floatVal
float floatVal
Definition: token.hpp:168
pFlow::token::tokenType
tokenType
Enumeration defining the types of token.
Definition: token.hpp:51
pFlow::token::content::int64Val
int64_t int64Val
Definition: token.hpp:164
pFlow::token::content::doubleVal
double doubleVal
Definition: token.hpp:169
pFlow::token::BEGIN_LIST
@ BEGIN_LIST
End entry [isseparator].
Definition: token.hpp:91
pFlow::token::swap
void swap(token &tok)
Swap token contents: type, data, line-number.
Definition: tokenI.hpp:289
pFlow::token::BEGIN_SQR
@ BEGIN_SQR
End list [isseparator].
Definition: token.hpp:93
pFlow::token::DIVIDE
@ DIVIDE
Subtract or start of negative number.
Definition: token.hpp:104
pFlow::uint64
unsigned long long int uint64
Definition: builtinTypes.hpp:58
pFlow::token::COMMA
@ COMMA
Colon [isseparator].
Definition: token.hpp:98
pFlow::int8
signed char int8
Definition: builtinTypes.hpp:48
pFlow::token::operator=
void operator=(const token &tok)
Copy assign.
Definition: tokenI.hpp:685
pFlow::token::operator!=
bool operator!=(const token &tok) const
Definition: tokenI.hpp:890
pFlow::token::type_
tokenType type_
The token type.
Definition: token.hpp:184
pFlow::token::isNumber
bool isNumber() const
Token is int, float or duble.
Definition: tokenI.hpp:580
pFlow::token::isEndStatement
bool isEndStatement() const
Token is end statement.
Definition: tokenI.hpp:449
pFlow::uint8
unsigned char uint8
Definition: builtinTypes.hpp:54
pFlow::token::isDirective
bool isDirective() const
Token is DIRECTIVE (word variant)
Definition: tokenI.hpp:612
pFlow::token::int32Token
int32 int32Token() const
Return int32 value.
Definition: tokenI.hpp:513
pFlow::token::END_SQR
@ END_SQR
Begin dimensions [isseparator].
Definition: token.hpp:94
pFlow::token::wordToken
const word & wordToken() const
Return const reference to the word contents.
Definition: tokenI.hpp:618
pFlow::token::setBad
void setBad()
Clear token and set to be ERROR.
Definition: tokenI.hpp:676
pFlow::token::isString
bool isString() const
Token is STRING, VARIABLE or VERBATIM string.
Definition: tokenI.hpp:633
pFlow::token::lineNumber
int32 lineNumber() const
The line number for the token.
Definition: tokenI.hpp:378
pFlow::token::isReal
bool isReal() const
Token is float or double.
Definition: tokenI.hpp:554
pFlow::token::isWord
bool isWord() const
Token is word or DIRECTIVE word.
Definition: tokenI.hpp:602