Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 2 Lnai 8725

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448505, 978-3662448502

More Books

Students also viewed these Databases questions