}
}
void get_lparen()
{
nextstate = get_ptr_part;
if (top >= 0) {
if (stack[top].type == '(') {
pop;
gettoken();/ read past ')' /
nextstate = get_array;
}
}
}
void get_ptr_part()
{
nextstate = get_type;
if (stack[top].type == '*') {
printf("pointer to ");
pop;
nextstate = get_lparen;
} else if (stack[top].type == QUALIFIER) {
printf("%s ", pop.string);
nextstate = get_lparen;
}
}
void get_type()
{
nextstate = NULL;
/* process tokens that we stacked while reading to
identifier */
while (top >= 0) {
printf("%s ", pop.string);
}
printf("\n");
}
Chapter 9. More about Arrays
Never eat at a place called "Mom's." Never play cards with a man called "Doc."
And never, ever, forget that C treats an l-value of type array-of-T in an expression as a pointer to the
first element of the array.
—C programmers' saying (Traditional)