Sun Nov 23 13:33:04 CET 2008


It's a bit hard to use..  The thing I seem to use the most is:

     * Literal macro arguments (for single procedures).
     * Global variables that get redefined.
     * Prefix parsers.

The first one is OK, but has limited use. (It can't define multiple
words in a simple way).  The second one is not good, but used a lot.
The third one doesn't get used really.

So, for redefinition of global variables (macros).  What's the deal

  macro : foo 1 ;
  forth : bar foo ;
  macro : foo 2 ;

In this code, foo is:
   	0840 6EEC [movwf 236 0]
	0842 0C02 [retlw 2]

In a single compilation unit, macro definition ALWAYS comes before
code generation.  If a macro gets redefined, the generated code will
reflect this.

This is a bit raw, but very usable.  Note: this is used inside the
core compiler too.  Most language features are redefined or
specialized in this way, so it is kind of basic.