MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / insert_empty_rule

Function insert_empty_rule

extern/btyacc/reader.c:1254–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1252}
1253
1254void 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
1283static char *insert_arg_rule(char *arg, char *tag)
1284{

Callers 3

insert_arg_ruleFunction · 0.85
add_symbolFunction · 0.85
copy_actionFunction · 0.85

Calls 4

assertClass · 0.85
make_bucketFunction · 0.85
expand_itemsFunction · 0.85
expand_rulesFunction · 0.85

Tested by

no test coverage detected