fix python3 encoding changes
workaroung missing cmp
update parsetab to work with python3