refactoring parsing actions / decoupling them from parse tree
representation