add test for start & atok tokens

hide-top-rule-name
Matthew Butterick 7 years ago
parent 2ad5296567
commit 52f1f4bce2

@ -0,0 +1,3 @@
#lang brag
top : ("start" | "atok")+

@ -15,6 +15,7 @@
"test-quotation-marks-and-backslashes.rkt" "test-quotation-marks-and-backslashes.rkt"
"test-simple-arithmetic-grammar.rkt" "test-simple-arithmetic-grammar.rkt"
"test-simple-line-drawing.rkt" "test-simple-line-drawing.rkt"
"test-start-and-atok.rkt"
"test-weird-grammar.rkt" "test-weird-grammar.rkt"
"test-whitespace.rkt" "test-whitespace.rkt"
"test-wordy.rkt" "test-wordy.rkt"

@ -0,0 +1,14 @@
#lang racket/base
(require brag/examples/start-and-atok
brag/support
rackunit)
;; make sure that "start" and "atok" work as terminals.
(check-equal? (parse-to-datum (list "start")) '(top "start"))
(check-equal? (parse-to-datum (list "atok")) '(top "atok"))
(check-equal? (parse-to-datum (list "start" "atok")) '(top "start" "atok"))
Loading…
Cancel
Save