bottom-up figures
top-down and bottom-up parser written further