Problem 1: A macro processor is a text substitution program where macro consists of a macro name and
its definition as shown below:
Macro nameMacro definition (replacement text)
YMCAYMCA institute of Engineering
The macro processor replaces all occurrences of macro name in a document by its corresponding
definition. Write a program that takes a text in which the macros are defined at the beginning by the
statements such as given below. The definitions end by the keyword “MEND”.
#defineCEComputer Engineering
#definePCPersonal computer
MEND
<text of the document>
The program implements the macr ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.