Xedecimal/tabtree — pull request #1 by dap6000 (2014-12-31 21:09:00+00:00)
Title: PHP parsing to JSON and associative array

The output here can’t match the working JS example from the original
repo ‘cos PHP can’t do circular objects. That also makes climbing up
and down the nodes of our struct rather difficult. So I went with JSON
as an intermediary step.

The heavy lifting is in parseTabTreeToJSON(). Then parseTabTree() just
calls json_decode() on the output of parseTabTreeToJSON() to get an
associative array. There’s a handful of JSON related helper functions
at the bottom.