%token treeType // something like "#PHYLO" %token description // a string %token edgeLength // a double value %token comment // everything in brackets [] typedForest : forest | treeType forest ; forest : tree ';' | tree ';' forest ; tree : inner | leaf ; nodelist : node | node ',' nodelist ; node : leaf | inner ; inner : '(' nodelist ')' description ':' edgeLength | '(' nodelist ')' ':' edgeLength | '(' nodelist ')' description | '(' nodelist ')' ; leaf : description ':' edgeLength | description | ':' edgeLength