One procedure for table-driven top-down parsing is given here:https://www.cs.rochester.edu/~nelson/courses/csc_173/grammars/parsing.htmlThis gives for matching the input the lines:else if NextInputSymbol == top then    /* Match terminal symbol in input */    Pop(stack)    /* Get next terminal symbol in input */    scanner(NextInputSymbol)Which seems to be assuming that every product leading to terminal symbols has only one terminal.But what if the product leading to terminals is of the following form:$$A \rightarrow a_1 | a_2| ...$$where $a_i$s terminals.How do you match for such product?Merely by trying out each terminal symbol?But reading them all to the stack would cause some overhead for keeping account of how many terminals symbols were added?In predict table form:
In top-down parser how do you match a product $A \rightarrow a_1 | a_2| ...$, $a_i$s terminals
parsers