ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sageBuilder.h
Go to the documentation of this file.
1 #ifndef ROSE_SAGE_BUILDER_INTERFACE
2 #define ROSE_SAGE_BUILDER_INTERFACE
3 
4 
5 #include <string>
6 
20 namespace SageBuilder
21 {
22 
23 #if 0
24 //---------------------AST creation/building/construction-----------------
25  SgExpression* buildConst(SgType* t, const string & val);
26  SgExpression* buildConstInt(int val);
27 
28  // build sth in languages, but not in SAGE AST
29  // how to specify position info? then
30 
32  // or
33  SgClassDeclaration* buildStruct(...);
34  SgClassDeclaration* buildClass(...);
35  SgClassDeclaration* buildUnion(...);
36 
37  // build B from dependent A
39  (SgTemplateInstantiationMemberFunctionDecl * memberFunctionInstantiation);
40 
41  //previous attempt: src/midend/astUtil/astInterface
42  // AstNodePtr AstInterface::CreateConst( const string& val, const string& valtype) const
43  // AstNodePtr AstInterfaceBase::CreateConstInt( int val)
44 #endif
45 
46 //----------------------------------------------------------
48 
63 extern std::list<SgScopeStatement*> ScopeStack;
64 
65 // DQ (11/30/2010): Added support for building Fortran case insensitive symbol table handling.
68 
76 
77 // DQ (3/11/2012): Added new function to the API for the internal scope stack.
80 
81 bool inSwitchScope();
82 
83 
85 
86 // *************************************************************************************************************
87 // DQ (5/1/2012): This is another possible interface: supporting how we set the source code position and mark is
88 // as either a transformation or as actual code to be assigned a source position as part of the AST construction.
89 // *************************************************************************************************************
90 
92  {
100  };
101 
104 
107 
109 std::string display(SourcePositionClassification & scp);
110 
113 
114 // DQ (7/27/2012): changed semantics from removing the template arguments in names to adding the template arguments to names.
115 SgName appendTemplateArgumentsToName( const SgName & name, const SgTemplateArgumentPtrList & templateArgumentsList);
116 
117 // *************************************************************************************************************
118 
119 
120 
121 //--------------------------------------------------------------
123 
139 
140 // DQ (8/21/2010): We want to move to the new buildStringType( SgExpression*,size_t) function over the older buildStringType() function.
142 // SgTypeString* buildStringType( SgExpression* stringLengthExpression, size_t stringLengthLiteral );
143 ROSE_DLL_API SgTypeString* buildStringType( SgExpression* stringLengthExpression );
144 
147 
153 
154 #if 1
157 #endif
158 
165 
168 
171 
172 // Liao, entirely phase out this function ! Build a modifier type with no modifiers set
173 //SgModifierType* buildModifierType(SgType *base_type = NULL);
174 
175 // DQ (7/29/2010): Changed return type from SgType to SgModifierType for a number of the functions below.
178 
181 
184 
187 
189 ROSE_DLL_API SgArrayType* buildArrayType(SgType* base_type=NULL, SgExpression* index=NULL);
190 
191 // DQ (8/27/2010): Added Fortran specific support for types based on kind expressions.
194 
197 
200 
201 // DQ (1/16/2009): Added to support member function in C++ (for new interface)
202 ROSE_DLL_API SgMemberFunctionType* buildMemberFunctionType(SgType* return_type, SgFunctionParameterTypeList * typeList, SgClassDefinition *struct_name, unsigned int mfunc_specifier);
203 
204 // DQ (12/2/2011): Added for symetry with other functios to generate SgFunctionType
205 ROSE_DLL_API SgMemberFunctionType* buildMemberFunctionType(SgType* return_type, SgFunctionParameterList* argList = NULL, SgClassDefinition *struct_name = NULL, unsigned int mfunc_specifier = 0);
206 
207 // DQ (8/19/2012): Refactored some of the code supporting construction of the SgMemberFunctionType.
208 ROSE_DLL_API SgMemberFunctionType* buildMemberFunctionType(SgType* return_type, SgFunctionParameterTypeList* typeList, SgClassType *classType, unsigned int mfunc_specifier);
209 
210 
212 
218 ROSE_DLL_API SgType* buildOpaqueType(std::string const type_name, SgScopeStatement * scope);
219 
220 // DQ (7/29/2010): Changed return type from SgType to SgModifierType for a number of the functions below.
223 
226 
228 // SgModifierType* buildUpcSharedType(SgType *base_type = NULL);
229 ROSE_DLL_API SgModifierType* buildUpcSharedType(SgType *base_type = NULL, long layout = -1);
230 
233 
236 
238 ROSE_DLL_API SgModifierType* buildUpcBlockNumberType(SgType *base_type, long block_factor);
239 
242 
245 
249 
250 //--------------------------------------------------------------
252 
264 // JJW (11/19/2008): _nfi versions of functions set file info objects to NULL (used in frontend)
265 
267 
272 
274 SgBoolValExp* buildBoolValExp(int value = 0);
275 SgBoolValExp* buildBoolValExp(bool value = 0);
277 
278 SgCharVal* buildCharVal(char value = 0);
279 SgCharVal* buildCharVal_nfi(char value, const std::string& str);
280 
281 SgWcharVal* buildWcharVal(wchar_t value = 0);
282 SgWcharVal* buildWcharVal_nfi(wchar_t value, const std::string& str);
283 
284 SgComplexVal* buildComplexVal(long double real_value = 0.0, long double imaginary_value = 0.0 );
285 SgComplexVal* buildComplexVal(SgValueExp* real_value, SgValueExp* imaginary_value);
286 SgComplexVal* buildComplexVal_nfi(SgValueExp* real_value, SgValueExp* imaginary_value, const std::string& str);
287 SgComplexVal* buildImaginaryVal(long double imaginary_value);
288 SgComplexVal* buildImaginaryVal(SgValueExp* imaginary_value);
289 SgComplexVal* buildImaginaryVal_nfi(SgValueExp* imaginary_value, const std::string& str);
290 
292 ROSE_DLL_API SgDoubleVal* buildDoubleVal(double value = 0.0);
293 SgDoubleVal* buildDoubleVal_nfi(double value, const std::string& str);
294 
295 ROSE_DLL_API SgFloatVal* buildFloatVal(float value = 0.0);
296 SgFloatVal* buildFloatVal_nfi(float value, const std::string& str);
297 
299 ROSE_DLL_API SgIntVal* buildIntVal(int value = 0);
300 SgIntVal* buildIntValHex(int value = 0);
301 SgIntVal* buildIntVal_nfi(int value, const std::string& str);
302 
304 ROSE_DLL_API SgLongIntVal* buildLongIntVal(long value = 0);
305 SgLongIntVal* buildLongIntValHex(long value = 0);
306 SgLongIntVal* buildLongIntVal_nfi(long value, const std::string& str);
307 
310 SgLongLongIntVal* buildLongLongIntValHex(long long value = 0);
311 SgLongLongIntVal* buildLongLongIntVal_nfi(long long value, const std::string& str);
312 
314 
315 ROSE_DLL_API SgLongDoubleVal* buildLongDoubleVal(long double value = 0.0);
316 SgLongDoubleVal* buildLongDoubleVal_nfi(long double value, const std::string& str);
317 
318 ROSE_DLL_API SgShortVal* buildShortVal(short value = 0);
319 SgShortVal* buildShortValHex(short value = 0);
320 SgShortVal* buildShortVal_nfi(short value, const std::string& str);
321 
322 ROSE_DLL_API SgStringVal* buildStringVal(std::string value="");
323 SgStringVal* buildStringVal_nfi(std::string value);
324 
327 SgUnsignedCharVal* buildUnsignedCharValHex(unsigned char v = 0);
328 SgUnsignedCharVal* buildUnsignedCharVal_nfi(unsigned char v, const std::string& str);
329 
332 SgUnsignedShortVal* buildUnsignedShortValHex(unsigned short v = 0);
333 SgUnsignedShortVal* buildUnsignedShortVal_nfi(unsigned short v, const std::string& str);
334 
337 SgUnsignedIntVal* buildUnsignedIntValHex(unsigned int v = 0);
338 SgUnsignedIntVal* buildUnsignedIntVal_nfi(unsigned int v, const std::string& str);
339 
342 SgUnsignedLongVal* buildUnsignedLongValHex(unsigned long v = 0);
343 SgUnsignedLongVal* buildUnsignedLongVal_nfi(unsigned long v, const std::string& str);
344 
348 SgUnsignedLongLongIntVal* buildUnsignedLongLongIntVal_nfi(unsigned long long v, const std::string& str);
349 
351 SgTemplateParameterVal* buildTemplateParameterVal(int template_parameter_position = -1);
352 SgTemplateParameterVal* buildTemplateParameterVal_nfi(int template_parameter_position, const std::string& str);
353 
354 
358 
362 
366 
370 
374 
377 
379 
382 template <class T> T* buildUnaryExpression(SgExpression* operand = NULL);
383 template <class T> T* buildUnaryExpression_nfi(SgExpression* operand);
385 
389 #define BUILD_UNARY_PROTO(suffix) \
390 ROSE_DLL_API Sg##suffix * build##suffix(SgExpression* op =NULL); \
391 Sg##suffix * build##suffix##_nfi(SgExpression* op);
392 
393 BUILD_UNARY_PROTO(AddressOfOp)
394 BUILD_UNARY_PROTO(BitComplementOp)
395 BUILD_UNARY_PROTO(MinusOp)
396 BUILD_UNARY_PROTO(NotOp)
397 BUILD_UNARY_PROTO(PointerDerefExp)
398 BUILD_UNARY_PROTO(UnaryAddOp)
399 BUILD_UNARY_PROTO(MinusMinusOp)
400 BUILD_UNARY_PROTO(PlusPlusOp)
401 BUILD_UNARY_PROTO(RealPartOp)
402 BUILD_UNARY_PROTO(ImagPartOp)
403 BUILD_UNARY_PROTO(ConjugateOp)
404 BUILD_UNARY_PROTO(VarArgStartOneOperandOp)
405 BUILD_UNARY_PROTO(VarArgEndOp)
406 
408 ROSE_DLL_API SgCastExp * buildCastExp(SgExpression * operand_i = NULL,
409  SgType * expression_type = NULL,
410  SgCastExp::cast_type_enum cast_type = SgCastExp::e_C_style_cast);
412  SgType * expression_type,
413  SgCastExp::cast_type_enum cast_type);
414 
416 SgVarArgOp * buildVarArgOp_nfi(SgExpression * operand_i, SgType * expression_type);
417 
423 
427 
430 
432  SgExprListExp* exprListExp,
433  SgConstructorInitializer* constInit,
434  SgExpression* expr,
435  short int val,
436  SgFunctionDeclaration* funcDecl);
437 
439  short is_array,
440  short need_global_specifier,
441  SgFunctionDeclaration* deleteOperatorDeclaration);
442 
443 // DQ (1/25/2013): Added support for typeId operators.
444 SgTypeIdOp* buildTypeIdOp(SgExpression *operand_expr, SgType *operand_type);
445 
446 
447 #undef BUILD_UNARY_PROTO
448 
450 
453 template <class T> T* buildBinaryExpression(SgExpression* lhs =NULL, SgExpression* rhs =NULL);
454 template <class T> T* buildBinaryExpression_nfi(SgExpression* lhs, SgExpression* rhs);
456 
460 #define BUILD_BINARY_PROTO(suffix) \
461 ROSE_DLL_API Sg##suffix * build##suffix(SgExpression* lhs =NULL, SgExpression* rhs =NULL); \
462 ROSE_DLL_API Sg##suffix * build##suffix##_nfi(SgExpression* lhs, SgExpression* rhs);
463 
464 BUILD_BINARY_PROTO(AddOp)
465 BUILD_BINARY_PROTO(AndAssignOp)
466 BUILD_BINARY_PROTO(AndOp)
467 BUILD_BINARY_PROTO(ArrowExp)
468 BUILD_BINARY_PROTO(ArrowStarOp)
469 BUILD_BINARY_PROTO(AssignOp)
470 BUILD_BINARY_PROTO(BitAndOp)
471 BUILD_BINARY_PROTO(BitOrOp)
472 BUILD_BINARY_PROTO(BitXorOp)
473 
474 BUILD_BINARY_PROTO(CommaOpExp)
475 BUILD_BINARY_PROTO(ConcatenationOp)
476 BUILD_BINARY_PROTO(DivAssignOp)
477 BUILD_BINARY_PROTO(DivideOp)
478 BUILD_BINARY_PROTO(DotExp)
479 BUILD_BINARY_PROTO(DotStarOp)
480 BUILD_BINARY_PROTO(EqualityOp)
481 
482 BUILD_BINARY_PROTO(ExponentiationOp)
483 BUILD_BINARY_PROTO(ExponentiationAssignOp)
484 BUILD_BINARY_PROTO(GreaterOrEqualOp)
485 BUILD_BINARY_PROTO(GreaterThanOp)
486 BUILD_BINARY_PROTO(IntegerDivideOp)
487 BUILD_BINARY_PROTO(IntegerDivideAssignOp)
488 BUILD_BINARY_PROTO(IorAssignOp)
489 BUILD_BINARY_PROTO(IsOp)
490 BUILD_BINARY_PROTO(IsNotOp)
491 
492 BUILD_BINARY_PROTO(LessOrEqualOp)
493 BUILD_BINARY_PROTO(LessThanOp)
494 BUILD_BINARY_PROTO(LshiftAssignOp)
495 BUILD_BINARY_PROTO(LshiftOp)
496 
497 BUILD_BINARY_PROTO(MembershipOp)
498 BUILD_BINARY_PROTO(MinusAssignOp)
499 BUILD_BINARY_PROTO(ModAssignOp)
500 BUILD_BINARY_PROTO(ModOp)
501 BUILD_BINARY_PROTO(MultAssignOp)
502 BUILD_BINARY_PROTO(MultiplyOp)
503 
504 BUILD_BINARY_PROTO(NonMembershipOp)
505 BUILD_BINARY_PROTO(NotEqualOp)
506 BUILD_BINARY_PROTO(OrOp)
507 BUILD_BINARY_PROTO(PlusAssignOp)
508 BUILD_BINARY_PROTO(PntrArrRefExp)
509 BUILD_BINARY_PROTO(RshiftAssignOp)
510 BUILD_BINARY_PROTO(JavaUnsignedRshiftAssignOp)
511 
512 BUILD_BINARY_PROTO(RshiftOp)
513 BUILD_BINARY_PROTO(JavaUnsignedRshiftOp)
514 BUILD_BINARY_PROTO(ScopeOp)
515 BUILD_BINARY_PROTO(SubtractOp)
516 BUILD_BINARY_PROTO(XorAssignOp)
517 
518 BUILD_BINARY_PROTO(VarArgCopyOp)
519 BUILD_BINARY_PROTO(VarArgStartOp)
520 
521 #undef BUILD_BINARY_PROTO
522 
524 ROSE_DLL_API SgConditionalExp * buildConditionalExp(SgExpression* test =NULL, SgExpression* a =NULL, SgExpression* b =NULL);
525 SgConditionalExp * buildConditionalExp_nfi(SgExpression* test, SgExpression* a, SgExpression* b, SgType* t);
526 
528 ROSE_DLL_API SgExprListExp * buildExprListExp(SgExpression * expr1 = NULL, SgExpression* expr2 = NULL, SgExpression* expr3 = NULL, SgExpression* expr4 = NULL, SgExpression* expr5 = NULL, SgExpression* expr6 = NULL, SgExpression* expr7 = NULL, SgExpression* expr8 = NULL, SgExpression* expr9 = NULL, SgExpression* expr10 = NULL);
529 ROSE_DLL_API SgExprListExp * buildExprListExp(const std::vector<SgExpression*>& exprs);
531 SgExprListExp * buildExprListExp_nfi(const std::vector<SgExpression*>& exprs);
532 
534 ROSE_DLL_API SgTupleExp * buildTupleExp(SgExpression * expr1 = NULL, SgExpression* expr2 = NULL, SgExpression* expr3 = NULL, SgExpression* expr4 = NULL, SgExpression* expr5 = NULL, SgExpression* expr6 = NULL, SgExpression* expr7 = NULL, SgExpression* expr8 = NULL, SgExpression* expr9 = NULL, SgExpression* expr10 = NULL);
535 ROSE_DLL_API SgTupleExp * buildTupleExp(const std::vector<SgExpression*>& exprs);
537 SgTupleExp * buildTupleExp_nfi(const std::vector<SgExpression*>& exprs);
538 
540 ROSE_DLL_API SgListExp * buildListExp(SgExpression * expr1 = NULL, SgExpression* expr2 = NULL, SgExpression* expr3 = NULL, SgExpression* expr4 = NULL, SgExpression* expr5 = NULL, SgExpression* expr6 = NULL, SgExpression* expr7 = NULL, SgExpression* expr8 = NULL, SgExpression* expr9 = NULL, SgExpression* expr10 = NULL);
541 ROSE_DLL_API SgListExp * buildListExp(const std::vector<SgExpression*>& exprs);
543 SgListExp * buildListExp_nfi(const std::vector<SgExpression*>& exprs);
544 
545 ROSE_DLL_API SgComprehension * buildComprehension(SgExpression *target, SgExpression *iter, SgExprListExp *ifs);
546 SgComprehension * buildComprehension_nfi(SgExpression *target, SgExpression *iter, SgExprListExp *ifs);
547 
548 ROSE_DLL_API SgListComprehension * buildListComprehension(SgExpression *elt, SgExprListExp *generators);
549 SgListComprehension * buildListComprehension_nfi(SgExpression *elt, SgExprListExp *generators);
550 
551 ROSE_DLL_API SgSetComprehension * buildSetComprehension(SgExpression *elt, SgExprListExp *generators);
552 SgSetComprehension * buildSetComprehension_nfi(SgExpression *elt, SgExprListExp *generators);
553 
556 
558 
563 
565 ROSE_DLL_API SgVarRefExp * buildVarRefExp(const std::string& varName, SgScopeStatement* scope=NULL);
566 
568 ROSE_DLL_API SgVarRefExp * buildVarRefExp(const char* varName, SgScopeStatement* scope=NULL);
569 
573 
576 
580 
582 
584 ROSE_DLL_API SgVarRefExp* buildOpaqueVarRefExp(const std::string& varName,SgScopeStatement* scope=NULL);
585 
586 // DQ (9/4/2013): Added support for building compound literals (similar to a SgVarRefExp).
590 
593 
595 ROSE_DLL_API SgFunctionRefExp * buildFunctionRefExp(const SgName& name, const SgType* func_type, SgScopeStatement* scope=NULL);
596 
597 ROSE_DLL_API SgFunctionRefExp * buildFunctionRefExp(const char* name, const SgType* func_type, SgScopeStatement* scope=NULL);
598 
601 
603 
606 
609 
611 
612 // #ifdef ROSE_USE_NEW_EDG_INTERFACE
613 // DQ (12/15/2011): Adding template declaration support to the AST.
615 // #endif
616 
617 // #ifdef ROSE_USE_NEW_EDG_INTERFACE
618 // DQ (12/29/2011): Adding template declaration support to the AST.
620 // #endif
621 
622 SgMemberFunctionRefExp * buildMemberFunctionRefExp_nfi(SgMemberFunctionSymbol* sym, bool virtual_call, bool need_qualifier);
623 ROSE_DLL_API SgMemberFunctionRefExp * buildMemberFunctionRefExp(SgMemberFunctionSymbol* sym, bool virtual_call, bool need_qualifier);
626 
629 SgFunctionCallExp* buildFunctionCallExp_nfi(SgExpression* f, SgExprListExp* parameters=NULL);
630 ROSE_DLL_API SgFunctionCallExp* buildFunctionCallExp(SgExpression* f, SgExprListExp* parameters=NULL);
631 
634 buildFunctionCallExp(const SgName& name, SgType* return_type, SgExprListExp* parameters=NULL, SgScopeStatement* scope=NULL);
635 
637 buildTypeTraitBuiltinOperator(SgName functionName, SgNodePtrList parameters);
638 
641  SgExpression * kernel,
642  SgExprListExp* parameters = NULL,
643  SgCudaKernelExecConfig * config = NULL
644 );
645 
648  SgExpression *grid = NULL,
649  SgExpression *blocks = NULL,
650  SgExpression *shared = NULL,
651  SgExpression *stream = NULL
652 );
653 
655 ROSE_DLL_API SgAssignInitializer * buildAssignInitializer(SgExpression * operand_i = NULL, SgType * expression_type = NULL);
656 SgAssignInitializer * buildAssignInitializer_nfi(SgExpression * operand_i = NULL, SgType * expression_type = NULL);
657 
661 
663 SgCompoundInitializer * buildCompoundInitializer(SgExprListExp * initializers = NULL, SgType * type = NULL);
665 
666 // DQ (!/4/2009): Added support for building SgConstructorInitializer
667 SgConstructorInitializer * buildConstructorInitializer( SgMemberFunctionDeclaration *declaration,SgExprListExp *args,SgType *expression_type,bool need_name,bool need_qualifier,bool need_parenthesis_after_name,bool associated_class_unknown);
668 SgConstructorInitializer * buildConstructorInitializer_nfi( SgMemberFunctionDeclaration *declaration,SgExprListExp *args,SgType *expression_type,bool need_name,bool need_qualifier,bool need_parenthesis_after_name,bool associated_class_unknown);
669 
671 ROSE_DLL_API SgSizeOfOp* buildSizeOfOp(SgExpression* exp= NULL);
672 SgSizeOfOp* buildSizeOfOp_nfi(SgExpression* exp);
673 
677 
679 SgAlignOfOp* buildAlignOfOp(SgExpression* exp= NULL);
680 SgAlignOfOp* buildAlignOfOp_nfi(SgExpression* exp);
681 
683 SgAlignOfOp* buildAlignOfOp(SgType* type = NULL);
685 
686 // DQ (7/18/2011): Added support for SgJavaInstanceOfOp
688 SgJavaInstanceOfOp* buildJavaInstanceOfOp(SgExpression* exp = NULL, SgType* type = NULL);
689 
690 
692 
693 //--------------------------------------------------------------
695 
699 
707 
711 
715 
718 buildFunctionParameterTypeList(SgType* type0 = NULL, SgType* type1 = NULL,
719  SgType* type2 = NULL, SgType* type3 = NULL,
720  SgType* type4 = NULL, SgType* type5 = NULL,
721  SgType* type6 = NULL, SgType* type7 = NULL);
722 
723 
724 //--------------------------------------------------------------
726 
734 buildVariableDeclaration(const SgName & name, SgType *type, SgInitializer *varInit=NULL, SgScopeStatement* scope=NULL);
735 
737 buildVariableDeclaration(const std::string & name, SgType *type, SgInitializer *varInit=NULL, SgScopeStatement* scope=NULL);
738 
740 buildVariableDeclaration(const char* name, SgType *type, SgInitializer *varInit=NULL, SgScopeStatement* scope=NULL);
741 
744 
745 // DQ (8/31/2012): Note that this macro can't be used in header files since it can only be set
746 // after sage3.h has been read. The reason is that this is a portability problem when "rose_config.h"
747 // appears in header files of applications using ROSE's header files.
748 // #ifdef ROSE_USE_NEW_EDG_INTERFACE
749 // DQ (12/6/2011): Adding support for template declarations into the AST.
750 // SgTemplateDeclaration*
751 // SgVariableDeclaration* buildTemplateVariableDeclaration_nfi(const SgName & name, SgType *type, SgInitializer *varInit, SgScopeStatement* scope);
753 // #endif
754 
757 buildTypedefDeclaration(const std::string& name, SgType* base_type, SgScopeStatement* scope = NULL, bool has_defining_base=false);
758 
760 buildTypedefDeclaration_nfi(const std::string& name, SgType* base_type, SgScopeStatement* scope = NULL, bool has_defining_base=false);
761 
765 
769 
772 
773 // DQ (2/11/2012): Added support to set the template name in function template instantations (member and non-member).
775 
776 // DQ (9/13/2012): Need to set the parents of SgTemplateArgument IR nodes now that they are passed in as part of the SageBuilder API.
780 
781 // DQ (9/16/2012): Added function to support setting the template parameters and setting their parents (and for any relevant declaration).
785 
786 // DQ (9/16/2012): Added function to support setting the template arguments and setting their parents (and for any relevant declaration).
787 void setTemplateArgumentsInDeclaration ( SgDeclarationStatement* decl, SgTemplateArgumentPtrList* templateArgumentsList_input );
788 void setTemplateSpecializationArgumentsInDeclaration ( SgDeclarationStatement* decl, SgTemplateArgumentPtrList* templateSpecializationArgumentsList_input );
789 void setTemplateParametersInDeclaration ( SgDeclarationStatement* decl, SgTemplateParameterPtrList* templateParametersList_input );
790 
791 
792 
793 // DQ (1/21/2009): This is a support function called by the buildNondefiningFunctionDeclaration() and
794 // buildNondefiningMemberFunctionDeclaration() functions. Since we constructe the function type in
795 // the support function and require either a SgFunctionType or SgMemberFunctionType, we need to to pass in
796 // a flag to specify which function type to build (bool isMemberFunction).
798 // template <class actualFunction>
799 // actualFunction*
800 template <class actualFunction>
801 actualFunction*
802 buildNondefiningFunctionDeclaration_T (const SgName & name, SgType* return_type, SgFunctionParameterList * paralist, bool isMemberFunction, SgScopeStatement* scope, SgExprListExp* decoratorList, unsigned int functionConstVolatileFlags, SgTemplateArgumentPtrList* templateArgumentsList, SgTemplateParameterPtrList* templateParameterList);
803 
805 // DQ (7/26/2012): Changing the API to include template arguments so that we can generate names with and without template arguments (to support name mangiling).
807 buildNondefiningFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, bool buildTemplateInstantiation, SgTemplateArgumentPtrList* templateArgumentsList);
808 
809 // DQ (8/28/2012): This preserves the original API with a simpler function (however for C++ at least, it is frequently not sufficent).
810 // We need to decide if the SageBuilder API should include these sorts of functions.
811 ROSE_DLL_API SgFunctionDeclaration* buildNondefiningFunctionDeclaration(const SgName& name, SgType* return_type, SgFunctionParameterList* parameter_list, SgScopeStatement* scope = NULL, SgExprListExp* decoratorList = NULL);
812 
813 // DQ (8/11/2013): Even though template functions can't use partial specialization, they can be specialized,
814 // however the specialization does not define a template and instead defines a template instantiation, so we
815 // don't need the SgTemplateArgumentPtrList in this function.
816 // SgTemplateFunctionDeclaration* buildNondefiningTemplateFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL);
818 buildNondefiningTemplateFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL, SgTemplateParameterPtrList* templateParameterList = NULL);
819 
820 // DQ (8/11/2013): Note that access to the SgTemplateParameterPtrList should be handled through the first_nondefining_declaration (which is a required parameter).
821 // DQ (12/1/2011): Adding support for template declarations into the AST.
823 buildDefiningTemplateFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, SgTemplateFunctionDeclaration* first_nondefining_declaration);
824 
827 buildNondefiningFunctionDeclaration (const SgFunctionDeclaration* funcdecl, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL);
828 
830 // SgMemberFunctionDeclaration * buildNondefiningMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL);
831 // SgMemberFunctionDeclaration * buildNondefiningMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL, unsigned int functionConstVolatileFlags = 0);
832 // SgMemberFunctionDeclaration* buildNondefiningMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL, unsigned int functionConstVolatileFlags = 0, bool buildTemplateInstantiation = false);
834 buildNondefiningMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, unsigned int functionConstVolatileFlags, bool buildTemplateInstantiation, SgTemplateArgumentPtrList* templateArgumentsList);
835 
836 // DQ (8/12/2013): This function needs to supporte SgTemplateParameterPtrList and SgTemplateArgumentPtrList parameters.
837 // SgTemplateMemberFunctionDeclaration* buildNondefiningTemplateMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope = NULL, SgExprListExp* decoratorList = NULL, unsigned int functionConstVolatileFlags = 0);
839 buildNondefiningTemplateMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, unsigned int functionConstVolatileFlags, SgTemplateParameterPtrList* templateParameterList );
840 
841 // DQ (12/1/2011): Adding support for template declarations in the AST.
843 buildDefiningTemplateMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, unsigned int functionConstVolatileFlags, SgTemplateMemberFunctionDeclaration* first_nondefing_declaration );
844 
846 // SgMemberFunctionDeclaration* buildNondefiningMemberFunctionDeclaration (const SgName & name, SgMemberFunctionType* func_type, SgFunctionParameterList* paralist, SgScopeStatement* scope=NULL);
847 
848 // DQ (8/11/2013): Note that the specification of the SgTemplateArgumentPtrList is somewhat redundant with the required parameter first_nondefinng_declaration (I think).
850 // SgMemberFunctionDeclaration* buildDefiningMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, bool buildTemplateInstantiation, unsigned int functionConstVolatileFlags, SgMemberFunctionDeclaration* first_nondefinng_declaration);
852 buildDefiningMemberFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList *parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, bool buildTemplateInstantiation, unsigned int functionConstVolatileFlags, SgMemberFunctionDeclaration* first_nondefinng_declaration, SgTemplateArgumentPtrList* templateArgumentsList);
853 
854 #if 0
855 // DQ (7/26/2012): I would like to remove this from the API (at least for now while debugging the newer API required for template argument handling).
856 // DQ (5/12/2012): This is a problem once we remove the default parameters for function arguments (to simplify debugging).
859 buildDefiningMemberFunctionDeclaration (const SgName & name, SgMemberFunctionType* func_type, SgFunctionParameterList* paralist, SgScopeStatement* scope, SgExprListExp* decoratorList /* , unsigned int functionConstVolatileFlags = 0 */, SgMemberFunctionDeclaration* first_nondefinng_declaration);
860 #endif
861 
862 #if 1
863 // DQ (8/29/2012): This is re-enabled because the backstroke project is using it (also added back the default parameters; which I don't think I like in the API).
864 // DQ (7/26/2012): I would like to remove this from the API (at least for now while debugging the newer API required for template argument handling).
867 buildDefiningMemberFunctionDeclaration (const SgName & name, SgMemberFunctionType* func_type, SgScopeStatement* scope, SgExprListExp* decoratorList = NULL /* , unsigned int functionConstVolatileFlags = 0 */, SgMemberFunctionDeclaration* first_nondefinng_declaration = NULL);
868 #endif
869 
871 // SgMemberFunctionDeclaration*
873 buildNondefiningMemberFunctionDeclaration (const SgMemberFunctionDeclaration* funcdecl, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL, unsigned int functionConstVolatileFlags = 0);
874 
875 // DQ (8/28/2012): This preserves the original API with a simpler function (however for C++ at least, it is frequently not sufficent).
876 // We need to decide if the SageBuilder API should include these sorts of functions.
878 
879 // DQ (8/28/2012): This preserves the original API with a simpler function (however for C++ at least, it is frequently not sufficent).
880 // We need to decide if the SageBuilder API should include these sorts of functions.
882 
883 
884 // DQ (8/11/2013): Note that the specification of the SgTemplateArgumentPtrList is somewhat redundant with the required parameter first_nondefinng_declaration (I think).
886 template <class actualFunction>
887 actualFunction*
888 // buildDefiningFunctionDeclaration_T (const SgName & name, SgType* return_type, SgFunctionParameterList * parlist, bool isMemberFunction, SgScopeStatement* scope=NULL, SgExprListExp* decoratorList = NULL, unsigned int functionConstVolatileFlags = 0);
889 // buildDefiningFunctionDeclaration_T (const SgName & name, SgType* return_type, SgFunctionParameterList * parlist, bool isMemberFunction, SgScopeStatement* scope, SgExprListExp* decoratorList, unsigned int functionConstVolatileFlags, actualFunction* first_nondefinng_declaration);
890 buildDefiningFunctionDeclaration_T (const SgName & name, SgType* return_type, SgFunctionParameterList * parlist, bool isMemberFunction, SgScopeStatement* scope, SgExprListExp* decoratorList, unsigned int functionConstVolatileFlags, actualFunction* first_nondefinng_declaration, SgTemplateArgumentPtrList* templateArgumentsList);
891 
892 // DQ (8/11/2013): Note that the specification of the SgTemplateArgumentPtrList is somewhat redundant with the required parameter first_nondefinng_declaration (I think).
894 // SgFunctionDeclaration* buildDefiningFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList * parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, bool buildTemplateInstantiation, SgFunctionDeclaration* first_nondefinng_declaration);
896 buildDefiningFunctionDeclaration (const SgName & name, SgType* return_type, SgFunctionParameterList * parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, bool buildTemplateInstantiation = false, SgFunctionDeclaration* first_nondefinng_declaration = NULL, SgTemplateArgumentPtrList* templateArgumentsList = NULL);
897 
898 #if 0
899 // DQ (7/26/2012): I would like to remove these from the API (if possible).
901 buildDefiningFunctionDeclaration (const std::string & name, SgType* return_type, SgFunctionParameterList * parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, SgFunctionDeclaration* first_nondefinng_declaration);
902 #endif
903 
904 #if 0
905 // DQ (7/26/2012): I would like to remove these from the API (if possible).
907 buildDefiningFunctionDeclaration (const char* name, SgType* return_type, SgFunctionParameterList * parlist, SgScopeStatement* scope, SgExprListExp* decoratorList, SgFunctionDeclaration* first_nondefinng_declaration);
908 #endif
909 
910 // DQ (8/28/2012): This preserves the original API with a simpler function (however for C++ at least, it is frequently not sufficient).
911 // We need to decide if the SageBuilder API should include these sorts of functions.
913 
914 // DQ (8/28/2012): This preserves the original API with a simpler function (however for C++ at least, it is frequently not sufficient).
915 // We need to decide if the SageBuilder API should include these sorts of functions.
917 
921 
924 buildFunctionCallStmt(const SgName& name, SgType* return_type, SgExprListExp* parameters=NULL, SgScopeStatement* scope=NULL);
925 
928 buildFunctionCallStmt(SgExpression* function, SgExprListExp* parameters=NULL);
929 
930 
932 
937 
941 
944 
946 ROSE_DLL_API SgCaseOptionStmt * buildCaseOptionStmt( SgExpression * key = NULL,SgStatement *body = NULL);
947 SgCaseOptionStmt * buildCaseOptionStmt_nfi( SgExpression * key,SgStatement *body);
948 
952 
954 ROSE_DLL_API SgExprStatement* buildExprStatement(SgExpression* exp = NULL);
955 SgExprStatement* buildExprStatement_nfi(SgExpression* exp);
956 
958 ROSE_DLL_API SgSwitchStatement* buildSwitchStatement(SgStatement *item_selector = NULL,SgStatement *body = NULL);
959 inline SgSwitchStatement* buildSwitchStatement(SgExpression *item_selector, SgStatement *body = NULL) {
960  return buildSwitchStatement(buildExprStatement(item_selector), body);
961 }
963 
965 ROSE_DLL_API SgIfStmt * buildIfStmt(SgStatement* conditional, SgStatement * true_body, SgStatement * false_body);
966 inline SgIfStmt * buildIfStmt(SgExpression* conditional, SgStatement * true_body, SgStatement * false_body) {
967  return buildIfStmt(buildExprStatement(conditional), true_body, false_body);
968 }
969 
970 SgIfStmt* buildIfStmt_nfi(SgStatement* conditional, SgStatement * true_body, SgStatement * false_body);
971 
976 
977 // DQ (10/12/2012): Added new function for a single statement.
979 
981 ROSE_DLL_API SgForStatement * buildForStatement(SgStatement* initialize_stmt, SgStatement * test, SgExpression * increment, SgStatement * loop_body, SgStatement * else_body = NULL);
982 SgForStatement * buildForStatement_nfi(SgStatement* initialize_stmt, SgStatement * test, SgExpression * increment, SgStatement * loop_body, SgStatement * else_body = NULL);
983 SgForStatement * buildForStatement_nfi(SgForInitStatement * init_stmt, SgStatement * test, SgExpression * increment, SgStatement * loop_body, SgStatement * else_body = NULL);
984 void buildForStatement_nfi(SgForStatement* result, SgForInitStatement * init_stmt, SgStatement * test, SgExpression * increment, SgStatement * loop_body, SgStatement * else_body = NULL);
985 
986 // EDG 4.8 handled the do-while statment differently (more similar to a block scope than before in EDG 4.7 (i.e. with an end-of-construct statement).
987 // So we need an builder function that can use the existing SgDoWhileStatement scope already on the stack.
988 void buildDoWhileStatement_nfi(SgDoWhileStmt* result, SgStatement * body, SgStatement * condition);
989 
991 SgUpcForAllStatement * buildUpcForAllStatement_nfi(SgStatement* initialize_stmt, SgStatement * test, SgExpression * increment, SgExpression* affinity, SgStatement * loop_body);
992 SgUpcForAllStatement * buildUpcForAllStatement_nfi(SgForInitStatement * init_stmt, SgStatement * test, SgExpression * increment, SgExpression* affinity, SgStatement * loop_body);
993 
994 // DQ (3/3/2013): Added UPC specific build functions.
997 
1000 
1003 
1006 
1007 
1009 ROSE_DLL_API SgWhileStmt * buildWhileStmt(SgStatement * condition, SgStatement *body, SgStatement *else_body = NULL);
1010 inline SgWhileStmt * buildWhileStmt(SgExpression * condition, SgStatement *body, SgStatement* else_body = NULL) {
1011  return buildWhileStmt(buildExprStatement(condition), body, else_body);
1012 }
1013 SgWhileStmt * buildWhileStmt_nfi(SgStatement * condition, SgStatement *body, SgStatement *else_body = NULL);
1014 
1016 ROSE_DLL_API SgWithStatement* buildWithStatement(SgExpression* expr, SgStatement* body);
1017 SgWithStatement* buildWithStatement_nfi(SgExpression* expr, SgStatement* body);
1018 
1021 inline SgDoWhileStmt * buildDoWhileStmt(SgStatement* body, SgExpression * condition) {
1022  return buildDoWhileStmt(body, buildExprStatement(condition));
1023 }
1025 
1029 
1031 ROSE_DLL_API SgPragma* buildPragma(const std::string & name);
1032 
1034 ROSE_DLL_API SgBasicBlock * buildBasicBlock(SgStatement * stmt1 = NULL, SgStatement* stmt2 = NULL, SgStatement* stmt3 = NULL, SgStatement* stmt4 = NULL, SgStatement* stmt5 = NULL, SgStatement* stmt6 = NULL, SgStatement* stmt7 = NULL, SgStatement* stmt8 = NULL, SgStatement* stmt9 = NULL, SgStatement* stmt10 = NULL);
1036 SgBasicBlock * buildBasicBlock_nfi(const std::vector<SgStatement*>&);
1037 
1040 buildAssignStatement(SgExpression* lhs,SgExpression* rhs);
1041 
1042 // DQ (8/16/2011): Generated a new version of this function to define consistant semantics.
1044 ROSE_DLL_API SgExprStatement* buildAssignStatement_ast_translate(SgExpression* lhs,SgExpression* rhs);
1045 
1049 
1053 
1057 
1060 ROSE_DLL_API SgAssertStmt* buildAssertStmt(SgExpression *test, SgExpression *exceptionArgument);
1061 SgAssertStmt* buildAssertStmt_nfi(SgExpression* test);
1062 
1065 SgYieldExpression* buildYieldExpression_nfi(SgExpression* value);
1066 
1068 ROSE_DLL_API SgKeyDatumPair* buildKeyDatumPair (SgExpression* key, SgExpression* datum);
1069 SgKeyDatumPair* buildKeyDatumPair_nfi(SgExpression* key, SgExpression* datum);
1070 
1072 ROSE_DLL_API SgDictionaryExp* buildDictionaryExp (std::vector<SgKeyDatumPair*> pairs);
1073 SgDictionaryExp* buildDictionaryExp_nfi(std::vector<SgKeyDatumPair*> pairs);
1074 
1078 
1080 ROSE_DLL_API SgDeleteExp* buildDeleteExp(SgExpression *target, bool is_array = false, bool need_global_specifier = false, SgFunctionDeclaration *deleteOperatorDeclaration = NULL);
1081 SgDeleteExp* buildDeleteExp_nfi(SgExpression *target, bool is_array = false, bool need_global_specifier = false, SgFunctionDeclaration *deleteOperatorDeclaration = NULL);
1082 
1084 // SgClassDefinition* buildClassDefinition(SgClassDeclaration *d = NULL);
1085 ROSE_DLL_API SgClassDefinition* buildClassDefinition(SgClassDeclaration *d = NULL, bool buildTemplateInstantiation = false);
1086 
1088 // SgClassDefinition* buildClassDefinition_nfi(SgClassDeclaration *d = NULL);
1089 SgClassDefinition* buildClassDefinition_nfi(SgClassDeclaration *d = NULL, bool buildTemplateInstantiation = false);
1090 
1091 // #ifdef ROSE_USE_NEW_EDG_INTERFACE
1092 // DQ (11/19/2011): Added more template declaration support.
1095 // #endif
1096 
1097 // DQ (7/27/2012): Removed from the API as part of new semantics for names with and without template arguments.
1098 // DQ (6/1/2012): Refactored support for setting the templateName to not have template argument syntax in the name.
1099 // SgName generateTemplateNameFromTemplateNameWithTemplateArguements(SgName inputNameWithTemplateArguements);
1100 
1102 // DQ (6/6/2012): Added support to get the template arguments into place before computing the type.
1103 // SgClassDeclaration* buildNondefiningClassDeclaration_nfi(const SgName& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope);
1104 // SgClassDeclaration* buildNondefiningClassDeclaration_nfi(const SgName& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, bool buildTemplateInstantiation = false);
1106 
1107 // DQ (8/11/2013): We need to hand in both the SgTemplateParameterPtrList and the SgTemplateArgumentPtrList because class templates can be partially specialized.
1108 // DQ (11/29/2011): Adding template declaration support to the AST.
1109 // SgTemplateClassDeclaration* buildNondefiningTemplateClassDeclaration_nfi(const SgName& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope);
1111 
1112 // DQ (11/7/2009): Added functions to build C++ class.
1115 
1116 // DQ (11/7/2009): Added function to build C++ class (builds both the non-defining and defining declarations; in that order).
1118 
1121 
1126 
1130 
1131 // tps (09/02/2009) : Added support for building namespaces
1135 
1136 // driscoll6 (7/20/11) : Support n-ary operators for python
1138 SgNaryComparisonOp* buildNaryComparisonOp_nfi(SgExpression* lhs);
1139 ROSE_DLL_API SgNaryBooleanOp* buildNaryBooleanOp(SgExpression* lhs);
1140 SgNaryBooleanOp* buildNaryBooleanOp_nfi(SgExpression* lhs);
1141 
1143 SgStringConversion* buildStringConversion_nfi(SgExpression* exp);
1144 
1145 // DQ (6/6/2012): Addeding support to include template arguments in the generated type (template argument must be provided as early as possible).
1146 // DQ (1/24/2009): Added this "_nfi" function but refactored buildStructDeclaration to also use it (this needs to be done uniformally).
1147 // SgClassDeclaration * buildClassDeclaration_nfi(const SgName& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, SgClassDeclaration* nonDefiningDecl, bool buildTemplateInstantiation = false);
1148 // SgClassDeclaration * buildClassDeclaration_nfi(const SgName& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, SgClassDeclaration* nonDefiningDecl, bool buildTemplateInstantiation);
1149 SgClassDeclaration* buildClassDeclaration_nfi(const SgName& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, SgClassDeclaration* nonDefiningDecl, bool buildTemplateInstantiation, SgTemplateArgumentPtrList* templateArgumentsList);
1150 
1151 // DQ (8/11/2013): I think that the specification of both SgTemplateParameterPtrList and SgTemplateArgumentPtrList is redundant with the nonDefiningDecl (which is a required parameter).
1152 // DQ (11/19/2011): Added to support template class declaration using EDG 4.x support (to support the template declarations directly in the AST).
1153 // SgTemplateClassDeclaration* buildTemplateClassDeclaration_nfi(const SgName& name, SgClassDeclaration::class_types kind, SgScopeStatement* scope, SgTemplateClassDeclaration* nonDefiningDecl );
1155  SgTemplateParameterPtrList* templateParameterList, SgTemplateArgumentPtrList* templateSpecializationArgumentList );
1156 
1159 
1162 
1164 ROSE_DLL_API SgReturnStmt* buildReturnStmt(SgExpression* expression = NULL);
1165 SgReturnStmt* buildReturnStmt_nfi(SgExpression* expression);
1166 
1170 
1173 
1176 
1179 
1182 
1183 // driscoll6 (6/9/2011): Adding support for try stmts.
1184 // ! Build a catch statement.
1186 
1187 // driscoll6 (6/9/2011): Adding support for try stmts.
1188 // ! Build a try statement.
1190  SgCatchOptionStmt* catch0=NULL,
1191  SgCatchOptionStmt* catch1=NULL,
1192  SgCatchOptionStmt* catch2=NULL,
1193  SgCatchOptionStmt* catch3=NULL,
1194  SgCatchOptionStmt* catch4=NULL);
1195 
1196 // charles4 (9/16/2011): Adding support for try stmts.
1197 // ! Build a try statement.
1198 //SgTryStmt* buildTryStmt(SgStatement *try_body, SgCatchStatementSeq *catches, SgStatement *finally_body = NULL);
1199 
1200 // charles4 (9/16/2011): Adding support for try stmts.
1201 // ! Build a try statement.
1202 ROSE_DLL_API SgTryStmt* buildTryStmt(SgBasicBlock *try_body, SgBasicBlock *finally_body = NULL);
1203 
1204 // charles4 (9/16/2011): Adding support for Catch Blocks.
1205 // ! Build an initial sequence of Catch blocks containing 0 or 1 element.
1207 
1208 // charles4 (8/25/2011): Adding support for Java Synchronized stmts.
1209 // ! Build a Java Synchronized statement.
1211 
1212 // charles4 (8/25/2011): Adding support for Java Throw stmts.
1213 // ! Build a Java Throw statement.
1215 
1216 // charles4 (8/25/2011): Adding support for Java Foreach stmts.
1217 // ! Build a Java Foreach statement.
1218 // SgJavaForEachStatement *buildJavaForEachStatement(SgInitializedName * = NULL, SgExpression * = NULL, SgStatement * = NULL);
1220 
1221 // charles4 (8/25/2011): Adding support for Java Label stmts.
1222 // ! Build a Java Label statement.
1224 
1225 // ! Build an exec statement
1226 ROSE_DLL_API SgExecStatement* buildExecStatement(SgExpression* executable, SgExpression* globals = NULL, SgExpression* locals = NULL);
1227 SgExecStatement* buildExecStatement_nfi(SgExpression* executable, SgExpression* globals = NULL, SgExpression* locals = NULL);
1228 
1229 // ! Build a python print statement
1230 ROSE_DLL_API SgPythonPrintStmt* buildPythonPrintStmt(SgExpression* dest = NULL, SgExprListExp* values = NULL);
1231 SgPythonPrintStmt* buildPythonPrintStmt_nfi(SgExpression* dest = NULL, SgExprListExp* values = NULL);
1232 
1233 // ! Build a python global statement
1236 
1237 // DQ (4/30/2010): Added support for building asm statements.
1239 ROSE_DLL_API SgAsmStmt* buildAsmStatement(std::string s);
1240 SgAsmStmt* buildAsmStatement_nfi(std::string s);
1241 
1242 // DQ (4/30/2010): Added support for building nop statement using asm statement
1243 // ! Building nop statement using asm statement
1245 
1246 // DQ (5/6/2013): Added build functions to support SgBaseClass construction.
1247 SgBaseClass* buildBaseClass ( SgClassDeclaration* classDeclaration, SgClassDefinition* classDefinition, bool isVirtual, bool isDirect );
1248 // SgAccessModifier buildAccessModifier ( unsigned int access );
1249 
1250 
1252 
1253 //--------------------------------------------------------------
1255 
1259 
1262 ROSE_DLL_API SgFile* buildFile(const std::string& inputFileName,const std::string& outputFileName, SgProject* project=NULL);
1263 
1265 
1267 SgSourceFile* buildSourceFile(const std::string& outputFileName, SgProject* project=NULL);
1268 
1270 ROSE_DLL_API PreprocessingInfo* buildComment(SgLocatedNode* target, const std::string & content,
1273 
1276  const std::string & content,
1278 
1279 #ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
1280 ROSE_DLL_API AbstractHandle::abstract_handle * buildAbstractHandle(SgNode* n);
1282 #endif
1283 
1285 // ROSE_DLL_API void fixupCopyOfAstFromSeperateFileInNewTargetAst (SgStatement *insertionPoint, bool insertionPointIsScope, SgStatement *toInsert, SgStatement* original_before_copy, std::map<SgNode*,SgNode*> & translationMap);
1286 // ROSE_DLL_API void fixupCopyOfNodeFromSeperateFileInNewTargetAst(SgStatement* insertionPoint, bool insertionPointIsScope, SgNode* node_copy, SgNode* node_original, std::map<SgNode*,SgNode*> & translationMap);
1287 ROSE_DLL_API void fixupCopyOfAstFromSeperateFileInNewTargetAst (SgStatement *insertionPoint, bool insertionPointIsScope, SgStatement *toInsert, SgStatement* original_before_copy);
1288 ROSE_DLL_API void fixupCopyOfNodeFromSeperateFileInNewTargetAst(SgStatement* insertionPoint, bool insertionPointIsScope, SgNode* node_copy, SgNode* node_original);
1290 ROSE_DLL_API SgType* getTargetFileType(SgType* snippet_type, SgScopeStatement* targetScope);
1292 
1294 ROSE_DLL_API void errorCheckingTargetAST (SgNode* node_copy, SgNode* node_original, SgFile* targetFile, bool failOnWarning);
1295 
1297 // ROSE_DLL_API void resetDeclaration(SgDeclarationStatement* classDeclaration_copy, SgDeclarationStatement* classDeclaration_original);
1298 template <class T> ROSE_DLL_API void resetDeclaration(T* classDeclaration_copy, T* classDeclaration_original, SgScopeStatement* targetScope);
1299 
1300 //-----------------------------------------------------------------------------
1301 //#ifdef ROSE_BUILD_JAVA_LANGUAGE_SUPPORT
1302 //-----------------------------------------------------------------------------
1310 ROSE_DLL_API SgJavaNormalAnnotation *buildJavaNormalAnnotation(SgType *, std::list<SgJavaMemberValuePair *>&);
1311 ROSE_DLL_API SgInitializedName *buildJavaFormalParameter(SgType *, const SgName &, bool is_var_args = false, bool is_final = false);
1312 
1323 
1325 
1326 } // end of namespace
1327 
1328 namespace Rose {
1329  namespace Frontend {
1330  namespace Java {
1331 
1333  extern SgClassType *ObjectClassType;
1334  extern SgClassType *StringClassType;
1335  extern SgClassType *ClassClassType;
1337 
1338  }// ::rose::frontend::java
1339  }// ::rose::frontend
1340 }// ::rose
1341 //-----------------------------------------------------------------------------
1342 //#endif // ROSE_BUILD_JAVA_LANGUAGE_SUPPORT
1343 //-----------------------------------------------------------------------------
1344 
1345 #endif //ROSE_SAGE_BUILDER_INTERFACE