BCT 2311 Compiler Construction Assignment II
BCT 2311 Compiler Construction Assignment II
1. Using the Recursive Descent strategy, write a C program for a simple calculator that
can be used to perform integer arithmetic involving ‘+’ and ‘*’. Let your program
consist of a set of mutually recursive routines.
SaS|b
Create an interpreter using LEX and YACC which will count the number of a’s in the
input string.
3. Write a LEX and YACC specification files for a small calculator that can add and
subtract numbers.