Beruflich Dokumente
Kultur Dokumente
ACKNOWLEDGEMENT
Any achievement, be it scholastic or otherwise does not depend solely on the individual efforts
but on the guidance, encouragement and cooperation of intellectuals, elders and friends. A
number of personalities, in their own capacities have helped me in carrying out this project work.
I would like to take this opportunity to thank them all.
I deeply express my sincere gratitude to Prof. Rashmi and Prof. Vanishree K , Department of
ISE, R.V.C.E, Bengaluru,for his able guidance, regular source of encouragement and assistance
throughout this project
I would like to thank Dr. N. K. Cauvery, Head of Department, Information Science &
Engineering, R.V.C.E, Bengaluru, for his valuable suggestions and expert advice.
I would also like to thankDr. B. S. Satyanarayana, Principal, R.V.C.E, Bengaluru, for his moral
support towards completing my project work.
I thank my Parents, and all the Faculty members of Department of Information Science &
Engineering for their constant support and encouragement.
Last, but not the least, I would like to thank my peers and friends who provided me with valuable
suggestions to improve my project.
Abstract
1
Dept of ISE, RVCE
2014-15
MACRO PROCESSOR
Very often we need short-cuts to get things done fast and to avoid confusion, and that is
the exact requirement of the programming world. Today, as programming languages grow more
sophisticated and make the life of a programmer easier, the requirements keep growing.
Programming languages perform Herculean tasks as compared to their ancestors several decades
ago. For example, from the simple days of C, companies such as Microsoft have developed much
more powerful languages such as Visual C#, which has the simplicity and foundation of C. Yet,
as we progress with the use of these languages, there are still some tools that are in use today that
make processing of code much simpler.
Code grows to such an extent today that even code needs management and processing. In
this project, we look at the processing of code before it is sent for compilation. These tasks are
called pre-processor tasks, where code is prepared before it is sent for compilation. These are
also known as pre-processor directives which perform a task before the code is compiled. There
are many such tools, including macro expansions. Macros are used to make compilation easier
and more feasible. We can look at the various advantages macros give the programmer as we
look at the problems inherent with coding. It should also be noted that the subject of macros are
vast and that only a few macros will be simulated.
A macro is a piece of code or text that replaces another body of text before compilation.
In SIC/XE macros may or may not take parameters. Code is scanned and those lines starting with
MACRO are treated first and the appropriate action is performed. These lines with MACRO are
removed and that edited code is sent for compilation. Any compilation errors caused by macro
expansions have to be taken care of by the user. Macros can be used in a simple or complex way
to make effective use of code. These macros will be simulated in this project.
Table of Contents
2
Dept of ISE, RVCE
2014-15
MACRO PROCESSOR
Acknowledgement
Abstract
ii
Table of Contents
iii
List of Figures
vi
List of Tables
vii
Chapter 1
Introduction
1.1
Problem Defination
1.1.1
Code Redability
1.1.2
Function Overhead
1.1.3
1.1.4
Compilation Issues
1.2
Basic Definitions
1.2.1
1.2.2
1.2.3
1.2.4
1.2.5
2
3
4
5
5
1.3.
Block Diagram
Chapter-2
Theory and Concepts of Macro Processor
2.1
Introduction
2.2
2.3
8
3
2014-15
MACRO PROCESSOR
2.3.1
2.3.2
Chapter-3
Software Requirements Specification
2.1
11
2.2
11
Chapter-4
HIGH LEVEL DESIGN
4.1
12
4.2
12
4.3
Conditional Macro
13
4.4
13
4.5
Language
13
4.6.1
4.6.2
Future plans
Data flow diagram
13
14
Chapter-5
DETAILED DESIGN
5.1
16
5.2
17
5.3
17
5.3.1
Word Scan
17
5.3.2
Process line
17
5.3.3
Define
18
5.3.4
Getline
19
4
2014-15
MACRO PROCESSOR
5.3.5
Expand
20
Chapter-6
IMPLEMENTATION
6.1
Algorithm
22
6.2
23
6.3
Error Detection
23
Chapter-7
SOFTWARE TESTING
7.1
Testing Process
25
7.2
Levels of Testing
25
7.3
Unit Testing
25
7.4
Integration Testing
26
7.5
26
7.6
26
7.7
Summary
28
CHAPTER 8
RESULTS, DISCUSSION AND INFERENCE
8.1
29
8.2
Future Enhancements
30
REFERENCES
31
APPENDIX
32
LIST OF FIGURES
Figure 1.a
Figure 2.a
2014-15
MACRO PROCESSOR
LIST OF TABLES
Table 7.a
Table 7.b
2014-15
MACRO PROCESSOR
Table 7.c
Nested Expansion
Table 7.d
7
Dept of ISE, RVCE
2014-15