⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 一个非常好的检索工具
💻 C
📖 第 1 页 / 共 2 页
字号:
        sprintf(msg_line,                "Number of Goto/Reduce actions: %d", num_goto_reduces);        PRNT(msg_line);    }    sprintf(msg_line, "Number of Reduce actions: %d", num_reductions);    PRNT(msg_line);    sprintf(msg_line,           "Number of Shift-Reduce conflicts: %d", num_sr_conflicts);    PRNT(msg_line);    sprintf(msg_line,            "Number of Reduce-Reduce conflicts: %d", num_rr_conflicts);    PRNT(msg_line);    /**********************************************************/    /* If the removal of single productions is requested, do  */    /* so now.                                                */    /* If STATE_BIT is on, we print the states.               */    /**********************************************************/    if (states_bit)    {        ptstats();        if (table_opt != 0)        {            PR_HEADING;        }    }    /**********************************************************/    /* If the tables are requested, we process them.          */    /**********************************************************/    if (table_opt != 0)    {        if (goto_default_bit && nt_check_bit)        {            PRNTERR("The options GOTO_DEFAULT and NT_CHECK are "                    "incompatible.  Tables not generated");        }        else        {            struct node *head;            int state_no;            num_entries = max_la_state + num_shifts + num_shift_reduces                                       + num_gotos  + num_goto_reduces                                       + num_reductions;            /***********************************************************/            /* We release space used by RHS_SYM, the ADEQUATE_ITEM     */            /* map, ITEM_TABLE (if we don't have to dump error maps),  */            /* IN_STAT, FIRST, NULL_NT and FOLLOW (if it's no longer   */            /* needed).                                                */            /***********************************************************/            ffree(rhs_sym);            if (adequate_item != NULL)            {                struct node *q;                int rule_no;                for ALL_RULES(rule_no)                {                    q = adequate_item[rule_no];                    if (q != NULL)                        free_nodes(q, q);                }                ffree(adequate_item);            }            if (! error_maps_bit)                ffree(item_table);            for ALL_STATES(state_no)            {                head = in_stat[state_no];                if (head != NULL)                {                    head = head -> next;                    free_nodes(head, in_stat[state_no]);                }            }            ffree(in_stat);            ffree(first);            null_nt += (num_terminals + 1);            ffree(null_nt);            if (follow != NULL)            {                if ((! error_maps_bit) || c_bit || cpp_bit || java_bit)                {                    follow += ((num_terminals + 1) * term_set_size);                    ffree(follow);                }            }            process_tables();        }    }    fclose(syslis);      /* close listing file */    return 0;}/****************************************************************************//*                              PRINT_OPTS:                                 *//****************************************************************************/static void print_opts(void){#if defined(C370) || defined(CW)#if defined(VM)    printf("\n%s\n\n"    "Usage: jikespg [filename [filetype [filemode]]] ([options]\n\n"    "Options                   Options                   Options\n"    "=======                   =======                   =======\n"    "action                    "    "actfile-name=string       "    "actfile-mode=string\n"    "actfile-type=string       "    "blockb=string             "    "blocke=string\n"    "byte                      "    "conflicts                 "    "default[=<0|1|2|3|4|5>]\n"    "edit                      "    "error-maps                "    "escape=character\n"    "first                     "    "follow                    "    "generate-parser[=string]\n"    "goto-default              "    "hactfile-name=string      "    "hactfile-mode=string\n"    "hactfile-type=string      "    "half-word                 "    "hblockb=string\n"    "hblocke=string            "    "lalr[=integer]            "    "list\n"    "names=<OPTIMIZED|MAX|MIN> "    "nt-check                  "    "ormark=character\n"    "output-size=integer       "    "read-reduce               "    "record-format=< F | V >\n"    "scopes                    "    "shift-default             "    "single-productions\n"    "slr                       "    "states                    "    "table[=<space|time>]\n"    "trace[=<conflicts|full>]  "    "verbose                   "    "warnings\n"    "xref\n\n"    "The following options are valid only if GENERATE-PARSER "    "and TABLE are activated:\n\n"    "debug                     "    "deferred                  "    "file-prefix=string\n"    "max-distance=integer      "    "min-distance=integer      "    "prefix=string\n"    "stack-size=integer        "    "suffix=string\n\n"    "Options must be separated by a space.  "    "Any non-ambiguous initial prefix of a\n"    "valid option may be used as an abbreviation "    "for that option.  When an option is\n"    "composed of two separate words, an "    "abbreviation may be formed by concatenating\n"    "the first character of each word.  Options "    "that are switches may benegated by\n"    "prefixing them with the string \"no\". "    "Default filetype is \"grammar\"; filemode is \"*\"\n",    HEADER_INFO);#else    printf("\n%s\n\n"    "Usage: jikespg [filename] [([options]]\n\n"    "Options                   Options                   Options\n"    "=======                   =======                   =======\n"    "action                    "    "actfile-name=string       "    "blockb=string\n"    "blocke=string             "    "byte                      "    "conflicts\n"    "default[=<0|1|2|3|4|5>]   "    "edit                      "    "error-maps\n"    "escape=character          "    "first                     "    "follow\n"    "generate-parser[=string]  "    "goto-default              "    "hactfile-name=string\n"    "half-word                 "    "hblockb=string            "    "hblocke=string\n"    "lalr[=integer]            "    "list                      "    "names=<OPTIMIZED|MAX|MIN>\n"    "nt-check                  "    "ormark=character          "    "output-size=integer\n"    "read-reduce               "    "record-format=< F | V >   "    "scopes\n"    "shift-default             "    "single-productions        "    "slr\n"    "states                    "    "table[=<space|time>]      "    "trace[=<conflicts|full>]\n"    "verbose                   "    "warnings                  "    "xref\n\n"    "The following options are valid only if GENERATE-PARSER "    "and TABLE are activated:\n\n"    "debug                     "    "deferred                  "    "file-prefix=string\n"    "max-distance=integer      "    "min-distance=integer      "    "prefix=string\n"    "stack-size=integer        "    "suffix=string\n\n"    "Options must be separated by a space.  "    "Any non-ambiguous initial prefix of a\n"    "valid option may be used as an abbreviation "    "for that option.  When an option is\n"    "composed of two separate words, an "    "abbreviation may be formed by concatenating\n"    "the first character of each word.  Options "    "that are switches may benegated by\n"    "prefixing them with the string \"no\". "    "Default filetype is \"grammar\"; filemode is \"*\"\n",    HEADER_INFO);#endif#else   printf("\n%s"    "\n(C) Copyright IBM Corp. 1983, 1999.\n"    "Licensed Materials - Program Property of IBM - All Rights Reserved.\n\n"    "Usage: jikespg [options] [filename[.extension]]\n\n"    "Options                   Options                   Options\n"    "=======                   =======                   =======\n"    "-action                   "    "-actfile-name=string      "    "-blockb=string\n"    "-blocke=string            "    "-byte                     "    "-conflicts\n"    "-default[=<0|1|2|3|4|5>]  "    "-edit                     "    "-error-maps\n"    "-escape=character         "    "-first                    "    "-follow\n"    "-generate-parser[=string] "    "-goto-default             "    "-half-word\n"    "-hactfile-name=string     "    "-hblockb=string           "    "-hblocke=string\n"    "-lalr[=integer]           "    "-list                     "    "-names=<OPTIMIZED|MAX|MIN>\n"    "-nt-check                 "    "-ormark=character         "    "-output-size=integer\n"    "-read-reduce              "    "-scopes                   "    "-shift-default\n"    "-single-productions       "    "-slr                      "    "-states\n"    "-table[=<space|time>]     "    "-trace[=<conflicts|full>] "    "-verbose\n"    "-warnings                 "    "-xref\n\n"    "The following options are valid only if "    "GENERATE-PARSER and TABLE are activated:\n"    "-debug                    "    "-deferred                 "    "-file-prefix=string\n"    "-max-distance=integer     "    "-min-distance=integer     "    "-prefix=string\n"    "-stack-size=integer       "    "-suffix=string\n\n"    "Options must be separated by a space.  "    "Any non-ambiguous initial prefix of a\n"    "valid option may be used as an abbreviation "    "for that option.  When an option is\n"    "composed of two separate words, an "    "abbreviation may be formed by concatenating\n"    "the first character of each word.  "    "Options that are switches may benegated by\n"    "prefixing them with the string \"no\".  "    "Default input file extension is \".g\"\n",    HEADER_INFO);    printf("\nVersion %s (27 Jan 98) by Philippe Charles, IBM Research."           "\nAddress comments and questions to charles@watson.ibm.com.\n", VERSION);#endif   return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -