Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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