Chap 2.6 : added generate-tree for explicit grammar