CD Questions

Embed Size (px)

Citation preview

  • 8/2/2019 CD Questions

    1/5

    CD PREVIOUS PAPER QUESTIONS

    UNIT-1

    (2marks):

    1.NDFA.

    2.Regular sets.

    3.Regular expressions.4.Interpreter vs. compiler.

    5.Explain transition systems.

    6.Explain the equivalence in b/w DFA and NDFA.

    7.Define finite automata.

    8.Define a grammar.

    9.Explain properties of transition functions.

    (7&14 marks):

    1.Explain the significance of Regular expressions.2.Discuss different types of Grammars with suitable examples.

    3.Explain equivalence b/w DFA and NDFA.

    4.Explain types of grammar from the following DFSM, construct

    an equivalent regular grammar.

    5. Using the grammar

    S-->ABSC; S-->Abc

    BA-->AB ;Bb-->bb

    Ab-->ab;Aa-->aa

    Derive the strings abc; aaabbbccc.

    6. Show that the following grammar is ambiguous.

  • 8/2/2019 CD Questions

    2/5

    E-->E*E; E-->

    T-->T*T; T-->(E)

    T-->a

    7. Explain a non deterministic finite automation.

    8. Construct the grammar for the set {0^n 1^n 0^m 1^n

    /m,n=>1}

    9. Find the regular expression for corresponding the automation

    for

    10. Explain the operations on Regular sets.

    11. Construct a non deterministic finite automation accepting

    {ab,ba},and use it to find a deterministic automation accepting

    the same set.

    12. Explain pumping lemma for regular sets.

    UNIT-2

    (2marks):

    1.What is compiler?

    2.Explain compiling process.

    (14marks):

    1.Give a brief discussion on various phases of compilers.

  • 8/2/2019 CD Questions

    3/5

    CD PREVIOUS PAPER QUESTIONS

    2.Discuss the importance of various phases of a compiler and

    the functioning of each phase also.

    UNIT-3

    (14marks):1.Discuss the various issues in the Design of lexical analyzer.

    2.Explain the Design of lexical analyzer.

    3.Explain token specifications.

    4.Explain the interaction b/w lexical analyzer and parser.

    5.Describe about error recovery in lexical analysis.

    UNIT-4

    (2marks):1.Give an overview of Parser.

    2.Parsing Tree.

    3.Predictive parser.

    4.What is the difference b/w LR parser and SLR parser?.

    (14marks):

    1.Explain operator precedence parser.

    2.Explain the significance of predictive parser.

    3.Explain the function of shift reduce parser.4.Design of SLR parser-Discuss.

    5.Explain precedence parsing.

    6.Describe a general means of constructing an LR(1) parser.

    7.Explain Top-Down parsers.

    8.Explain LALR parser.

    9.Describe parsing tree.

    10.Explain about shift reduce parser and predictive parser.

    11.Explain Bottom-up LR (k) parser.12.Discuss the design issues of shift reduce parser.

    UNIT-5

    (2marks):

    1. Quadruples.

  • 8/2/2019 CD Questions

    4/5

    2. DAG.

    3. What is an intermediate code?

    (14MARKS):

    1. Explain the following:

    a) Three address code*.b) Intermediate code.

    2. Explain the significance of parsing tree.

    3. Discuss intermediate code generation.

    4. Convert this SDTS to an equivalent, simple postfix SDTS:

    E E or T, E infor T or

    E T, T; TT and F,T infand F and

    TF ,F;F(E),E;Fa,a.

    5. Explain about quadruples, triples and three address codes.6. Describe abstract-syntax tree construction.

    UNIT-6

    (2MARKS):

    1. DAG

    2. Global data vs. local data.

    3. What is the principle source of optimization?

    (14MARKS):1. Explain the principle source of optimization.

    2. Discuss Global data flow analysis.

    3. Explain the significance of loop optimization.

    4. What is meant by peep hole optimization?

    5. Explain DAG.

    UNIT-7

    (14MARKS):1. Discuss about simple code generator.

    2. Discuss the significance of peep hole

    optimization.

    3. Explain the significance of loop optimization.

    4. Explain DAG.

  • 8/2/2019 CD Questions

    5/5

    CD PREVIOUS PAPER QUESTIONS

    5. Explain register allocation and assignment.

    6. Distinguish b/w machine dependent optimization

    and machine independent optimization.

    UNIT-8(2MARKS):

    1. What is register allocation?

    2. Define symbol table.*

    (14MARKS):

    1. Discuss the Role of symbol tables.

    2. Discuss Runtime storage administration.

    3. Explain symbol table and Finite automata.

    4. Write a brief note on symbol table and its importance.