[A possible resource.](http://plindenbaum.blogspot.ca/2012/07/parsing-newick-format-in-c-using-flex.html)