implemented syntax tree generator