Move top level definition parsing out of package parsing
Central definition of EOF error
Inline convert_tokens