fixed lexer and parser to work with Alex 3.0 and upwards