Ejemplo n.º 1
0
Archivo: parser.c Proyecto: palmerc/lab
int init_declarator_list(void) {
	if( init_declarator() ) {
	} else if( init_declarator_list() ) {
		match(COMMA);
		init_declarator();
	} else {
		abort();
	}	
}
Ejemplo n.º 2
0
TOKEN init_declarator_list(SYMBOL s)
{
    TOKEN init_dec_list = init_declarator(s);
    TOKEN tok = peek_token();
    if( true == token_matches_delimiter(tok, COMMA) )
    {
        //FIXME: this might be a bug but i'm not sure yet
        tok = get_token(); //consume the COMMA
        set_token_link(init_dec_list, init_declarator(s));
    }
    else
    {
        //FIXME: this might be a bug but i'm not sure yet
        set_token_link(init_dec_list, NULL);
    }
    return init_dec_list;
}