home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / yaccsrc2 / yfdtyp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-19  |  373 b   |  19 lines

  1.  
  2. # include "y2.h" 
  3.  
  4. fdtype( t )
  5. {
  6.   /* determine the type of a symbol */
  7.   register v;
  8.   if ( t >= NTBASE )
  9.     v = nontrst[ t - NTBASE ].tvalue;
  10.   else
  11.     v = TYPE( toklev[ t ] );
  12.   if ( v <= 0 )
  13.     error( "must specify type for %s",
  14.            ( t >= NTBASE ) ?
  15.            nontrst[ t - NTBASE ].name :
  16.            tokset[ t ].name );
  17.   return ( v );
  18. }
  19.