Detail how you would go about adding reserved words into the problem where you are designing your own lexical analyzer? How would you have to change your code?

computer science

Description

1. Detail how you would go about adding reserved words into the problem where you are designing your own lexical analyzer? How would you have to change your code? What would you have to add to let users choose a reserve word word as an identifier? 


2. Write a recursive decent algorithm for a java while statement, a Javas if statement , an logical/mathematical expression based on the rules you created in your lexical analyzer, and an mathematical assignment statement , where statement may be an empty function. Supply the EBNF rule for each. 


3. Given the natural constraints of an RDA explain how you would go about the creation of a Statement function in your RDA that would allow statement to either be a while statement, an if statement or an assignment statement.


Related Questions in computer science category