|
|
@ -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)])
|
|
|
|
(for/list ([bit (in-range 7)])
|
|
|
|
(define int (modulo (char->integer tok) 128))
|
|
|
|
(if (bitwise-bit-set? int bit)
|
|
|
|
(for/list ([bit (in-range 7)])
|
|
|
|
'taco
|
|
|
|
(if (bitwise-bit-set? int bit)
|
|
|
|
null)))
|
|
|
|
'taco
|
|
|
|
|
|
|
|
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)))))
|