edit parser-tester

v6.3-exception
Matthew Butterick 7 years ago
parent 9c97fe31d7
commit 66a826d6f6

@ -1,42 +1,3 @@
#lang br
(require "parser.rkt")
(module+ test
(require rackunit)
(check-equal? (parse-to-datum "++++-+++-++-++[>++++-+++-++-++<-]>.")
'(bf-program
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-loop
"["
(bf-op ">")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "<")
(bf-op "-")
"]")
(bf-op ">")
(bf-op "."))))
(parse-to-datum "++++-+++-++-++[>++++-+++-++-++<-]>.")

@ -0,0 +1,42 @@
#lang br
(require "parser.rkt")
(module+ test
(require rackunit)
(check-equal? (parse-to-datum "++++-+++-++-++[>++++-+++-++-++<-]>.")
'(bf-program
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-loop
"["
(bf-op ">")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "-")
(bf-op "+")
(bf-op "+")
(bf-op "<")
(bf-op "-")
"]")
(bf-op ">")
(bf-op "."))))
Loading…
Cancel
Save