33 const label lastPrior,
36 const HashTable<Type>& table
39 Type result(identity);
42 token nextToken(tis.nextToken());
46 bool haveReadSymbol =
false;
50 if (nextToken.isWord())
53 result.reset(result*table[nextToken.wordToken()]);
54 haveReadSymbol =
true;
56 else if (nextToken.isNumber())
62 else if (nextToken.isPunctuation())
76 tis.putBack(nextToken);
88 token t = tis.nextToken();
95 haveReadSymbol =
true;
100 tis.putBack(nextToken);
106 if (nextPrior > lastPrior)
117 tis.putBack(nextToken);
121 haveReadSymbol =
false;
126 if (nextPrior > lastPrior)
135 tis.putBack(nextToken);
139 haveReadSymbol =
false;
141 else if (nextToken.pToken() ==
'^')
144 if (nextPrior > lastPrior)
146 token t = tis.nextToken();
152 result.reset(
pow(result, t.scalarToken()));
156 tis.putBack(nextToken);
160 haveReadSymbol =
true;
179 nextToken = tis.nextToken();
180 if (nextToken.error())
185 if (haveReadSymbol && (nextToken.isWord() || nextToken.isNumber()))
188 tis.putBack(nextToken);
201 const Type& identity,
202 const HashTable<Type>& table
205 symbols::tokeniser tis(is);
static label priority(const token &t)
...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Type parseNoBegin(const label lastPrior, tokeniser &tis, const Type &identity, const HashTable< Type > &table)
Parse tokens into a dimension set or unit conversion, assuming that the '['.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)