Last week I didn't have enough time to make much progress except maybe yesterday. While thinking of it I came up with some s-expr to describe rules for token transformation. This helped to clarify what I'm trying to achieve with that as I've started to build full blown node processor which I definitely didn't need.
Something like that:
(rule :arc1 (has-color :red) (has-count 2)) (rule :arc1 (has-color :black) (has-count 2) (allocate :allocation1)) (rule :arc1 (emit :template) (allocate :allocation1))
So slowly but steady.