Parse moduleheads and import statements without parser-helper.