Homework6-sol - COP 5555 Programming Language Principles...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 6 - Solution Assigned: July 6, 2011 Deadline: 11:59pm July. 13, 2011 1. Problem 1 (20 Points) Give an example of a left associative operator in RPAL and then modify the grammar such that it won't be left or right associative anymore. Solution: An example is 'or' operator: B -> Bt ('or' Bt)+ (as done for 'tau' operator.) 2. Problem 2 (20 Points) According to the semantic definition of RPAL, are RPAL programs meant to be evaluated in PL order or normal order? Why was this choice made? Solution: Normal order for its better computation time. 3. Problem 3 (20 Points) Can you give an example of an RPAL program whose root of a fully standardized tree is not lambda or gamma? Can you give an example of an RPAL program in which Ystar is not a leaf in its standardized tree? (If it exists in both cases) Solution: Answer to the first part: A program with just the number “3” Answer to the second part: no
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/22/2012 for the course COP 5555 taught by Professor Staff during the Fall '08 term at University of Florida.

Page1 / 2

Homework6-sol - COP 5555 Programming Language Principles...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online