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

Function insert_arg_rule

extern/btyacc/reader.c:1283–1307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281}
1282
1283static char *insert_arg_rule(char *arg, char *tag)
1284{
1285int lineno = rescan_lineno;
1286char *code = compile_arg(&arg, tag);
1287int rule = lookup_arg_cache(code);
1288FILE *f = action_file;
1289
1290 if (rule<0) {
1291 rule = nrules;
1292 insert_arg_cache(code, rule);
1293 fprintf(f, "case %d:\n", rule - 2);
1294 if (!lflag)
1295 fprintf(f, line_format, lineno, (inc_file?inc_file_name:input_file_name));
1296 fprintf(f, "%s;\n", code);
1297 fprintf(f, "break;\n");
1298 insert_empty_rule();
1299 plhs[rule]->tag = tag;
1300 plhs[rule]->class = ARGUMENT; }
1301 else {
1302 if (++nitems > maxitems)
1303 expand_items();
1304 pitem[nitems-1] = plhs[rule];
1305 free(code); }
1306 return arg+1;
1307}
1308
1309void add_symbol()
1310{

Callers 1

add_symbolFunction · 0.85

Calls 5

compile_argFunction · 0.85
lookup_arg_cacheFunction · 0.85
insert_arg_cacheFunction · 0.85
insert_empty_ruleFunction · 0.85
expand_itemsFunction · 0.85

Tested by

no test coverage detected