C:/Users/Dennis/src/lang/russell.orig/src/pass1/stt/test.c

Go to the documentation of this file.
00001 #
00002 /*
00003  * string table routines test driver
00004  */
00005 # include "parm.h"
00006 # include "sttdefs.h"
00007 # include "stdio.h"
00008 
00009 char testbuff[100];
00010 
00011 main()
00012 {
00013 register char *p;
00014 int lgth;
00015 sttrelptr rp;
00016 
00017     for(;;) {
00018         p = testbuff;
00019         while( (*p = getchar()) != '\n' ) {
00020                         if( *p == EOF ) exit();
00021             p++;
00022         }
00023         *p++ = 0;
00024         lgth = p - testbuff;
00025         printf("%s: ",testbuff);
00026         rp = stt_enter( testbuff, lgth );
00027         printf("(%l) ",rp);
00028         p = getname( rp );
00029         printf("%s\n",p);
00030     }
00031 }
00032 
00033 /*
00034  *      Dummy yyerror to make things fly.
00035  */
00036 yyerror(msg)
00037 char msg[];
00038 {
00039         printf("YYERROR: %s",msg);
00040 }

Generated on Fri Jan 25 10:39:46 2008 for russell by  doxygen 1.5.4