ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SgToken Class Reference

#include <Cxx_Grammar.h>

Inheritance diagram for SgToken:
Collaboration diagram for SgToken:

Classes

struct  token_element
 

Public Types

enum  ROSE_Fortran_Keywords {
  FORTRAN_ABSTRACT = 0 + 0,
  FORTRAN_ACCESS = 1 + 0,
  FORTRAN_ACTION = 2 + 0,
  FORTRAN_ALLOCATE = 3 + 0,
  FORTRAN_ALLOCATABLE = 4 + 0,
  FORTRAN_ASSIGN = 5 + 0,
  FORTRAN_ASSOCIATE = 6 + 0,
  FORTRAN_ASYNCHRONOUS = 7 + 0,
  FORTRAN_BACKSPACE = 8 + 0,
  FORTRAN_BIND = 9 + 0,
  FORTRAN_BLANK = 10 + 0,
  FORTRAN_BLOCK_DATA = 11 + 0,
  FORTRAN_CALL = 12 + 0,
  FORTRAN_CHARACTER = 13 + 0,
  FORTRAN_CLASS = 14 + 0,
  FORTRAN_CLOSE = 15 + 0,
  FORTRAN_CONTINUE = 16 + 0,
  FORTRAN_CYCLE = 17 + 0,
  FORTRAN_CASE = 18 + 0,
  FORTRAN_COMMON = 19 + 0,
  FORTRAN_COMPLEX = 20 + 0,
  FORTRAN_CONTAINS = 21 + 0,
  FORTRAN_DEALLOCATE = 22 + 0,
  FORTRAN_DATA = 23 + 0,
  FORTRAN_DEFERRED = 24 + 0,
  FORTRAN_DELIM = 25 + 0,
  FORTRAN_DIMENSION = 26 + 0,
  FORTRAN_DO = 27 + 0,
  FORTRAN_DT = 28 + 0,
  FORTRAN_DOUBLEPRECISION = 29 + 0,
  FORTRAN_ENCODING = 30 + 0,
  FORTRAN_END_CASE = 31 + 0,
  FORTRAN_ENDDO = 32 + 0,
  FORTRAN_END_FILE = 33 + 0,
  FORTRAN_END_ENUM = 34 + 0,
  FORTRAN_END_INTERFACE = 35 + 0,
  FORTRAN_END_TYPE = 36 + 0,
  FORTRAN_ERR = 37 + 0,
  FORTRAN_ERRMSG = 38 + 0,
  FORTRAN_EXIT = 39 + 0,
  FORTRAN_ELSE = 40 + 0,
  FORTRAN_ELSEWHERE = 41 + 0,
  FORTRAN_ELSEIF = 42 + 0,
  FORTRAN_ENDIF = 43 + 0,
  FORTRAN_ENTRY = 44 + 0,
  FORTRAN_END = 45 + 0,
  FORTRAN_ENUM = 46 + 0,
  FORTRAN_ENUMERATOR = 47 + 0,
  FORTRAN_EQUIVALENCE = 48 + 0,
  FORTRAN_EXTERNAL = 49 + 0,
  FORTRAN_EXTENDS = 50 + 0,
  FORTRAN_FILE = 51 + 0,
  FORTRAN_FINAL = 52 + 0,
  FORTRAN_FMT = 53 + 0,
  FORTRAN_FORALL = 54 + 0,
  FORTRAN_FORM = 55 + 0,
  FORTRAN_FORMATTED = 56 + 0,
  FORTRAN_FORMAT = 57 + 0,
  FORTRAN_FLUSH = 58 + 0,
  FORTRAN_FUNCTION = 59 + 0,
  FORTRAN_GENERIC = 60 + 0,
  FORTRAN_GOTO = 61 + 0,
  FORTRAN_ID = 62 + 0,
  FORTRAN_IF = 63 + 0,
  FORTRAN_INQUIRE = 64 + 0,
  FORTRAN_INTEGER = 65 + 0,
  FORTRAN_IOMSG = 66 + 0,
  FORTRAN_IOSTAT = 67 + 0,
  FORTRAN_IMPLICIT = 68 + 0,
  FORTRAN_IMPLICIT_NONE = 69 + 0,
  FORTRAN_IMPORT = 70 + 0,
  FORTRAN_INTERFACE = 71 + 0,
  FORTRAN_INTENT = 72 + 0,
  FORTRAN_INTRINSIC = 73 + 0,
  FORTRAN_LEN = 74 + 0,
  FORTRAN_LOGICAL = 75 + 0,
  FORTRAN_KIND = 76 + 0,
  FORTRAN_MODULE_PROC = 77 + 0,
  FORTRAN_MODULE = 78 + 0,
  FORTRAN_NON_INTRINSIC = 79 + 0,
  FORTRAN_NON_OVERRIDABLE = 80 + 0,
  FORTRAN_NULL = 81 + 0,
  FORTRAN_NULLIFY = 82 + 0,
  FORTRAN_NAMELIST = 83 + 0,
  FORTRAN_NML = 84 + 0,
  FORTRAN_NONE = 85 + 0,
  FORTRAN_NOPASS = 86 + 0,
  FORTRAN_ONLY = 87 + 0,
  FORTRAN_OPEN = 88 + 0,
  FORTRAN_OPTIONAL = 89 + 0,
  FORTRAN_PARAMETER = 90 + 0,
  FORTRAN_PASS = 91 + 0,
  FORTRAN_PAUSE = 92 + 0,
  FORTRAN_POINTER = 93 + 0,
  FORTRAN_PRINT = 94 + 0,
  FORTRAN_PRIVATE = 95 + 0,
  FORTRAN_PROCEDURE = 96 + 0,
  FORTRAN_PROGRAM = 97 + 0,
  FORTRAN_PROTECTED = 98 + 0,
  FORTRAN_READ = 99 + 0,
  FORTRAN_REAL = 100 + 0,
  FORTRAN_RETURN = 101 + 0,
  FORTRAN_REWIND = 102 + 0,
  FORTRAN_ROUND = 103 + 0,
  FORTRAN_SELECTCASE = 104 + 0,
  FORTRAN_SELECTTYPE = 105 + 0,
  FORTRAN_SEQUENCE = 106 + 0,
  FORTRAN_SAVE = 107 + 0,
  FORTRAN_SIGN = 108 + 0,
  FORTRAN_SIZE = 109 + 0,
  FORTRAN_SOURCE = 110 + 0,
  FORTRAN_STAT = 111 + 0,
  FORTRAN_STOP = 112 + 0,
  FORTRAN_SUBROUTINE = 113 + 0,
  FORTRAN_TARGET = 114 + 0,
  FORTRAN_THEN = 115 + 0,
  FORTRAN_DERIVED_DECL = 116 + 0,
  FORTRAN_TYPEIS = 117 + 0,
  FORTRAN_UNFORMATTED = 118 + 0,
  FORTRAN_UNIT = 119 + 0,
  FORTRAN_USE = 120 + 0,
  FORTRAN_VALUE = 121 + 0,
  FORTRAN_VOLATILE = 122 + 0,
  FORTRAN_WAIT = 123 + 0,
  FORTRAN_WHERE = 124 + 0,
  FORTRAN_WRITE = 125 + 0,
  FORTRAN_END_PROGRAM = 126 + 0,
  FORTRAN_END_FUNCTION = 127 + 0,
  FORTRAN_END_SUBROUTINE = 128 + 0,
  FORTRAN_END_MODULE = 129 + 0,
  FORTRAN_DOUBLE_COMPLEX = 130 + 0,
  FORTRAN_TYPE = 131 + 0,
  FORTRAN_UNKNOWN = 132 + 0
}
 
enum  ROSE_C_CXX_keywords {
  C_CXX_ASM = 0 + 500,
  C_CXX_AUTO = 1 + 500,
  C_CXX_BOOL = 2 + 500,
  C_CXX_BREAK = 3 + 500,
  C_CXX_CASE = 4 + 500,
  C_CXX_CATCH = 5 + 500,
  C_CXX_CHAR = 6 + 500,
  C_CXX_CLASS = 7 + 500,
  C_CXX_CONST = 8 + 500,
  C_CXX_CONSTCAST = 9 + 500,
  C_CXX_CONTINUE = 10 + 500,
  C_CXX_DEFAULT = 11 + 500,
  C_CXX_DEFINED = 12 + 500,
  C_CXX_DELETE = 13 + 500,
  C_CXX_DO = 14 + 500,
  C_CXX_DOUBLE = 15 + 500,
  C_CXX_DYNAMICCAST = 16 + 500,
  C_CXX_ELSE = 17 + 500,
  C_CXX_ENUM = 18 + 500,
  C_CXX_EXPLICIT = 19 + 500,
  C_CXX_EXPORT = 20 + 500,
  C_CXX_EXTERN = 21 + 500,
  C_CXX_FALSE = 22 + 500,
  C_CXX_FLOAT = 23 + 500,
  C_CXX_FOR = 24 + 500,
  C_CXX_FRIEND = 25 + 500,
  C_CXX_GOTO = 26 + 500,
  C_CXX_IF = 27 + 500,
  C_CXX_INLINE = 28 + 500,
  C_CXX_INT = 29 + 500,
  C_CXX_LONG = 30 + 500,
  C_CXX_MUTABLE = 31 + 500,
  C_CXX_NAMESPACE = 32 + 500,
  C_CXX_NEW = 33 + 500,
  C_CXX_OPERATOR = 34 + 500,
  C_CXX_PRIVATE = 35 + 500,
  C_CXX_PROTECTED = 36 + 500,
  C_CXX_PUBLIC = 37 + 500,
  C_CXX_REGISTER = 38 + 500,
  C_CXX_REINTERPRETCAST = 39 + 500,
  C_CXX_RETURN = 40 + 500,
  C_CXX_SHORT = 41 + 500,
  C_CXX_SIGNED = 42 + 500,
  C_CXX_SIZEOF = 43 + 500,
  C_CXX_STATIC = 44 + 500,
  C_CXX_STATICCAST = 45 + 500,
  C_CXX_STRUCT = 46 + 500,
  C_CXX_SWITCH = 47 + 500,
  C_CXX_TEMPLATE = 48 + 500,
  C_CXX_THIS = 49 + 500,
  C_CXX_THROW = 50 + 500,
  C_CXX_TRY = 51 + 500,
  C_CXX_TRUE = 52 + 500,
  C_CXX_TYPEDEF = 53 + 500,
  C_CXX_TYPEID = 54 + 500,
  C_CXX_TYPENAME = 55 + 500,
  C_CXX_UNION = 56 + 500,
  C_CXX_UNSIGNED = 57 + 500,
  C_CXX_USING = 58 + 500,
  C_CXX_VIRTUAL = 59 + 500,
  C_CXX_VOID = 60 + 500,
  C_CXX_VOLATILE = 61 + 500,
  C_CXX_WCHART = 62 + 500,
  C_CXX_WHILE = 63 + 500
}
 
enum  ROSE_Fortran_Operators {
  FORTRAN_INTRINSIC_PLUS = 0 + 10000,
  FORTRAN_INTRINSIC_MINUS = 1 + 10000,
  FORTRAN_INTRINSIC_POWER = 2 + 10000,
  FORTRAN_INTRINSIC_CONCAT = 3 + 10000,
  FORTRAN_INTRINSIC_TIMES = 4 + 10000,
  FORTRAN_INTRINSIC_DIVIDE = 5 + 10000,
  FORTRAN_INTRINSIC_AND = 6 + 10000,
  FORTRAN_INTRINSIC_OR = 7 + 10000,
  FORTRAN_INTRINSIC_EQV = 8 + 10000,
  FORTRAN_INTRINSIC_NEQV = 9 + 10000,
  FORTRAN_INTRINSIC_EQ = 10 + 10000,
  FORTRAN_INTRINSIC_NE = 11 + 10000,
  FORTRAN_INTRINSIC_GE = 12 + 10000,
  FORTRAN_INTRINSIC_LE = 13 + 10000,
  FORTRAN_INTRINSIC_LT = 14 + 10000,
  FORTRAN_INTRINSIC_GT = 15 + 10000,
  FORTRAN_INTRINSIC_NOT = 16 + 10000,
  FORTRAN_INTRINSIC_OLDEQ = 17 + 10000,
  FORTRAN_INTRINSIC_OLDNE = 18 + 10000,
  FORTRAN_INTRINSIC_OLDGE = 19 + 10000,
  FORTRAN_INTRINSIC_OLDLE = 20 + 10000,
  FORTRAN_INTRINSIC_OLDLT = 21 + 10000,
  FORTRAN_INTRINSIC_OLDGT = 22 + 10000
}
 
enum  ROSE_C_CXX_Operators {
  C_CXX_AND = 0 + 50000,
  C_CXX_ANDAND = 1 + 50000,
  C_CXX_ASSIGN = 2 + 50000,
  C_CXX_ANDASSIGN = 3 + 50000,
  C_CXX_OR = 4 + 50000,
  C_CXX_ORASSIGN = 5 + 50000,
  C_CXX_XOR = 6 + 50000,
  C_CXX_XORASSIGN = 7 + 50000,
  C_CXX_COMMA = 8 + 50000,
  C_CXX_COLON = 9 + 50000,
  C_CXX_DIVIDE = 10 + 50000,
  C_CXX_DIVIDEASSIGN = 11 + 50000,
  C_CXX_DOT = 12 + 50000,
  C_CXX_DOTSTAR = 13 + 50000,
  C_CXX_ELLIPSIS = 14 + 50000,
  C_CXX_EQUAL = 15 + 50000,
  C_CXX_GREATER = 16 + 50000,
  C_CXX_GREATEREQUAL = 17 + 50000,
  C_CXX_LEFTBRACE = 18 + 50000,
  C_CXX_LESS = 19 + 50000,
  C_CXX_LESSEQUAL = 20 + 50000,
  C_CXX_LEFTPAREN = 21 + 50000,
  C_CXX_LEFTBRACKET = 22 + 50000,
  C_CXX_MINUS = 23 + 50000,
  C_CXX_MINUSASSIGN = 24 + 50000,
  C_CXX_MINUSMINUS = 25 + 50000,
  C_CXX_PERCENT = 26 + 50000,
  C_CXX_PERCENTASSIGN = 27 + 50000,
  C_CXX_NOT = 28 + 50000,
  C_CXX_NOTEQUAL = 29 + 50000,
  C_CXX_OROR = 30 + 50000,
  C_CXX_PLUS = 31 + 50000,
  C_CXX_PLUSASSIGN = 32 + 50000,
  C_CXX_PLUSPLUS = 33 + 50000,
  C_CXX_ARROW = 34 + 50000,
  C_CXX_ARROWSTAR = 35 + 50000,
  C_CXX_QUESTION_MARK = 36 + 50000,
  C_CXX_RIGHTBRACE = 37 + 50000,
  C_CXX_RIGHTPAREN = 38 + 50000,
  C_CXX_RIGHTBRACKET = 39 + 50000,
  C_CXX_COLON_COLON = 40 + 50000,
  C_CXX_SEMICOLON = 41 + 50000,
  C_CXX_SHIFTLEFT = 42 + 50000,
  C_CXX_SHIFTLEFTASSIGN = 43 + 50000,
  C_CXX_SHIFTRIGHT = 44 + 50000,
  C_CXX_SHIFTRIGHTASSIGN = 45 + 50000,
  C_CXX_STAR = 46 + 50000,
  C_CXX_COMPL = 47 + 50000,
  C_CXX_STARASSIGN = 48 + 50000,
  C_CXX_POUND_POUND = 49 + 50000,
  C_CXX_POUND = 50 + 50000,
  C_CXX_AND_ALT = 51 + 50000,
  C_CXX_ANDASSIGN_ALT = 52 + 50000,
  C_CXX_OR_ALT = 53 + 50000,
  C_CXX_ORASSIGN_ALT = 54 + 50000,
  C_CXX_XOR_ALT = 55 + 50000,
  C_CXX_XORASSIGN_ALT = 56 + 50000,
  C_CXX_LEFTBRACE_ALT = 57 + 50000,
  C_CXX_LEFTBRACKET_ALT = 58 + 50000,
  C_CXX_NOT_ALT = 59 + 50000,
  C_CXX_NOTEQUAL_ALT = 60 + 50000,
  C_CXX_RIGHTBRACE_ALT = 61 + 50000,
  C_CXX_RIGHTBRACKET_ALT = 62 + 50000,
  C_CXX_COMPL_ALT = 63 + 50000,
  C_CXX_POUND_POUND_ALT = 64 + 50000,
  C_CXX_POUND_ALT = 65 + 50000,
  C_CXX_OR_TRIGRAPH = 66 + 50000,
  C_CXX_XOR_TRIGRAPH = 67 + 50000,
  C_CXX_LEFTBRACE_TRIGRAPH = 68 + 50000,
  C_CXX_LEFTBRACKET_TRIGRAPH = 69 + 50000,
  C_CXX_RIGHTBRACE_TRIGRAPH = 70 + 50000,
  C_CXX_RIGHTBRACKET_TRIGRAPH = 71 + 50000,
  C_CXX_COMPL_TRIGRAPH = 72 + 50000,
  C_CXX_POUND_POUND_TRIGRAPH = 73 + 50000,
  C_CXX_POUND_TRIGRAPH = 74 + 50000
}
 
enum  ROSE_Fortran_Additional_Info {
  FORTRAN_COMMENTS = 0 + 100000,
  FORTRAN_STRING_LITERALS = 1 + 100000,
  FORTRAN_IDENTIFIER = 2 + 100000,
  FORTRAN_UNIDENTIFIED_TOKEN = 3 + 100000,
  FORTRAN_ERROR = 4 + 100000
}
 
enum  { static_variant = V_SgToken }
 static variant value More...
 
typedef SgLocatedNode base_node_type
 
- Public Types inherited from SgLocatedNode
enum  { static_variant = V_SgLocatedNode }
 static variant value More...
 
typedef SgNode base_node_type
 
- Public Types inherited from SgNode
enum  { static_variant = V_SgNode }
 static variant value More...
 

Public Member Functions

virtual SgNodecopy (SgCopyHelp &help) const
 This function clones the current IR node object recursively or not, depending on the argument. More...
 
virtual std::string class_name () const
 Copies AST (whole subtree, depending on the SgCopyHelp class. More...
 
virtual VariantT variantT () const
 returns new style SageIII enum values More...
 
void * operator new (size_t size)
 returns pointer to newly allocated IR node More...
 
void operator delete (void *pointer, size_t size)
 deallocated memory for IR node (returns memory to memory pool for reuse) More...
 
void operator delete (void *pointer)
 
virtual std::vector< SgNode * > get_traversalSuccessorContainer ()
 FOR INTERNAL USE within ROSE traverals mechanism only. More...
 
virtual std::vector< std::string > get_traversalSuccessorNamesContainer ()
 FOR INTERNAL USE within ROSE traverals mechanism only. More...
 
virtual size_t get_numberOfTraversalSuccessors ()
 
virtual SgNodeget_traversalSuccessorByIndex (size_t idx)
 
virtual size_t get_childIndex (SgNode *child)
 
virtual RTIReturnType roseRTI ()
 FOR INTERNAL USE Access to Runtime Type Information (RTI) for this IR nodes. More...
 
virtual const char * sage_class_name () const ROSE_DEPRECATED_FUNCTION
 
void executeVisitorMemberFunction (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern. More...
 
virtual void accept (ROSE_VisitorPattern &visitor)
 DXN (08/09/2010): support for the classic visitor pattern done in GoF. More...
 
virtual bool isInMemoryPool ()
 FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap. More...
 
virtual void checkDataMemberPointersIfInMemoryPool ()
 FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap. More...
 
virtual std::vector< std::pair
< SgNode *, std::string > > 
returnDataMemberPointers () const
 FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools More...
 
virtual void processDataMemberReferenceToPointers (ReferenceToPointerHandler *)
 FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools More...
 
virtual long getChildIndex (SgNode *childNode) const
 FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR node. More...
 
 SgToken (const SgTokenStorageClass &source)
 
SgTokenaddRegExpAttribute (std::string s, AstRegExAttribute *a)
 Support for AST matching using regular expression. More...
 
std::string get_lexeme_string () const
 
void set_lexeme_string (std::string lexeme_string)
 
unsigned int get_classification_code () const
 
void set_classification_code (unsigned int classification_code)
 
virtual ~SgToken ()
 
 SgToken (Sg_File_Info *startOfConstruct, std::string lexeme_string="", unsigned int classification_code=0)
 
 SgToken (std::string lexeme_string, unsigned int classification_code)
 
- Public Member Functions inherited from SgLocatedNode
const std::string & getFilenameString () const
 
void addToAttachedPreprocessingInfo (PreprocessingInfo *prepInfoPtr, PreprocessingInfo::RelativePositionType locationInList=PreprocessingInfo::after)
 This function adds comment or CPP directives to the current IR node. More...
 
virtual Sg_File_Infoget_file_info () const
 Interface function to implement original SAGE interface to SgFile_Info objects. More...
 
virtual void set_file_info (Sg_File_Info *X)
 Access function calls set_startingConstruct(Sg_File_Info*) member function. More...
 
void setCompilerGenerated ()
 Allow IR nodes (mostly SgLocatedNode) to be marked as compiler generated. More...
 
void unsetCompilerGenerated ()
 
void setFrontendSpecific ()
 Allow IR nodes (mostly SgLocatedNode) to be marked as front-end specific (generated by the front-end to support a specific backend compiler; e.g. GNU gcc and g++). More...
 
void unsetFrontendSpecific ()
 
void setSourcePositionUnavailableInFrontend ()
 Allow IR nodes (mostly SgLocatedNode) to be marked as to when the information was unavilable in the front-end (even if it typically is there are special cases). More...
 
void unsetSourcePositionUnavailableInFrontend ()
 
void setOutputInCodeGeneration ()
 Allow IR nodes (mostly SgLocatedNode) to be marked as to when the information was unavilable in the front-end (even if it typically is there are special cases). More...
 
void unsetOutputInCodeGeneration ()
 
virtual void fixupCopy (SgNode *copy, SgCopyHelp &help) const
 
AttachedPreprocessingInfoType *& getAttachedPreprocessingInfo (void)
 Computes the number of nodes in the defined subtree of the AST. More...
 
Sg_File_InfogenerateMatchingFileInfo ()
 
virtual void addNewAttribute (std::string s, AstAttribute *a)
 Add a new attribute represented by the named string. More...
 
virtual AstAttributegetAttribute (std::string s) const
 Returns attribute of name 's'. More...
 
virtual void updateAttribute (std::string s, AstAttribute *a)
 Replace existing attribute of name 's' with new AstAttribute. More...
 
virtual void setAttribute (std::string s, AstAttribute *a)
 This is a wrapper function with the following semantics: if no attribute of name 's' exists then addNewAttribute(s,a); is called, otherwise updateAttribute(s,a); is called. More...
 
virtual void removeAttribute (std::string s)
 Remove attribute of name 's' if present. More...
 
virtual bool attributeExists (std::string s) const
 Tests if attribute of name 's' is present. More...
 
virtual int numberOfAttributes () const
 Returns the number of attributes on this IR node. More...
 
void * operator new (size_t size)
 returns pointer to newly allocated IR node More...
 
void operator delete (void *pointer, size_t size)
 deallocated memory for IR node (returns memory to memory pool for reuse) More...
 
void operator delete (void *pointer)
 
void executeVisitorMemberFunction (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern. More...
 
 SgLocatedNode (const SgLocatedNodeStorageClass &source)
 
SgLocatedNodeaddRegExpAttribute (std::string s, AstRegExAttribute *a)
 Support for AST matching using regular expression. More...
 
Sg_File_Infoget_startOfConstruct () const
 New function interface for Sg_File_Info data stores starting location of contruct (typically the opening brace or first letter of keyword). More...
 
void set_startOfConstruct (Sg_File_Info *startOfConstruct)
 This function sets the current source location position of the start of the current construct. More...
 
Sg_File_Infoget_endOfConstruct () const
 New function interface for Sg_File_Info data stores ending location of contruct (typically the closing brace). More...
 
void set_endOfConstruct (Sg_File_Info *endOfConstruct)
 This function sets the current source location position of the end of the current construct. More...
 
AttachedPreprocessingInfoTypeget_attachedPreprocessingInfoPtr () const
 
void set_attachedPreprocessingInfoPtr (AttachedPreprocessingInfoType *attachedPreprocessingInfoPtr)
 
AstAttributeMechanismget_attributeMechanism () const
 FOR INTERNAL USE Access function; if an attribute exists then a pointer to it is returned, else error. More...
 
void set_attributeMechanism (AstAttributeMechanism *attributeMechanism)
 FOR INTERNAL USE Access function; sets poiner to value AstAttributeMechanism. More...
 
virtual ~SgLocatedNode ()
 This is the destructor. More...
 
 SgLocatedNode (Sg_File_Info *startOfConstruct=NULL)
 This is the constructor. More...
 
- Public Member Functions inherited from SgNode
void * operator new (size_t size)
 returns pointer to newly allocated IR node More...
 
void operator delete (void *pointer, size_t size)
 deallocated memory for IR node (returns memory to memory pool for reuse) More...
 
void operator delete (void *pointer)
 
void executeVisitorMemberFunction (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern. More...
 
 SgNode (const SgNodeStorageClass &source)
 
SgNodeaddRegExpAttribute (std::string s, AstRegExAttribute *a)
 Support for AST matching using regular expression. More...
 
void set_isModified (bool isModified)
 All nodes in the AST contain a isModified flag used to track changes to the AST. More...
 
bool get_isModified () const
 Acess function for isModified flag This flag records if the current IR node has been modified. It is set to false after and ROSE front-end processing. More...
 
void set_parent (SgNode *parent)
 All nodes in the AST contain a reference to a parent node. More...
 
SgNodeget_parent () const
 Access function for parent node. More...
 
bool isChild (SgNode *node) const
 Query function for if the input IR nodes is a child of the current IR node. More...
 
virtual std::string unparseToString (SgUnparse_Info *info) const
 This function unparses the AST node (excluding comments and unnecessary white space) More...
 
std::string unparseToString () const
 
std::string unparseToCompleteString ()
 This function unparses the AST node (including comments and white space) More...
 
int variant () const ROSE_DEPRECATED_FUNCTION
 Older version function returns enum value "NODE". More...
 
VirtualCFG::CFGNode cfgForBeginning ()
 Returns the CFG node for just before this AST node. More...
 
VirtualCFG::CFGNode cfgForEnd ()
 Returns the CFG node for just after this AST node. More...
 
virtual unsigned int cfgIndexForEnd () const
 Determine the CFG index for the end of this construct. More...
 
virtual bool cfgIsIndexInteresting (unsigned int index) const
 Determine whether a particular CFG node index is "interesting" for this kind of node. More...
 
virtual unsigned int cfgFindChildIndex (SgNode *n)
 Find the index of n in this node's CFG children. More...
 
virtual unsigned int cfgFindNextChildIndex (SgNode *n)
 Find the index just after n in this node's CFG children. More...
 
virtual std::vector
< VirtualCFG::CFGEdge
cfgOutEdges (unsigned int index=false)
 Find the out edges of a CFG node – internal version. More...
 
virtual std::vector
< VirtualCFG::CFGEdge
cfgInEdges (unsigned int index=false)
 Find the in edges of a CFG node – internal version. More...
 
int numberOfNodesInSubtree ()
 Computes the number of nodes in the defined subtree of the AST. More...
 
int depthOfSubtree ()
 Computes the depth of the current defined subtree of the AST. More...
 
SgNodeget_freepointer () const
 
void set_freepointer (SgNode *freepointer)
 
virtual ~SgNode ()
 This is the destructor. More...
 
 SgNode ()
 This is the constructor. More...
 
bool get_isVisited () const ROSE_DEPRECATED_FUNCTION
 DOCS IN HEADER: Access function for p_isVisited flag used previously by the AST traversals. More...
 
void set_isVisited (bool isVisited) ROSE_DEPRECATED_FUNCTION
 Access function for p_isVisited flag used previously by the AST traversals. More...
 

Static Public Member Functions

static size_t numberOfNodes ()
 Returns the total number of IR nodes of this type. More...
 
static size_t memoryUsage ()
 Returns the size in bytes of the total memory allocated for all IR nodes of this type. More...
 
static void traverseMemoryPoolNodes (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for visitor pattern. More...
 
static void traverseMemoryPoolVisitorPattern (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern. More...
 
static void visitRepresentativeNode (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for type-based traversal. More...
 
- Static Public Member Functions inherited from SgLocatedNode
static size_t numberOfNodes ()
 Returns the total number of IR nodes of this type. More...
 
static size_t memoryUsage ()
 Returns the size in bytes of the total memory allocated for all IR nodes of this type. More...
 
static void traverseMemoryPoolNodes (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for visitor pattern. More...
 
static void traverseMemoryPoolVisitorPattern (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern. More...
 
static void visitRepresentativeNode (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for type-based traversal. More...
 
- Static Public Member Functions inherited from SgNode
static size_t numberOfNodes ()
 Returns the total number of IR nodes of this type. More...
 
static size_t memoryUsage ()
 Returns the size in bytes of the total memory allocated for all IR nodes of this type. More...
 
static void traverseMemoryPoolNodes (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for visitor pattern. More...
 
static void traverseMemoryPoolVisitorPattern (ROSE_VisitorPattern &visitor)
 FOR INTERNAL USE Support for visitor pattern. More...
 
static void visitRepresentativeNode (ROSE_VisitTraversal &visit)
 FOR INTERNAL USE Support for type-based traversal. More...
 
static std::vector< std::string > buildCommandLineToSubstituteTransformationFile (const std::vector< std::string > &argv, std::string newFileName)
 Command line support for this compilation The command line is saved as a static variable so that it will be available to support the rewrite mechanism. More...
 
static std::vector< VariantTgetClassHierarchySubTreeFunction (VariantT v)
 
static void getClassHierarchySubTreeFunction (VariantT v, std::vector< VariantT > &)
 
static std::map< SgNode
*, std::string > & 
get_globalMangledNameMap ()
 Access function for performance optimizing global mangled name map. More...
 
static void clearGlobalMangledNameMap ()
 Support to clear the performance optimizing global mangled name map. More...
 
static std::map< std::string,
int > & 
get_shortMangledNameCache ()
 Access function for lower level optimizing of global mangled name map. More...
 
static std::map< SgNode
*, std::string > & 
get_globalQualifiedNameMapForNames ()
 Access function for name qualification support (for names). More...
 
static void set_globalQualifiedNameMapForNames (const std::map< SgNode *, std::string > &X)
 Access function for name qualification support (for names). More...
 
static std::map< SgNode
*, std::string > & 
get_globalQualifiedNameMapForTypes ()
 Access function for name qualification support (for type). More...
 
static void set_globalQualifiedNameMapForTypes (const std::map< SgNode *, std::string > &X)
 Access function for name qualification support (for type). More...
 
static std::map< SgNode
*, std::string > & 
get_globalTypeNameMap ()
 Access function for name qualification support (for names of types). More...
 
static void set_globalTypeNameMap (const std::map< SgNode *, std::string > &X)
 Access function for name qualification support (for names of types). More...
 
static SgFunctionTypeTableget_globalFunctionTypeTable ()
 Access function for symbol table specific to function types. More...
 
static void set_globalFunctionTypeTable (SgFunctionTypeTable *globalFunctionTypeTable)
 Access function for symbol table specific to function types. More...
 
static SgTypeTableget_globalTypeTable ()
 Access function for symbol table specific to non-function types. More...
 
static void set_globalTypeTable (SgTypeTable *globalTypeTable)
 Access function for symbol table specific to non-function types. More...
 

Static Public Attributes

static const token_element ROSE_Fortran_keyword_map [127]
 

Protected Attributes

std::string p_lexeme_string
 
unsigned int p_classification_code
 
- Protected Attributes inherited from SgLocatedNode
Sg_File_Infop_startOfConstruct
 This pointer is always valid and stores the source position of the start of the current construct. More...
 
Sg_File_Infop_endOfConstruct
 This pointer is always valid and stores the source position of the end of the current construct. More...
 
AttachedPreprocessingInfoTypep_attachedPreprocessingInfoPtr
 Holds comments and/or preprocessor directives located before or after the current statement of expression. More...
 
AstAttributeMechanismp_attributeMechanism
 
- Protected Attributes inherited from SgNode
SgNodep_parent
 This is the pointer to the parent IR node in the AST. More...
 
bool p_isModified
 Records if IR node has been modified (data members reset). More...
 
SgNodep_freepointer
 This is the pointer to the chain of previously freed objects. More...
 

Friends

class AST_FILE_IO
 
class SgTokenStorageClass
 
class AstSpecificDataManagingClass
 
class AstSpecificDataManagingClassStorageClass
 
ROSE_DLL_API friend SgTokenisSgToken (SgNode *s)
 Casts pointer from base class to derived class. More...
 
ROSE_DLL_API friend const SgTokenisSgToken (const SgNode *s)
 Casts pointer from base class to derived class (for const pointers) More...
 
SgTokenSgToken_getPointerFromGlobalIndex (unsigned long globalIndex)
 Constructor for use by AST File I/O Mechanism. More...
 
unsigned long SgToken_getNumberOfValidNodesAndSetGlobalIndexInFreepointer (unsigned long)
 Get the size of the memory pool. More...
 
void SgToken_clearMemoryPool ()
 
void SgToken_extendMemoryPoolForFileIO (unsigned long)
 
void SgToken_getNextValidPointer (std::pair< SgToken *, std::vector< unsigned char * >::const_iterator > &)
 
void SgToken_resetValidFreepointers ()
 

Additional Inherited Members

- Protected Member Functions inherited from SgLocatedNode
void post_construction_initialization ()
 Final initialization for constructors This function is called at the end of generated constructors to allow the specification writer to add special initialization functions or tests. Default is to do nothing. Otherwise it should be overridden in the spec file, in NewHeaderCode/NewOutlinedCode. More...
 
- Static Protected Attributes inherited from SgNode
static SgFunctionTypeTablep_globalFunctionTypeTable
 Pointer to symbol table specific to function types. More...
 
static SgTypeTablep_globalTypeTable
 
static std::map< SgNode
*, std::string > 
p_globalMangledNameMap
 Cache of mangled names to avoid regeneration of previously build mangled names or parts of mangled names. This is a performance optimization. More...
 
static std::map< std::string, int > p_shortMangledNameCache
 STL map used as a cache to shorten generated mangled names. This is mostly a space optimization ofr mangled names of templates. More...
 
static std::map< SgNode
*, std::string > 
p_globalQualifiedNameMapForNames
 
static std::map< SgNode
*, std::string > 
p_globalQualifiedNameMapForTypes
 
static std::map< SgNode
*, std::string > 
p_globalTypeNameMap
 

Detailed Description

Definition at line 67737 of file Cxx_Grammar.h.

Member Typedef Documentation

Definition at line 68431 of file Cxx_Grammar.h.

Member Enumeration Documentation

Enumerator
FORTRAN_ABSTRACT 
FORTRAN_ACCESS 
FORTRAN_ACTION 
FORTRAN_ALLOCATE 
FORTRAN_ALLOCATABLE 
FORTRAN_ASSIGN 
FORTRAN_ASSOCIATE 
FORTRAN_ASYNCHRONOUS 
FORTRAN_BACKSPACE 
FORTRAN_BIND 
FORTRAN_BLANK 
FORTRAN_BLOCK_DATA 
FORTRAN_CALL 
FORTRAN_CHARACTER 
FORTRAN_CLASS 
FORTRAN_CLOSE 
FORTRAN_CONTINUE 
FORTRAN_CYCLE 
FORTRAN_CASE 
FORTRAN_COMMON 
FORTRAN_COMPLEX 
FORTRAN_CONTAINS 
FORTRAN_DEALLOCATE 
FORTRAN_DATA 
FORTRAN_DEFERRED 
FORTRAN_DELIM 
FORTRAN_DIMENSION 
FORTRAN_DO 
FORTRAN_DT 
FORTRAN_DOUBLEPRECISION 
FORTRAN_ENCODING 
FORTRAN_END_CASE 
FORTRAN_ENDDO 
FORTRAN_END_FILE 
FORTRAN_END_ENUM 
FORTRAN_END_INTERFACE 
FORTRAN_END_TYPE 
FORTRAN_ERR 
FORTRAN_ERRMSG 
FORTRAN_EXIT 
FORTRAN_ELSE 
FORTRAN_ELSEWHERE 
FORTRAN_ELSEIF 
FORTRAN_ENDIF 
FORTRAN_ENTRY 
FORTRAN_END 
FORTRAN_ENUM 
FORTRAN_ENUMERATOR 
FORTRAN_EQUIVALENCE 
FORTRAN_EXTERNAL 
FORTRAN_EXTENDS 
FORTRAN_FILE 
FORTRAN_FINAL 
FORTRAN_FMT 
FORTRAN_FORALL 
FORTRAN_FORM 
FORTRAN_FORMATTED 
FORTRAN_FORMAT 
FORTRAN_FLUSH 
FORTRAN_FUNCTION 
FORTRAN_GENERIC 
FORTRAN_GOTO 
FORTRAN_ID 
FORTRAN_IF 
FORTRAN_INQUIRE 
FORTRAN_INTEGER 
FORTRAN_IOMSG 
FORTRAN_IOSTAT 
FORTRAN_IMPLICIT 
FORTRAN_IMPLICIT_NONE 
FORTRAN_IMPORT 
FORTRAN_INTERFACE 
FORTRAN_INTENT 
FORTRAN_INTRINSIC 
FORTRAN_LEN 
FORTRAN_LOGICAL 
FORTRAN_KIND 
FORTRAN_MODULE_PROC 
FORTRAN_MODULE 
FORTRAN_NON_INTRINSIC 
FORTRAN_NON_OVERRIDABLE 
FORTRAN_NULL 
FORTRAN_NULLIFY 
FORTRAN_NAMELIST 
FORTRAN_NML 
FORTRAN_NONE 
FORTRAN_NOPASS 
FORTRAN_ONLY 
FORTRAN_OPEN 
FORTRAN_OPTIONAL 
FORTRAN_PARAMETER 
FORTRAN_PASS 
FORTRAN_PAUSE 
FORTRAN_POINTER 
FORTRAN_PRINT 
FORTRAN_PRIVATE 
FORTRAN_PROCEDURE 
FORTRAN_PROGRAM 
FORTRAN_PROTECTED 
FORTRAN_READ 
FORTRAN_REAL 
FORTRAN_RETURN 
FORTRAN_REWIND 
FORTRAN_ROUND 
FORTRAN_SELECTCASE 
FORTRAN_SELECTTYPE 
FORTRAN_SEQUENCE 
FORTRAN_SAVE 
FORTRAN_SIGN 
FORTRAN_SIZE 
FORTRAN_SOURCE 
FORTRAN_STAT 
FORTRAN_STOP 
FORTRAN_SUBROUTINE 
FORTRAN_TARGET 
FORTRAN_THEN 
FORTRAN_DERIVED_DECL 
FORTRAN_TYPEIS 
FORTRAN_UNFORMATTED 
FORTRAN_UNIT 
FORTRAN_USE 
FORTRAN_VALUE 
FORTRAN_VOLATILE 
FORTRAN_WAIT 
FORTRAN_WHERE 
FORTRAN_WRITE 
FORTRAN_END_PROGRAM 
FORTRAN_END_FUNCTION 
FORTRAN_END_SUBROUTINE 
FORTRAN_END_MODULE 
FORTRAN_DOUBLE_COMPLEX 
FORTRAN_TYPE 
FORTRAN_UNKNOWN 

Definition at line 67765 of file Cxx_Grammar.h.

Enumerator
C_CXX_ASM 
C_CXX_AUTO 
C_CXX_BOOL 
C_CXX_BREAK 
C_CXX_CASE 
C_CXX_CATCH 
C_CXX_CHAR 
C_CXX_CLASS 
C_CXX_CONST 
C_CXX_CONSTCAST 
C_CXX_CONTINUE 
C_CXX_DEFAULT 
C_CXX_DEFINED 
C_CXX_DELETE 
C_CXX_DO 
C_CXX_DOUBLE 
C_CXX_DYNAMICCAST 
C_CXX_ELSE 
C_CXX_ENUM 
C_CXX_EXPLICIT 
C_CXX_EXPORT 
C_CXX_EXTERN 
C_CXX_FALSE 
C_CXX_FLOAT 
C_CXX_FOR 
C_CXX_FRIEND 
C_CXX_GOTO 
C_CXX_IF 
C_CXX_INLINE 
C_CXX_INT 
C_CXX_LONG 
C_CXX_MUTABLE 
C_CXX_NAMESPACE 
C_CXX_NEW 
C_CXX_OPERATOR 
C_CXX_PRIVATE 
C_CXX_PROTECTED 
C_CXX_PUBLIC 
C_CXX_REGISTER 
C_CXX_REINTERPRETCAST 
C_CXX_RETURN 
C_CXX_SHORT 
C_CXX_SIGNED 
C_CXX_SIZEOF 
C_CXX_STATIC 
C_CXX_STATICCAST 
C_CXX_STRUCT 
C_CXX_SWITCH 
C_CXX_TEMPLATE 
C_CXX_THIS 
C_CXX_THROW 
C_CXX_TRY 
C_CXX_TRUE 
C_CXX_TYPEDEF 
C_CXX_TYPEID 
C_CXX_TYPENAME 
C_CXX_UNION 
C_CXX_UNSIGNED 
C_CXX_USING 
C_CXX_VIRTUAL 
C_CXX_VOID 
C_CXX_VOLATILE 
C_CXX_WCHART 
C_CXX_WHILE 

Definition at line 67904 of file Cxx_Grammar.h.

Enumerator
FORTRAN_INTRINSIC_PLUS 
FORTRAN_INTRINSIC_MINUS 
FORTRAN_INTRINSIC_POWER 
FORTRAN_INTRINSIC_CONCAT 
FORTRAN_INTRINSIC_TIMES 
FORTRAN_INTRINSIC_DIVIDE 
FORTRAN_INTRINSIC_AND 
FORTRAN_INTRINSIC_OR 
FORTRAN_INTRINSIC_EQV 
FORTRAN_INTRINSIC_NEQV 
FORTRAN_INTRINSIC_EQ 
FORTRAN_INTRINSIC_NE 
FORTRAN_INTRINSIC_GE 
FORTRAN_INTRINSIC_LE 
FORTRAN_INTRINSIC_LT 
FORTRAN_INTRINSIC_GT 
FORTRAN_INTRINSIC_NOT 
FORTRAN_INTRINSIC_OLDEQ 
FORTRAN_INTRINSIC_OLDNE 
FORTRAN_INTRINSIC_OLDGE 
FORTRAN_INTRINSIC_OLDLE 
FORTRAN_INTRINSIC_OLDLT 
FORTRAN_INTRINSIC_OLDGT 

Definition at line 67973 of file Cxx_Grammar.h.

Enumerator
C_CXX_AND 
C_CXX_ANDAND 
C_CXX_ASSIGN 
C_CXX_ANDASSIGN 
C_CXX_OR 
C_CXX_ORASSIGN 
C_CXX_XOR 
C_CXX_XORASSIGN 
C_CXX_COMMA 
C_CXX_COLON 
C_CXX_DIVIDE 
C_CXX_DIVIDEASSIGN 
C_CXX_DOT 
C_CXX_DOTSTAR 
C_CXX_ELLIPSIS 
C_CXX_EQUAL 
C_CXX_GREATER 
C_CXX_GREATEREQUAL 
C_CXX_LEFTBRACE 
C_CXX_LESS 
C_CXX_LESSEQUAL 
C_CXX_LEFTPAREN 
C_CXX_LEFTBRACKET 
C_CXX_MINUS 
C_CXX_MINUSASSIGN 
C_CXX_MINUSMINUS 
C_CXX_PERCENT 
C_CXX_PERCENTASSIGN 
C_CXX_NOT 
C_CXX_NOTEQUAL 
C_CXX_OROR 
C_CXX_PLUS 
C_CXX_PLUSASSIGN 
C_CXX_PLUSPLUS 
C_CXX_ARROW 
C_CXX_ARROWSTAR 
C_CXX_QUESTION_MARK 
C_CXX_RIGHTBRACE 
C_CXX_RIGHTPAREN 
C_CXX_RIGHTBRACKET 
C_CXX_COLON_COLON 
C_CXX_SEMICOLON 
C_CXX_SHIFTLEFT 
C_CXX_SHIFTLEFTASSIGN 
C_CXX_SHIFTRIGHT 
C_CXX_SHIFTRIGHTASSIGN 
C_CXX_STAR 
C_CXX_COMPL 
C_CXX_STARASSIGN 
C_CXX_POUND_POUND 
C_CXX_POUND 
C_CXX_AND_ALT 
C_CXX_ANDASSIGN_ALT 
C_CXX_OR_ALT 
C_CXX_ORASSIGN_ALT 
C_CXX_XOR_ALT 
C_CXX_XORASSIGN_ALT 
C_CXX_LEFTBRACE_ALT 
C_CXX_LEFTBRACKET_ALT 
C_CXX_NOT_ALT 
C_CXX_NOTEQUAL_ALT 
C_CXX_RIGHTBRACE_ALT 
C_CXX_RIGHTBRACKET_ALT 
C_CXX_COMPL_ALT 
C_CXX_POUND_POUND_ALT 
C_CXX_POUND_ALT 
C_CXX_OR_TRIGRAPH 
C_CXX_XOR_TRIGRAPH 
C_CXX_LEFTBRACE_TRIGRAPH 
C_CXX_LEFTBRACKET_TRIGRAPH 
C_CXX_RIGHTBRACE_TRIGRAPH 
C_CXX_RIGHTBRACKET_TRIGRAPH 
C_CXX_COMPL_TRIGRAPH 
C_CXX_POUND_POUND_TRIGRAPH 
C_CXX_POUND_TRIGRAPH 

Definition at line 68000 of file Cxx_Grammar.h.

Enumerator
FORTRAN_COMMENTS 
FORTRAN_STRING_LITERALS 
FORTRAN_IDENTIFIER 
FORTRAN_UNIDENTIFIED_TOKEN 
FORTRAN_ERROR 

Definition at line 68080 of file Cxx_Grammar.h.

anonymous enum

static variant value

Enumerator
static_variant 

Definition at line 68119 of file Cxx_Grammar.h.

Constructor & Destructor Documentation

SgToken::SgToken ( const SgTokenStorageClass source)
virtual SgToken::~SgToken ( )
virtual
SgToken::SgToken ( Sg_File_Info startOfConstruct,
std::string  lexeme_string = "",
unsigned int  classification_code = 0 
)
SgToken::SgToken ( std::string  lexeme_string,
unsigned int  classification_code 
)

Member Function Documentation

virtual SgNode* SgToken::copy ( SgCopyHelp help) const
virtual

This function clones the current IR node object recursively or not, depending on the argument.

This function performs a copy based on the specification of the input parameter. The input parameter is used to determin which data members are copied by reference and which are copied by value.

Parameters
help- If this argument is of type SgTreeCopy, then the IR node is cloned recursively. If its of type SgShallowCopy only the first level of the IR node is copied, everything else is left pointing to the the original IR node's object's data members.
Returns
a pointer to the new clone.

It appears the the copy functions don't set the parents of anything that they do a deep copy of! This can cause AST tests to fail. In particular some functions that require the parent pointers to be valid will return NULL pointers (e.g. SgInitializedName::get_declaration()). It might be that we should allow this to be done as part of the SgCopyHelp::clone function or perhaps another member function of SgCopyHelp would be useful for this support. It is not serious if the AST post processing is done since that will set any NULL pointers that are found within its traversal.

Exceptions
noneNo exceptions are thrown by this function.

Reimplemented from SgLocatedNode.

virtual std::string SgToken::class_name ( ) const
virtual

Copies AST (whole subtree, depending on the SgCopyHelp class.

returns a string representing the class name

Reimplemented from SgLocatedNode.

virtual VariantT SgToken::variantT ( ) const
virtual

returns new style SageIII enum values

Reimplemented from SgLocatedNode.

void* SgToken::operator new ( size_t  size)

returns pointer to newly allocated IR node

void SgToken::operator delete ( void *  pointer,
size_t  size 
)

deallocated memory for IR node (returns memory to memory pool for reuse)

void SgToken::operator delete ( void *  pointer)
static size_t SgToken::numberOfNodes ( )
static

Returns the total number of IR nodes of this type.

static size_t SgToken::memoryUsage ( )
static

Returns the size in bytes of the total memory allocated for all IR nodes of this type.

virtual std::vector<SgNode*> SgToken::get_traversalSuccessorContainer ( )
virtual

FOR INTERNAL USE within ROSE traverals mechanism only.

This function builds and returns a copy of ordered container holding pointers to children of this node in a traversal. It is associated with the definition of a tree that is travered by the AST traversal mechanism; a tree that is embeded in the AST (which is a more general graph). This function is used within the implementation of the AST traversal and has a semantics may change in subtle ways that makes it difficult to use in user code. It can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.

Warning
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Returns
Returns ordered STL Container of pointers to children nodes in AST.

Reimplemented from SgLocatedNode.

virtual std::vector<std::string> SgToken::get_traversalSuccessorNamesContainer ( )
virtual

FOR INTERNAL USE within ROSE traverals mechanism only.

This function builds and returns a copy of ordered container holding strings used to name data members that are traversed in the IR node. It is associated with the definition of a tree that is travered by the AST traversal mechanism; a tree that is embeded in the AST (which is a more general graph). This function is used within the implementation of the AST traversal and has a semantics may change in subtle ways that makes it difficult to use in user code. It can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.

Warning
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.

Each string is a name of a member variable holding a pointer to a child in the AST. The names are the same as used in the generated enums for accessing attributes in a traversal. The order is the same in which they are traversed and the same in which the access enums are defined. Therefore this method can be used to get the corresponding name (string) of an access enum which allows to produce more meaningful messages for attribute computations.

Returns
Returns ordered STL container of names (strings) of access names to children nodes in AST.

Reimplemented from SgLocatedNode.

virtual size_t SgToken::get_numberOfTraversalSuccessors ( )
virtual

Reimplemented from SgLocatedNode.

virtual SgNode* SgToken::get_traversalSuccessorByIndex ( size_t  idx)
virtual

Reimplemented from SgLocatedNode.

virtual size_t SgToken::get_childIndex ( SgNode child)
virtual

Reimplemented from SgLocatedNode.

virtual RTIReturnType SgToken::roseRTI ( )
virtual

FOR INTERNAL USE Access to Runtime Type Information (RTI) for this IR nodes.

 This function provides runtime type information for accessing the

structure of the current node. It is useful for generating code which would dump out or rebuild IR nodes.

Returns
Returns a RTIReturnType object (runtime type information).

Reimplemented from SgLocatedNode.

virtual const char* SgToken::sage_class_name ( ) const
virtual

returns a C style string (char*) representing the class name

Reimplemented from SgLocatedNode.

void SgToken::executeVisitorMemberFunction ( ROSE_VisitorPattern visitor)

FOR INTERNAL USE Support for visitor pattern.

virtual void SgToken::accept ( ROSE_VisitorPattern visitor)
virtual

DXN (08/09/2010): support for the classic visitor pattern done in GoF.

Reimplemented from SgLocatedNode.

static void SgToken::traverseMemoryPoolNodes ( ROSE_VisitTraversal visit)
static

FOR INTERNAL USE Support for visitor pattern.

static void SgToken::traverseMemoryPoolVisitorPattern ( ROSE_VisitorPattern visitor)
static

FOR INTERNAL USE Support for visitor pattern.

static void SgToken::visitRepresentativeNode ( ROSE_VisitTraversal visit)
static

FOR INTERNAL USE Support for type-based traversal.

virtual bool SgToken::isInMemoryPool ( )
virtual

FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.

The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.

Reimplemented from SgLocatedNode.

virtual void SgToken::checkDataMemberPointersIfInMemoryPool ( )
virtual

FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.

The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.

Reimplemented from SgLocatedNode.

virtual std::vector<std::pair<SgNode*,std::string> > SgToken::returnDataMemberPointers ( ) const
virtual

FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools

This functions is part of general support for many possible tools to operate on the AST. The forms a list of ALL IR node pointers used by each IR node, and is a supperset of the get_traversalSuccessorContainer(). It is (I think) less than the set of pointers used by the AST file I/O. This is part of work implemented by Andreas, and support tools such as the AST graph generation.

Warning
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Returns
STL vector of pairs of SgNode* and strings

Reimplemented from SgLocatedNode.

virtual void SgToken::processDataMemberReferenceToPointers ( ReferenceToPointerHandler *  )
virtual

FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools

This functions similar to returnDataMemberPointers() except that it passes references to a handler object. As a result there is FAR more damage that can be done by using this function, but it is type-safe. This is provided for support of internal tools that operate on the AST, e.g the AST Merge mechanism.

Warning
This function can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.

Reimplemented from SgLocatedNode.

virtual long SgToken::getChildIndex ( SgNode childNode) const
virtual

FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR node.

This function returns a unique value for the input childNode in set of children at this IR node. Note that a negative value indicates that the input node is not a child. This is the basis for the implementation of the isChild(SgNode*) member function. Data members that are NULL in the IR node are counted internally (so that this function returns value that could be statically defined, and so are not dynamically determined).

Warning
The mapping on children to integer values could change from release to release of ROSE.
Returns
long

Reimplemented from SgLocatedNode.

SgToken* SgToken::addRegExpAttribute ( std::string  s,
AstRegExAttribute a 
)

Support for AST matching using regular expression.

This support is incomplete and the subject of current research to define RegEx trees to support inexact matching.

std::string SgToken::get_lexeme_string ( ) const
void SgToken::set_lexeme_string ( std::string  lexeme_string)
unsigned int SgToken::get_classification_code ( ) const
void SgToken::set_classification_code ( unsigned int  classification_code)

Friends And Related Function Documentation

friend class AST_FILE_IO
friend

Definition at line 68390 of file Cxx_Grammar.h.

friend class SgTokenStorageClass
friend

Definition at line 68391 of file Cxx_Grammar.h.

friend class AstSpecificDataManagingClass
friend

Definition at line 68392 of file Cxx_Grammar.h.

friend class AstSpecificDataManagingClassStorageClass
friend

Definition at line 68393 of file Cxx_Grammar.h.

ROSE_DLL_API friend SgToken* isSgToken ( SgNode s)
friend

Casts pointer from base class to derived class.

ROSE_DLL_API friend const SgToken* isSgToken ( const SgNode s)
friend

Casts pointer from base class to derived class (for const pointers)

SgToken* SgToken_getPointerFromGlobalIndex ( unsigned long  globalIndex)
friend

Constructor for use by AST File I/O Mechanism.

This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory which obtained via fast binary file I/O from disk.

Typedef used for low level memory access.

Typedef used to hold memory addresses as values.

Methods to find the pointer to a global and local index

unsigned long SgToken_getNumberOfValidNodesAndSetGlobalIndexInFreepointer ( unsigned  long)
friend

Get the size of the memory pool.

It actually returns the size of the whole blocks allocated, no matter they contain valid pointers or not.

void SgToken_clearMemoryPool ( )
friend
void SgToken_extendMemoryPoolForFileIO ( unsigned  long)
friend
void SgToken_getNextValidPointer ( std::pair< SgToken *, std::vector< unsigned char * >::const_iterator > &  )
friend
void SgToken_resetValidFreepointers ( )
friend

Member Data Documentation

const token_element SgToken::ROSE_Fortran_keyword_map[127]
static

Definition at line 68091 of file Cxx_Grammar.h.

std::string SgToken::p_lexeme_string
protected

Definition at line 68455 of file Cxx_Grammar.h.

unsigned int SgToken::p_classification_code
protected

Definition at line 68459 of file Cxx_Grammar.h.


The documentation for this class was generated from the following file: