Skip to content

Category Archives: Compiler Design

LR parser can be used to parse ambiguous grammars. LR parser resolves the conflicts (shift/reduce or reduce/reduce) in parsing table of ambiguous grammars based on… Read More
Prerequisite – Language Processors: Assembler, Compiler and Interpreter  Compiler: A Compiler is primarily used for programs that translate source code from a high-level programming language to… Read More
LL Parser includes both the recursive descent parser and non-recursive descent parser. Its one type uses backtracking while another one uses parsing table. Theses are… Read More
The parser is that phase of the compiler which takes a token string as input and with the help of existing grammar, converts it into… 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
Both High level language and low level language are the programming languages’s types. The main difference between high level language and low level language is… 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 lexical analyzers.… 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 program that… Read More