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

📄 lpgact.i

📁 一个非常好的检索工具
💻 I
📖 第 1 页 / 共 2 页
字号:
            "Symbol cannot be used as Start symbol. "            "Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* start_symbol ::= BLOCK */#line 677 "jikespg.g"static void act68(void){    sprintf(msg_line,            "Misplaced block found in Start section. "            "Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* start_symbol ::= DEFINE_KEY */#line 691 "jikespg.g"static void misplaced_keyword_found_in_START_section(void){    sprintf(msg_line,            "Misplaced keyword found in START section. "            "Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* rules_block ::= RULES_KEY */#line 712 "jikespg.g"static void act73(void){    register struct node *q;    if (start_symbol_root == NULL)    {        q = Allocate_node();        q -> value = empty;        q -> next = q;        start_symbol_root = q;        num_rules = 0;                 /* One rule */        num_items = 0;                 /* 0 items */    }    build_symno();    return;}/* rules_block ::= RULES_KEY rule_list */#line 733 "jikespg.g"static void act74(void){    build_symno();    return;}/* rule_list ::= {action_block} SYMBOL produces */#line 749 "jikespg.g"static void act77(void){    register struct node *q;    assign_symbol_no(SYM2.name, OMEGA);    if (start_symbol_root == NULL)    {        q = Allocate_node();        q -> value = symbol_image(SYM2.name);        q -> next = q;        start_symbol_root = q;        num_rules = 1;        num_items = 1;    }/*********************************************************************//* Since we don't know for sure how many start symbols we have, a    *//* "while" loop is used to increment the size of rulehdr. However,   *//* it is highly unlikely that this loop would ever execute more than *//* once if the size of RULE_INCREMENT is reasonable.                 *//*********************************************************************/    while (num_rules >= (int)rulehdr_size)    {        rulehdr_size += RULEHDR_INCREMENT;        rulehdr = (struct rulehdr_type *)            (rulehdr == (struct rulehdr_type *) NULL             ? malloc(rulehdr_size * sizeof(struct rulehdr_type))             : realloc(rulehdr, rulehdr_size * sizeof(struct rulehdr_type)));        if (rulehdr == (struct rulehdr_type *) NULL)            nospace(__FILE__, __LINE__);    }    rulehdr[num_rules].sp = ((SYM3.kind == ARROW_TK) ? TRUE : FALSE);    rulehdr[num_rules].lhs = symbol_image(SYM2.name);    rulehdr[num_rules].rhs_root = NULL;    return;}/* rule_list ::= rule_list OR */#line 794 "jikespg.g"static void act78(void){    num_rules++;    if (num_rules >= (int)rulehdr_size)    {        rulehdr_size += RULEHDR_INCREMENT;        rulehdr = (struct rulehdr_type *)            (rulehdr == (struct rulehdr_type *) NULL             ? malloc(rulehdr_size * sizeof(struct rulehdr_type))             : realloc(rulehdr, rulehdr_size * sizeof(struct rulehdr_type)));        if (rulehdr == (struct rulehdr_type *) NULL)            nospace(__FILE__, __LINE__);    }    rulehdr[num_rules].sp = rulehdr[num_rules - 1].sp;    rulehdr[num_rules].lhs = OMEGA;    rulehdr[num_rules].rhs_root = NULL;    return;}/* rule_list ::= rule_list SYMBOL produces */#line 817 "jikespg.g"static void act79(void){    num_rules++;    if (num_rules >= (int)rulehdr_size)    {        rulehdr_size += RULEHDR_INCREMENT;        rulehdr = (struct rulehdr_type *)            (rulehdr == (struct rulehdr_type *) NULL             ? malloc(rulehdr_size * sizeof(struct rulehdr_type))             : realloc(rulehdr, rulehdr_size * sizeof(struct rulehdr_type)));        if (rulehdr == (struct rulehdr_type *) NULL)            nospace(__FILE__, __LINE__);    }    rulehdr[num_rules].sp = ((SYM3.kind == ARROW_TK) ? TRUE : FALSE);    assign_symbol_no(SYM2.name, OMEGA);    rulehdr[num_rules].lhs = symbol_image(SYM2.name);    rulehdr[num_rules].rhs_root = NULL;    return;}/* rule_list ::= rule_list ERROR_SYMBOL */#line 846 "jikespg.g"static void act82(void){    register struct node *q;    char tok_string[SYMBOL_SIZE + 1];    if (error_image == DEFAULT_SYMBOL)    {        restore_symbol(tok_string, kerror);        sprintf(msg_line,                "%s not declared or aliased to terminal "                "symbol. Line %d, column %d",                tok_string,                SYM2.start_line, SYM2.start_column);        PRNTERR(msg_line);        exit(12);    }    q = Allocate_node();    q -> value = error_image;    num_items++;    SHORT_CHECK(num_items);    if (rulehdr[num_rules].rhs_root == NULL)        q -> next = q;    else    {        q -> next = rulehdr[num_rules].rhs_root -> next;         rulehdr[num_rules].rhs_root -> next = q;    }    rulehdr[num_rules].rhs_root = q;    return;}/* rule_list ::= rule_list SYMBOL */#line 881 "jikespg.g"static void act83(void){    register int sym;    register struct node *q;    assign_symbol_no(SYM2.name, OMEGA);    sym = symbol_image(SYM2.name);    if (sym != empty)    {        if (sym == eoft_image)        {            sprintf(msg_line,                    "End-of-file symbol cannot be used "                    "in rule. Line %d, column %d",                    SYM2.start_line, SYM2.start_column);            PRNTERR(msg_line);            exit(12);        }        q = Allocate_node();        q -> value = sym;        num_items++;        SHORT_CHECK(num_items);        if (rulehdr[num_rules].rhs_root == NULL)            q -> next = q;        else        {            q -> next = rulehdr[num_rules].rhs_root -> next;            rulehdr[num_rules].rhs_root -> next = q;        }        rulehdr[num_rules].rhs_root = q;    }    return;}/* rule_list ::= OR */#line 919 "jikespg.g"static void bad_first_symbol_in_RULES_section(void){    sprintf(msg_line,            "First symbol in Rules section is not "            "a valid left-hand side.\n Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* rule_list ::= rule_list OR produces */#line 939 "jikespg.g"static void rule_without_left_hand_side(void){    sprintf(msg_line,            "Rule without left-hand-side.  Line %d, column %d",            SYM3.start_line, SYM3.start_column);    PRNTERR(msg_line);    exit(12);}/* rule_list ::= rule_list keyword produces */#line 956 "jikespg.g"static void act91(void){    sprintf(msg_line,            "Misplaced keyword found in Rules section "            "Line %d, column %d",            SYM2.start_line, SYM2.start_column);    PRNTERR(msg_line);    exit(12);}/* action_block ::= BLOCK */#line 971 "jikespg.g"static void act92(void){    if (action_bit)        add_block_definition(&(SYM1));    return;}/* action_block ::= HBLOCK */#line 982 "jikespg.g"static void act93(void){    if (action_bit)        add_block_definition(&(SYM1));    return;}/* keyword ::= DEFINE_KEY */#line 994 "jikespg.g"static void misplaced_keyword_found_in_RULES_section(void){    sprintf(msg_line,            "Misplaced keyword found in RULES section. "            "Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* names_definition ::= name produces name */#line 1020 "jikespg.g"static void act100(void){    if (error_maps_bit)    {        int symbol;        switch(SYM1.kind)        {            case EMPTY_SYMBOL_TK:                symbol = empty;                break;            case ERROR_SYMBOL_TK:                symbol = error_image;                break;            case EOL_SYMBOL_TK:                symbol = eolt_image;                break;            case EOF_SYMBOL_TK:                symbol = eoft_image;                break;            default:                symbol = symbol_image(SYM1.name);                break;        }        if (symbol == OMEGA)        {            sprintf(msg_line,                    "Symbol %s is undefined. Line %d, column %d",            SYM1.name, SYM1.start_line, SYM1.start_column);            PRNTERR(msg_line);            exit(12);        }        if (symno[symbol].name_index != OMEGA)        {            sprintf(msg_line,                    "Symbol %s has been named more than once. "                    "Line %d, column %d.",            SYM1.name, SYM1.start_line, SYM1.start_column);            PRNTERR(msg_line);            exit(12);        }         symno[symbol].name_index = name_map(SYM3.name);     }     return;}/* bad_name ::= DEFINE_KEY */#line 1098 "jikespg.g"static void misplaced_keyword_found_in_NAMES_section(void){    sprintf(msg_line,            "Keyword  has been misplaced in NAMES section."            "  Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* bad_name ::= BLOCK */#line 1122 "jikespg.g"static void act116(void){    sprintf(msg_line,            "Misplaced action block found in NAMES "            "section. Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* bad_name ::= MACRO_NAME */#line 1136 "jikespg.g"static void act117(void){    sprintf(msg_line,            "Misplaced macro name found in NAMES "            "section. Line %d, column %d",            SYM1.start_line, SYM1.start_column);    PRNTERR(msg_line);    exit(12);}/* [terminals_block] ::= */#line 1158 "jikespg.g"static void process_TERMINALS_section(void){    num_terminals = num_symbols;    assign_symbol_no(keoft, OMEGA);    eoft_image = symbol_image(keoft);    if (error_maps_bit)    {        assign_symbol_no(kerror, OMEGA);        error_image = symbol_image(kerror);    }    else error_image = DEFAULT_SYMBOL;   /* should be 0 */    assign_symbol_no(kaccept, OMEGA);    accept_image = symbol_image(kaccept);    return;}/* [alias_block] ::= */#line 1183 "jikespg.g"static void process_ALIAS_section(void){    register int i,                 k;    register struct hash_type *p;    k = 0;    if (eoft_image <= num_terminals)        k++;    else        num_terminals++;    if (error_maps_bit)    {        if (error_image <= num_terminals)            k++;        else        {            num_terminals++;            if (k == 1)                error_image--;        }    }    if (k > 0)    {        for (i = 0; i < HT_SIZE; i++)        {            p = hash_table[i];            while(p != NULL)            {                if (p -> number > num_terminals)                    p -> number -= k;                else if (p -> number < -num_terminals)                    p -> number += k;                p = p -> link;            }        }        num_symbols -= k;        accept_image -= k;    }    if (eolt_image == OMEGA)        eolt_image = eoft_image;    if (error_image == DEFAULT_SYMBOL)        alias_map(kerror, DEFAULT_SYMBOL);    return;}/* {terminal_symbol} ::= */#line 1260 "jikespg.g"static void act132(void){    assign_symbol_no(kempty, OMEGA);    empty = symbol_image(kempty);    return;}

⌨️ 快捷键说明

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