home *** CD-ROM | disk | FTP | other *** search
- /*
- HEADER: CUG nnn.nn;
- TITLE: YACC - Yet Another Compilier-Compilier
- VERSION: 1.0 for IBM-PC
- DATE: JAN 28, 1985
- DESCRIPTION: LALR(1) Parser Generator. From UNIX
- KEYWORDS: Parser Generator Compilier-Compilier YACC
- SYSTEM: IBM-PC and Compatiables
- FILENAME: YMAIN.1C
- WARNINGS: This program is not for the casual user. It will
- be useful primarily to expert developers.
- CRC: N/A
- SEE-ALSO: LEX and PREP
- AUTHORS: Scott Guthery 11100 leafwood lane Austin, TX 78750
- COMPILERS: DESMET-C
- REFERENCES: UNIX Systems Manuals
- */
-
- #include "y1.h"
- #include "y2.h"
- #include "y3.h"
- #include "y4.h"
-
- /*
- * 12-Apr-83 (RBD) Add symbolic exit status
- */
- void main(int argc,char *argv[])
-
- {
-
- puts("Setup...");
- setup(argc,argv); /* initialize and read productions */
- puts("cpres ...");
- tbitset = NWORDS(ntokens);
- cpres(); /* make table of which productions yield a given nonterminal */
- puts("cempty ...");
- cempty(); /* make a table of which nonterminals can match the empty string */
- puts("cpfir ...");
- cpfir(); /* make a table of firsts of nonterminals */
- puts("stagen ...");
- stagen(); /* generate the states */
- puts("output ...");
- output(); /* write the states and the tables */
- puts("go2out ...");
- go2out();
- puts("hideprod ...");
- hideprod();
- puts("summary ...");
- summary();
- puts("callopt ...");
- callopt();
- puts("others ...");
- others();
- puts("DONE !!!");
- exit(EX_SUC);
- }
-