Recursion in a grammar?

Hello, could you please point us to using recursion in a grammar?

For example, if we do something like:

Stmt {

Stmt? tokenA tokenB tokenC


We’re not getting the desired result we thought this would get. Is there a specific way to do this?

Thank you!

You’ll have to be a bit more specific on what is going wrong. I tried a small grammar like A { A? "b" } and it seems to behave the way I’d expect—adding one nested A for each b in the input.

Not sure what was missing, but it worked later. Thank you!