general_token_defs.h

Go to the documentation of this file.
00001 /* DQ (9/24/2007): This is part of Rama's Lexer */
00002 #ifndef ROSE_LEX_TOKEN_DEFINITIONS
00003 #define ROSE_LEX_TOKEN_DEFINITIONS 1
00004 
00005 struct token_element
00006    {
00007   // This is the simplist contect of a Token
00008 
00009   // value of the token
00010      std::string token_lexeme;
00011 
00012   // The classification for the token (language dependent)
00013      int token_id;
00014    };
00015 
00016 struct file_pos_info
00017    {
00018   // Source code position information for token
00019      int line_num;
00020      int column_num;
00021    };
00022 
00023 // At some point I want to replace this with a SgToken 
00024 // IR node until then this is an intermediate step.
00025 struct stream_element
00026    {
00027   // This is the element in the token stream.
00028 
00029   // This is the pointer to the token
00030      struct token_element * p_tok_elem;
00031 
00032   // Positon of the start of the token
00033      struct file_pos_info beginning_fpi;
00034 
00035   // Position of the end of the token
00036      struct file_pos_info ending_fpi;
00037    };
00038 
00039 // At present this is an STL list, but I would like it to be a vector at some point
00040 typedef std::list<stream_element*> LexTokenStreamType;
00041 typedef LexTokenStreamType* LexTokenStreamTypePointer;
00042 
00043 // endif for ROSE_LEX_TOKEN_DEFINITIONS
00044 #endif

Generated on Sat May 19 00:53:06 2012 for ROSE by  doxygen 1.4.7