ROSE  0.11.98.0
untypedBuilder.h
1 #ifndef UNTYPED_BUILDER_H
2 #define UNTYPED_BUILDER_H
3 
4 namespace UntypedBuilder {
5 
6 void set_language(SgFile::languageOption_enum language);
7 
9 template <class ScopeClass>
10 ScopeClass* buildScope();
11 
13 template <class ScopeClass>
14 ScopeClass* buildScope(const std::string & label);
15 
17 SgUntypedType* buildType (SgUntypedType::type_enum type_enum = SgUntypedType::e_unknown, std::string name = "");
18 
20 SgUntypedArrayType* buildArrayType (SgUntypedType::type_enum type_enum, SgUntypedExprListExpression* shape, int rank);
21 
23 SgUntypedTableType* buildJovialTableType (std::string name, SgUntypedType* base_type,
24  SgUntypedExprListExpression* shape, bool is_anonymous=false);
25 
27 SgUntypedInitializedName* buildInitializedName(const std::string & name, SgUntypedType* type, SgUntypedExpression* initializer = NULL);
28 
30 SgUntypedInitializedNameList* buildInitializedNameList(SgUntypedInitializedName* initialized_name = NULL);
31 
33 SgUntypedVariableDeclaration* buildVariableDeclaration(const std::string & name, SgUntypedType* type,
34  SgUntypedExprListExpression* attr_list,
35  SgUntypedExpression* initializer = NULL);
36 
38 SgUntypedVariableDeclaration* buildVariableDeclaration(const std::string & name, SgUntypedType* type,
39  SgUntypedStructureDeclaration* base_type_decl,
40  SgUntypedExprListExpression* attr_list,
41  SgUntypedExpression* initializer = NULL);
42 
45 SgUntypedStructureDefinition* buildStructureDefinition();
46 
50 SgUntypedStructureDefinition* buildStructureDefinition(const std::string type_name, bool has_body=false, SgUntypedScope* scope=NULL);
51 
54 SgUntypedStructureDeclaration* buildStructureDeclaration(const std::string struct_name);
55 
59 SgUntypedStructureDeclaration* buildStructureDeclaration(const std::string struct_name,
60  const std::string struct_type_name, bool has_body=false);
61 
64 SgUntypedStructureDefinition* buildJovialTableDescription();
65 
69 SgUntypedStructureDefinition* buildJovialTableDescription(std::string table_type_name, bool has_body=false, SgUntypedScope* scope=NULL);
70 
73 SgUntypedStructureDeclaration* buildJovialTableDeclaration(std::string type_name);
74 
76 SgUntypedDirectiveDeclaration* buildDirectiveDeclaration(std::string directive_string);
77 
79 ROSE_DLL_API SgUntypedNullExpression* buildUntypedNullExpression();
80 
81 } // namespace UntypedBuilder
82 
83 #endif
ROSE_DLL_API SgJovialTableType * buildJovialTableType(const SgName &name, SgType *base_type, SgExprListExp *dim_info, SgScopeStatement *scope=NULL)
Build a Jovial table type with required class definition and defining and nondefining declarations...
ROSE_DLL_API SgArrayType * buildArrayType(SgType *base_type=NULL, SgExpression *index=NULL)
Build ArrayType.
ROSE_DLL_API SgInitializedName * buildInitializedName(const SgName &name, SgType *type, SgInitializer *init=NULL)
Initialized names are tricky, their scope vary depending on context, so scope and symbol information ...
ROSE_DLL_API SgVariableDeclaration * buildVariableDeclaration(const SgName &name, SgType *type, SgInitializer *varInit=NULL, SgScopeStatement *scope=NULL)
Build a variable declaration, handle symbol table transparently.
languageOption_enum
Enum type used to specify output language (option used for testing unparsers).