home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / toolboxsas.lha / Toolbox / lib / rex / ScanDrv.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-15  |  571 b   |  33 lines

  1. /* $Id: ScanDrv.c,v 2.2 1992/08/07 15:29:41 grosch rel $ */
  2.  
  3. #include <stdio.h>
  4. #include "Positions.h"
  5. $@ #include "@.h"
  6.  
  7. int main (void)
  8.  {
  9.   int Token, Count = 0;
  10. #ifdef Debug
  11.   char Word [256];
  12. #endif
  13.  
  14. $@  $_BeginScanner();
  15.   do
  16.    {
  17. $@    Token = $_GetToken();
  18.     Count++;
  19. #ifdef Debug
  20. $@    if (Token != $_EofToken)
  21. $@      $_GetWord(Word);
  22.     else
  23.       Word[0] = '\x0';
  24. $@    WritePosition(stdout,$_Attribute.Position);
  25.     printf("%5d %s\n",Token,Word);
  26. #endif
  27.    }
  28. $@  while (Token != $_EofToken);
  29. $@  $_CloseScanner();
  30.   printf("%d\n",Count);
  31.   return(0);
  32.  }
  33.