use jump table instead of conditionals for parsing hex char.