Download as pdf
Download as pdf
You are on page 1of 4
50, will be treated as malpractice, ly raw diagonal cross lines on the remaining blank pages. 2. Any revealing of identification, appeal to evaluator and /or equations written eg, 42+8 Important Note: 1, On completing your answers, com, Livravian Se a institutes &» ay 18CS61 ww || 1] J oS Time: Sixth Semester B.E. Degree Examinafiop; July/August 2022 System Software angi; ompilers 3 hrs, Max. Marks: 100 Note: Answer any FIVE full questions, See ONE full questionSeom each module. oP b. oP C 6 a b. © Toa b. o Module-1, Explain in detail SIC/XE a chitecture. a, (10 Marks) oO List the various machine i jent assembler features, EXplain the control sections how the assembler convert them intpobject code. ? (10 Marks) “a er and ge Write an algorithm 1e 2... Assembler and give sample object program from One Pass Assembler. (20 Marks) ‘What'are the “ur of loader? nie two ways of program relocation in loaders. (10 Marks) a dule-2 Explaifivatious -_ of CompjféPSShow the wamlaig@yer an Assignment statement Postion = Initial rae * OP Clearly indicate the output of each phase. oe 4 (12 Maris) What are the applicationsia Compiler? Explain | (¢8 Marks) ke ots” ’ Write a brief note-on Language Processi tem. (06 Marks) Explain the coné&pt,of input buffering Lexical analygis,vith its implementation, isd a5 (G0 Marks) Define Token, Kexeme and Patt male (04 Marks) Module-3 DefinSContext Free creel Obtain CFG o generate strings of a’s and b's having ‘substring “ab”. (10 Marks) sider grammar given below from wu arithmetic expressions can be obtained. E+E Bei-E ESE E>E|E Eid how that the is anbiigg the sentence id + id + id (lo Marks) + Breusi Write an agpithm to eliminate 16 recursion from a grammar. Eliminate le recursion from the given grammar. ral A Ac|Sd|. (10 Marks) Define Shift ~ Reduce Bafsévand Handle, What are conflicts in shift ~ reduce parse, explain with example, (06 Marks) List and explain diffezent actions of shift - reducer parser (04 Marks) Module-4 Explain the three basic section of LEX program with example. (10 Marks) Write LEX pfogram to count word, character and line count in a given file (0 Marks) Y 1of2 10 a. Define $- Attribute and I - Atti {ree and annotated tree for sti +7 by using given 18CS61 a oR a. What is YACC? Explain the different sections u6ed Lit writing the YACC specification Explain with example program. e (10 Marks) ». Define Regular Expression. What is the use o {Noving ‘Meta characters : )- i) * i) a iy S WE} WD? (OT Marks) ¢. Discuss how Lexes and Parser communicé ay (03 Marks) Y cofistruct Syntax tree, Parse joditle-5 ith respect to SDD S>En ToT|F a ESE+T|E-T|T TOF, ¢ ToOT*F F > digit | S 1 (10 Marks) b, What are the diffeggntirce address code instructions? Translate the arithmetic expression a+b (-c) into, adthunles , triplets and inggee ies (40 Marks) ¢ a. Define ive SDD for simple type declaration. Construct a dependency graph for the decla int a,b 5 (10 Marks) bb. Expléinlyhe issues in design of (10 Marks) 2of2 as malprac ly draw diagonal cross & = 2 @3CS Serlsills 7 18CS61 h Semester B.E. Degree Examination, Jan./Feb. 2023 AR System Software and Compilers Time: 3 hrs. Max. Marks: 100 Note: Answer any FIVE full questions, choosing ONE full question from each module. Module-1 1a. Explain the SIC/XE machine architecture. (10 Marks) b. Suppose alpha is an array of 100.words. Write a sequence of instruction for SIC/XE to set all 100 elements of an array to 0. (05 Marks) c. What is system software? Compare system software with application software and give couple of example. (05 Marks) OR 2 a. Explain the assembler directive and data structures used in assembler. (10 Marks) b. Write an algorithm of pass 1 of 2 — pass assembler. (05 Marks) c. Explain the bootstrap loader. (05 Marks) Module- 3. a. Explain the structure of complier with an example, (10 Marks) b. List and example the applications of compiler technology. (06 Marks) c. Differentiate between type checking and bound checking. (04 Marks) OR 4) a. Explain the role of lexical analyzer. (08 Marks) b. What is regular expression? Write the algebraic. laws of regular expression. (06 Marks) c. Explain the concept of input buffering in the Lenticels analysis. (06 Marks) Module- 5 a. Explain the different types of error recovery strategies in process. (06 Marks) b. Explain context free grammer and derivation. (06 Marks) cc. Explain the top down parsing and process for the string id + id + id. Given the grammer i) EDE+E ii) E> E*E ii) E > (E) WWE id (08 Marks) OR 6 a. Write the algorithm for recursive descent parser. For the following grammer write a recursive descent parser E-4T TOF E>SE+T (08 Marks) b. Is the following grammer ambiguous? (if — statement or if - then — else) SictSlictSeSla Cob, (04 Marks) c. Explain bottom — up parsing, shift-reduce parsing and LL(1) grammer. (08 Marks) 1of2 10 18CS61 Mod Explain the LEX specification with an example to count number vowels and consonants. (10 Marks) Explain the meta characters used in regular expression with an example. (05 Marks) Write a LEX program to count the number of scanf and printf statement and replacing them with readf and writef respectively. (05 Marks) OR Explain the YACC specification with an example, (10 Marks) Write a YACC program to accept strings of the form a"b” (n > 0). (05 Marks) Discuss two types of conflict in YACC with an example, (0S Marks) Mod: What is syntax directed definition? Write the’ grammer and SDD for a simple desk calculatiori and show annotated Parse tree for the expression (3 +4) *(S+6). (08 Marks) What is an attribute? Explain the different types of attributes with example. (08 Marks) What is the difference between syntax tree and parse tree? (04 Marks) OR Explain the Intermediate Code Generation (ICG) and type of method used to convert ICG (10 Marks) Explain the issues in the design of code generation. (10 Marks) 20f2

You might also like