TOKEN declaration_specifiers(SYMBOL s) { TOKEN t = NULL; //check the storage class of the thing being declared //if the storage class is specified, else use the default //that is already inside the symbol TOKEN storage_class = storage_class_specifier(); if( NULL != storage_class ) { setStorageClass(s, get_token_storage_class(storage_class)); } TOKEN type_spec = type_specifier(); if( false == token_matches_keyword(type_spec, VOID)) { SYMBOL type = searchst(get_token_string_value(type_spec)); s->basicdt = type->basicdt; s->datatype = type; s->size = type->size; } else { s->basicdt = 0; s->datatype = 0; s->size = 0; } //TOKEN type_qual = type_qualifier(); //TOKEN function_spec = function_specifier(); return t; }
int declaration_specifiers(void) { if( storage_class_specifier() ) { if( declaration_specifiers() ) { } } else if( type_specifier() ) { if( declaration_specifiers() ) { } } else if( type_qualifier() ) { if( declaration_specifiers() ) { } } }