Newick tree format

Author: Lucien Grondin

See https://en.wikipedia.org/wiki/Newick_format.

Source code: Newick.pm

use v6;

grammar Newick {
    rule TOP { '(' ** 2..3 % \, ');' }
    rule subtree {  | '(' ** 2 % \, ')' }
    token species { <.ident>+ }
}