use factored out context-free-parser; slight formatting changes