Go to the documentation of this file.
48 !(level == 0 && nextTok == token::END_STATEMENT)
55 if( t == token::BEGIN_LIST ||
56 t == token::BEGIN_BLOCK ||
63 t == token::END_LIST ||
64 t == token::END_BLOCK ||
75 "number of opening and closing ( or, [ or { does not match, closing is greater than opening \n";
81 tokenStream_.appendToken(nextTok);
88 "imbalance number of ( or { or [ \n";
93 return nextTok.
good();
103 auto lastPuncBegin =
false;
104 auto lastPuncEnd =
false;
105 auto applySpace =
false;
107 const tokenList& tokens = tokenStream_.tokens();
110 for(
auto tok = tokens.cbegin(); tok != tokens.cend(); tok++)
126 lastPuncBegin =
true;
140 lastPuncBegin =
false;
144 if(!lastPuncBegin&&applySpace) os<<
spaceToken();
147 lastPuncBegin =
false;
163 tokenStream_(parDict_.globalName())
199 tokenStream_.rewind();
217 if( !readDataEntry(is) )
220 "error in reading data entry from file \n";
223 tokenStream_.rewind();
241 tokenStream_.appendToken(tok);
242 tokenStream_.rewind();
256 tokenStream_.rewind();
272 "Request for an entry that is not a dictionray. Entry name is " << globalName() <<
endl;
281 "Request for an entry that is not a dictionray. Entry name is " << globalName() <<
endl;
293 return tokenStream_.name();
306 "Request for an entry that is not a dictionray. Entry name is " << globalName() <<
endl;
315 "Request for an entry that is not a dictionray. Entry name is " << globalName() <<
endl;
323 return makeUnique<dataEntry>(*
this);
329 auto ptr = makeUnique<dataEntry>(*
this);
330 return ptr.release();
335 return makeUnique<dataEntry>(this->keyword(), parDict, *
this);
340 auto ptr = makeUnique<dataEntry>(this->keyword(), parDict, *
this);
341 return ptr.release();
348 if(!readKeyword(is, keyword_, tok))
351 "expected a valid keyword for dataEntry but found " << tok <<
endl;
355 if(!readDataEntry(is) )
358 "unsucceful in reading dataEntry from " << is.
name() <<
endl;
368 if( !writeDataEntry(os) )
const tokenList & tokens() const
bool readDataEntry(iIstream &is)
virtual iIstream & read(token &)=0
virtual iTstream & stream()
punctuationToken pToken() const
token endStatementToken()
virtual const dictionary & parrentDict() const
virtual word globalName() const
bool isPunctuation() const
bool writeDataEntry(iOstream &os) const
virtual word globalName() const
iOstream & endl(iOstream &os)
bool isEndToken(const token &tok)
#define fatalErrorInFunction
bool fatalCheck(const char *operation) const
virtual iOstream & endEntry()
virtual dictionary * dictPtr()
virtual const word & name() const
static dataEntry nullDataEntry
virtual bool isDictionary() const
virtual bool read(iIstream &is)
virtual uniquePtr< iEntry > clone() const
word groupNames(const word &bw, const word &tw, char sep='.')
#define ioErrorInFile(fileName, lineNumber)
virtual iEntry * clonePtr() const
virtual dictionary & dict()
virtual bool write(iOstream &os) const
bool isBeginToken(const token &tok)