some refactor
most of the way done
things are still not quite working out

currently has an expected left recursion infinite loop

although the structure looks better (/shrug)