Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Ex: C code with preprocessor directives: Expanded code:Store the array information in an array table. Use the following data structure for array table:Parse each line
Ex:
C code with preprocessor directives:
Expanded code:Store the array information in an array table. Use the following data structure for array table:Parse each line of the source code that contains a directive, and store the tokens in the parse table in the following format:You may declare the Array Table and Parse Table as global.Preprocessor variables Pdot, Psum, Paver must be declared in a header file named Pheader. h The header file must have the following contents:int Pdot;int Psum;int Paver;
Your preprocessor will do the following:Finally, write a shell script with the name P that takes the name of a C code as command line argument and generates expanded.c as output.
Ex:
P myCprog.c
You must use gee compiler in Linux environment. Prior to project submission, you must make sure that your project executes correctly with the specified setting. Projects producing errors during the demonstrations due to the differences in the platform will not be accepted.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started