Efficient Construction of LR(k) States and Tables