split h_lr_lookup into two (yet identical) functions
better factor out lr table writes
split LR table representation by key type (terminals/nonterminals)