0% found this document useful (0 votes)
49 views

Introduction To Compiler

This document discusses various topics related to compilers including definitions of compilers, assemblers, loaders, and interpreters. It describes the different phases of compilation like preprocessing, lexical analysis, parsing, code generation and optimization. It discusses parsing techniques like top-down and bottom-up parsing. Specific parsing algorithms like LR parsing are covered. Other topics include syntax analysis, semantic analysis, symbol tables, error detection, intermediate code representation and runtime environment organization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Introduction To Compiler

This document discusses various topics related to compilers including definitions of compilers, assemblers, loaders, and interpreters. It describes the different phases of compilation like preprocessing, lexical analysis, parsing, code generation and optimization. It discusses parsing techniques like top-down and bottom-up parsing. Specific parsing algorithms like LR parsing are covered. Other topics include syntax analysis, semantic analysis, symbol tables, error detection, intermediate code representation and runtime environment organization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

INTRODUCTION TO COMPILER

 Define compiler.
 What do you mean by assembler and loader.
 Describe the different phases of compilation process.
 What are the difference between compiler and interpreter ?
 What is preprocessor? Describe the function of preprocessor .
 Illustrate the representation of the following statement after each face
of a compiler: position=initial+rate x 70.
 What are the reasons for separating the analysis phase of compelling
into lexical analysis and parsing?
 Define translator software?
 What are the different kinds of error cncountered during compilation?

A SIMPLE PASS COMPILER


 Define CFG. Parse tree.
 Define syntex tree.
 What do you mean by token, lexcme, pattern and identifier?
 What do you mean by parse tree and describe it’s propertise.
 Define CFG, what are the components of CFG?
 Consider the following context free grammar(CFG);
STMT EXPR,|EXPR,STMT
EXPREXPR+TERM|TERM
TERMNUMBER|FACTOR
FACTORNUMBER|(EXPR)
NUMBER0|1|…., ….., …. |9
 Show the sting 1+2*(3+4)+5; can be generated by this grammar.
 Construct a parser tree for the string.
 What is ambiguity? Explain with example.
 Describe the associatively of operators with example.
 Consider the following grammer:
s iCtss|a
s’cs|
cb
now draw th parser table.
LEXICAL ANALYSIS
 What are the main functions of lexicul analyzer? List the various error
recovery strategies in lexical analysis.
 Discuss the relationship between input, lexical analyzer and parser.
 Describe the input buffering tecniques in detail. Why is buffering used in
lexical analysis? What are the commonly used buffering methods?
 Write down the input buffering tecnique with code.
 What are the difference betwween DFA and NFA?
 2016 ()
 Define NFA & DFA
 Write the rule to eliminate left recursion in a grammar. Prepare and
eliminate the left recursion for the grammar.
sAa|b
 2017 (4a)

BASIC PARSING TECNIQUE


 Define parser. What is the difference between top down and bottom up
parser?
 What is shift reduce parser? What are the actions allowed in shift
reduce parse?
 Write down the algorithm for left factoring A grammar.
 Explain the functions values of ACTION function in LR parser.
 What is predictive parsing?
 2014(3d)
 2016(2e)
 2016(2e)
 2017(4d)
 Write the rules for FIRST and FOLLOW.
 What do you mean by handle pruning?
 Compute the FIRST and FOLLOW of the following grammar:
ETE’
CODE GRNARATION AND CODE OPTIMIZATION
 What do you mean by Dead code elimination?
 What is Dag? What are the application of Dag? Write the algorithmes for
constructiong a Dag.
 Describe the peephole optimization.
 What is the application of DAG?
 Explain the plan of error detector with figure.
 What do you mean by copy propagation and du-chaining?
 2017(5b)
 2016(5a)

SYNTEX DIRECTED TRANSLATION AND RUNTIME ENVIROMENT

 What is the purpose of syntex directed translation? Briefly explain.


 What is symble table? What are the functions of sylble table?
 Explain the address codes with example.
 What is the implementation tecnique of three-address statement?
Describe with example
 2015(3c)

You might also like