Question: C# Assignment 2-CS 4101 Implement the Shift-Reduce Parser (SRP) for the Grammar Specification: 1- Implement the Shift-Reduce for the above grammar 2- Use the Shift-Reduce

C#

C# Assignment 2-CS 4101 Implement the Shift-Reduce Parser (SRP) for the Grammar

Specification: 1- Implement the Shift-Reduce for the above grammar 2- Use the

Assignment 2-CS 4101 Implement the Shift-Reduce Parser (SRP) for the Grammar Specification: 1- Implement the Shift-Reduce for the above grammar 2- Use the Shift-Reduce table provided below 3- Your code should be written in C# and should compile on Visual Studio 2017 If you are creating a Console application, your code should compile on https://dotnetfiddle.net 5- Submit your code via Moodle 6- Your entire code should be in one file, called YourL astName SRP.cs - Failure to submit by the deadline will result in a zero grade 8- Follow the general styling guidelines for your code (comments and meaningful variable names) 9- Point distribution: 20 points for the lexical analyzer, 80 points for the SRP Action Goto State id 0 S5 54 S5 R6 S5 S5 10 S11 R1 R3 RS R3 R3 R3 RS RS R5 10- Your main output window should display the token sequence, the full sequence of shift reduce steps, and the different states of the stack (see below) Enter your expression num1num23 Calling Lexer: num1: id num2: id 3: id Parsing Steps S5 R6 R4 R2 S6 S5 R6 R4 ACCEPT Stack 0 Oid5 OF3 OE1 OE1+6 OE1+6id5 OE1 Assignment 2-CS 4101 Implement the Shift-Reduce Parser (SRP) for the Grammar Specification: 1- Implement the Shift-Reduce for the above grammar 2- Use the Shift-Reduce table provided below 3- Your code should be written in C# and should compile on Visual Studio 2017 If you are creating a Console application, your code should compile on https://dotnetfiddle.net 5- Submit your code via Moodle 6- Your entire code should be in one file, called YourL astName SRP.cs - Failure to submit by the deadline will result in a zero grade 8- Follow the general styling guidelines for your code (comments and meaningful variable names) 9- Point distribution: 20 points for the lexical analyzer, 80 points for the SRP Action Goto State id 0 S5 54 S5 R6 S5 S5 10 S11 R1 R3 RS R3 R3 R3 RS RS R5 10- Your main output window should display the token sequence, the full sequence of shift reduce steps, and the different states of the stack (see below) Enter your expression num1num23 Calling Lexer: num1: id num2: id 3: id Parsing Steps S5 R6 R4 R2 S6 S5 R6 R4 ACCEPT Stack 0 Oid5 OF3 OE1 OE1+6 OE1+6id5 OE1

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!