Scanner groundwork

Making (some of) the neccesary changes to the parser in preparation for
plugging in the shiny new scanner that's coming