I have two questions about how to write a recursive descent parser:
The first is what when you have a nonterminal that can match one of a few different nonterminals? How do you check which way is correct?
Second, how do you build an AST? Using YACC, I can just write a piece of code to execute for every instance of a nonterminal and it has special variables which refer to the "values" of the rules. How do you do a similar thing in a recursive descent parser?