
Changed backtracking algorithm, runtime representations - syntax classes, ~describe no longer implicitly commit - ~describe no longer delimits effect of cut Added keyword & optional args for stxclasses Added ~do and #:do, ~post, ~commit and #:commit, ~delimit-cut and #:no-delimit-cut Added syntax/parse/debug, syntax/parse/experimental/* - expr/c for contracting macro sub-expressions moved from syntax/parse to syntax/parse/experimental/contract - syntax class reflection (~reflect, ~splicing-reflect) - eh-alternative-sets (~eh-var) - provide-syntax-class/contract (only for params, not attrs so far) Changed ~fail to not include POST progress (#:fail still does) old (~fail _) is now (~post (~fail _)) Made msg argument of ~fail optional Removed generic "repetition constraint violated" msg Removed atom-in-list stxclass Removed unnecessary datum->syntax on cdr of pair pattern massive improvements to long-list microbenchmarks Optimization: integrable syntax classes (id, expr, keyword) need better measurements Optimization: ad hoc elimination of head/tail choice point for (EH ... . ()) patterns Added unstable/wrapc (proc version of expr/c)
22 lines
536 B
Racket
22 lines
536 B
Racket
#lang racket/load
|
|
|
|
(module a racket
|
|
(require syntax/parse)
|
|
(define-literal-set lits (begin))
|
|
(provide lits))
|
|
|
|
(module b racket
|
|
(require (for-syntax 'a syntax/parse))
|
|
(require (for-syntax syntax/parse/private/runtime))
|
|
(define-syntax (snarf stx)
|
|
;;(printf "slpl of snarf: ~s\n" (syntax-local-phase-level))
|
|
(syntax-parse stx
|
|
#:literal-sets (lits)
|
|
[(snarf (begin e)) #'e]))
|
|
(provide snarf))
|
|
|
|
(module c racket
|
|
(require (for-syntax 'b racket/base))
|
|
(begin-for-syntax
|
|
(displayln (snarf (begin 5)))))
|