| 1252 | } |
| 1253 | |
| 1254 | void insert_empty_rule() |
| 1255 | { |
| 1256 | register bucket *bp, **bpp; |
| 1257 | |
| 1258 | assert(cache); |
| 1259 | sprintf(cache, "$$%d", ++gensym); |
| 1260 | bp = make_bucket(cache); |
| 1261 | last_symbol->next = bp; |
| 1262 | last_symbol = bp; |
| 1263 | bp->tag = plhs[nrules]->tag; |
| 1264 | bp->class = ACTION; |
| 1265 | bp->args = 0; |
| 1266 | |
| 1267 | if ((nitems += 2) > maxitems) |
| 1268 | expand_items(); |
| 1269 | bpp = pitem + nitems - 1; |
| 1270 | *bpp-- = bp; |
| 1271 | while ((bpp[0] = bpp[-1])) --bpp; |
| 1272 | |
| 1273 | if (++nrules >= maxrules) |
| 1274 | expand_rules(); |
| 1275 | plhs[nrules] = plhs[nrules-1]; |
| 1276 | plhs[nrules-1] = bp; |
| 1277 | rprec[nrules] = rprec[nrules-1]; |
| 1278 | rprec[nrules-1] = 0; |
| 1279 | rassoc[nrules] = rassoc[nrules-1]; |
| 1280 | rassoc[nrules-1] = TOKEN; |
| 1281 | } |
| 1282 | |
| 1283 | static char *insert_arg_rule(char *arg, char *tag) |
| 1284 | { |
no test coverage detected