GUJARAT TECHNOLOGICAL UNIVERSITY

Similar documents
QUESTION BANK CHAPTER 1 : OVERVIEW OF SYSTEM SOFTWARE. CHAPTER 2: Overview of Language Processors. CHAPTER 3: Assemblers

GUJARAT TECHNOLOGICAL UNIVERSITY

PSD1C SYSTEM SOFTWAE UNIT: I - V PSD1C SYSTEM SOFTWARE

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTER SCIENCE AND ENGINEERING COURSE PLAN

Gujarat Technological University Sankalchand Patel College of Engineering, Visnagar B.E. Semester VII (CE) July-Nov Compiler Design (170701)

SYSTEMS PROGRAMMING. Srimanta Pal. Associate Professor Indian Statistical Institute Kolkata OXFORD UNIVERSITY PRESS

SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY ADITYA SILVER OAK INSTITUTE OF TECHNOLOGY

Evaluation Scheme L T P Total Credit Theory Mid Sem Exam

GUJARAT TECHNOLOGICAL UNIVERSITY

SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY

About the Authors... iii Introduction... xvii. Chapter 1: System Software... 1

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

GUJARAT TECHNOLOGICAL UNIVERSITY

III) EXAMINATION, 2015 CS 331 : SYSTEM PROGRAMMING AND OPERATING SYSTEM I

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY

Compiler Design. Computer Science & Information Technology (CS) Rank under AIR 100

GUJARAT TECHNOLOGICAL UNIVERSITY

CST-402(T): Language Processors

LECTURE NOTES ON COMPILER DESIGN P a g e 2

G.PULLAIH COLLEGE OF ENGINEERING & TECHNOLOGY

GUJARAT TECHNOLOGICAL UNIVERSITY

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

SILVER OAK COLLEGE OF ENGINEERING & TECHNOLOGY

UNIT I. Pune Vidyarthi Griha s COLLEGE OF ENGINEERING, NASHIK-4. 1

SYED AMMAL ENGINEERING COLLEGE (An ISO 9001:2008 Certified Institution) Dr. E.M. Abdullah Campus, Ramanathapuram

1. (a) What are the closure properties of Regular sets? Explain. (b) Briefly explain the logical phases of a compiler model. [8+8]

Question Bank. 10CS63:Compiler Design


GUJARAT TECHNOLOGICAL UNIVERSITY

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR / EVEN SEMESTER

2068 (I) Attempt all questions.

QUESTIONS RELATED TO UNIT I, II And III

KALASALINGAM UNIVERSITY ANAND NAGAR, KRISHNAN KOIL DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING ODD SEMESTER COURSE PLAN

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program.

VALLIAMMAI ENGINEERING COLLEGE

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Subject Name: CS2352 Principles of Compiler Design Year/Sem : III/VI

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

CMPE 152 Compiler Design

CMPE 152 Compiler Design

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER-15 EXAMINATION Model Answer Paper

CS/SE 153 Concepts of Compiler Design

PSD3A Principles of Compiler Design Unit : I-V. PSD3A- Principles of Compiler Design

Compiler, Assembler, and Linker

LANGUAGE PROCESSORS. Presented By: Prof. S.J. Soni, SPCE Visnagar.

DEPARTMENT OF INFORMATION TECHNOLOGY / COMPUTER SCIENCE AND ENGINEERING UNIT -1-INTRODUCTION TO COMPILERS 2 MARK QUESTIONS

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Compiling Regular Expressions COMP360

CMPE 152 Compiler Design

CS/SE 153 Concepts of Compiler Design

CS606- compiler instruction Solved MCQS From Midterm Papers

DEPARTMENT OF INFORMATION TECHNOLOGY AUTOMATA AND COMPILER DESIGN. B.Tech-IT, III Year -I Sem

Philadelphia University Faculty of Information Technology Department of Computer Science --- Semester, 2007/2008. Course Syllabus

1. The output of lexical analyser is a) A set of RE b) Syntax Tree c) Set of Tokens d) String Character

Life Cycle of Source Program - Compiler Design

SYLLABUS UNIT - I UNIT - II UNIT - III UNIT - IV CHAPTER - 1 : INTRODUCTION CHAPTER - 4 : SYNTAX AX-DIRECTED TRANSLATION TION CHAPTER - 7 : STORA

1. Explain the input buffer scheme for scanning the source program. How the use of sentinels can improve its performance? Describe in detail.

CS 4240: Compilers and Interpreters Project Phase 1: Scanner and Parser Due Date: October 4 th 2015 (11:59 pm) (via T-square)

COMPILER DESIGN LECTURE NOTES

Roll No. :... Invigilator's Signature :. CS/B.Tech(CSE)/SEM-7/CS-701/ LANGUAGE PROCESSOR. Time Allotted : 3 Hours Full Marks : 70

Formal Languages and Compilers Lecture I: Introduction to Compilers

VIVA QUESTIONS WITH ANSWERS

COMPILER DESIGN. For COMPUTER SCIENCE

Programming for Problem Solving 105A L T P Credit Major Minor Total Time

ASSEMBLERS. Prof. S.J. Soni, SPCE, Visnagar

The analysis part breaks up the source program into constituent pieces and creates an intermediate representation of the source program.

GUJARAT TECHNOLOGICAL UNIVERSITY COMPUTER ENGINEERING (07) / INFORMATION TECHNOLOGY (16) / INFORMATION & COMMUNICATION TECHNOLOGY (32) DATA STRUCTURES

INTRODUCTION PRINCIPLES OF PROGRAMMING LANGUAGES. Norbert Zeh Winter Dalhousie University 1/10

COMP455: COMPILER AND LANGUAGE DESIGN. Dr. Alaa Aljanaby University of Nizwa Spring 2013

Question Marks 1 /11 2 /4 3 /13 4 /5 5 /11 6 /14 7 /32 8 /6 9 /11 10 /10 Total /117

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILING

PESIT Bangalore South Campus Department of MCA Course Information for. System Programming (13MCA24)

CS 415 Midterm Exam Spring 2002

INSTITUTE OF AERONAUTICAL ENGINEERING

COLLEGE OF ENGINEERING, NASHIK. LANGUAGE TRANSLATOR

Front End. Hwansoo Han

Time : 1 Hour Max Marks : 30

2) Save the Macro definition:- The processor must store the macro instruction definitions which it will need for expanding macro calls.

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

CS5363 Final Review. cs5363 1

GUJARAT TECHNOLOGICAL UNIVERSITY

Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

EXPERIMENT NO : M/C Lenovo Think center M700 Ci3,6100,6th Gen. H81, 4GB RAM,500GB HDD

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: OBJECT ORINTED PROGRAMMING (Code: )

Principles of Programming Languages [PLP-2015] Detailed Syllabus

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: OBJECT ORIENTED PROGRAMMING (Code: )

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

Sai Nath University. Assignment For MCA 2nd Sem.

An Overview of Compilation

HOLY ANGEL UNIVERSITY COLLEGE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY COMPILER THEORY COURSE SYLLABUS

Compilers and Interpreters

Parsing II Top-down parsing. Comp 412

BSCS Fall Mid Term Examination December 2012

Crafting a Compiler with C (II) Compiler V. S. Interpreter

1. Consider the following program in a PCAT-like language.

Examples of attributes: values of evaluated subtrees, type information, source file coordinates,

Lexical Scanning COMP360

Compilers for Modern Architectures Course Syllabus, Spring 2015

Transcription:

Type of course: System Programming GUJARAT TECHNOLOGICAL UNIVERSITY SYSTEM PROGRAMMING SUBJECT CODE: 21508 B.E. 5 th SEMESTER Prerequisite: Data Structures and Operating Systems Rationale: NA Teaching and Examination Scheme: Teaching Scheme Credits Examination Marks Total L T P C Theory Marks Practical Marks Marks ESE PA (M) ESE (V) PA (E) PA ALA ESE OEP (I) 4 0 2 6 70 20 10 20 10 20 150 Content: Sr. No. Content Total Hrs % Weightage 1 Overview of System Software 06 10% Introduction, Software, Software Hierarchy, Systems Programming, Machine Structure, Interfaces, Address Space, Computer Languages, Tools, Life Cycle of a Source Program, Different Views on the Meaning of a Program, System Software Development, Recent Trends in Software Development, Levels of System Software 2 Overview of Language Processors 06 15% Programming Languages and Language Processors, Language Processing Activities, Program Execution, Fundamental of Language Processing, Symbol Tables Data Structures for Language Processing: Search Data structures, Allocation Data Structures. 3 Assemblers 06 15% Elements of Assembly Language Programming, Design of the Assembler, Assembler Design Criteria, Types of Assemblers, Two-Pass Assemblers, One-Pass Assemblers, Single pass Assembler for Intel x86, Algorithm of Single Pass Assembler, Multi-Pass Assemblers, Advanced Assembly Process, Variants of Assemblers Design of two pass assembler, 4 Macro and Macro Processors Introduction, Macro Definition and Call, Macro Expansion, Nested Macro Calls, Advanced Macro Facilities, Design Of a Macro Preprocessor, 08 20% Design of a Macro Assembler, Functions of a Macro Processor, Basic Tasks of a Macro Processor, Design Issues of Macro Processors, Features, Macro Processor Design Options, Two-Pass Macro Processors, One-Pass Macro Processors 5 Linkers and Loaders 06 20%

Introduction, Relocation of Linking Concept, Design of a Linker, Self- Relocating Programs, Linking in MSDOS, Linking of Overlay Structured Programs, Dynamic Linking, Loaders, Different Loading Schemes, Sequential and Direct Loaders, Compile-and-Go Loaders, General Loader Schemes, Absolute Loaders, Relocating Loaders, Practical Relocating Loaders, Linking Loaders, Relocating Linking Loaders, Linkers v/s Loaders 6 Scanning and Parsing Programming Language Grammars, Classification of Grammar, Ambiguity in Grammatic Specification, Scanning, Parsing, Top Down Parsing, Bottom up Parsing, Language Processor Development Tools, LEX, YACC 7 Compilers Causes of Large Semantic Gap, Binding and Binding Times, Data Structure used in Compiling, Scope Rules, Memory Allocation, Compilation of Expression, Compilation of Control Structure, Code Optimization 8 Interpreters & Debuggers Benefits of Interpretation, Overview of Interpretation, The Java Language Environment, Java Virtual Machine, Types of Errors, Debugging Procedures, Classification of Debuggers, Dynamic/Interactive Debugger 06 10% 04 5% 04 5% Suggested Specification table with Marks (Theory): Distribution of Theory Marks R Level U Level A Level N Level E Level C Level 7 30 33 - - - Legends: R: Remembrance; U: Understanding; A: Application, N: Analyze and E: Evaluate C: Create and above Levels (Revised Bloom s Taxonomy) Note: This specification table shall be treated as a general guideline for students and teachers. The actual distribution of marks in the question paper may vary slightly from above table. Reference Books: 1) System Programming by D M Dhamdhere McGraw Hill Publication 2) System Programming by Srimanta Pal OXFD Publication 3) System Programming and Compiler Construction by R.K. Maurya & A. Godbole. 4) System Software An Introduction to Systems Programming by Leland L. Beck, 3rd Edition, Pearson Education Asia, 2000 5) System Software by Santanu Chattopadhyay, Prentice-Hall India,20 Course Outcome: After learning the course the students should be able to: 1. To understand the execution process of HLL programs. 2. To understand the working of scanners and parsers.

3. To understand the basic design of various system software. 4. To implement various system software. List of Experiments and Design based Problems (DP)/Open Ended Problem: (Pl. Note: List of Experiments should be as per theory covered in the class, below mentioned practical are just for the reference purpose) 1. Write a program to implement the lexical analyzer. 2. Write a Lexical Analyzer (using lex utility for UNIX). 3. Write a program to left factor the given grammar. 4. Write a program to remove the Left Recursion from a given grammar. 5. Aim: Implement Recursive Descendent Parsing for the given Grammar. E -> T + E / T T -> F * T / F F -> ( E ) / i 6. Implement Predictive Parser for the given grammar. E -> T + E / T T -> F * T / F F -> ( E ) / i 7. Write a SAL program in text file and generate SYMTAB and LITTAB 8. Use macro features of C language 9. Write a program which generates Quadruple Table for the given postfix String 10. Write a C program to parse a given string using Predictive parsing for given grammar. type simple id array [ simple ] of type simple integer char num dotdot num List of Open Source Software/learning website: www.cs.jhu.edu/~scott/pl/lectures/parsing.html www.en.wikipedia.org/wiki/system_programming ACTIVE LEARNING ASSIGNMENTS: Preparation of power-point slides, which include videos, animations, pictures, graphics for better understanding theory and practical work The faculty will allocate chapters/ parts of chapters to groups of students so that the entire syllabus to be covered. The power-point slides should be put up on the web-site of the College/ Institute, along with the names of the students of the group, the name of the faculty, Department and College on the first slide. The best three works should submit to GTU.

Seat No.: Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER V (NEW) - EXAMINATION SUMMER 2017 Subject Code: 21508 Date: 03/05/2017 Subject Name: System Programming Time: 02:30 PM to 05:00 PM Total Marks: 70 Instructions: 1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 Short Questions 14 1 Define : Language Processor. 2 phase performs type checking task. [ a] Lexical Analysis [b] Syntax Analysis [c] Semantic Analysis 3 Define : Parse tree. 4 State True/False : Code optimization phase is optional phase of compiler. 5 Which phase of compiler will generate error if semicolon is missing in a c program? 6 Define : intermediate code. 7 Define : Pattern. 8 State True/False : Top Down parsers can never work with left recursive grammar. 9 Define: symbol Table. 10 Define: Semantic Gap. 11 Define : Backpatching. 12 State True/False : Single pass assemblers cannot handle forward references. 13 Define : Macro Assembler. 14 State True/False : Symbol table is used to store mnemonics and opcodes. MARKS Q.2 (a) Eliminate left recursion from following grammar. S A A Ad Ae ab ac B bbc f C g 03 (b) Construct LL(1) parsing table for following grammar. S ictses icts a C b 04 (c) Construct an optimized DFA : 0*1*(0/1)# 1 1

(c) Show that following regular expressions are equivalent by constructing optimized DFA. (0/1)* (0*/1*)* Q.3 (a) What is Peephole optimization? Explain any two optimization 03 transformations in detail. (b) Define and explain different intermediate code representations. 04 (c) What is main task of semantic analysis phase? Explain inherited and synthesized attributes in detail with example. Q.3 (a) Define: L-Attributed definition in detail. 03 (b) State different storage allocation strategies. Explain static allocation and 04 stack allocation in detail. (c) Generate Quadruple, Triple, Indirect Triple for following expression: ans=a+b*c/2.0 Q.4 (a) What is program relocation? How relocation is performed by linker? 03 (b) Write and explain the algorithm for macro expansion. 04 (c) Explain in brief design of a Two Pass Assembler. Q.4 (a) What is overlay? Explain the execution of an overlay structure program. 03 (b) Explain in brief self relocating programs. 04 (c) Explain in detail any two advanced assembler directives. Q.5 (a) Explain Types of grammar in detail. 03 (b) Compare and Contrast macro preprocessor and macro assembler. 04 (c) Explain in brief design the linker. Q.5 (a) Define: Ambiguous grammar. Also state example of same. 03 (b) Explain and compare two variants of intermediate code. 04 (c) Explain in brief the design of a macro assembler. ************* 2 2

Seat No.: Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER V(New) EXAMINATION WINTER 2016 Subject Code:21508 Date:22/11/2016 Subject Name:System Programming Time: 10:30 AM to 01:00 PM Total Marks: 70 Instructions: 1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 Short Questions 14 1 A is a language processor which bridges an execution gap but is not a language translator 2 Justify e (True/False): A language migrator provides portability of program. 3 Difference between Procedure oriented language and Problem oriented language. 4 Describe the output of Lexical analysis. 5 Difference between Literal and Constant. 6 Describe the syntax of keyword parameter and the use of it. 7 What is the use of backpatching? 8 Which of system software always reside in main memory? What kind of input this system software takes? 9 Define Handle, Grammar 10 How to avoid backtracking in top down parsing? 11 Justify (True/False): A positional parameter can have a default value. 12 Give name of data structures used in compiler 13 What is the use of POOLTAB in assembler? 14 What is JIT? MARKS Q.2 (a) What are the basic tasks that must be performed by macro preprocessor? 03 (b) List out different forms of editor and explain each of them. 04 (c) Explain Left recursion, Left factoring and backtracking in top down parsing. (c) Develop an LL(1) parser table for the following grammer and Parse the string using the parsing table : (id*id) + (id*id) E->TA A->+TA T->VB B->*VB V->id (E) Q.3 (a) Explain Absolute loader. 03 (b) Develop regular expression and DFAs for the following kind of strings: 04 1. a real number with optional integer and fraction part 2. a comment string in the C++ language. (c) Write operator precedence table for arithmetic operators +, *, -, / (, ). Parse following expression using the table. id * (id + id )/ (id *id) Q.3 (a) How compiler implements scope rules? 03 (b) An assembly program contains the statement 04 X EQU Y + 25 Indicate how the EQU statement can processed if (1) Y is a back reference (2) Y is a forward reference 1

(c) Write the data structure, intermediate code of following assembly program. Write the assembly program output if value of N = 5. START 101 READ N MOVER BREG, ONE MOVEM BREG, TERM AGAIN MULT BREG, TERM MOVER CREG, TERM ADD CREG, ONE MOVEM CREG, TERM COMP CREG, N BC LE, AGAIN MOVEM BREG, RESULT PRINT RESULT STOP N DS 1 RESULT DS 1 ONE DC 1 TERM DS 1 END Q.4 (a) Explain attributes of formal parameters in macro with syntax. 03 (b) Explain Object Module of a Program Unit P in Linker. 04 (c) Describe the use of stacks in Expansion of Nested macro calls with example. Q.4 (a) Explain Boostrap loader. 03 (b) What is Overlay? Explain the execution of an overlay structured program. 04 (c) Explain in detail how the following input gets processed in toy compiler. int a; real b,c; c= a + b * 0.6; Q.5 (a) Describe the level of System Software. 03 (b) Describe the use of REPT and IRP statement. 04 (c) Explain types of intermediate code representation of expression during compilation in detail. Q.5 (a) What is pure and impure interpreter? 03 (b) Explain design of an editor. 04 (c) What is the use of static pointer and dynamic pointer in compiler? Explain working of Display with suitable example. ************* 2

Seat No.: Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER V (NEW) - EXAMINATION SUMMER 2016 Subject Code:21508 Date:11/05/2016 Subject Name:System Programming Time:02:30 PM to 05:00 PM Total Marks: 70 Instructions: 1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 (a) Compare user-centric view and system-centric view of system software. (b) What is Symbol table? Explain how one can organize Symbol table using Linear Data Structure? Q.2 (a) What are the Advanced Assembler Directives? Explain any two with example. (b) List various phases of Language Processor. Explain any one phase in detail. (b) Given the source program: START 100 A DS 3 L1 MOVER AREG, B ADD AREG, C MOVEM D EQU A+1 L2 PRINT D IGIN A-1 C DC 5 IGIN L2+1 STOP B DC 19 END L1 AREG, D (a) Show the contents of the symbol table at the end of Pass I. (b) Explain the significance of EQU and IGIN statement in the program and explain how they are processed by the assembler. (c) Show the intermediate code generated for the program. Q.3 (a) Explain use and field of following tables of macro. KPDTAB, MDT, EVTAB, SSTAB (b) Explain following facilities for expansion time loop with example. (1) REPT statement (2) IRP statement Q.3 (a) Explain following terms with suitable example. (1) Expansion time variable (3) Semantic expansion (2) Positional parameter (4) Macro Pre-processor (b) Draw a flowchart and explain simple one pass macro processor. Q.4 (a) With example explain how relocation is performed by linker? 1

(b) Explain Absolute loader with example. Q.4 (a) What is overlay? Explain linking of overlay structured program. (b) In brief explain relocating loader. Q.5 (a) (1) Explain types of grammar. 03 (2) Explain lexical analysis of language processor. 04 (b) Given following expression: x = -a * b + -a * b (1) Write three address codes for the expression. (2) Optimize the three address code if it is possible to do so. (3) Give triple implementation for the three address code of the expression. Q.5 (a) Explain recursive descendent parsing algorithm. (b) What is interpreter? Explain pure & impure interpreters. ************* 2

Seat No.: Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE SEMESTER V (NEW) EXAMINATION WINTER 2015 Subject Code: 21508 Date:10/12/ 2015 Subject Name: System Programming Time: 10:30am to 1:00pm Total Marks: 70 Instructions: 1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 (a) (i) Compare Problem oriented and Procedure oriented languages. (ii) Define Following terms: 1. System Software 2. Semantic Gap 3. Specification Gap 4. Execution Gap (b) (i) Explain types of grammars. (ii) Write a regular expression for a language containing a binary string which does not contain two consecutive 0s or two consecutive 1s anywhere. Q.2 (a) Explain the various stages of the life cycle of a source program with a neat diagram. (b) Consider following assembly language program: Show (i) Contents of Symbol Table (ii) Intermediate codes using Variant I representation. START 101 READ N MOVER BREG, ONE MOVEM BREG, TERM AGAIN MULT BREG, TERM MOVER CREG, TERM ADD CREG, ONE MOVEM CREG, TERM COMP CREG, N BC LE, AGAIN MOVEM BREG, AGAIN PRINT RESULT STOP N DS 1 RESULT DS 1 ONE DC 1 TERM DS 1 END Instruction opcode: STOP 00, ADD 01, MULT 03, MOVER 04, MOVEM 05, COMP 06, BC, READ 09, PRINT 10, LE 02 Assembler directives: START 01, END 02 Declaration statements: DC 01, DS 02 Register code: BREG 02, CREG 03 (b) Explain language processing activities. 1

Q.3 (a) Construct NFA and DFA for following regular expression: (0 1)*001# (b) What is program relocation? How relocation is performed by linker? Explain with example. Q.3 (a) Explain recursive descent parsing algorithm. (b) List various phases of a language processor. Explain roles of phases of Language Processor. Also explain symbol table. Q.4 (a) Define forward references. How it can be solved using back-patching? Explain with example. (b) Explain Absolute Loader with example. Q.4 (a) Explain advanced assembler directives with suitable example. (b) What is macro preprocessor? Explain steps of macro preprocessor design. Q.5 (a) List out and explain various optimizing transformations of a compiler by giving suitable examples. (b) What is interpreter? Explain benefits of interpreter. Compare interpreter and compiler. Q.5 (a) Define two macros of your choice to illustrate nested calls to these macros. Also show their corresponding expansion. (b) What are advanced macro programming facilities? Explain with example. ************* 2