We got this context-free grammar that looks relatively simple and we are required to write a pseudo code of a recursive descent parser for that CFG. We need to use getToken()/nextToken() and unreadToken(Token) procedures. I have never done anything like that before and have tried finding examples online but none of them have helped me. The CFG is:
S → xSyS
S → ySxS
S → ε