Changes in src/Parser/parser.yy [0da3e2c:e82aa9df]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r0da3e2c re82aa9df 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 16 17:10:35201613 // Update Count : 189 812 // Last Modified On : Mon Aug 15 15:18:19 2016 13 // Update Count : 1891 14 14 // 15 15 … … 43 43 #define YYDEBUG_LEXER_TEXT (yylval) // lexer loads this up each time 44 44 #define YYDEBUG 1 // get the pretty debugging code to compile 45 extern char *yytext; 45 46 46 47 #undef __GNUC_MINOR__ … … 55 56 #include "LinkageSpec.h" 56 57 57 extern DeclarationNode *parseTree; 58 extern LinkageSpec::Type linkage; 59 extern TypedefTable typedefTable; 60 58 DeclarationNode *theTree = 0; // the resulting parse tree 59 LinkageSpec::Type linkage = LinkageSpec::Cforall; 61 60 std::stack< LinkageSpec::Type > linkageStack; 61 TypedefTable typedefTable; 62 62 63 63 void appendStr( std::string &to, std::string *from ) { … … 223 223 %type<decl> paren_identifier paren_type 224 224 225 %type<decl> storage_class storage_class_ list225 %type<decl> storage_class storage_class_name storage_class_list 226 226 227 227 %type<decl> sue_declaration_specifier sue_type_specifier … … 1324 1324 1325 1325 storage_class: 1326 storage_class_name 1327 ; 1328 1329 storage_class_name: 1326 1330 EXTERN 1327 1331 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Extern ); } … … 1971 1975 | external_definition_list 1972 1976 { 1973 if ( parseTree ) {1974 parseTree->appendList( $1 );1977 if ( theTree ) { 1978 theTree->appendList( $1 ); 1975 1979 } else { 1976 parseTree = $1;1980 theTree = $1; 1977 1981 } 1978 1982 } … … 2144 2148 any_word: // GCC 2145 2149 identifier_or_type_name {} 2146 | storage_class {}2150 | storage_class_name {} 2147 2151 | basic_type_name {} 2148 2152 | type_qualifier {} … … 2844 2848 // ----end of grammar---- 2845 2849 2846 extern char *yytext;2847 2848 2850 void yyerror( const char * ) { 2849 2851 std::cout << "Error ";
Note:
See TracChangeset
for help on using the changeset viewer.