|
|
@ -1,4 +1,5 @@
|
|
|
|
#lang br
|
|
|
|
#lang br
|
|
|
|
|
|
|
|
(require (for-syntax br/syntax))
|
|
|
|
(provide #%top-interaction #%module-begin #%datum (rename-out [my-top #%top]) #%app
|
|
|
|
(provide #%top-interaction #%module-begin #%datum (rename-out [my-top #%top]) #%app
|
|
|
|
(all-defined-out))
|
|
|
|
(all-defined-out))
|
|
|
|
|
|
|
|
|
|
|
@ -10,25 +11,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
(define #'(tst-program _arg ...) #'(begin _arg ...))
|
|
|
|
(define #'(tst-program _arg ...) #'(begin _arg ...))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(begin-for-syntax
|
|
|
|
|
|
|
|
(define-scope blue))
|
|
|
|
|
|
|
|
|
|
|
|
(define #'(header-expr _filename (_colid ... _outid))
|
|
|
|
(define #'(header-expr _filename (_colid ... _outid))
|
|
|
|
(with-syntax* ([filename-string (symbol->string (syntax->datum #'_filename))]
|
|
|
|
(with-syntax* ([filename-string (symbol->string (syntax->datum #'_filename))]
|
|
|
|
[procname (string->symbol (cadr (regexp-match #rx"^(.*)\\.hdl$"(symbol->string (syntax->datum #'_filename)))))]
|
|
|
|
[procname (string->symbol (cadr (regexp-match #rx"^(.*)\\.hdl$"(symbol->string (syntax->datum #'_filename)))))])
|
|
|
|
[output (syntax-local-introduce (datum->syntax #f 'output))])
|
|
|
|
(with-blue-binding-form (output)
|
|
|
|
#'(begin
|
|
|
|
#'(begin
|
|
|
|
(provide (all-defined-out))
|
|
|
|
(provide (all-defined-out))
|
|
|
|
(define procname
|
|
|
|
(define procname
|
|
|
|
(dynamic-require (findf file-exists?
|
|
|
|
(dynamic-require (findf file-exists?
|
|
|
|
(list filename-string (format "~a.rkt" filename-string))) 'procname))
|
|
|
|
(list filename-string (format "~a.rkt" filename-string))) 'procname))
|
|
|
|
(display-header '_colid ... '_outid)
|
|
|
|
(display-header '_colid ... '_outid)
|
|
|
|
(define _colid (make-parameter 0)) ...
|
|
|
|
(define _colid (make-parameter 0)) ...
|
|
|
|
(define (_outid)
|
|
|
|
(define (_outid)
|
|
|
|
(keyword-apply procname
|
|
|
|
(keyword-apply procname
|
|
|
|
(map (compose1 string->keyword symbol->string) (list '_colid ...))
|
|
|
|
(map (compose1 string->keyword symbol->string) (list '_colid ...))
|
|
|
|
(list (_colid) ...) null))
|
|
|
|
(list (_colid) ...) null))
|
|
|
|
|
|
|
|
|
|
|
|
(define (output)
|
|
|
|
(define (output)
|
|
|
|
(display-values (_colid) ... (_outid))))))
|
|
|
|
(display-values (_colid) ... (_outid)))))))
|
|
|
|
|
|
|
|
|
|
|
|
(define #'(display-header _sym ...)
|
|
|
|
(define #'(display-header _sym ...)
|
|
|
|
#'(begin
|
|
|
|
#'(begin
|
|
|
@ -47,5 +50,5 @@
|
|
|
|
(define #'eval-expr #'void)
|
|
|
|
(define #'eval-expr #'void)
|
|
|
|
|
|
|
|
|
|
|
|
(define #'(output-expr)
|
|
|
|
(define #'(output-expr)
|
|
|
|
(inject-syntax ([#'output 'output])
|
|
|
|
(with-blue-identifiers (output)
|
|
|
|
#'(output)))
|
|
|
|
#'(output)))
|
|
|
|