Updated annot_grammar.py to handle with syntax errors

Signed-off-by: Herbert Rocha <herberthb12@gmail.com>