helper for working with pegjs