beautiful-racket/brag/brag/examples/wordy.rkt
2016-05-05 17:01:56 -07:00

8 lines
202 B
Racket
Executable File

#lang brag
;; A parser for a silly language
sentence: verb optional-adjective object
verb: greeting
optional-adjective: ["happy" | "frumpy"]
greeting: "hello" | "hola" | "aloha"
object: "world" | WORLD