## Lex program for Decimal to Binary Conversion

Problem: Write a Lex program for Decimal to Binary conversion. Explanation: FLEX (Fast Lexical Analyzer Generator) is a tool/computer program for generating lexical analyzers (scanners… Read More »

## Lex Program to check whether a number is Prime or Not

Problem: Write a Lex Program to check whether a number is Prime or Not. Explanation: Lex is a computer program that generates lexical analyzers and… Read More »

## Lex program to Count the Positive numbers, Negative numbers and Fractions

Problem : Write a Lex program to count the positive numbers, negative numbers and fractions Explanation : FLEX (Fast Lexical Analyzer Generator) is a tool/computer… Read More »

## Lex program to check whether given string is Palindrome or Not

Problem: Write a Lex program to check whether given string is Palindrome or Not. Explanation: Lex is a computer program that generates lexical analyzers and… Read More »

## Lex program to check whether an year is a leap year or not

Problem: Write a Lex program to check whether an year is a leap year or not. Explanation: Lex is a computer program that generates lexical… Read More »

## Regular Expression Vs Context Free Grammar

Regular Expressions are capable of describing the syntax of Tokens. Any syntactic construct that can be described by Regular Expression can also be described by… Read More »

## Compiler Design | Peephole Optimization

Peephole optimization is a type of Code Optimization performed on a small part of the code. It is performed on the very small set of… Read More »

## Lex program for Decimal to Hexadecimal Conversion

Problem: Write a Lex program for Decimal to Hexadecimal conversion. Explanation: Lex reads an input stream specifying the lexical analyzer and outputs source code implementing… Read More »

## Lex program to find the Length of a String

Problem: Write a Lex program to find the Length of a String Explanation: FLEX (Fast Lexical Analyzer Generator) is a computer program that generates lexical… Read More »

## Lex program to check perfect numbers

Lex is a computer program that generates lexical analyzers and was written by Mike Lesk and Eric Schmidt. Lex reads an input stream specifying the… Read More »

## Lex code to replace a word with another word in a file

Given a text file as input, the task is to replace a given word with another word in the file. Lex is a computer program… Read More »

## Lex program to search a word in a file

Problem: Write a Lex program to search a word in a file. Explanation: FLEX (Fast Lexical Analyzer Generator) is a tool/computer program for generating lexical… Read More »

## Compiler Design | Loop Optimization

Loop Optimization is the process of increasing execution speed and reducing the overheads associated with loops. It plays an important role in improving cache performance… Read More »

## Lex program to check whether input number is odd or even

Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer… Read More »

## Lex program to implement a simple Calculator

Lex is a computer program that generates lexical analyzers. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer… Read More »