TOKEN parameter_list(void) { TOKEN param_list = parameter_declaration(); 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(param_list, parameter_list()); } else { //FIXME: this might be a bug but i'm not sure yet set_token_link(param_list, NULL); } return param_list; }
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; }
TOKEN declaration_list(SYMBOL s) { TOKEN dec_list = declaration(s); if( dec_list != NULL) { //FIXME this might be a bug, but I'm not sure yet set_token_link(dec_list, declaration_list(s)); } return dec_list; }
halfword concat_tokens(halfword q,halfword r) { halfword p; if(q==null) return r; p= q; while(token_link(p)!=null) p= token_link(p); set_token_link(p,token_link(r)); free_avail(r); return q; }
int scan_tex_toks_register(int j,int c,lstring s) { int a; halfword ref= get_avail(); (void)str_scan_toks(c,s); set_token_ref_count(ref,0); set_token_link(ref,token_link(temp_token_head)); if(global_defs_par> 0) a= 4; else a= 0; define(j+toks_base,call_cmd,ref); return 0; }
TOKEN translation_unit(void) { TOKEN trans_unit = NULL; TOKEN next = NULL; TOKEN tok = peek_token(); if(tok != NULL) { trans_unit = external_declaration(); next = translation_unit(); if(trans_unit != NULL) { set_token_link(trans_unit, next); } else { trans_unit = next; } } return trans_unit; }