add API for pretty-printing for grammar symbols and symbol sequences
h_predict for k>1, more debugging