|
|
@ -7,17 +7,18 @@
|
|
|
|
(for/list ([tok (in-port read-char ip)])
|
|
|
|
(for/list ([tok (in-port read-char ip)])
|
|
|
|
tok))
|
|
|
|
tok))
|
|
|
|
|
|
|
|
|
|
|
|
(define (parse-char c)
|
|
|
|
(define (parse toks)
|
|
|
|
(define int (modulo (char->integer c) 128))
|
|
|
|
(for/list ([tok (in-list toks)])
|
|
|
|
|
|
|
|
(define int (modulo (char->integer tok) 128))
|
|
|
|
(for/list ([bit (in-range 7)])
|
|
|
|
(for/list ([bit (in-range 7)])
|
|
|
|
(if (bitwise-bit-set? int bit)
|
|
|
|
(if (bitwise-bit-set? int bit)
|
|
|
|
'taco
|
|
|
|
'taco
|
|
|
|
null)))
|
|
|
|
null))))
|
|
|
|
|
|
|
|
|
|
|
|
(define (read-syntax src ip)
|
|
|
|
(define (read-syntax src ip)
|
|
|
|
(define toks (tokenize ip))
|
|
|
|
(define toks (tokenize ip))
|
|
|
|
(define parse-tree (map parse-char toks))
|
|
|
|
(define parse-tree (parse toks))
|
|
|
|
(strip-context
|
|
|
|
(strip-context
|
|
|
|
(with-syntax ([(PARSED-CHAR ...) parse-tree])
|
|
|
|
(with-syntax ([PT parse-tree])
|
|
|
|
#'(module tacofied racket
|
|
|
|
#'(module tacofied racket
|
|
|
|
(for-each displayln '(PARSED-CHAR ...))))))
|
|
|
|
(for-each displayln 'PT)))))
|