support for recursive grammar