changed the default case in the switch to handle invalid characters. 
Also all identifiers are now send to parser in lower case.