Use grammar to inverse transform prompt