Newick tree format

AUTHOR

Lucien Grondin

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

use v6;



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

# vim: expandtab shiftwidth=4 ft=perl6

See Also

CSSGrammar.rakumod

CSS2.1 Grammar

SimpleStrings.rakumod

Simple strings

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.