Weeks of illness, sleep difficulties and general busyness; I haven't had the brain power to get my head around OZ80 and I've been feeling disheartened over how endless development is. It's taken since the last post until now to work out what was making recent work too difficult to nail down -- the Abstract Syntax Tree was not abstract! I made the mistake of re-using the language tokens for the syntax tree so all I was doing was double-implementing the same grammar parsing -- once with tokens and again with the tree. This got seriously confusing, fast.
The AST doesn't need the meta data and semantics of the user-friendly OZ80 language. It just needs to be a series of direct actions the compiler needs to take. There doesn't need to be a distinction between Constants, Labels and so on in the AST, they're all just Symbols.
Now I can finally make sense of what I'm doing, my next main concern is how to define an object format -- assembled code, but with blanks inserted for later linking (that's an over-simplification unfortunately as some 'blanks' require link-time calculations)