automatic AST to table encoder