Core of the parser