Compiler Construction Lab Manual / Statement Code Generation using Lex Program

Program Name

Write a Compiler Construction Program for Statement Code Generation using Lex Program.
Theory
Statement Code Generation using Lex program sections.
Program Code


Saving: vi codegen.l

Compiling and Running
cc codegen.c
./a.out
Input
enter the c stmt a=b+c

Output
LOAD b,R1
ADD c,R1
STORE R1,a


Home     Back