1

Click here to load reader

Spcc Mid Term Test 2

Embed Size (px)

DESCRIPTION

System Programming and Compiler Construction

Citation preview

  • Sardar Patel Institute of TechnologyComputer Engineering Department

    Test - 2Subject System Programming & Complier Construction

    Class TE (Computer) Time 1 Hour Marks 20

    Note(1) Attempt all questions.(2) Assume suitable data wherever required but justify same.(3) Illustrate answers with neat sketches wherever required.

    Q.No.1.a) Write the output of Single-pass Marco Processor of the following program and then show the content of Macro Definition Table (MDT) and Macro Name Table (MNT). (7M)

    MACROINCR &ARGA 1, ARGA 2, ARGMENDTEST START 0BEGIN BALR BASE,0

    USING BEGIN+2,BASEL 1,TEMPL 2,TEMPINCR FOURINCR FIVEFOUR DC F4FIVE DC F5TEMP DC F3END

    Q.No.1.b) List all types of editors with examples (3M)

    Q.No.2.a) Consider the following augmented grammer (6M) S' S S CC S cC / d where c, d are terminals and S, C are Non Terminals. Construct LALR parsing table for the grammer. (or)Explain the Concept of DAG in detail, and Contruct DAG for the following Expression.(Step by Step) (a-b) * (c+d) (a+b) Q.No.2.b) Explain the various forms of Intermediate Code used by Compiler. (4M) (or) Explain BackPatching with the help of Example.