Implementing recursion in grammar

Hello, we were trying to implement recursion in our PostgreSQL-esque grammar.

For this, we are using something like this, to have nested select queries.


   Select Star From Identifier  |

  Select  Star  From   Identifier Where ("(" SelectStmt ")")?  

We were wondering if this was a good approach to do it, especially if multiple queries are present.

Yes, recursive rules should be no problem.

1 Like