Question: Consider the following BNF grammar: EXP ::= EXP + TERM | EXP - TERM | TERM TERM ::= TERM * FACTOR | TERM / FACTOR
Consider the following BNF grammar:
EXP ::= EXP + TERM | EXP - TERM | TERM
TERM ::= TERM * FACTOR | TERM / FACTOR | FACTOR
FACTOR ::= ( EXP ) | DIGIT
DIGIT ::= 0 | 1 | 2 | 3
Write a recursive descent recognizer pseudocode with: - Ask the user for an input stream. - Report "legal" or "errors found", not both. - Assume the input stream is the token stream. - Assume the input stream terminates with a $. - Assume there is no white space. - Use a form to collect input and return the output. - Test your recognizer with illegal and legal strings. - Give a brief description of this recognizer for the user on how to use and what method that it based on.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
