# Category Archives: Compiler Design

Problem: Write YACC program to recognize strings of { anb | n≥5 } Explanation: Yacc (for “yet another compiler compiler.”) is the standard parser generator… Read More
A parser generator is a program that takes as input a specification of a syntax, and produces as output a procedure for recognizing that language.… Read More
Problem: YACC program to implement a Calculator and recognize a valid Arithmetic expression. Explanation: Yacc (for “yet another compiler compiler.”) is the standard parser generator… Read More
Problem: Write a Lex program to recognize valid arithmetic expression and identify the identifiers and operators. Explanation: Flex (Fast lexical Analyzer Generator) is a tool/computer… Read More
Problem: Write a YACC program which accept strings that starts and ends with Zero or One Explanation: YACC (Yet another Compiler-Compiler) is the standard parser… Read More
Problem: Write a Lex program to check if a date is valid or not. Explanation: Flex (Fast lexical Analyzer Generator) is a tool/computer program for… Read More
Problem: Write a Lex program for checking a valid URL. Explanation: Lex is a computer utility that generates some lexical analyzers. Lex reads a stream… Read More
Problem: Write a YACC program for conversion of Infix to Postfix expression. Explanation: YACC (Yet another Compiler-Compiler) is the standard parser generator for the Unix… Read More
Prerequisite – Compiler Design | Code Optimization Frequency reduction is a type in loop optimization process which is machine independent. In frequency reduction code inside… Read More
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
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
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
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
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 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