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.pm

CSS2.1 Grammar

SimpleStrings.pm

Simple strings

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