Changeset 0da3e2c for src/Parser/parser.yy
- Timestamp:
- Aug 16, 2016, 5:56:37 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 29917c6
- Parents:
- 7880579
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r7880579 r0da3e2c 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 15 15:18:19201613 // Update Count : 189 112 // Last Modified On : Tue Aug 16 17:10:35 2016 13 // Update Count : 1898 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;46 45 47 46 #undef __GNUC_MINOR__ … … 56 55 #include "LinkageSpec.h" 57 56 58 DeclarationNode *theTree = 0; // the resulting parse tree 59 LinkageSpec::Type linkage = LinkageSpec::Cforall; 57 extern DeclarationNode *parseTree; 58 extern LinkageSpec::Type linkage; 59 extern TypedefTable typedefTable; 60 60 61 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_ name storage_class_list225 %type<decl> storage_class storage_class_list 226 226 227 227 %type<decl> sue_declaration_specifier sue_type_specifier … … 1324 1324 1325 1325 storage_class: 1326 storage_class_name1327 ;1328 1329 storage_class_name:1330 1326 EXTERN 1331 1327 { $$ = DeclarationNode::newStorageClass( DeclarationNode::Extern ); } … … 1975 1971 | external_definition_list 1976 1972 { 1977 if ( theTree ) {1978 theTree->appendList( $1 );1973 if ( parseTree ) { 1974 parseTree->appendList( $1 ); 1979 1975 } else { 1980 theTree = $1;1976 parseTree = $1; 1981 1977 } 1982 1978 } … … 2148 2144 any_word: // GCC 2149 2145 identifier_or_type_name {} 2150 | storage_class _name{}2146 | storage_class {} 2151 2147 | basic_type_name {} 2152 2148 | type_qualifier {} … … 2848 2844 // ----end of grammar---- 2849 2845 2846 extern char *yytext; 2847 2850 2848 void yyerror( const char * ) { 2851 2849 std::cout << "Error ";
Note: See TracChangeset
for help on using the changeset viewer.