Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #include <stdlib.h>
  3. #include "y1.h"
  4. /*
  5. * 12-Apr-83 (RBD) Add symbolic exit status
  6. * Added s - switch. Please refer to ywstat.c for details on sswitch
  7. */
  8. extern FILE * finput;
  9. extern FILE * faction;
  10. extern FILE * fdefine;
  11. extern FILE * ftable;
  12. extern FILE * ftemp;
  13. extern FILE * foutput;
  14. extern FILE *tokxlathdl; /* token xlation file,token index vs value*/
  15. extern FILE *stgotohdl; /* state goto table file handle */
  16. extern FILE *stexhdl; /* state vs expected construct handle */
  17. void
  18. main(argc,argv) int argc;
  19. char *argv[];
  20. {
  21. tokxlathdl = stdout;/* token xlation file,token index vs value*/
  22. stgotohdl = stdout; /* state goto table file handle */
  23. stexhdl = stdout; /* state vs expected construct handle */
  24. puts("Setup...");
  25. setup(argc,argv); /* initialize and read productions */
  26. puts("cpres ...");
  27. tbitset = NWORDS(ntokens);
  28. cpres(); /* make table of which productions yield a given nonterminal */
  29. puts("cempty ...");
  30. cempty(); /* make a table of which nonterminals can match the empty string */
  31. puts("cpfir ...");
  32. cpfir(); /* make a table of firsts of nonterminals */
  33. puts("stagen ...");
  34. stagen(); /* generate the states */
  35. puts("output ...");
  36. output(); /* write the states and the tables */
  37. puts("go2out ...");
  38. go2out();
  39. puts("hideprod ...");
  40. hideprod();
  41. puts("summary ...");
  42. summary();
  43. puts("callopt ...");
  44. callopt();
  45. puts("others ...");
  46. others();
  47. puts("DONE !!!");
  48. SSwitchExit();
  49. exit(EX_SUC);
  50. }