Question: 2. 20 points Create the state table and action table for the lexical analyze in question 1. In the table below, write the new state,

 2. 20 points Create the state table and action table for

2. 20 points Create the state table and action table for the lexical analyze in question 1. In the table below, write the new state, a slash and the action to take at this transition. Use state zere to represent a terminal failing state. The available actions are: O do nothing 1 Create a token containing the input symbol 2 Add the input symbol to the end of the current token string Write the input symbols (or groups of symbols) in the left column input symbol state 1 state 2 state 3 letter Space other The Gr a nd 3. [20 points) Write a Backus Naur Form (BNF) description of the markup language. The terminal symbols are word, text, > 4. [25 points) Write a method of a recursive descent parser for ONE of the following BNF productions You may write the method in Java, C++ or pseudo code. Assume there is a global list or array of Token objects called tokens and an integer curtok that is an index into tokens for the next token. 1. amte [name] [name memberlist] 2. memberlist - member member memberlist 3. member name amte where gerbil is the root non-terminal symbol. T. "T" and "name" are terminal symbols. What is the number of the one BNF production you are implementing! 2. 20 points Create the state table and action table for the lexical analyze in question 1. In the table below, write the new state, a slash and the action to take at this transition. Use state zere to represent a terminal failing state. The available actions are: O do nothing 1 Create a token containing the input symbol 2 Add the input symbol to the end of the current token string Write the input symbols (or groups of symbols) in the left column input symbol state 1 state 2 state 3 letter Space other The Gr a nd 3. [20 points) Write a Backus Naur Form (BNF) description of the markup language. The terminal symbols are word, text, > 4. [25 points) Write a method of a recursive descent parser for ONE of the following BNF productions You may write the method in Java, C++ or pseudo code. Assume there is a global list or array of Token objects called tokens and an integer curtok that is an index into tokens for the next token. 1. amte [name] [name memberlist] 2. memberlist - member member memberlist 3. member name amte where gerbil is the root non-terminal symbol. T. "T" and "name" are terminal symbols. What is the number of the one BNF production you are implementing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!