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

Function sole_reduction

extern/btyacc/mkpar.c:263–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261
262
263int sole_reduction(int stateno)
264{
265 register int count, ruleno;
266 register action *p;
267
268 count = 0;
269 ruleno = 0;
270 for (p = parser[stateno]; p; p = p->next)
271 {
272 if (p->action_code == SHIFT && p->suppressed <= 1)
273 return (0);
274 else if (p->action_code == REDUCE && p->suppressed <= 1)
275 {
276 if (ruleno > 0 && p->number != ruleno)
277 return (0);
278 if (p->symbol != 1)
279 ++count;
280 ruleno = p->number;
281 }
282 }
283
284 if (count == 0)
285 return (0);
286 return (ruleno);
287}
288
289
290void defreds()

Callers 1

defredsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected