Skip to content

ajaimaurya/Complier-Design-Lab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 

Repository files navigation

Complier-Design-Lab

This repo contains the codes (lex, YACC and C language) for few common lab experiments.

The list of the experiments is given below.

  1. Implement transition diagrams for identifying an identifier and constant and classify the identifier as either variable or array or function or structure and constant as integer or real.Example 1 in C and Example 1 in Lex.
  2. A lex program to identify the number of input lines, space characters, tab characters and number of all input characters. test2.l.
  3. Implement transition diagram for identifying an identifier and classify whether it is either variable or array or function or structure. example2.c
  4. Write a program which reads a production and check for Left- Recursion (may contain in more than one alternatives) and if found eliminate it and store in another production and display the result. example3.c
  5. Write a program which reads the productions display the grammar. example4.c
  6. Write a lex program to implement - a simple calculator. calculator.l
  7. LEX program to count the number of vowels and consonants in a given string. vowels_and_consonants.l.
  8. Write a lex program to read lines, characters, words in a given input file. readfile.l
  9. Implement the C Program for identifying constant and classify whether it is integer or real. integer_or_real.c
  10. Write a C-program to eliminate the left recurrision from a given CFG. left_recurrisionCFG.c
  11. Write a C program for applying left factoring to a given grammar. left_factoring.c
  12. Write a C program which reads a grammar and find First symbols of all non-terminals. First_Symbol_of_Grammer.c and First_Symbol.c FIrst%20and%20Follow
  13. Write a C program which reads a grammar and find FOLLOW symbols of all non-terminals. Compute_Follow_Symbol.c FIrst%20and%20Follow
  14. Write a C program which reads a production and check for Left-Recursion (may contain in more than one alternatives) and if found eliminate it and store in another production and display the result. Stroe_left_recurrision.c
  15. Write a C program which takes a grammar and check for Left-Recursion (may contain left recursion in more than one production) and if found eliminate it display the resultant grammar. remove_all_left_recurrision.c
  16. Write a C program to implement Recursive Descent Parser for any given grammar. recursive_descent_parser.c recursive-descent-parser
  17. Write a lex Program to Find Given Character is Keyword, Identifier, Number or Invalid. Keyword_Indetifier_Number_Invalid.l
  18. Write a C Program to Find Character Is Delimiter or Operator or Identifier or Keyword or Integer or Real Number. Delimiter_-Operator_and_others.c
  19. Write a C program find FOLLOW symbols of non-terminals in a given Grammer. Compute_Follow.c
  20. Write a C program which reads a grammar and find FOLLOW symbols of all non-terminals. Compute_Follow_Symbol.c
  21. Program for shift-reduce parser. shiftreduceparser.c
  22. Lex and yacc program to check a valid expression. yacc-lex-valid-expression
  23. YACC Program to perform calculator operations using lex code. yacc-lex-calculator

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 90.6%
  • Lex 7.3%
  • Yacc 2.1%