New API for Grammar_TS