[Modules] [Syllabus]

Module #2a: Context-Free Grammars
& Languages

Objectives

  1. Define a context-free grammar formally
  2. Derive strings and sentential forms using context-free grammars
  3. Create leftmost and rightmost derivations
  4. Show the language of a grammar
  5. Construct parse trees
  6. Prove a language = L(G), given G
  7. Use context-free grammars to describe programming languages
  8. Define ambiguity

Topics

  1. Backus Naur Form & Context-free Grammars
  2. Terminals and Nonterminals
  3. Sentential Forms
  4. Derivations
  5. Parse Trees
  6. Ambiguity

Background Material

0. Text

1. Wikepedia: Context-Free Grammars
1. Grahne Text Slides: Pages 133-180
2. Busch, Shiri & Grahne: Context Free Grammars and Tape
3. Java Grammar
4. Other Language Grammars

Old Homeworks

Homework Summer 2006 [PDF]
Homework Summer 2006 Solutions [DOC] [PDF]

Homework Posted in Module 1