Wrote functions that parse a structural formula and return a nested list.