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.
brag/yaragg-lib/yaragg/examples/simple-line-drawing/lang/reader.rkt

23 lines
601 B
Racket

8 years ago
#lang s-exp syntax/module-reader
yaragg/examples/simple-line-drawing/semantics
8 years ago
#:read my-read
#:read-syntax my-read-syntax
#:info my-get-info
#:whole-body-readers? #t
(require yaragg/examples/simple-line-drawing/lexer
yaragg/examples/simple-line-drawing/grammar)
8 years ago
(define (my-read in)
(syntax->datum (my-read-syntax #f in)))
(define (my-read-syntax src ip)
(list (parse src (tokenize ip))))
(define (my-get-info key default default-filter)
(case key
[(color-lexer)
(dynamic-require 'syntax-color/default-lexer 'default-lexer)]
[else
(default-filter key default)]))