Dr. Jody Paul
jody@computer.org


Computer Science 3

Sentence Generator Assignment

Problem: Generate all sentences in the language L defined by the following grammar G

Grammar G

Non-Terminals { S, NP, VP, N, V, ART }
Terminals { the, dog, cat, ran, ate }
Start Symbol S
Production Rules

S => NP VP
NP => N | ART N
VP => V
N => dog | cat
V => ran | ate
ART => the

Assessment Rubric