#include "global.h" #include "source.h" #include "lex.h" #include "list.h" #include "nodes.h" #include "conf.h" #include "parser.h" #include "parparse.h" #include "partab.h" #include "gen.h" // The workings of ParGen are brought together within main() function. int main(int argc, char **argv) { // Open the input file ParGenParser input(argc == 1 ? strdup("-") : argv[1]); // Read grammar specifications input.specification(); // Make the parser ParRule::makeParser(); // Give a textual representation of configuration sets. // listIter forEach(&ConfSet::confSets); // ConfSet **item; // while (item = forEach()) (*item)->show(stdout); // Output the parser based on predefined templates ParTable table; Copier copysrc(&table, "gparserc.tpl", "gparser.cc"); Copier copyinc(&table, "gparserh.tpl", "gparser.h"); }