System Programming and Compiler Design

Lex Programs:


1. Lex Program to Count the Number of Lines and Characters in the Input File
2. Lex program that implements the Caesar cipher
3. Lex program to find the length of the longest word
4. Lex program that distinguishes keywords, integers, floats, identifiers, operators, and comments
5. Lex program to count the number of identifiers
6. Lex program to count the number of words,small and capital letters, digits and special characters in a C file
7. Lex specification program that generates a C program which takes a string “abcd” and prints the pattern
8. Lex program to recognize a valid arithmetic expression

Yacc Programs:


1. Program in YACC to evaluate an expression (simple calculator program for addition and subtraction, multiplication, division)
2. Program in YACC to recognize the string „abbb^n, „ab^n „a^n of the langauge (a^n b^n , n>=1)
3. Program in YACC to recognize the language (a^n b , n>=10). (output to say input is valid or not)


8 comments:

  1. Also provide download facilities

    ReplyDelete
  2. Kindly attach a file on 'HOW' to run these prog...

    ReplyDelete
  3. Thanks...
    Looking for micro!

    ReplyDelete

  4. Very informative and well-explained tutorial.The compiler-design tutorial concepts are easy to understand, and the examples are helpful for beginners.Great learning resource Learn compiler-design-tutorial.

    ReplyDelete