Minimal syntax for phylogenetic trees

Darius J Chuck


Newick format was developed in 1986 as a minimal representation for phylogenetic trees for the PHYLogeny Inference Package.

More generally it can represent different kinds of tree-structures.

Following up the previous article here I show how Jevko could be used as an even more general and minimal alternative for the task.


The Wikipedia example:


can be represened in Jevko as follows:


Let’s call this format Phylo-Jevko.

Grammar comparison

Compared to the Newick format’s grammar:

Tree → Subtree ";"
Subtree → Leaf | Internal
Leaf → Name
Internal → "(" BranchSet ")" Name
BranchSet → Branch | Branch "," BranchSet
Branch → Subtree Length
Name → empty | string
Length → empty | ":" number

Phylo-Jevko is simpler:

Tree = *Branch Name
Branch = Length "[" Tree "]"
Length = number / ""
Name = string / ""

In Phylo-Jevko:

Both Name and Length may be surrounded with whitespace. Whitespace is also allowed within Name, no quoting needed.

A simple escape mechanism (as in the definition of Jevko) could be introduced to allow Names with brackets.

Thanks to these simplifications, no extra separators, such as :, ;, ,, or ' are needed – only brackets.

Comments could be implemented as branches prefixed with # instead of Length:

Comment = "#" "[" Name "]"

Nested comments could be allowed like so:

Comment = "#" "[" NestedComment "]"
NestedComment = *("[" NestedComment "]" / Name)


Extremely minimal formats for encoding all kinds of tree structures can be built based on Jevko, offering the most bang for the buck in terms of complexity. Less accidental complexity means less trouble and better efficiency. This is a good direction to go in when building a new system.

For existing systems, whether the extra efficiency is worth the work necessary to simplify – that’s a question that is best answered on an individual basis.