// If tracefiles are enabled, calls print_trace() and sends the // result to file. Otherwise, does nothing. void write_traceout() { #ifdef LIBMESH_ENABLE_TRACEFILES std::stringstream outname; outname << "traceout_" << static_cast<std::size_t>(libMesh::global_processor_id()) << '_' << getpid() << ".txt"; std::ofstream traceout(outname.str().c_str(), std::ofstream::app); libMesh::print_trace(traceout); #endif }
void P::parse_action(ASTBase **_root,int *_retsignal ) { zzRULE; int _signal=NoSignal; *_retsignal = NoSignal; loop_clause_nest_level = 0; *_root = new AST(TOK_STATEMENTS); tracein("action"); while ( 1 ) { statement( _root, &_signal ); _signal = NoSignal; if ( LA(1) == Eof ) break; } ASTBase::tmake( NULL, (*_root)->bottom(), (new AST(Eof)) , NULL); if ( dumpflag && (*_root) ) { ((AST *)(*_root))->dumpTree("\nAST tree", ascii_buffer); printf("--------------------------------------------------\n"); if (relocflag) { printf("Relocatable ASTs:\n"); AST *look = ttr->getItemHead(); while (look) { look->dumpNode(" "); look = look->getItemNext(); } printf("--------------------------------------------------\n"); } } traceout("action"); return; }