You are on page 1of 2

20. (i) Write a C program to recognize strings under 'a', 'a*b+', 'abb'.

(ii) Write a C program to calculate FIRST of a regular expression.

18. Write a program to generate three address codes for (i)assignment expression
(ii)arithmetic expression

16. Create and print a symbol table of C language that contains name, type and size of identifier.

14. Write a LEX program to recognize a valid variable which starts with a letter followed by any
number of letters or digits.

12. Write a program to implement the type checking for given expression.

10. Write a program to implement any one of the dynamic storage allocation strategies (Heap,
Stack, Static).

8. Write a program to implement the back end of the compiler for which the three-address
code is given as input and the 8086-assembly language code is produced as output.

6. Write a Lex program to count the number of words, characters, blank spaces and lines in a C
program.

4. Write a program that uses the semantic rules of LEX and YACC tool to construct a calculator
that computes the supplied expression.

2. (i) Write a program to find number of identifiers in a C file.

(ii) Write a program to test whether a given identifier is valid or not.

1. (i) Write a program to recognize a valid arithmetic expression that uses operator +, - , *
and /.

(ii) Develop a LEX program to find number of white spaces.

3. (i) Develop a LEX Program to scan reserved words of C Language.

(ii) Design a LEX Program to find identifiers of C Language.

5. Create a Lex program to identify a valid C language control structure syntax for the following

(i) if-else-if

(ii) switch-case
7. Write a program to implement the following code optimization techniques:

(i) Strength reduction.

(ii) Algebraic transformation.


9. Write a program to construct of DAG (Directed Acyclic Graph).

11. (i) Write a program to find whether a given string is keyword or not.

(ii) Develop a LEX program to count newline characters.

13. Develop a program to generate tokens for the following input string

(12+23*34)

15. Write a program for implementing Three Address Code using LEX and YACC.

17. Write a program to implement the Lexical Analyzer using lex tool to recognize few patterns

(Identifiers, Constants, Comments, Operators).

19. Write a program for implementing a Lexical analyzer using LEX tool in Linux platform.

You might also like