home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OS2-YACC.ZIP / YMAIN.1C < prev    next >
Text File  |  1989-09-29  |  2KB  |  57 lines

  1. /*
  2.   HEADER: CUG     nnn.nn;
  3.   TITLE:     YACC - Yet Another Compilier-Compilier
  4.   VERSION:     1.0 for IBM-PC
  5.   DATE:      JAN 28, 1985
  6.   DESCRIPTION:     LALR(1) Parser Generator. From UNIX
  7.   KEYWORDS:     Parser Generator Compilier-Compilier YACC
  8.   SYSTEM:     IBM-PC and Compatiables
  9.   FILENAME:      YMAIN.1C
  10.   WARNINGS:     This program is not for the casual user. It will
  11.          be useful primarily to expert developers.
  12.   CRC:         N/A
  13.   SEE-ALSO:     LEX and PREP
  14.   AUTHORS:     Scott Guthery 11100 leafwood lane Austin, TX 78750
  15.   COMPILERS:     DESMET-C
  16.   REFERENCES:     UNIX Systems Manuals
  17. */
  18.  
  19. #include "y1.h"
  20. #include "y2.h"
  21. #include "y3.h"
  22. #include "y4.h"
  23.  
  24. /*
  25.  * 12-Apr-83 (RBD) Add symbolic exit status
  26.  */
  27. void main(int argc,char *argv[])
  28.  
  29.    {
  30.  
  31.    puts("Setup...");
  32.    setup(argc,argv); /* initialize and read productions */
  33.    puts("cpres ...");
  34.    tbitset = NWORDS(ntokens);
  35.    cpres(); /* make table of which productions yield a given nonterminal */
  36.    puts("cempty ...");
  37.    cempty(); /* make a table of which nonterminals can match the empty string */
  38.    puts("cpfir ...");
  39.    cpfir(); /* make a table of firsts of nonterminals */
  40.    puts("stagen ...");
  41.    stagen(); /* generate the states */
  42.    puts("output ...");
  43.    output();  /* write the states and the tables */
  44.    puts("go2out ...");
  45.    go2out();
  46.    puts("hideprod ...");
  47.    hideprod();
  48.    puts("summary ...");
  49.    summary();
  50.    puts("callopt ...");
  51.    callopt();
  52.    puts("others ...");
  53.    others();
  54.    puts("DONE !!!");
  55.    exit(EX_SUC);
  56.    }
  57.