JavaScript Newick format parser