LR1 parser code implementation