Start of parser code for colouriser.