perform event handling if grammar is valid
bugfixes