python. Renamed base_type into discriminator_value, fixed #172.

Also move parsing from the lang module to the parser module.