Comp 252 -- Assignment #6 -- Due Tuesday, November 6, 1990 In Pascal a procedure P can call a procedure Q, if: (1), Q is an immediate internal procedure of P; (2), Q is P (that is, P can call itself); (3), P is an internal procedure of Q; (4), P is defined after Q and is at the same level as Q; or (5), P is an internal procedure of some third procedure R, which is defined after Q and is at the same level as Q. If you prefer familial images and can consider a procedure to be the "mother" of its subprocedures, then the five Pascal calling rules can be stated as: (1), You may call your daughters; (2), You may call yourself; (3), You may call all your ancestors; (4), You may call all your elder sisters; and (5), You may call the elder sisters of any of your ancestors. Your assignment is to write a C program which can "answer" questions about Pascal's procedure calling rules. Your program will receive two kinds of input lines: one describes the procedure-level structure of a Pascal program, and the other asks whether or not one procedure can call another. The structure of the Pascal program is described by several input lines of the form: P1->PA,PB,PC which means "P1 has subprocedures PA, PB, and PC" or, if you prefer family relations "P1 is the mother of PA, PB, and PC". Your program will read this lines and build up a tree structure representing the Pascal program. Because you don't know a priori the length of procedures name or the number of procedures you must use the "malloc" routine to build the structure. You may assume that the first input line describes the root of the tree. On subsequent input lines, you should check that the "parent" procedure has been previously described as a "child" procedure. Assume that the lines describing the structure of the Pascal procedures is ended by a blank line. Questions concerning the structure of the Pascal program will be input lines of the form: P