| 78 | } |
| 79 | |
| 80 | action *add_reductions(int stateno, action *actions) |
| 81 | { |
| 82 | register int i, j, m, n; |
| 83 | register int ruleno, tokensetsize; |
| 84 | register unsigned *rowp; |
| 85 | |
| 86 | tokensetsize = WORDSIZE(ntokens); |
| 87 | m = lookaheads[stateno]; |
| 88 | n = lookaheads[stateno + 1]; |
| 89 | for (i = m; i < n; i++) |
| 90 | { |
| 91 | ruleno = LAruleno[i]; |
| 92 | rowp = LA + i * tokensetsize; |
| 93 | for (j = ntokens - 1; j >= 0; j--) |
| 94 | { |
| 95 | if (BIT(rowp, j)) |
| 96 | actions = add_reduce(actions, ruleno, j); |
| 97 | } |
| 98 | } |
| 99 | return (actions); |
| 100 | } |
| 101 | |
| 102 | action *add_reduce(action *actions, int ruleno, int symbol) |
| 103 | { |
no test coverage detected