This repository contains a collection of programs written as part of KTU CSL411 Compiler Lab
-
Design and implement a lexical analyzer using C language to recognize all valid tokens in the input program. The lexical analyzer should ignore redundant spaces, tabs and newlines. It should also ignore comments. Link
-
LEX Programs
- LEX Program to count the numbers of lines, words, spaces, and characters in a given statement Link
- LEX Program to convert the substring abc to ABC from the given input string.Link
- LEX program to find out total number of vowels and consonants from the given input sting.Link -
YACC Programs
- Generate a YACC specification to recognize a valid arithmetic expression that uses operators +, – , *,/ and parenthesis. Link
- Generate a YACC specification to recognize a valid identifier which starts with a letter followed by any number of letters or digits. Link
- Implementation of Calculator using LEX and YACC. Link