-/* Compute how to make the finite state machine deterministic;
- find which rules need lookahead in each state, and which lookahead tokens they accept.
-
-lalr(), the entry point, builds these data structures:
-
-goto_map, from_state and to_state
- record each shift transition which accepts a variable (a nonterminal).
-ngotos is the number of such transitions.
-from_state[t] is the state number which a transition leads from
-and to_state[t] is the state number it leads to.
-All the transitions that accept a particular variable are grouped together and
-goto_map[i - ntokens] is the index in from_state and to_state of the first of them.
-
-consistent[s] is nonzero if no lookahead is needed to decide what to do in state s.
-
-LAruleno is a vector which records the rules that need lookahead in various states.
-The elements of LAruleno that apply to state s are those from
- lookaheads[s] through lookaheads[s+1]-1.
-Each element of LAruleno is a rule number.
-
-If lr is the length of LAruleno, then a number from 0 to lr-1
-can specify both a rule and a state where the rule might be applied.
-
-LA is a lr by ntokens matrix of bits.
-LA[l, i] is 1 if the rule LAruleno[l] is applicable in the appropriate state
- when the next token is symbol i.
-If LA[l, i] and LA[l, j] are both 1 for i != j, it is a conflict.
-*/