651 lines
28 KiB
Diff
651 lines
28 KiB
Diff
From f40af8e9288f83b19c8b358981e2a8c7c42874ef Mon Sep 17 00:00:00 2001
|
|
From: Suzanne Soy <ligo@suzanne.soy>
|
|
Date: Tue, 2 Mar 2021 21:19:51 +0000
|
|
Subject: [PATCH 1/2] require paths
|
|
|
|
---
|
|
.../racket/private/stxcase-scheme.rkt | 7 +--
|
|
racket/collects/racket/private/stxcase.rkt | 12 ++---
|
|
racket/collects/racket/private/stxloc.rkt | 4 +-
|
|
racket/collects/racket/private/template.rkt | 49 +++++++++++--------
|
|
racket/collects/racket/private/with-stx.rkt | 6 +--
|
|
racket/collects/racket/syntax.rkt | 3 +-
|
|
racket/collects/syntax/parse.rkt | 3 +-
|
|
racket/collects/syntax/parse/debug.rkt | 8 +--
|
|
racket/collects/syntax/parse/define.rkt | 4 +-
|
|
.../syntax/parse/experimental/contract.rkt | 4 +-
|
|
.../collects/syntax/parse/experimental/eh.rkt | 2 +-
|
|
.../parse/experimental/private/substitute.rkt | 1 +
|
|
.../syntax/parse/experimental/provide.rkt | 6 +--
|
|
.../syntax/parse/experimental/reflect.rkt | 6 +--
|
|
.../syntax/parse/experimental/specialize.rkt | 4 +-
|
|
.../syntax/parse/experimental/splicing.rkt | 6 +--
|
|
racket/collects/syntax/parse/private/lib.rkt | 2 +-
|
|
.../collects/syntax/parse/private/litconv.rkt | 10 ++--
|
|
racket/collects/syntax/parse/private/opt.rkt | 6 +--
|
|
.../collects/syntax/parse/private/parse.rkt | 18 +++----
|
|
racket/collects/syntax/parse/private/rep.rkt | 14 +++---
|
|
.../syntax/parse/private/residual.rkt | 6 +--
|
|
.../syntax/parse/private/runtime-progress.rkt | 2 +-
|
|
.../syntax/parse/private/runtime-reflect.rkt | 30 +++++++++---
|
|
.../syntax/parse/private/runtime-report.rkt | 6 +--
|
|
.../collects/syntax/parse/private/runtime.rkt | 4 +-
|
|
racket/collects/syntax/parse/private/sc.rkt | 4 +-
|
|
27 files changed, 128 insertions(+), 99 deletions(-)
|
|
create mode 100644 racket/collects/syntax/parse/experimental/private/substitute.rkt
|
|
|
|
diff --git racket/collects/racket/private/stxcase-scheme.rkt racket/collects/racket/private/stxcase-scheme.rkt
|
|
index 9f1a21abbb..46bddba4e5 100644
|
|
--- racket/collects/racket/private/stxcase-scheme.rkt
|
|
+++ racket/collects/racket/private/stxcase-scheme.rkt
|
|
@@ -4,8 +4,8 @@
|
|
;; check-duplicate-identifier, and assembles everything we have so far
|
|
|
|
(module stxcase-scheme '#%kernel
|
|
- (#%require "small-scheme.rkt" "stx.rkt" "stxcase.rkt" "with-stx.rkt" "stxloc.rkt"
|
|
- (for-syntax '#%kernel "small-scheme.rkt" "stx.rkt" "stxcase.rkt"
|
|
+ (#%require racket/private/small-scheme racket/private/stx "stxcase.rkt" "with-stx.rkt" "stxloc.rkt"
|
|
+ (for-syntax '#%kernel racket/private/small-scheme racket/private/stx "stxcase.rkt"
|
|
"stxloc.rkt"))
|
|
|
|
(-define (check-duplicate-identifier names)
|
|
@@ -68,7 +68,8 @@
|
|
(syntax-arm stx #f #t)
|
|
(raise-argument-error 'syntax-protect "syntax?" stx)))
|
|
|
|
- (#%provide syntax datum (all-from "with-stx.rkt") (all-from "stxloc.rkt")
|
|
+ (#%provide syntax datum (all-from "with-stx.rkt")
|
|
+ (all-from "stxloc.rkt")
|
|
check-duplicate-identifier syntax-protect
|
|
syntax-rules syntax-id-rules
|
|
(for-syntax syntax-pattern-variable?)))
|
|
diff --git racket/collects/racket/private/stxcase.rkt racket/collects/racket/private/stxcase.rkt
|
|
index 69832a27a1..ca8f8f631b 100644
|
|
--- racket/collects/racket/private/stxcase.rkt
|
|
+++ racket/collects/racket/private/stxcase.rkt
|
|
@@ -2,10 +2,10 @@
|
|
;; syntax-case and syntax
|
|
|
|
(module stxcase '#%kernel
|
|
- (#%require "stx.rkt" "small-scheme.rkt" '#%paramz '#%unsafe
|
|
- "ellipses.rkt"
|
|
- (for-syntax "stx.rkt" "small-scheme.rkt"
|
|
- "gen-temp.rkt" "member.rkt" "sc.rkt" '#%kernel))
|
|
+ (#%require racket/private/stx racket/private/small-scheme '#%paramz '#%unsafe
|
|
+ racket/private/ellipses
|
|
+ (for-syntax racket/private/stx racket/private/small-scheme
|
|
+ racket/private/gen-temp racket/private/member racket/private/sc '#%kernel))
|
|
|
|
(-define interp-match
|
|
(lambda (pat e literals immediate=?)
|
|
@@ -379,6 +379,6 @@
|
|
m))))])))
|
|
x)))))))
|
|
|
|
- (#%require "template.rkt")
|
|
- (#%provide (all-from "ellipses.rkt") syntax-case** syntax syntax/loc datum
|
|
+ (#%require racket/private/template)
|
|
+ (#%provide (all-from racket/private/ellipses) syntax-case** syntax syntax/loc datum
|
|
(for-syntax syntax-pattern-variable?)))
|
|
diff --git racket/collects/racket/private/stxloc.rkt racket/collects/racket/private/stxloc.rkt
|
|
index c9e0d54324..e26417c7bc 100644
|
|
--- racket/collects/racket/private/stxloc.rkt
|
|
+++ racket/collects/racket/private/stxloc.rkt
|
|
@@ -3,8 +3,8 @@
|
|
;; syntax/loc
|
|
|
|
(module stxloc '#%kernel
|
|
- (#%require "qq-and-or.rkt" "stxcase.rkt" "define-et-al.rkt"
|
|
- (for-syntax '#%kernel "stxcase.rkt" "sc.rkt"))
|
|
+ (#%require racket/private/qq-and-or "stxcase.rkt" racket/private/define-et-al
|
|
+ (for-syntax '#%kernel "stxcase.rkt" racket/private/sc))
|
|
|
|
(begin-for-syntax
|
|
(define-values (transform-to-syntax-case**)
|
|
diff --git racket/collects/racket/private/template.rkt racket/collects/racket/private/template.rkt
|
|
index 9037109f38..06dfba3033 100644
|
|
--- racket/collects/racket/private/template.rkt
|
|
+++ racket/collects/racket/private/template.rkt
|
|
@@ -1,25 +1,25 @@
|
|
(module template '#%kernel
|
|
-(#%require "stx.rkt" "small-scheme.rkt" "performance-hint.rkt"
|
|
- (rename "small-scheme.rkt" define -define)
|
|
- (rename "small-scheme.rkt" define-syntax -define-syntax)
|
|
- "ellipses.rkt"
|
|
- (for-syntax "stx.rkt" "small-scheme.rkt"
|
|
- (rename "small-scheme.rkt" define -define)
|
|
- (rename "small-scheme.rkt" define-syntax -define-syntax)
|
|
- "member.rkt" "sc.rkt" '#%kernel))
|
|
+(#%require racket/private/stx racket/private/small-scheme racket/private/performance-hint
|
|
+ (rename racket/private/small-scheme define -define)
|
|
+ (rename racket/private/small-scheme define-syntax -define-syntax)
|
|
+ racket/private/ellipses
|
|
+ (for-syntax racket/private/stx racket/private/small-scheme
|
|
+ (rename racket/private/small-scheme define -define)
|
|
+ (rename racket/private/small-scheme define-syntax -define-syntax)
|
|
+ racket/private/member racket/private/sc '#%kernel))
|
|
(#%provide syntax
|
|
syntax/loc
|
|
datum
|
|
~? ~@
|
|
~@! signal-absent-pvar
|
|
- (protect
|
|
- (for-syntax attribute-mapping
|
|
- attribute-mapping?
|
|
- attribute-mapping-name
|
|
- attribute-mapping-var
|
|
- attribute-mapping-depth
|
|
- attribute-mapping-check
|
|
- metafunction metafunction?)))
|
|
+ (for-syntax attribute-mapping
|
|
+ attribute-mapping?
|
|
+ attribute-mapping-name
|
|
+ attribute-mapping-var
|
|
+ attribute-mapping-depth
|
|
+ attribute-mapping-check
|
|
+ (protect metafunction
|
|
+ metafunction?)))
|
|
|
|
;; ============================================================
|
|
;; Syntax of templates
|
|
@@ -87,7 +87,14 @@
|
|
;; (struct attribute-mapping (var name depth check) ...)
|
|
;; check : #f (trusted) or Id, ref to Checker
|
|
;; Checker = ( Any d:Nat b:Boolean Syntax/#f -> (Listof^d (if b Syntax Any)) )
|
|
- (define-values (struct:attribute-mapping attribute-mapping attribute-mapping?
|
|
+ (#%require (for-template (only racket/private/template
|
|
+ attribute-mapping
|
|
+ attribute-mapping?
|
|
+ attribute-mapping-var
|
|
+ attribute-mapping-name
|
|
+ attribute-mapping-depth
|
|
+ attribute-mapping-check)))
|
|
+ #;(define-values (struct:attribute-mapping attribute-mapping attribute-mapping?
|
|
attribute-mapping-ref _attribute-mapping-set!)
|
|
(make-struct-type 'attribute-mapping #f 4 0 #f null (current-inspector)
|
|
(lambda (self stx)
|
|
@@ -106,10 +113,10 @@
|
|
(quote-syntax ,source-name)))
|
|
(datum->syntax here-stx code stx))
|
|
(attribute-mapping-var self)))))
|
|
- (define (attribute-mapping-var a) (attribute-mapping-ref a 0))
|
|
- (define (attribute-mapping-name a) (attribute-mapping-ref a 1))
|
|
- (define (attribute-mapping-depth a) (attribute-mapping-ref a 2))
|
|
- (define (attribute-mapping-check a) (attribute-mapping-ref a 3))
|
|
+ #;(define (attribute-mapping-var a) (attribute-mapping-ref a 0))
|
|
+ #;(define (attribute-mapping-name a) (attribute-mapping-ref a 1))
|
|
+ #;(define (attribute-mapping-depth a) (attribute-mapping-ref a 2))
|
|
+ #;(define (attribute-mapping-check a) (attribute-mapping-ref a 3))
|
|
|
|
;; (struct metafunction (var))
|
|
(define-values (struct:metafunction metafunction metafunction? metafunction-ref _mf-set!)
|
|
diff --git racket/collects/racket/private/with-stx.rkt racket/collects/racket/private/with-stx.rkt
|
|
index b10fc4ec7c..1e22edcd99 100644
|
|
--- racket/collects/racket/private/with-stx.rkt
|
|
+++ racket/collects/racket/private/with-stx.rkt
|
|
@@ -2,9 +2,9 @@
|
|
;; with-syntax, generate-temporaries
|
|
|
|
(module with-stx '#%kernel
|
|
- (#%require "stx.rkt" "small-scheme.rkt" "stxcase.rkt"
|
|
- (for-syntax '#%kernel "stx.rkt" "stxcase.rkt" "stxloc.rkt"
|
|
- "gen-temp.rkt" "sc.rkt" "qq-and-or.rkt" "cond.rkt"))
|
|
+ (#%require racket/private/stx racket/private/small-scheme "stxcase.rkt"
|
|
+ (for-syntax '#%kernel racket/private/stx "stxcase.rkt" "stxloc.rkt"
|
|
+ racket/private/gen-temp racket/private/sc racket/private/qq-and-or racket/private/cond))
|
|
|
|
(-define (with-syntax-fail stx)
|
|
(raise-syntax-error
|
|
diff --git racket/collects/racket/syntax.rkt racket/collects/racket/syntax.rkt
|
|
index ce0a72d1fc..428c195971 100644
|
|
--- racket/collects/racket/syntax.rkt
|
|
+++ racket/collects/racket/syntax.rkt
|
|
@@ -1,5 +1,6 @@
|
|
#lang racket/base
|
|
-(require (for-syntax racket/base
|
|
+(require (only-in "stxloc.rkt" syntax-case)
|
|
+ (for-syntax racket/base
|
|
racket/private/sc))
|
|
(provide define/with-syntax
|
|
|
|
diff --git racket/collects/syntax/parse.rkt racket/collects/syntax/parse.rkt
|
|
index 6e81621a07..643de4ddda 100644
|
|
--- racket/collects/syntax/parse.rkt
|
|
+++ racket/collects/syntax/parse.rkt
|
|
@@ -24,7 +24,8 @@
|
|
[syntax-local-syntax-parse-pattern-introduce
|
|
(-> syntax? syntax?)]))
|
|
|
|
- (define pattern-expander
|
|
+ (require (only-in (for-template syntax/parse) pattern-expander))
|
|
+ #;(define pattern-expander
|
|
(let ()
|
|
(struct pattern-expander (proc) #:transparent
|
|
#:omit-define-syntaxes
|
|
diff --git racket/collects/syntax/parse/debug.rkt racket/collects/syntax/parse/debug.rkt
|
|
index a092ab6263..c62849b212 100644
|
|
--- racket/collects/syntax/parse/debug.rkt
|
|
+++ racket/collects/syntax/parse/debug.rkt
|
|
@@ -2,20 +2,20 @@
|
|
(require (for-syntax racket/base
|
|
syntax/stx
|
|
racket/syntax
|
|
- "private/rep-data.rkt"
|
|
+ syntax/parse/private/rep-data
|
|
"private/rep.rkt"
|
|
- "private/kws.rkt")
|
|
+ syntax/parse/private/kws)
|
|
racket/list
|
|
racket/pretty
|
|
"../parse.rkt"
|
|
- (except-in syntax/parse/private/residual
|
|
+ (except-in stxparse-info/parse/private/residual
|
|
prop:syntax-class
|
|
prop:pattern-expander
|
|
syntax-local-syntax-parse-pattern-introduce)
|
|
"private/runtime.rkt"
|
|
"private/runtime-progress.rkt"
|
|
"private/runtime-report.rkt"
|
|
- "private/kws.rkt")
|
|
+ syntax/parse/private/kws)
|
|
|
|
;; No lazy loading for this module's dependencies.
|
|
|
|
diff --git racket/collects/syntax/parse/define.rkt racket/collects/syntax/parse/define.rkt
|
|
index 80af669b22..6392c75adb 100644
|
|
--- racket/collects/syntax/parse/define.rkt
|
|
+++ racket/collects/syntax/parse/define.rkt
|
|
@@ -1,10 +1,10 @@
|
|
#lang racket/base
|
|
(require (for-syntax racket/base
|
|
- syntax/parse
|
|
+ stxparse-info/parse
|
|
"private/sc.rkt"))
|
|
(provide define-simple-macro
|
|
define-syntax-parser
|
|
- (for-syntax (all-from-out syntax/parse)))
|
|
+ (for-syntax (all-from-out stxparse-info/parse)))
|
|
|
|
(define-syntax (define-simple-macro stx)
|
|
(syntax-parse stx
|
|
diff --git racket/collects/syntax/parse/experimental/contract.rkt racket/collects/syntax/parse/experimental/contract.rkt
|
|
index 022e590958..b0f932b3ff 100644
|
|
--- racket/collects/syntax/parse/experimental/contract.rkt
|
|
+++ racket/collects/syntax/parse/experimental/contract.rkt
|
|
@@ -1,8 +1,8 @@
|
|
#lang racket/base
|
|
-(require syntax/parse/pre
|
|
+(require stxparse-info/parse/pre
|
|
"provide.rkt"
|
|
syntax/contract
|
|
- (only-in syntax/parse/private/residual ;; keep abs. path
|
|
+ (only-in stxparse-info/parse/private/residual ;; keep abs. path
|
|
this-context-syntax
|
|
this-role)
|
|
racket/contract/base)
|
|
diff --git racket/collects/syntax/parse/experimental/eh.rkt racket/collects/syntax/parse/experimental/eh.rkt
|
|
index 305080721f..f8e1b09302 100644
|
|
--- racket/collects/syntax/parse/experimental/eh.rkt
|
|
+++ racket/collects/syntax/parse/experimental/eh.rkt
|
|
@@ -1,5 +1,5 @@
|
|
#lang racket/base
|
|
(require "../private/sc.rkt"
|
|
- "../private/keywords.rkt")
|
|
+ syntax/parse/private/keywords)
|
|
(provide ~eh-var
|
|
define-eh-alternative-set)
|
|
diff --git racket/collects/syntax/parse/experimental/private/substitute.rkt racket/collects/syntax/parse/experimental/private/substitute.rkt
|
|
new file mode 100644
|
|
index 0000000000..7bc35af1c4
|
|
--- /dev/null
|
|
+++ racket/collects/syntax/parse/experimental/private/substitute.rkt
|
|
@@ -0,0 +1 @@
|
|
+#lang racket/base
|
|
diff --git racket/collects/syntax/parse/experimental/provide.rkt racket/collects/syntax/parse/experimental/provide.rkt
|
|
index 86a3b6fd88..173d81e428 100644
|
|
--- racket/collects/syntax/parse/experimental/provide.rkt
|
|
+++ racket/collects/syntax/parse/experimental/provide.rkt
|
|
@@ -4,10 +4,10 @@
|
|
syntax/location
|
|
(for-syntax racket/base
|
|
racket/syntax
|
|
- "../private/minimatch.rkt"
|
|
- syntax/parse/pre
|
|
+ syntax/parse/private/minimatch
|
|
+ stxparse-info/parse/pre
|
|
syntax/parse/private/residual-ct ;; keep abs. path
|
|
- "../private/kws.rkt"
|
|
+ syntax/parse/private/kws
|
|
syntax/contract))
|
|
(provide provide-syntax-class/contract
|
|
syntax-class/c
|
|
diff --git racket/collects/syntax/parse/experimental/reflect.rkt racket/collects/syntax/parse/experimental/reflect.rkt
|
|
index 7e4daa3e5a..8f18781e9a 100644
|
|
--- racket/collects/syntax/parse/experimental/reflect.rkt
|
|
+++ racket/collects/syntax/parse/experimental/reflect.rkt
|
|
@@ -5,10 +5,10 @@
|
|
syntax/parse/private/residual-ct) ;; keep abs.path
|
|
racket/contract/base
|
|
racket/contract/combinator
|
|
- "../private/minimatch.rkt"
|
|
- "../private/keywords.rkt"
|
|
+ syntax/parse/private/minimatch
|
|
+ syntax/parse/private/keywords
|
|
"../private/runtime-reflect.rkt"
|
|
- "../private/kws.rkt")
|
|
+ syntax/parse/private/kws)
|
|
(begin-for-syntax
|
|
(lazy-require
|
|
[syntax/parse/private/rep-data ;; keep abs. path
|
|
diff --git racket/collects/syntax/parse/experimental/specialize.rkt racket/collects/syntax/parse/experimental/specialize.rkt
|
|
index e32b077825..ad569c1cb0 100644
|
|
--- racket/collects/syntax/parse/experimental/specialize.rkt
|
|
+++ racket/collects/syntax/parse/experimental/specialize.rkt
|
|
@@ -1,8 +1,8 @@
|
|
#lang racket/base
|
|
(require (for-syntax racket/base
|
|
racket/syntax
|
|
- "../private/kws.rkt"
|
|
- "../private/rep-data.rkt"
|
|
+ syntax/parse/private/kws
|
|
+ syntax/parse/private/rep-data
|
|
"../private/rep.rkt")
|
|
"../private/runtime.rkt")
|
|
(provide define-syntax-class/specialize)
|
|
diff --git racket/collects/syntax/parse/experimental/splicing.rkt racket/collects/syntax/parse/experimental/splicing.rkt
|
|
index 510b2a7361..56abbd5cd2 100644
|
|
--- racket/collects/syntax/parse/experimental/splicing.rkt
|
|
+++ racket/collects/syntax/parse/experimental/splicing.rkt
|
|
@@ -1,9 +1,9 @@
|
|
#lang racket/base
|
|
(require (for-syntax racket/base
|
|
- syntax/parse
|
|
+ stxparse-info/parse
|
|
racket/lazy-require
|
|
- "../private/kws.rkt")
|
|
- syntax/parse/private/residual) ;; keep abs. path
|
|
+ syntax/parse/private/kws)
|
|
+ stxparse-info/parse/private/residual) ;; keep abs. path
|
|
(provide define-primitive-splicing-syntax-class)
|
|
|
|
(begin-for-syntax
|
|
diff --git racket/collects/syntax/parse/private/lib.rkt racket/collects/syntax/parse/private/lib.rkt
|
|
index 5eaa74c946..01e110c45b 100644
|
|
--- racket/collects/syntax/parse/private/lib.rkt
|
|
+++ racket/collects/syntax/parse/private/lib.rkt
|
|
@@ -1,6 +1,6 @@
|
|
#lang racket/base
|
|
(require "sc.rkt"
|
|
- "keywords.rkt"
|
|
+ syntax/parse/private/keywords
|
|
(only-in "residual.rkt" state-cons!)
|
|
(for-syntax syntax/parse/private/residual-ct)
|
|
(for-syntax racket/base))
|
|
diff --git racket/collects/syntax/parse/private/litconv.rkt racket/collects/syntax/parse/private/litconv.rkt
|
|
index 772930c301..9e25611d96 100644
|
|
--- racket/collects/syntax/parse/private/litconv.rkt
|
|
+++ racket/collects/syntax/parse/private/litconv.rkt
|
|
@@ -3,14 +3,14 @@
|
|
racket/lazy-require
|
|
"sc.rkt"
|
|
"lib.rkt"
|
|
- "kws.rkt"
|
|
+ syntax/parse/private/kws
|
|
racket/syntax)
|
|
syntax/parse/private/residual-ct ;; keep abs. path
|
|
- syntax/parse/private/residual) ;; keep abs. path
|
|
+ stxparse-info/parse/private/residual) ;; keep abs. path
|
|
(begin-for-syntax
|
|
(lazy-require
|
|
[syntax/private/keyword (options-select-value parse-keyword-options)]
|
|
- [syntax/parse/private/rep ;; keep abs. path
|
|
+ [stxparse-info/parse/private/rep ;; keep abs. path
|
|
(parse-kw-formals
|
|
check-conventions-rules
|
|
check-datum-literals-list
|
|
@@ -18,7 +18,7 @@
|
|
;; FIXME: workaround for phase>0 bug in racket/runtime-path (and thus lazy-require)
|
|
;; Without this, dependencies don't get collected.
|
|
(require racket/runtime-path racket/syntax (for-meta 2 '#%kernel))
|
|
-(define-runtime-module-path-index _unused_ 'syntax/parse/private/rep)
|
|
+(define-runtime-module-path-index _unused_ 'stxparse-info/parse/private/rep)
|
|
|
|
(provide define-conventions
|
|
define-literal-set
|
|
@@ -215,7 +215,7 @@ change between when define-literal-set is compiled and the comparison
|
|
involving L. For example:
|
|
|
|
(module M racket
|
|
- (require syntax/parse)
|
|
+ (require stxparse-info/parse)
|
|
(define-literal-set LS (lambda))
|
|
(require (only-in some-other-lang lambda))
|
|
.... LS ....)
|
|
diff --git racket/collects/syntax/parse/private/opt.rkt racket/collects/syntax/parse/private/opt.rkt
|
|
index 0e7af8e5a8..12714d6be1 100644
|
|
--- racket/collects/syntax/parse/private/opt.rkt
|
|
+++ racket/collects/syntax/parse/private/opt.rkt
|
|
@@ -2,9 +2,9 @@
|
|
(require racket/syntax
|
|
racket/pretty
|
|
syntax/parse/private/residual-ct ;; keep abs. path
|
|
- "minimatch.rkt"
|
|
- "rep-patterns.rkt"
|
|
- "kws.rkt")
|
|
+ syntax/parse/private/minimatch
|
|
+ syntax/parse/private/rep-patterns
|
|
+ syntax/parse/private/kws)
|
|
(provide (struct-out pk1)
|
|
(rename-out [optimize-matrix0 optimize-matrix]))
|
|
|
|
diff --git racket/collects/syntax/parse/private/parse.rkt racket/collects/syntax/parse/private/parse.rkt
|
|
index 609d0a48b4..e14cc3aea9 100644
|
|
--- racket/collects/syntax/parse/private/parse.rkt
|
|
+++ racket/collects/syntax/parse/private/parse.rkt
|
|
@@ -4,22 +4,22 @@
|
|
syntax/private/id-table
|
|
syntax/keyword
|
|
racket/syntax
|
|
- "minimatch.rkt"
|
|
- "datum-to-expr.rkt"
|
|
- "rep-attrs.rkt"
|
|
- "rep-data.rkt"
|
|
- "rep-patterns.rkt"
|
|
+ syntax/parse/private/minimatch
|
|
+ syntax/parse/private/datum-to-expr
|
|
+ syntax/parse/private/rep-attrs
|
|
+ syntax/parse/private/rep-data
|
|
+ syntax/parse/private/rep-patterns
|
|
"rep.rkt"
|
|
- "kws.rkt"
|
|
+ syntax/parse/private/kws
|
|
"opt.rkt"
|
|
"txlift.rkt")
|
|
- "keywords.rkt"
|
|
+ syntax/parse/private/keywords
|
|
racket/syntax
|
|
racket/stxparam
|
|
syntax/stx
|
|
- syntax/parse/private/residual ;; keep abs. path
|
|
+ stxparse-info/parse/private/residual ;; keep abs. path
|
|
"runtime.rkt"
|
|
- syntax/parse/private/runtime-reflect) ;; keep abs. path
|
|
+ stxparse-info/parse/private/runtime-reflect) ;; keep abs. path
|
|
|
|
;; ============================================================
|
|
|
|
diff --git racket/collects/syntax/parse/private/rep.rkt racket/collects/syntax/parse/private/rep.rkt
|
|
index 1264a0398f..be08bc36c1 100644
|
|
--- racket/collects/syntax/parse/private/rep.rkt
|
|
+++ racket/collects/syntax/parse/private/rep.rkt
|
|
@@ -1,12 +1,12 @@
|
|
#lang racket/base
|
|
(require (for-template racket/base
|
|
syntax/parse/private/keywords
|
|
- syntax/parse/private/residual ;; keep abs. path
|
|
- syntax/parse/private/runtime)
|
|
+ stxparse-info/parse/private/residual ;; keep abs. path
|
|
+ stxparse-info/parse/private/runtime)
|
|
racket/list
|
|
racket/contract/base
|
|
"make.rkt"
|
|
- "minimatch.rkt"
|
|
+ syntax/parse/private/minimatch
|
|
syntax/apply-transformer
|
|
syntax/private/id-table
|
|
syntax/stx
|
|
@@ -14,11 +14,11 @@
|
|
racket/syntax
|
|
racket/struct
|
|
"txlift.rkt"
|
|
- "rep-attrs.rkt"
|
|
- "rep-data.rkt"
|
|
- "rep-patterns.rkt"
|
|
+ syntax/parse/private/rep-attrs
|
|
+ syntax/parse/private/rep-data
|
|
+ syntax/parse/private/rep-patterns
|
|
syntax/parse/private/residual-ct ;; keep abs. path
|
|
- "kws.rkt")
|
|
+ syntax/parse/private/kws)
|
|
|
|
;; Error reporting
|
|
;; All entry points should have explicit, mandatory #:context arg
|
|
diff --git racket/collects/syntax/parse/private/residual.rkt racket/collects/syntax/parse/private/residual.rkt
|
|
index 3f9416c950..528885697b 100644
|
|
--- racket/collects/syntax/parse/private/residual.rkt
|
|
+++ racket/collects/syntax/parse/private/residual.rkt
|
|
@@ -7,10 +7,10 @@
|
|
;; ============================================================
|
|
;; Compile-time
|
|
|
|
-(require (for-syntax racket/private/sc "residual-ct.rkt"))
|
|
-(provide (for-syntax (all-from-out "residual-ct.rkt")))
|
|
+(require (for-syntax racket/private/sc syntax/parse/private/residual-ct))
|
|
+(provide (for-syntax (all-from-out syntax/parse/private/residual-ct)))
|
|
|
|
-(require racket/private/template)
|
|
+(require "../../case/template.rkt")
|
|
(provide (for-syntax attribute-mapping attribute-mapping?))
|
|
|
|
;; ============================================================
|
|
diff --git racket/collects/syntax/parse/private/runtime-progress.rkt racket/collects/syntax/parse/private/runtime-progress.rkt
|
|
index 4065357c76..ad894d2c70 100644
|
|
--- racket/collects/syntax/parse/private/runtime-progress.rkt
|
|
+++ racket/collects/syntax/parse/private/runtime-progress.rkt
|
|
@@ -1,6 +1,6 @@
|
|
#lang racket/base
|
|
(require racket/list
|
|
- "minimatch.rkt")
|
|
+ syntax/parse/private/minimatch)
|
|
(provide ps-empty
|
|
ps-add-car
|
|
ps-add-cdr
|
|
diff --git racket/collects/syntax/parse/private/runtime-reflect.rkt racket/collects/syntax/parse/private/runtime-reflect.rkt
|
|
index e3bc47a4c5..59125cf0ac 100644
|
|
--- racket/collects/syntax/parse/private/runtime-reflect.rkt
|
|
+++ racket/collects/syntax/parse/private/runtime-reflect.rkt
|
|
@@ -1,7 +1,7 @@
|
|
#lang racket/base
|
|
(require "residual.rkt"
|
|
- (only-in "residual-ct.rkt" attr-name attr-depth)
|
|
- "kws.rkt")
|
|
+ (only-in syntax/parse/private/residual-ct attr-name attr-depth)
|
|
+ syntax/parse/private/kws)
|
|
(provide reflect-parser
|
|
(struct-out reified)
|
|
(struct-out reified-syntax-class)
|
|
@@ -11,10 +11,28 @@
|
|
A Reified is
|
|
(reified symbol ParserFunction nat (listof (list symbol nat)))
|
|
|#
|
|
-(define-struct reified-base (name) #:transparent)
|
|
-(define-struct (reified reified-base) (parser arity signature))
|
|
-(define-struct (reified-syntax-class reified) ())
|
|
-(define-struct (reified-splicing-syntax-class reified) ())
|
|
+(require (only-in syntax/parse/private/runtime-reflect
|
|
+ reified
|
|
+ reified?
|
|
+ reified-parser
|
|
+ reified-arity
|
|
+ reified-signature
|
|
+ make-reified
|
|
+ struct:reified
|
|
+
|
|
+ reified-syntax-class
|
|
+ reified-syntax-class?
|
|
+ make-reified-syntax-class
|
|
+ struct:reified-syntax-class
|
|
+
|
|
+ reified-splicing-syntax-class
|
|
+ reified-splicing-syntax-class?
|
|
+ make-reified-splicing-syntax-class
|
|
+ struct:reified-splicing-syntax-class))
|
|
+#;(define-struct reified-base (name) #:transparent)
|
|
+#;(define-struct (reified reified-base) (parser arity signature))
|
|
+#;(define-struct (reified-syntax-class reified) ())
|
|
+#;(define-struct (reified-splicing-syntax-class reified) ())
|
|
|
|
(define (reflect-parser obj e-arity e-attrs splicing?)
|
|
;; e-arity represents single call; min and max are same
|
|
diff --git racket/collects/syntax/parse/private/runtime-report.rkt racket/collects/syntax/parse/private/runtime-report.rkt
|
|
index 59733c4cd2..a1d09e11ad 100644
|
|
--- racket/collects/syntax/parse/private/runtime-report.rkt
|
|
+++ racket/collects/syntax/parse/private/runtime-report.rkt
|
|
@@ -4,9 +4,9 @@
|
|
syntax/stx
|
|
racket/struct
|
|
syntax/srcloc
|
|
- "minimatch.rkt"
|
|
- syntax/parse/private/residual
|
|
- "kws.rkt")
|
|
+ syntax/parse/private/minimatch
|
|
+ stxparse-info/parse/private/residual
|
|
+ syntax/parse/private/kws)
|
|
(provide call-current-failure-handler
|
|
current-failure-handler
|
|
invert-failure
|
|
diff --git racket/collects/syntax/parse/private/runtime.rkt racket/collects/syntax/parse/private/runtime.rkt
|
|
index d100d2c564..41b321499e 100644
|
|
--- racket/collects/syntax/parse/private/runtime.rkt
|
|
+++ racket/collects/syntax/parse/private/runtime.rkt
|
|
@@ -1,13 +1,13 @@
|
|
#lang racket/base
|
|
(require racket/stxparam
|
|
- syntax/parse/private/residual ;; keep abs. path
|
|
+ stxparse-info/parse/private/residual ;; keep abs. path
|
|
(for-syntax racket/base
|
|
racket/list
|
|
syntax/kerncase
|
|
syntax/strip-context
|
|
racket/private/sc
|
|
racket/syntax
|
|
- "rep-data.rkt"))
|
|
+ syntax/parse/private/rep-data))
|
|
|
|
(provide with
|
|
fail-handler
|
|
diff --git racket/collects/syntax/parse/private/sc.rkt racket/collects/syntax/parse/private/sc.rkt
|
|
index 27b069059d..d4e5ff695a 100644
|
|
--- racket/collects/syntax/parse/private/sc.rkt
|
|
+++ racket/collects/syntax/parse/private/sc.rkt
|
|
@@ -1,6 +1,6 @@
|
|
#lang racket/base
|
|
(require racket/lazy-require
|
|
- "keywords.rkt"
|
|
+ syntax/parse/private/keywords
|
|
"residual.rkt")
|
|
|
|
(lazy-require-syntax
|
|
@@ -21,7 +21,7 @@
|
|
syntax-parser
|
|
define/syntax-parse
|
|
|
|
- (except-out (all-from-out "keywords.rkt")
|
|
+ (except-out (all-from-out syntax/parse/private/keywords)
|
|
~reflect
|
|
~splicing-reflect
|
|
~eh-var)
|
|
--
|
|
2.30.0
|
|
|