top-down recursive descent parser mostly working, after much pain