12 lines
277 B
Racket
12 lines
277 B
Racket
#lang racket/base
|
|
|
|
(provide (struct-out nt)
|
|
(struct-out rhs))
|
|
|
|
;; lang = (listof nt)
|
|
;; nt = (make-nt sym (listof rhs))
|
|
;; rhs = (make-rhs single-pattern)
|
|
;; single-pattern = sexp
|
|
(define-struct nt (name rhs) #:transparent)
|
|
(define-struct rhs (pattern) #:transparent)
|