A: Create a variable declaration grammar that accepts: single/multiple declaration of variables (e.g int x, y; float
Question:
A: Create a variable declaration grammar that accepts: single/multiple declaration of variables (e.g int x, y; float a, char s), single/multiple dimensional of arrays (e.g float d[12][3], char p[10]), pointer type variables (e.g. int *ptr) and record (e.g. STRUCT type) type variables.
B: Now consider that the integer takes 5 bytes, float takes 10 bytes and char takes 1 byte. Create an SDD that generates the total bytes allocated by any declaration statement. (e.g int s[10][3] allocates 150 bytes in memory).
C: Create dependency graph for the input string using the grammar developed in the above PART A.
record {int x; float y[10];} data[5];
D: Now convert the developed SDD into an equivalent SDT.
Probability and Random Processes With Applications to Signal Processing and Communications
ISBN: 978-0123869814
2nd edition
Authors: Scott Miller, Donald Childers