add invalid command exception in Parser

-add invalid command exception in Parser to throw an exception when the
command given is invalid