generalize grammar analysis to k>1
comma-separate properly in h_pprint_stringset
remove some left-over dead code that I think is bullshit
generalize grammar data structure allocation to k>1