Skip to content

Commit 343cb99

Browse files
author
L. Grondin
committed
[parsers] Newick tree format (used in bioinformatics)
1 parent dd782ef commit 343cb99

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

parsers/Newick.pm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#| Newick tree format. L<https://en.wikipedia.org/wiki/Newick_format>
2+
grammar Newick {
3+
rule TOP { <node> ';' }
4+
token node {
5+
<name>
6+
| '(' ~ ')' <node>+ % ',' <name>?
7+
}
8+
token name { <.ident>+ }
9+
}
10+
11+
# vim: ft=perl6
12+

0 commit comments

Comments
 (0)