New helper functions in Grammar class