Question: Programming Language Concepts CS 280 Final Exan Summer 2018 Problem 1. Using the following extended BNF grammar, write a parse tree as an for each

 Programming Language Concepts CS 280 Final Exan Summer 2018 Problem 1.

Using the following extended BNF grammar, write a parse tree as an

Programming Language Concepts CS 280 Final Exan Summer 2018 Problem 1. Using the following extended BNF grammar, write a parse tree as an for each of the following expressions if one exists, and if one does not exist, write "No parse tree". ::- | [,] ::- ] () ::- XIYIZ a. X b. [[X,Y], [Z,x]] c. [([Y,X]), [Z,x]] Problem 2. Given the following program: int h, i; 2 void B(int w) f int j, k; i - 2 v; void A(int x, int y) f float i, j; B(h); 10 i = 3; 11 12 13 void main () f int a, b; h = 5; a = A(a, b); B(h); 14 15 3; b 2; 16 17 18 19 20 g a. Assume dynamic scoping and a call history of: main(line 17) ! A(line 10) ! B. For each function list all of the variables referenced and the line on which it was declared. b. Assume dynamic scoping and a call history of: main(line 18) ! B. For each function list all of the variables referenced and the line on which it was declared

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!