
Construct LL(1) parse table for the following grammar.ī factor -> not bfactor ->(b exp r) /true /false (b) Explain error recovery in predictive parsing. (b) Write short notes on following terms:ĩ.(a) Write the algorithm for predictive parsing. (b) Write an algorithm for construction of predictive parsing table.ġ.Construct SLR parsing table for the following grammar.ħ.Construct SLR parsing table for following grammar: ConstructįIRST and FOLLOW sets for the following grammar. Grammar generates strings of balanced parentheses.Ħ.a) Give the rules for computation of FIRST(X) and FOLLOW(X). (b) Explain the basic method of LL(1) parsing and hence explain how very simple (a) What is the string generated by the grammar A -> (A)A (b) Construct SLR parsing table for the following grammar.Ĥ.(a) Convert the following grammar into LL(1) grammarī) construct LL(1) parse table for the above grammerĥ. (a) What are the common conicts that can be encountered in shift - reduce (b) What are the limitations of recursive descent parser (a) What are the difficulties in top down parsing? Explain in detail.Ĭonstruct leftmost derivations and parse trees for the following sentences:ģ.(a) Construct predictive parse table for the following grammar. (b) Eliminate ambiguities in the following grammar. (a) Construct recursive descent parser for the following grammar. Write the output at all phases of the compiler for the above `C' code. (a) Consider the following fragment of `C' code:

Identify the lexemes, that make up thetokens in the following program segment. the set of words having a,e,i,o,u appearing in that order, although notġ4.(a) What is regular expression? Write regular expressions for the following pat-terns: identifiers and float constants. (b) Write regular expressions for the following patterns.

How the use ofġ2.a) What is LEX? Explain, in detail, different sections of LEX program. (b) Explain how input buffering helps lexical analyzer in compilation processġ1.Explain the input buffer scheme for scanning the source program. (a) Construct an NFA for regular expression R= (aa/b)*ab convert it into anġ0.(a) Explain the bootstrapping process with suitable diagrams. (b) Write short notes on bootstrapping process.ĩ.State the steps to convert a regular expression to NFA. **8.(a) Explain the different phases of a compiler, showing the output of each phase (b) Compare compiler and interpreter with suitable diagrams. Using the example of the following statement: *7.(a) Explain the different phases of a compiler, showing the output of each phase, (b) Write a LEX program for identifying the keywords and identifiers from the Ing patterns in `C': identifier, comments, numerical constants, arithmetic operators.Ħ.(a) Construct an NFA for regular expression R= (aa/b)*ab convert it into an Explain with one example how LEX program perform lexical analysis for the follow. **4.Describe various phases of a compiler? Differentiate a phase and pass? Compare (b) Differentiate Interpreter & Compiler? The set of words having a, e, i, o, u appearing in that order, although not (b) Write short notes on: input buffering.ģ.(a) Write a regular expressions and NFA for the following patterns. Sentinels can improve its performance? Describe in detail. Write the output at all phases of the compiler for the above ‘C’ code.Įxplain the input buffer scheme for scanning the source program. (a) Consider the following fragment of ‘C’ code:

(b) Describe the lexical errors and various error recovery strategies with suitableĢ. (a) Explain, in detail, lexical analyzer generator.

