13 lines
300 B
C
13 lines
300 B
C
|
#include "y2.h"
|
||
|
|
||
|
int fdtype(int t)
|
||
|
{
|
||
|
/* determine the type of a symbol */
|
||
|
register v;
|
||
|
if( t >= NTBASE ) v = nontrst[t-NTBASE].tvalue;
|
||
|
else v = TYPE( toklev[t] );
|
||
|
if( v <= 0 ) error( "must specify type for %s", (t>=NTBASE)?nontrst[t-NTBASE].name:
|
||
|
tokset[t].name );
|
||
|
return( v );
|
||
|
}
|