You are on page 1of 1

Compiler Design Individual Course Projects: 20%-30%

1. Write a program in LEX to count the number of consonants and vowels for a given C and
C++ source programs.
2. Write a program in LEX for a given C and C++ source programs to count the number of :
i. Positive and negative integers
ii. Positive and negative fractions.
3. Write a LEX program to recognize valid C and C++ programs.
4. Write Calculator Program
Expand the calculator program so that the new calculator program is capable of processing:
User: 3*(4+5)
User: x=3*(4+5)
User: y=5
User: x+2*y
User: 2^3/6
User: sin(1)+cos(PI)
User: tan
User: log
User: factorial

N.B: The assignments must be submitted in PDF files through email in one zip file by the student’s
representative and an individual will be present.

You might also like