if (streq(dec->type, "string")) { if (dec->rel != REL_ARRAY) {   dec->rel = REL_ARRAY; dec->array_max = "~0"; }
else { scan_num (&tok); dec->array_max = tok.str; scan (TOK_RANGLE, &tok);
get_prog_declaration(declaration *dec, defkind dkind, int num /* arg number */){	token tok;	char name[10]; /* argument name */	if (dkind == DEF_PROGRAM) { 	  peek(&tok);	  if (tok.kind == TOK_RPAREN) { /* no arguments */	    	dec->rel = REL_ALIAS;		dec->type = "void";		dec->prefix = NULL;		dec->name = NULL;		return;	      }	}	get_type(&dec->prefix, &dec->type, dkind);	dec->rel = REL_ALIAS;	if (peekscan(TOK_IDENT, &tok))  /* optional name of argument */		strcpy(name, tok.str);	else 		sprintf(name, "%s%d", ARGNAME, num); /* default name of argument */	dec->name = (char *) strdup(name); 		if (streq(dec->type, "void")) {		return;	}	if (streq(dec->type, "opaque")) {		error("opaque -- illegal argument type");	}	if (peekscan(TOK_STAR, &tok)) { 	  if (streq(dec->type, "string")) {	    error("pointer to string not allowed in program arguments\n");	  }		dec->rel = REL_POINTER;		if (peekscan(TOK_IDENT, &tok))  /* optional name of argument */		  dec->name = strdup(tok.str);      }	  if (peekscan(TOK_LANGLE, &tok)) {	    if (!streq(dec->type, "string")) {	      error("arrays cannot be declared as arguments to procedures -- 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, "string")) {		if (dec->rel != REL_ARRAY) {  /* .x specifies just string as					       * type of argument 					       * - make it string<>					       */			dec->rel = REL_ARRAY;			dec->array_max = "~0";/* unspecified size, use max */		}	}}