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

Function get_shifts

extern/btyacc/mkpar.c:47–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47action *get_shifts(int stateno)
48{
49 register action *actions, *temp;
50 register shifts *sp;
51 register Yshort *to_state;
52 register int i, k;
53 register int symbol;
54
55 actions = 0;
56 sp = shift_table[stateno];
57 if (sp)
58 {
59 to_state = sp->shift;
60 for (i = sp->nshifts - 1; i >= 0; i--)
61 {
62 k = to_state[i];
63 symbol = accessing_symbol[k];
64 if (ISTOKEN(symbol))
65 {
66 temp = NEW(action);
67 temp->next = actions;
68 temp->symbol = symbol;
69 temp->number = k;
70 temp->prec = symbol_prec[symbol];
71 temp->action_code = SHIFT;
72 temp->assoc = symbol_assoc[symbol];
73 actions = temp;
74 }
75 }
76 }
77 return (actions);
78}
79
80action *add_reductions(int stateno, action *actions)
81{

Callers 1

parse_actionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected