Evaluating bids

College Programming Project in C

Published on the February 23, 2022 in IT & Programming

About this project

Open

Programming project # 2: Semantic checker and code generator.
I already have the whole skeleton of the program and I just need the register-based code.

Project overview

The whole detail of the program is attached but basically, you should You will use the lexical analyzer and parser from Project 1(WHICH I already have). You will add variable declaration, semantic checks, and code generation capabilities to that project. All programed in C and tested in the SSH server or Linux as well. Input and output: Given this as the input file: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ This is a comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ begin int ghgghg, abc_edef; int a, b, c, abcd; int qwerty; ghgghg = (abc_edef * b); qwerty=(6 * (a / b)); qwerty=((6 - abcd)*(a + b)); xyz = (9*8*7*6)/(a+b+c); end. Your program should produce: Compiling legal1.in R0 = abc_edef R1 = b R0 = R0 * R1 ghgghg = R0 *****[abc_edef,b,*]***** R0 = 6 R1 = a R2 = b R1 = R1 / R2 R0 = R0 * R1 qwerty = R0 *****[6,a,b,/,*]***** R0 = 6 R1 = abcd R0 = R0 - R1 R1 = a R2 = b R1 = R1 + R2 R0 = R0 * R1 qwerty = R0 *****[6,abcd,-,a,b,+,*]***** R0 = 9 R1 = 8 R0 = R0 * R1 R1 = 7 R0 = R0 * R1 R1 = 6 R0 = R0 * R1 R1 = a R2 = b R1 = R1 + R2 R2 = c R1 = R1 + R2 R0 = R0 / R1 xyz = R0 *****[9,8,*,7,*,6,*,a,b,+,c,+,/]***** For the following illegal program, output would be as indicated: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ This is a comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ begin int ghgghg, abc_edef; abc = (abc_edef * b); end. Error line 6: variable abc is undefined.

Category IT & Programming
Subcategory Other
Project size Small
Is this a project or a position? Project
I currently have I have the design
Required availability As needed

Delivery term: Not specified

Skills needed

Other projects posted by L.