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.
br-parser-tools/collects/parser-tools/private-yacc/terminal.ss

25 lines
493 B
Scheme

#cs
(module terminal mzscheme
;; Defining tokens
(require-for-syntax "terminal-syntax.ss")
(provide define-tokens define-empty-tokens token-name token-value token?)
(define-struct token (name value))
(define-syntax define-tokens
(lambda (stx)
(syntax-case stx ()
((_ name ...)
(define-tokens-helper stx #'hack #f)))))
(define-syntax define-empty-tokens
(lambda (stx)
(syntax-case stx ()
((_ name ...)
(define-tokens-helper stx #'hack #t)))))
)