dec->name = tok.str; if (peekscan(TOK_LBRACKET, &tok)) { if (dec->rel == REL_POINTER) { error("no array-of-pointer declarations -- use typedef"); } dec->rel = REL_VECTOR; scan_num(&tok); dec->array_max = tok.str; scan(TOK_RBRACKET, &tok); } else if (peekscan(TOK_LANGLE, &tok)) { if (dec->rel == REL_POINTER) { error("no array-of-pointer declarations -- use typedef"); } dec->rel = REL_ARRAY; if (peekscan(TOK_RANGLE, &tok)) { dec->array_max = "~0";	 } else { scan_num(&tok); dec->array_max = tok.str; scan(TOK_RANGLE, &tok); }
dec->rel = REL_ARRAY; if (peekscan (TOK_RANGLE, &tok)) { dec->array_max = "~0";
get_declaration(declaration *dec, defkind dkind){	token tok;	get_type(&dec->prefix, &dec->type, dkind);	dec->rel = REL_ALIAS;	if (streq(dec->type, "void")) {		return;	}	check_type_name(dec->type, 0);	scan2(TOK_STAR, TOK_IDENT, &tok);	if (tok.kind == TOK_STAR) {		dec->rel = REL_POINTER;		scan(TOK_IDENT, &tok);	}	dec->name = tok.str;	if (peekscan(TOK_LBRACKET, &tok)) {		if (dec->rel == REL_POINTER) {			error("no array-of-pointer declarations -- use typedef");		}		dec->rel = REL_VECTOR;		scan_num(&tok);		dec->array_max = tok.str;		scan(TOK_RBRACKET, &tok);	} else if (peekscan(TOK_LANGLE, &tok)) {		if (dec->rel == REL_POINTER) {			error("no array-of-pointer declarations -- use typedef");		}		dec->rel = REL_ARRAY;		if (peekscan(TOK_RANGLE, &tok)) {			dec->array_max = "~0";	/* unspecified size, use max */		} else {			scan_num(&tok);			dec->array_max = tok.str;			scan(TOK_RANGLE, &tok);		}	}	if (streq(dec->type, "opaque")) {		if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) {			error("array declaration expected");		}	} else if (streq(dec->type, "string")) {		if (dec->rel != REL_ARRAY) {			error("variable-length array declaration expected");		}	}}