error(_("illegal result type"));
error("illegal result type");
def_program(defp)	definition *defp;{	token tok;	version_list *vlist;	version_list **vtailp;	proc_list *plist;	proc_list **ptailp;	defp->def_kind = DEF_PROGRAM;	scan(TOK_IDENT, &tok);	defp->def_name = tok.str;	scan(TOK_LBRACE, &tok);	vtailp = &defp->def.pr.versions;	scan(TOK_VERSION, &tok);	do {		scan(TOK_IDENT, &tok);		vlist = ALLOC(version_list);		vlist->vers_name = tok.str;		scan(TOK_LBRACE, &tok);		ptailp = &vlist->procs;		do {			plist = ALLOC(proc_list);			get_type(&plist->res_prefix, &plist->res_type, DEF_PROGRAM);			if (streq(plist->res_type, "opaque")) {				error(_("illegal result type"));			}			scan(TOK_IDENT, &tok);			plist->proc_name = tok.str;			scan(TOK_LPAREN, &tok);			get_type(&plist->arg_prefix, &plist->arg_type, DEF_PROGRAM);			if (streq(plist->arg_type, "opaque")) {				error("illegal argument type");			}			scan(TOK_RPAREN, &tok);			scan(TOK_EQUAL, &tok);			scan_num(&tok);			scan(TOK_SEMICOLON, &tok);			plist->proc_num = tok.str;			*ptailp = plist;			ptailp = &plist->next;			peek(&tok);		} while (tok.kind != TOK_RBRACE);		*vtailp = vlist;		vtailp = &vlist->next;		scan(TOK_RBRACE, &tok);		scan(TOK_EQUAL, &tok);		scan_num(&tok);		vlist->vers_num = tok.str;		scan(TOK_SEMICOLON, &tok);		scan2(TOK_VERSION, TOK_RBRACE, &tok);	} while (tok.kind == TOK_VERSION);	scan(TOK_EQUAL, &tok);	scan_num(&tok);	defp->def.pr.prog_num = tok.str;	*vtailp = NULL;}