Answered step by step
Verified Expert Solution
Question
1 Approved Answer
l. Introduction In this programming assignment, you will create a front end that is, a scanner and a parserfor the intermediate representation, ILOC, that will
l. Introduction In this programming assignment, you will create a front end that is, a scanner and a parserfor the intermediate representation, ILOC, that will be used as input in the next two assignments: a local register allocator and an instruction scheduler. Your program will take, as input, a program written in ILOC. It will determine whether or not the input is a syntactically corTect ILOC program And generate an output. In a general sense, the front end should check the input code for validity. If the input program contains errors, your front end should find as many errors as possible and report each of them to the user. If the input program does not contain erors, your front end should report that the input file was a valid ILOC program and it should build an intemal representation for the input program that is suitable for use in the subsequent assignments. You will reuse the code that you write for this assignment in both the local register allocator and the instruction scheduler. Therefore, you should take care to make it comect, robust, and efficient. You do not want to spend time in the later assignments fixing work that you should have done in the first assignment. The work product of this assignment will be an archive tar file. The file will contain (1) the source code for your front end.(2) makefile that performs any necessary compilation and linking 3) a README file that describes the contents of the archive file and how to use them. Grading is largely dependent on you confoming to the specification, if these files do not conform to the specifications, the grading tools may not properly evaluate your submission. Your front end will be tested and evaluated on a UNIX or LINUX systems. Anything that you develop for this assignment or submit for this assignment should work on Both a UNIXor LINUX system. You are responsible for testing your code, and directions on how to run your file. The lecturer is not expected to fix incompatibilities in your submission. 2. Overview of the Problem You will build a front end-that is, a scanner and a parser-that will take, as input, a single basic block! written in the LOC subset described in 7. The scanner will break the input stream into a series of individual words. ILOC has a particularly simple syntax, and a small set of word types. The scanner produced, as output, a stream of classified words represented as tokens: a pair
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started