Added some exceptions and error checking for Parser.

The parser now checks for empty expressions "( )", invalid operators
"$" and invalid tag names "art!st".