Skip to content

Tag Archives: Lex program

Problem  :- Write a Lex program to find if a character apart from alphabets occurs in a string or not Explanation:-  Flex (Fast Lexical Analyzer… Read More
Prerequisite – Introduction to YACC Problem: Write a YACC program to evaluate a given arithmetic expression consisting of ‘+’, ‘-‘, ‘*’, ‘/’ including brackets.Examples:   Input: 7*(5-3)/2… Read More
Problem: Given a text file as input, the task is to copy the content of the given file to another file. Explanation: Lex is a computer program… Read More
Prerequisite: Designing Finite Automata Problem: Design a LEX code to construct a DFA which accepts the language: all the strings ending with “11” over inputs… Read More
Prerequisite: Designing Finite Automata Problem: Design a LEX code to construct a DFA which accepts the language: all strings with Odd number of 0’s and… Read More
Problem: Write a Lex Program to check valid Mobile Number. Explanation: FLEX (Fast Lexical Analyzer Generator) is a tool/computer program for generating lexical analyzers (scanners… Read More
Problem: Write a Lex program to count words that are less than 10 and greater than 5. Explanation: Lex is a computer program that generates… Read More
Problem: Write YACC program for Binary to Decimal Conversion. Explanation: Yacc (for “yet another compiler compiler.”) is the standard parser generator for the Unix operating… Read More
Problem: Lex program to check whether given number is armstrong number or not. Explanation: Lex is a computer program that generates lexical analyzers and was… Read More
Problem: Write a YACC program to check whether given string is Palindrome or not. Explanation: Yacc (for “yet another compiler compiler.”) is the standard parser… Read More
Problem: Given a text file as input, the task is to count frequency of a given word in the file. Explanation: Lex is a computer… Read More
Problem: Write YACC program to recognize string with grammar { anbn | n≥0 }. Explanation: Yacc (for “yet another compiler compiler.”) is the standard parser… Read More
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