Added some usefull error messages.

Added an error message to indicate when a parser hasn't been finalized.

Added an error message to indicate that someone is trying to finalize an
empty parser.