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

Go to the documentation of this file.
00001 #
00002 #include <stdio.h>
00003 #include "../parser/y.tab.h"
00004 
00005 extern yylval;
00006 int pflag = 1;
00007 
00008 main() 
00009 {
00010 register x;
00011 
00012         while( (x = yylex()) != EOF ) {
00013                 printf("%d: ",x); fflush(stdout);
00014                 if( (x == WORDID) || (x == OPID) ) {
00015                         printf("%s ", getname(yylval) ); fflush(stdout);
00016                 }
00017                 if( (x == QSTRING) || (x == UQSTRING) ) {
00018                         printf("%s ", yylval ); fflush(stdout);
00019                 }
00020                 putchar('\n');
00021         }
00022         printf("%d: ",x);
00023 }
00024 
00025 yyerror(s)
00026 {
00027     printf("\nYYERROR: %s\n",s);
00028 }

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