You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
beautiful-racket/beautiful-racket-demo/bf-demo/test-parser.rkt

43 lines
1.2 KiB
Racket

#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 "."))))