added SyntaxErrors handling in Grammar