HM8-Ambiguity-NormalForms-Answers

HM8-Ambiguity-Normal - CS 341 Automata Theory Elaine Rich Homework 8 Due Thursday March 8 2007 This assignment covers Sections 11.7 11.8 1 Let G be

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

View Full Document Right Arrow Icon
CS 341 Automata Theory Elaine Rich Homework 8 Due: Thursday, March 8, 2007 This assignment covers Sections 11.7 - 11.8. 1) Let G be the ambiguous expression grammar of Example 11.14. Show at least three different parse trees that can be generated from G for the string id + id * id * id . 2) Consider the unambiguous expression grammar G of Example 11.19. a) Trace the derivation of the string id + id * id * id in G . E E + T T + T F + T id + T id + T F id + T F F id + F F F id + id F F id + id id F id + id id id b) Add exponentiation ( ) and unary minus (-) to G , assigning the highest precedence to unary minus, followed by exponentiation, multiplication, and addition, in that order. R = { E E + T E T T T F T F F F X F X X - X X Y Y ( E ) Y id }. 3) Let L = { w { a , b , , ε , (, ), *, + }* : w is a syntactically legal regular expression}. a)
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 12/03/2009 for the course CS 341 taught by Professor Rich during the Fall '08 term at University of Texas at Austin.

Page1 / 2

HM8-Ambiguity-Normal - CS 341 Automata Theory Elaine Rich Homework 8 Due Thursday March 8 2007 This assignment covers Sections 11.7 11.8 1 Let G be

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