Question: The following is a specification for a very simple programming language. Stmt Iist Stmt | Stmt_list ; Stmt Stmt Variable assignop Expression Variable id I

 The following is a specification for a very simple programming language.
Stmt Iist Stmt | Stmt_list ; Stmt Stmt Variable assignop Expression Variable

The following is a specification for a very simple programming language. Stmt Iist Stmt | Stmt_list ; Stmt Stmt Variable assignop Expression Variable id I id [Expression] Expression Simple expression | Simple_expression relop Simple expression Simple expression Term I Simple_expression addop Term Term Factor | Term mulop Eactor Factor id I num | (Expression) | id [Expression] | not Eactor 1. Write a program demonstrating the capability of the given specification. Name this file yourname-input.txt. [10] 2. Create a parser for this language using Flex and Bison, and give the file created for the previous question (1) as input to it. Given that the file is correct as per the specification. your parser should be able to parse it successfully. Your parser should either say "parsed" or "error" upon completion. No further details are required. [10] 3. Create 3 erroneous versions of your input file (yourname-error1.txt, yourname-error2.txt, yourname-error3.txt) such that your parser gives an error. [5] Submission guideline Submit the following - You Flex file - Your Bison file - Your make file - Your correct input file and screenshot proving it parses correctly - Your incorrect input files (3) and screenshot(s) proving that your parser catches the error

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!