# /* * pi - Pascal interpreter code translator * * Charles Haley, Bill Joy UCB * Version 1.0 August 1977 * * * pxp - Pascal execution profiler * * Bill Joy UCB * Version 1.0 August 1977 */ #include "whoami" #include "0.h" #include "yy.h" int line 1; /* * Yymain initializes each of the utility * clusters and then starts the processing * by calling yyparse. */ yymain() { /* * Initialize the scanner */ #ifdef PXP if (bracket == 0) { #endif if (getline() == -1) { Perror(filename, "No lines in file"); pexit(NOSTART); } #ifdef PXP } else yyline = 0; #endif #ifdef PI /* * Magic number for Pascal */ word(0404); #endif /* * Initialize the clusters * initstring(); */ inithash(); inittree(); #ifdef PI initnl(); #endif /* * Process the input */ yyparse(); #ifdef DEBUG #ifdef PI dumpnl(0); #endif #endif #ifdef PXP prttab(); #endif pexit(eflg ? ERRS : AOK); }