Try out this grammar:
MAIN -> "Excuse me professor… " EXCUSE "."
EXCUSE -> SUB " " ACTION " " OBJECT
SUB -> "I" | "my sister" | "my brother"
ACTION -> "lost" | "forgot"
OBJECT -> "my homework" | "my paper"
Recursive version:
MAIN -> "Excuse me professor… " EXCUSE "."
EXCUSE -> SUB " " ACTION " " OBJECT | EXCUSE " and " EXCUSE
SUB -> "I" | "my sister" | "my brother"
ACTION -> "lost" | "forgot"
OBJECT -> "my homework" | "my paper"
Slides:
https://docs.google.com/presentation/d/1uoOp7rXYOiPjrXCfTB1HtgaUzUiMgqC3GVP-4d8b8PU/edit?usp=sharing
Email us at [email protected] or [email protected] if you have any questions about the materials or if you end up using this assignment as inspiration!