本文整理汇总了C++中Label::Print方法的典型用法代码示例。如果您正苦于以下问题:C++ Label::Print方法的具体用法?C++ Label::Print怎么用?C++ Label::Print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Label
的用法示例。
在下文中一共展示了Label::Print方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: subprogram_declaration
//---------------------------------------------------------------------
//---------------------------------------------------------------------
void subprogram_declaration(SubprogramSymbol* S,List<Exp*>* compound_statement)
{ //-----------------------------------------------------------------------
//Create a list of expressions containing the subprogram prolog, the
//compound statement of the subprogram itself, and the subprogram epilog
//making the entire subprogram.
//-----------------------------------------------------------------------
//First, verify that all is well in the trace file for the prolog,
//compound_statement, and the epilog.
//-----------------------------------------------------------------------
List<Exp*>* prolog=subprogram_prolog(S);
o << endl << "prolog";
prolog->Print(o);
o << endl << "compound_statement";
compound_statement->Print(o);
List<Exp*>* epilog=subprogram_epilog(S,compound_statement);
o << endl << "epilog";
epilog->Print(o);
//-----------------------------------------------------------------------
//Now, concatenate the prolog, compound_statement, and the epilog into
//a single list.
//-----------------------------------------------------------------------
List <Exp*>* L=new List<Exp*>;
L->Append(prolog);
L->Append(compound_statement);
L->Append(epilog);
//-----------------------------------------------------------------------
//Now, print the subprogram to the PCode File
//-----------------------------------------------------------------------
L->Print(pfs);
ST.Print(o); //Print the symbol table at this lexical level
ST.PopLocality(); //Pop the current locality
}
示例2: program
//---------------------------------------------------------------------
//---------------------------------------------------------------------
void program(SubprogramSymbol* S,List<Exp*>* compound_statement)
{
//-----------------------------------------------------------------------
//First, verify that all is well in the trace file for the prolog,
//compound_statement, and the epilog.
//-----------------------------------------------------------------------
List<Exp*>* prolog=subprogram_prolog(S);
o << endl << "prolog";
prolog->Print(o);
o << endl << "compound_statement";
compound_statement->Print(o);
List<Exp*>* epilog=subprogram_epilog(S,compound_statement);
o << endl << "epilog";
epilog->Print(o);
List<Exp*>* programepilog=program_epilog(S);
o << endl << "program epilog";
programepilog->Print(o);
//-----------------------------------------------------------------------
//Now, concatenate the prolog, compound_statement, and the epilog into
//a single list.
//-----------------------------------------------------------------------
List <Exp*>* L=new List<Exp*>;
L->Append(prolog);
L->Append(compound_statement);
L->Append(epilog);
L->Append(programepilog);
//-----------------------------------------------------------------------
//Now, print the subprogram to the PCode File
//-----------------------------------------------------------------------
L->Print(pfs);
ST.Print(o); //Print Locality 1
ST.PopLocality();
ST.Print(o); //Print Locality 0
}