created error flag. when error detected can be set true. works for any
invalid lexeme.