Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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#

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Multidimensional Array Data Management In Databases

Authors: Florin Rusu

1st Edition

1638281483, 978-1638281481

More Books

Students also viewed these Databases questions

Question

No

Answered: 1 week ago

Question

please dont use chat gpt 1 4 .

Answered: 1 week ago

Question

How to solve maths problems with examples

Answered: 1 week ago

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago