Finished main parser skeleton. Not much tested.