I'm creating a parser using PLY in Python. Everything's going well so far but the problem is, I don't know how to use a custom p_error for each statement. I currently have a p_error: statement at the bottom of the parser file that prints "Syntax error" for every kind of error in the program. But how could I make it say Syntax error when it's a syntax error and some other kind of error when it's not a syntax error?