added type checking for LR0 Parser