Question: 3. (10 pts) a. Modify the grammar in Problem 2 so that the language requires a var to begin with a lower-case letter followed by
3. (10 pts) a. Modify the grammar in Problem 2 so that the language requires a var to begin with a lower-case letter followed by zero or more lower-case letters or digits. Use BNF, not EBNF. Exactly what grammar rule(s) need to be added? Example: The following should be variables (var): X y books albel sum2 b. Modify the grammar in Problem 2 so that the language requires a var to begin with a letter, followed by zero or more letters or digits. Use EBNF. Exactly what grammar rule(s) need to be added? 3. (10 pts) a. Modify the grammar in Problem 2 so that the language requires a var to begin with a lower-case letter followed by zero or more lower-case letters or digits. Use BNF, not EBNF. Exactly what grammar rule(s) need to be added? Example: The following should be variables (var): X y books albel sum2 b. Modify the grammar in Problem 2 so that the language requires a var to begin with a letter, followed by zero or more letters or digits. Use EBNF. Exactly what grammar rule(s) need to be added
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
