Parsing the Newick format in C using flex and bison by Pierre Lindenbaum.
From the post:
The following post is my answer for this question on biostar “Newick 2 Json converter“.
The Newick tree format is a simple format used to write out trees (using parentheses and commas) in a text file .
The original question asked for a parser based on perl but here, I’ve implemented a C parser using flex/bison.
If that doesn’t grab your interest, consider the following from the Wikipedia article cited by Pierre on the Newick tree format:
In mathematics, Newick tree format (or Newick notation or New Hampshire tree format) is a way of representing graph-theoretical trees with edge lengths using parentheses and commas. It was adopted by James Archie, William H. E. Day, Joseph Felsenstein, Wayne Maddison, Christopher Meacham, F. James Rohlf, and David Swofford, at two meetings in 1986, the second of which was at Newick’s restaurant in Dover, New Hampshire, US. The adopted format is a generalization of the format developed by Meacham in 1984 for the first tree-drawing programs in Felsenstein’s PHYLIP package.[1]
Of interest both for conversion but also for the representation of graph-theoretical trees. About the same time as GML and other efforts on trees.
In case you are in Dover, Newick’s survives to this day. I don’t know if they are aware of the reason for their fame but you could mention it.