LR parser generator in python