implementing text representation of relational algebra tree