sort codes written in parser_core.hs