1875 |
|
|
1876 |
ritem = XCALLOC (short, nitems + 1); |
ritem = XCALLOC (short, nitems + 1); |
1877 |
rule_table = XCALLOC (rule_t, nrules) - 1; |
rule_table = XCALLOC (rule_t, nrules) - 1; |
|
rprec = XCALLOC (short, nrules) - 1; |
|
|
rprecsym = XCALLOC (short, nrules) - 1; |
|
|
rassoc = XCALLOC (short, nrules) - 1; |
|
1878 |
|
|
1879 |
itemno = 0; |
itemno = 0; |
1880 |
ruleno = 1; |
ruleno = 1; |
1894 |
of the last token in it. */ |
of the last token in it. */ |
1895 |
if (p->sym->class == token_sym) |
if (p->sym->class == token_sym) |
1896 |
{ |
{ |
1897 |
rprec[ruleno] = p->sym->prec; |
rule_table[ruleno].prec = p->sym->prec; |
1898 |
rassoc[ruleno] = p->sym->assoc; |
rule_table[ruleno].assoc = p->sym->assoc; |
1899 |
} |
} |
1900 |
if (p) |
if (p) |
1901 |
p = p->next; |
p = p->next; |
1905 |
the specified symbol's precedence replaces the default. */ |
the specified symbol's precedence replaces the default. */ |
1906 |
if (ruleprec) |
if (ruleprec) |
1907 |
{ |
{ |
1908 |
rprec[ruleno] = ruleprec->prec; |
rule_table[ruleno].prec = ruleprec->prec; |
1909 |
rassoc[ruleno] = ruleprec->assoc; |
rule_table[ruleno].assoc = ruleprec->assoc; |
1910 |
rprecsym[ruleno] = ruleprec->value; |
rule_table[ruleno].precsym = ruleprec->value; |
1911 |
} |
} |
1912 |
|
|
1913 |
ritem[itemno++] = -ruleno; |
ritem[itemno++] = -ruleno; |