35 void Foam::primitiveEntry::append
37 const token& currToken,
38 const dictionary& dict,
42 if (currToken.isWord())
44 const word& w = currToken.wordToken();
50 !(w[0] ==
'$' && expandVariable(w, dict))
51 && !(w[0] ==
'#' && expandFunction(w, dict, is))
69 newElmt(tokenIndex()++) = varTokens[i];
74 bool Foam::primitiveEntry::expandVariable
77 const dictionary& dict
80 word varName = w(1, w.size()-1);
88 const entry* ePtr = dict.lookupEntryPtr(varName,
true,
false);
101 string enVarString =
getEnv(varName);
103 if (enVarString.size())
114 bool Foam::primitiveEntry::expandFunction
117 const dictionary& parentDict,
121 word functionName = keyword(1, keyword.size()-1);
130 "primitiveEntry::readData(const dictionary&, Istream&)"
133 label blockCount = 0;
143 append(currToken, dict, is);
178 append(currToken, dict, is);
184 "primitiveEntry::readData(const dictionary&, Istream&)"
187 if (currToken.
good())
212 "primitiveEntry::readEntry(const dictionary&, Istream&)",
214 ) <<
"ill defined primitiveEntry starting at keyword '"
216 <<
" on line " << keywordLineNumber
233 is.
name() +
"::" + key,
248 is.
name() +
"::" + key,
264 for (label i=0; i<size(); i++)
291 const label nPrintTokens = 10;
293 os <<
" primitiveEntry '" << e.
keyword() <<
"' comprises ";
295 for (label i=0; i<
min(e.
size(), nPrintTokens); i++)
297 os <<
nl <<
" " << e[i].
info();
300 if (e.
size() > nPrintTokens)