Declarative strongly typed tree matcher generator