cleaned up and completed the Parser verifySyntax method.