Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

UCS- 802: Compiler Construction

Lab Assignment 1

(Based on LEX Tool)

1. Lex program to display the same line as read from keyboard.


2. Write a program to display only digits.
3. WAP to print line number of each line in a file.
4. WAP to remove comments from a file i.e to print all data except comments.
5. WAP to check entered number is Integer or Float.
6. WAP to check a given substring in text.
7. WAP to convert text into uppercase.
8. WAP to check for valid identifier.
9. WAP to check given string is verb or noun.
10. WAP to identify signed or unsigned integer.
11. WAP to print a string that starts and ends with “a”.
12. WAP to count number of lines, words and characters in text file.
13. WAP to convert decimal to hexadecimal.

You might also like