Skip to content

Experiments done during 7th semester of B.tech CSE for Compiler Lab at KTU

Notifications You must be signed in to change notification settings

WrenOswin/Compiler-Lab-CSL411

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler-Lab-CSL411

  1. Lexical analyser using C lang

  2. Lexical analyser using Lex tool

  3. Lex program to display number of lines, words, and characters in an input text

  4. Lex program to convert substring abc to ABC from given input string

  5. Lex program to find out total number of vowels and consonants from given input string

  6. Yacc specification to recognize valid arithmetic expression that uses operators ,-,*,/ and parenthesis

  7. Implement calculator using Lex and Yacc

  8. Convert Expression to AST and traverse it to find result

  9. NFA to DFA converter

  10. Recursive descent parser

  11. Shift Reduce Parser

  12. Constant propagation

  13. Simple intermediate code generator

  14. First and Follow

  15. YACC program to recognise string with grammar a^n b^n n>=0

  16. Calculator that takes input either hex or decimal and prints output in both hex and decimal. (Using lex and yacc)

  17. Intermediate code generator using lex and yacc

  18. Infix to postfix using lex and yacc

  19. Implement yacc program for shift reduce parser or shift reduce parsing techniques for the grammar E: E E|E-E|E*E|id

lex filename.l

bison -dy filename.y

gcc lex.yy.c y.tab.c