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.
43 lines
1.2 KiB
Racket
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 "."))))
|