prac3-fall09

prac3-fall09 - CMSC 330, Fall 2009, Practice Problems 3 1....

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

View Full Document Right Arrow Icon
CMSC 330, Fall 2009, Practice Problems 3 1. Context Free Grammars a. List the 4 components of a context free grammar. b. Describe the relationship between terminals, non-terminals, and productions. c. Define ambiguity. d. Describe the difference between scanning & parsing. 2. Describing Grammars a. Describe the language accepted by the following grammar: S abS | a b. Describe the language accepted by the following grammar: S aSb | ± c. Describe the language accepted by the following grammar: S bSb | A A aA | ± d. Describe the language accepted by the following grammar: S AS | B A aAc | Aa | ± B bBb | ± e. Describe the language accepted by the following grammar: S S and S | S or S | (S) | true | false f. Which of the previous grammars are left recursive? g. Which of the previous grammars are right recursive? h. Which of the previous grammars are ambiguous? Provide proof. 3.
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/13/2012 for the course CMSC 330 taught by Professor Staff during the Fall '08 term at Maryland.

Page1 / 2

prac3-fall09 - CMSC 330, Fall 2009, Practice Problems 3 1....

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