parser: Improve top level parsing.