mirror of
https://github.com/false-schemers/skint.git
synced 2024-12-24 21:58:52 +01:00
expander fixes, -l/--load cl option
This commit is contained in:
parent
04c59f51f2
commit
36c26cea58
5 changed files with 144 additions and 108 deletions
|
@ -3076,4 +3076,12 @@
|
|||
(test (write-data write-simple '(#() #(a) #(19 21 c)))
|
||||
'("#()" "#(a)" "#(19 21 c)"))
|
||||
|
||||
;; Skint extras
|
||||
|
||||
; _ and ... as literals:
|
||||
(define-syntax test-specials (syntax-rules (_ ...) ((_ _ ...) '(_ ...)) ((_ x y) (vector x y))))
|
||||
(test (list (test-specials _ ...) (test-specials 1 2))
|
||||
'((_ ...) #(1 2)))
|
||||
|
||||
|
||||
(test-end)
|
||||
|
|
|
@ -180,6 +180,7 @@
|
|||
[(_ ,@x d) (cons 'unquote-splicing (quasiquote (x) . d))]
|
||||
[(_ (x . y) . d) (cons (quasiquote x . d) (quasiquote y . d))]
|
||||
[(_ #(x ...) . d) (list->vector (quasiquote (x ...) . d))]
|
||||
[(_ #&x . d) (box (quasiquote x . d))]
|
||||
[(_ x . d) 'x]))
|
||||
|
||||
(define-syntax when ; + body support
|
||||
|
|
31
pre/t.scm
31
pre/t.scm
|
@ -378,7 +378,7 @@
|
|||
(let ([p1 (env1 id1 'peek)] [p2 (env2 id2 'peek)])
|
||||
(and p1 p2 ; both envs should be supported by name registries
|
||||
(if (and (name-registry? p1) (name-registry? p2))
|
||||
(and (eq? p1 p2) (eq? id1 id2)) ; would end w/same loc if alloced
|
||||
(and (eq? p1 p2) (eq? (id->sym id1) (id->sym id2))) ; would end w/same loc if alloced
|
||||
(eq? p1 p2))))) ; nrs and locs are distinct, so this means "same loc"
|
||||
|
||||
; xpand receives Scheme s-expressions and returns either Core Scheme <core> form
|
||||
|
@ -429,6 +429,19 @@
|
|||
[(not (val-core? hval)) (x-error "improper use of syntax form" hval)]
|
||||
[else (xpand-call hval tail env)])]))]))
|
||||
|
||||
; prexpand check if sexp expands to a transformer or a definition primitive (a symbol)
|
||||
|
||||
(define (prexpand sexp env) ; also may return any core, it won't be used
|
||||
(cond [(id? sexp) (xpand-ref sexp env)]
|
||||
[(not (pair? sexp)) '#f] ; any core
|
||||
[else ; note: these transformations are made in 'expression' context
|
||||
(let* ([head (car sexp)] [tail (cdr sexp)] [hval (prexpand head env)])
|
||||
(case hval
|
||||
[(syntax-lambda) (xpand-syntax-lambda tail env #t)]
|
||||
[(syntax-rules) (xpand-syntax-rules tail env)]
|
||||
[else (cond [(val-transformer? hval) (prexpand (hval sexp env) env)]
|
||||
[else '#f])]))]))
|
||||
|
||||
(define (xpand-quote tail env)
|
||||
(if (list1? tail)
|
||||
(list 'quote (xpand-sexp->datum (car tail)))
|
||||
|
@ -557,7 +570,7 @@
|
|||
(let loop ([env env] [ids '()] [inits '()] [nids '()] [body tail])
|
||||
(if (and (pair? body) (pair? (car body)))
|
||||
(let ([first (car body)] [rest (cdr body)])
|
||||
(let* ([head (car first)] [tail (cdr first)] [hval (xpand #t head env)])
|
||||
(let* ([head (car first)] [tail (cdr first)] [hval (prexpand head env)])
|
||||
(case hval
|
||||
[(begin) ; internal
|
||||
(if (list? tail)
|
||||
|
@ -781,20 +794,22 @@
|
|||
; nb: 'real' ... is a builtin, at this time possibly registered in rnr
|
||||
(define ellipsis-den ; we may need to be first to alloc ... binding!
|
||||
(name-lookup *root-name-registry* '... (lambda (n) '...)))
|
||||
; now we need just peek x in maro env to compare with the above
|
||||
; now we need just peek x in macro env to compare with the above
|
||||
(define (ellipsis? x)
|
||||
(and (id? x) (not (pat-literal? x))
|
||||
(if ellipsis (eq? x ellipsis) ; custom one is given
|
||||
(and (id? x) (eq? (mac-env x 'peek) ellipsis-den))))
|
||||
(and (id? x) (eq? (mac-env x 'peek) ellipsis-den)))))
|
||||
|
||||
; ditto for underscore
|
||||
(define underscore-den ; we may need to be first to alloc _ binding!
|
||||
(name-lookup *root-name-registry* '_ (lambda (n) '_)))
|
||||
(define (underscore? x)
|
||||
(and (id? x) (eq? (mac-env x 'peek) underscore-den)))
|
||||
(and (id? x) (not (pat-literal? x))
|
||||
(eq? (mac-env x 'peek) underscore-den)))
|
||||
|
||||
; slow version of the above for escape keywords
|
||||
(define (id-escape=? x s)
|
||||
(and (id? x)
|
||||
(and (id? x) (not (pat-literal? x))
|
||||
(eq? (mac-env x 'peek)
|
||||
(name-lookup *root-name-registry* s (lambda (n) (list 'ref s))))))
|
||||
|
||||
|
@ -2688,6 +2703,7 @@
|
|||
[prepend-libdir "-I" "--prepend-libdir" "DIR" "Prepend a library search directory"]
|
||||
[define-feature "-D" "--define-feature" "NAME" "Add name to the list of features"]
|
||||
[eval "-e" "--eval" "SEXP" "Evaluate and print an expression"]
|
||||
[load "-l" "--load" "FILE" "Load file and continue processing"]
|
||||
[script "-s" "--script" "FILE" "Run file as a Scheme script"]
|
||||
[program "-p" "--program" "FILE" "Run file as a Scheme program"]
|
||||
;[benchmark #f "--benchmark" "FILE" "Run .sf benchmark file (internal)"]
|
||||
|
@ -2695,7 +2711,7 @@
|
|||
[help "-h" "--help" #f "Display this help"]
|
||||
))
|
||||
|
||||
(define *skint-version* "0.4.9")
|
||||
(define *skint-version* "0.5.0")
|
||||
|
||||
(define (implementation-version) *skint-version*)
|
||||
(define (implementation-name) "SKINT")
|
||||
|
@ -2730,6 +2746,7 @@
|
|||
[(append-libdir *) (append-library-path! optarg) (loop restargs #t)]
|
||||
[(prepend-libdir *) (prepend-library-path! optarg) (loop restargs #t)]
|
||||
[(define-feature *) (add-feature! optarg) (loop restargs #t)]
|
||||
[(load *) (load optarg) (loop restargs #t)]
|
||||
[(eval *) (eval! optarg #t) (loop restargs #f)]
|
||||
[(script *) (set! *quiet* #t) (exit (run-script optarg restargs))]
|
||||
[(program *) (set! *quiet* #t) (exit (run-program optarg restargs))]
|
||||
|
|
7
s.c
7
s.c
|
@ -125,7 +125,7 @@ char *s_code[] = {
|
|||
";y4:step;y3:...;;y3:...;;;;;;",
|
||||
|
||||
"S", "quasiquote",
|
||||
"l10:y12:syntax-rules;l3:y7:unquote;y16:unquote-splicing;y10:quasiquote"
|
||||
"l11:y12:syntax-rules;l3:y7:unquote;y16:unquote-splicing;y10:quasiquote"
|
||||
";;l2:l2:y1:_;l2:y7:unquote;y1:x;;;y1:x;;l2:l2:y1:_;pl2:y16:unquote-spl"
|
||||
"icing;y1:x;;y1:y;;;l3:y6:append;y1:x;l2:y10:quasiquote;y1:y;;;;l2:py1:"
|
||||
"_;pl2:y10:quasiquote;y1:x;;y1:d;;;l3:y4:cons;l2:y5:quote;y10:quasiquot"
|
||||
|
@ -135,8 +135,9 @@ char *s_code[] = {
|
|||
"uote;y16:unquote-splicing;;py10:quasiquote;pl1:y1:x;;y1:d;;;;;l2:py1:_"
|
||||
";ppy1:x;y1:y;;y1:d;;;l3:y4:cons;py10:quasiquote;py1:x;y1:d;;;py10:quas"
|
||||
"iquote;py1:y;y1:d;;;;;l2:py1:_;pv2:y1:x;y3:...;;y1:d;;;l2:y12:list->ve"
|
||||
"ctor;py10:quasiquote;pl2:y1:x;y3:...;;y1:d;;;;;l2:py1:_;py1:x;y1:d;;;l"
|
||||
"2:y5:quote;y1:x;;;",
|
||||
"ctor;py10:quasiquote;pl2:y1:x;y3:...;;y1:d;;;;;l2:py1:_;pzy1:x;;y1:d;;"
|
||||
";l2:y3:box;py10:quasiquote;py1:x;y1:d;;;;;l2:py1:_;py1:x;y1:d;;;l2:y5:"
|
||||
"quote;y1:x;;;",
|
||||
|
||||
"S", "when",
|
||||
"l3:y12:syntax-rules;n;l2:py1:_;py4:test;y4:rest;;;l3:y2:if;y4:test;py4"
|
||||
|
|
203
t.c
203
t.c
|
@ -245,8 +245,8 @@ char *t_code[] = {
|
|||
|
||||
"P", "free-id=?",
|
||||
"%4${'(y4:peek),.5,.7[02},${'(y4:peek),.4,.6[02},.0?{.1?{${.2,@(y14:nam"
|
||||
"e-registry?)[01}?{${.3,@(y14:name-registry?)[01}}{f}?{.1,.1q?{.4,.3q]6"
|
||||
"}f]6}.1,.1q]6}f]6}f]6",
|
||||
"e-registry?)[01}?{${.3,@(y14:name-registry?)[01}}{f}?{.1,.1q?{${.6,@(y"
|
||||
"7:id->sym)[01},${.5,@(y7:id->sym)[01}q]6}f]6}.1,.1q]6}f]6}f]6",
|
||||
|
||||
"P", "xpand",
|
||||
"%3${.3,@(y3:id?)[01}?{${.4,.4,@(y9:xpand-ref)[02},.1?{.0]4}.0U0?{.0U7,"
|
||||
|
@ -276,6 +276,12 @@ char *t_code[] = {
|
|||
")[73}.1p~?{.1,'(s27:improper use of syntax form),@(y7:x-error)[72}.6,."
|
||||
"3,.3,@(y10:xpand-call)[73",
|
||||
|
||||
"P", "prexpand",
|
||||
"%2${.2,@(y3:id?)[01}?{.1,.1,@(y9:xpand-ref)[22}.0p~?{f]2}.0a,.1d,${.5,"
|
||||
".4,@(y8:prexpand)[02},.0,'(y13:syntax-lambda),.1v?{t,.6,.4,@(y19:xpand"
|
||||
"-syntax-lambda)[63}'(y12:syntax-rules),.1v?{.5,.3,@(y18:xpand-syntax-r"
|
||||
"ules)[62}.1K0?{.5,${.8,.8,.6[02},@(y8:prexpand)[62}f]6",
|
||||
|
||||
"P", "xpand-quote",
|
||||
"%2${.2,@(y6:list1?)[01}?{${.2a,@(y17:xpand-sexp->datum)[01},'(y5:quote"
|
||||
"),l2]2}.0,'(y5:quote)c,'(s19:improper quote form),@(y7:x-error)[22",
|
||||
|
@ -361,29 +367,29 @@ char *t_code[] = {
|
|||
"P", "xpand-body",
|
||||
"%3.0u?{'(y5:begin),l1]3}${.2,@(y6:list1?)[01}?{.1,.1a,.4,@(y5:xpand)[3"
|
||||
"3}.0L0~?{.0,'(y4:body)c,'(s18:improper body form),@(y7:x-error)[32}.0,"
|
||||
"n,n,n,.5,,#0.8,.1,&2{%5.4p?{.4ap}{f}?{.4d,.5a,.0a,.1d,${.6,.4,t,@(y5:x"
|
||||
"pand)[03},.0,'(y5:begin),.1v?{.2L0?{.5,.3L6,.(i10),.(i10),.(i10),.(i10"
|
||||
"),:0^[(i11)5}.4,'(s19:improper begin form),@(y7:x-error)[(i11)2}'(y6:d"
|
||||
"efine),.1v?{${.4,.6,@(y17:preprocess-define)[02},${.2,@(y6:list1?)[01}"
|
||||
"?{.0a,.7,.(i12),fc,.(i12),.3c,.(i12),fc,.(i12),:0^[(i13)5}.0a,.1da,${$"
|
||||
"{.5,@(y7:id->sym)[01},@(y6:gensym)[01},${.(i12),.3,.6,@(y13:add-local-"
|
||||
"var)[03},.(i10),.(i15),.3c,.(i15),.5c,.(i15),.7c,.4,:0^[(i16)5}'(y13:d"
|
||||
"efine-syntax),.1v?{${.4,.6,@(y24:preprocess-define-syntax)[02},.0a,.1d"
|
||||
"a,${.(i11),'(l1:y9:undefined;),.5,@(y17:extend-xenv-local)[03},.9,.(i1"
|
||||
"4),tc,.(i14),.4c,.(i14),.6c,.4,:0^[(i15)5}'(y14:define-library),.1v?{$"
|
||||
"{.4,@(y7:list2+?)[01}?{${.4a,@(y9:listname?)[01}}{f}?{${f,.9,.6,.8,@(y"
|
||||
"20:xpand-define-library)[04},.0da,.1dda,${.(i11),.3,.5,@(y17:extend-xe"
|
||||
"nv-local)[03},.9,.(i14),.(i14),.(i14),.4,:0^[(i15)5}.4,'(s28:improper "
|
||||
"define-library form),@(y7:x-error)[(i11)2}'(y6:import),.1v?{.2L0?{${f,"
|
||||
".9,.6,.8,@(y12:xpand-import)[04},.0da,'0,.1V4,'1,.2V4,.(i10),.1,,#0.(i"
|
||||
"10),.1,.(i14),.(i19),.(i19),.(i19),:0,.(i11),&8{%2.0u?{:0,@(y15:syntax"
|
||||
"-quote-id),l2,:5,:4,fc,:3,.3c,:2,fc,.6,:1^[35}.0ad,${.3aa,:7,@(y12:id-"
|
||||
"rename-as)[02},.3,.2,.2,&3{%2:0,.1q?{'(l2:y3:ref;y4:peek;),.2A0?{:1]2}"
|
||||
"f]2}.1,.1,:2[22},.3d,:6^[42}.!0.0^_1[(i15)2}.4,'(s20:improper import f"
|
||||
"orm),@(y7:x-error)[(i11)2}.1K0?{.5,${.9,.8,.6[02}c,.(i10),.(i10),.(i10"
|
||||
"),.(i10),:0^[(i11)5}:1,.7,.(i12),.(i12)A8,.(i12)A8,.(i12)A8,@(y12:xpan"
|
||||
"d-labels)[(i11)6}:1,.1,.6,.6A8,.6A8,.6A8,@(y12:xpand-labels)[56}.!0.0^"
|
||||
"_1[35",
|
||||
"n,n,n,.5,,#0.8,.1,&2{%5.4p?{.4ap}{f}?{.4d,.5a,.0a,.1d,${.6,.4,@(y8:pre"
|
||||
"xpand)[02},.0,'(y5:begin),.1v?{.2L0?{.5,.3L6,.(i10),.(i10),.(i10),.(i1"
|
||||
"0),:0^[(i11)5}.4,'(s19:improper begin form),@(y7:x-error)[(i11)2}'(y6:"
|
||||
"define),.1v?{${.4,.6,@(y17:preprocess-define)[02},${.2,@(y6:list1?)[01"
|
||||
"}?{.0a,.7,.(i12),fc,.(i12),.3c,.(i12),fc,.(i12),:0^[(i13)5}.0a,.1da,${"
|
||||
"${.5,@(y7:id->sym)[01},@(y6:gensym)[01},${.(i12),.3,.6,@(y13:add-local"
|
||||
"-var)[03},.(i10),.(i15),.3c,.(i15),.5c,.(i15),.7c,.4,:0^[(i16)5}'(y13:"
|
||||
"define-syntax),.1v?{${.4,.6,@(y24:preprocess-define-syntax)[02},.0a,.1"
|
||||
"da,${.(i11),'(l1:y9:undefined;),.5,@(y17:extend-xenv-local)[03},.9,.(i"
|
||||
"14),tc,.(i14),.4c,.(i14),.6c,.4,:0^[(i15)5}'(y14:define-library),.1v?{"
|
||||
"${.4,@(y7:list2+?)[01}?{${.4a,@(y9:listname?)[01}}{f}?{${f,.9,.6,.8,@("
|
||||
"y20:xpand-define-library)[04},.0da,.1dda,${.(i11),.3,.5,@(y17:extend-x"
|
||||
"env-local)[03},.9,.(i14),.(i14),.(i14),.4,:0^[(i15)5}.4,'(s28:improper"
|
||||
" define-library form),@(y7:x-error)[(i11)2}'(y6:import),.1v?{.2L0?{${f"
|
||||
",.9,.6,.8,@(y12:xpand-import)[04},.0da,'0,.1V4,'1,.2V4,.(i10),.1,,#0.("
|
||||
"i10),.1,.(i14),.(i19),.(i19),.(i19),:0,.(i11),&8{%2.0u?{:0,@(y15:synta"
|
||||
"x-quote-id),l2,:5,:4,fc,:3,.3c,:2,fc,.6,:1^[35}.0ad,${.3aa,:7,@(y12:id"
|
||||
"-rename-as)[02},.3,.2,.2,&3{%2:0,.1q?{'(l2:y3:ref;y4:peek;),.2A0?{:1]2"
|
||||
"}f]2}.1,.1,:2[22},.3d,:6^[42}.!0.0^_1[(i15)2}.4,'(s20:improper import "
|
||||
"form),@(y7:x-error)[(i11)2}.1K0?{.5,${.9,.8,.6[02}c,.(i10),.(i10),.(i1"
|
||||
"0),.(i10),:0^[(i11)5}:1,.7,.(i12),.(i12)A8,.(i12)A8,.(i12)A8,@(y12:xpa"
|
||||
"nd-labels)[(i11)6}:1,.1,.6,.6A8,.6A8,.6A8,@(y12:xpand-labels)[56}.!0.0"
|
||||
"^_1[35",
|
||||
|
||||
"P", "xpand-labels",
|
||||
"%6,#0${.5,&0{%1t,.1q]1},@(y6:andmap)[02}.!0n,n,.5,.5,.5,,#0.0,.(i12),."
|
||||
|
@ -488,57 +494,58 @@ char *t_code[] = {
|
|||
"%4,,,,,,,,,,,,#0#1#2#3#4#5#6#7#8#9#(i10)#(i11).(i14),&1{%1:0,.1A0]1}.!"
|
||||
"0.0,&1{%1${.2,:0^[01}~]1}.!1.4,&1{%1.0p?{.0a,:0^[11}f]1}.!2${&0{%1'(y3"
|
||||
":...)]1},'(y3:...),@(y20:*root-name-registry*),@(y11:name-lookup)[03}."
|
||||
"!3.(i12),.4,.(i15),&3{%1:0?{:0,.1q]1}${.2,@(y3:id?)[01}?{:1^,${'(y4:pe"
|
||||
"ek),.4,:2[02}q]1}f]1}.!4${&0{%1'(y1:_)]1},'(y1:_),@(y20:*root-name-reg"
|
||||
"istry*),@(y11:name-lookup)[03}.!5.(i12),.6,&2{%1${.2,@(y3:id?)[01}?{:0"
|
||||
"^,${'(y4:peek),.4,:1[02}q]1}f]1}.!6.(i12),&1{%2${.2,@(y3:id?)[01}?{${."
|
||||
"3,&1{%1:0,'(y3:ref),l2]1},.4,@(y20:*root-name-registry*),@(y11:name-lo"
|
||||
"okup)[03},${'(y4:peek),.4,:0[02}q]2}f]2}.!7.4,.3,&2{%3n,.2,.2,,#0:0,.1"
|
||||
",:1,.9,&4{%3${.2,@(y3:id?)[01}?{.1?{${.2,:0[01}}{f}?{.2,.1c]3}.2]3}.0V"
|
||||
"0?{.2,.2,.2X0,:2^[33}.0Y2?{.2,.2,.2z,:2^[33}${.2,@(y7:list3+?)[01}?{${"
|
||||
".2a,:1^[01}}{f}?{.2,.2,.2dd,:2^[33}.0p?{${.2d,:3^[01}?{${.4,.4,.4dd,:2"
|
||||
"^[03},t,.2a,:2^[33}${.4,.4,.4d,:2^[03},.2,.2a,:2^[33}.2]3}.!0.0^_1[33}"
|
||||
".!8.4,&1{%2'0,.1,,#0.0,.4,.6,:0,&4{%2.0p~?{.1]2}:1?{${.2a,:0^[01}}{f}?"
|
||||
"{:2,'(s41:misplaced ellipsis in syntax-case pattern),@(y7:x-error)[22}"
|
||||
"'1,.2I+,.1d,:3^[22}.!0.0^_1[22}.!9.7,.5,.4,.(i12),.5,.(i13),.6,.(i19),"
|
||||
".(i14),&9{%3k3,.0,,#0.1,&1{%0f,:0[01}.!0f,n,.6,.6,,#0:8,:7,:6,:5,:4,:3"
|
||||
",.6,.(i12),:2,:1,.(i20),:0,&(i12){%4,#0:4,.4,&2{%1.0?{:0]1}:1^[10}.!0."
|
||||
"4~?{${.3,:0^[01}}{f}?{.3]5}${.3,@(y3:id?)[01}?{${.3,:3^[01}?{${.4,@(y3"
|
||||
":id?)[01}?{${:2,.4,:1,.7,@(y9:free-id=?)[04}}{f},.1^[51}.3,.3,.3cc]5}."
|
||||
"1V0?{.2V0,.0?{.0}{${:4^[00}}_1.4,.4,.4X0,.4X0,:5^[54}.1Y2?{.2Y2,.0?{.0"
|
||||
"}{${:4^[00}}_1.4,.4,.4z,.4z,:5^[54}.1p~?{.2,.2e,.1^[51}.4~?{${.3a,:(i1"
|
||||
"0)^[01}?{${.3,@(y6:list2?)[01}}{f}}{f}?{t,.4,.4,.4da,:5^[54}.4~?{${.3a"
|
||||
",:(i10)^[01}?{${.3,@(y6:list3?)[01}?{${:(i11)^,.4da,@(y20:pattern-esca"
|
||||
"pe->test)[02}}{f}}{f}}{f},.0?{.0,${.6,.3[01}?{.6,.6,.6,.6dda,:5^[74}:4"
|
||||
"^[70}.5~?{${.4a,:(i10)^[01}}{f}?{.2,'(s27:unrecognized pattern escape)"
|
||||
",@(y7:x-error)[62}.5~?{${.4d,:9^[01}}{f}?{${t,.5dd,:8^[02},${f,.7,:8^["
|
||||
"02},.1,.1I-,.0<0?{${:4^[00}}{.0,.7A6},${.3,.(i10),@(y9:list-head)[02},"
|
||||
"${:7^,t,.(i11)a,:6^[03},,#0:5,.(i10),.(i14),&3{%1${:0,n,.4,:1a,:2^[04}"
|
||||
",@(y3:cdr),@(y5:%25map1)[12}.!0${.(i14),.(i14),.7,.(i14)dd,:5^[04},${$"
|
||||
"{.7,.6^,@(y5:%25map1)[02},.5c,@(y4:list)c,@(y4:%25map),@(y13:apply-to-"
|
||||
"list)[02}L6](i13)}.3p?{.5,${.8,.8,.8d,.8d,:5^[04},.5a,.5a,:5^[64}:4^[6"
|
||||
"0}.!0.0^_1[64}.!(i10).(i12),.2,.(i10),.(i10),.8,.7,&6{%4,,,#0#1#2,#0${"
|
||||
"${.(i10),&1{%1:0,.1A3~]1},t,.(i11),:3^[03},:5,.4,&2{%1${:0,&1{%0:0^]0}"
|
||||
",:1,.4,@(y14:new-literal-id)[03},.1c]1},@(y5:%25map1)[02}.!0.0^_1.!0${"
|
||||
":4^,f,.7,:3^[03}.!1.1,:3,&2{%1:1,&1{%1:0^,.1A0]1},t,.2,:0^[13}.!2f,.6,"
|
||||
".6,,#0.9,.5,.2,.9,:0,:1,:2,&7{%3.2,.1,,#0:0,:1,:2,:3,:4,.9,.6,:5,:6,&9"
|
||||
"{%2${.2,@(y3:id?)[01}?{:3,.1A3,.0?{.0}{:0,.2A3,.0?{.0}{:1^,.3A3}_1}_1d"
|
||||
"]2}.0V0?{${.3,.3X0,:2^[02}X1]2}.0Y2?{${.3,.3z,:2^[02}b]2}.0p~?{.0]2}.1"
|
||||
"~?{${.2a,:7^[01}?{${.2,@(y7:list3+?)[01}?{${:8^,.3da,@(y21:template-es"
|
||||
"cape->conv)[02}}{f}}{f}}{f},.0?{.0,${.5,.5dd,:2^[02},.1[41}.2~?{${.3a,"
|
||||
":7^[01}?{${.3,@(y6:list2?)[01}}{f}}{f}?{t,.2da,:2^[32}.2~?{${.3a,:7^[0"
|
||||
"1}}{f}?{.1,'(s28:unrecognized template escape),@(y7:x-error)[32}.2~?{$"
|
||||
"{.3d,:6^[01}}{f}?{${.3a,:5^[01},,,#0#1:3,&1{%1:0,.1A3d]1}.!0.2,.5,:4,&"
|
||||
"3{%!1.1,${.3,:2,@(y4:cons),@(y5:%25map2)[03},:1a,:0^[23}.!1.2u?{${.7,."
|
||||
"7dd,:2^[02},${.8,.8a,:2^[02}c]6}.5,.2,&2{%!0.0,:1c,:0^,@(y13:apply-to-"
|
||||
"list)[12},${.5,.4^,@(y5:%25map1)[02},${.9,.9dd,:2^[02},${.3,.5c,@(y4:%"
|
||||
"25map),@(y13:apply-to-list)[02}L6]8}${.4,.4d,:2^[02},${.5,.5a,:2^[02}c"
|
||||
"]3}.!0.0^_1[32}.!0.0^_1[73}.!(i11).(i15),.(i11),.(i13),&3{%2:2,,#0.0,:"
|
||||
"0,.5,:1,.6,&5{%1.0u?{${:0,'(s14:invalid syntax),@(y7:x-error)[02}}.0d,"
|
||||
".1a,${.2,@(y6:list2?)[01}~?{${.2,'(s19:invalid syntax rule),@(y7:x-err"
|
||||
"or)[02}}.0ap?{${.2aa,@(y3:id?)[01}?{:0p}{f}}{f},.0?{.1ad}{.1a},.1?{:0d"
|
||||
"}{:0},.3da,${:2,.4,.6,:1^[03},.0?{.0,:2,.1,.4,.7,:3^[94}.6,:4^[81}.!0."
|
||||
"0^_1[21}](i16)",
|
||||
"!3.0,.(i13),.5,.(i16),&4{%1${.2,@(y3:id?)[01}?{${.2,:3^[01}~?{:0?{:0,."
|
||||
"1q]1}${.2,@(y3:id?)[01}?{:1^,${'(y4:peek),.4,:2[02}q]1}f]1}f]1}f]1}.!4"
|
||||
"${&0{%1'(y1:_)]1},'(y1:_),@(y20:*root-name-registry*),@(y11:name-looku"
|
||||
"p)[03}.!5.0,.6,.(i14),&3{%1${.2,@(y3:id?)[01}?{${.2,:2^[01}~?{:1^,${'("
|
||||
"y4:peek),.4,:0[02}q]1}f]1}f]1}.!6.0,.(i13),&2{%2${.2,@(y3:id?)[01}?{${"
|
||||
".2,:1^[01}~?{${.3,&1{%1:0,'(y3:ref),l2]1},.4,@(y20:*root-name-registry"
|
||||
"*),@(y11:name-lookup)[03},${'(y4:peek),.4,:0[02}q]2}f]2}f]2}.!7.4,.3,&"
|
||||
"2{%3n,.2,.2,,#0:0,.1,:1,.9,&4{%3${.2,@(y3:id?)[01}?{.1?{${.2,:0[01}}{f"
|
||||
"}?{.2,.1c]3}.2]3}.0V0?{.2,.2,.2X0,:2^[33}.0Y2?{.2,.2,.2z,:2^[33}${.2,@"
|
||||
"(y7:list3+?)[01}?{${.2a,:1^[01}}{f}?{.2,.2,.2dd,:2^[33}.0p?{${.2d,:3^["
|
||||
"01}?{${.4,.4,.4dd,:2^[03},t,.2a,:2^[33}${.4,.4,.4d,:2^[03},.2,.2a,:2^["
|
||||
"33}.2]3}.!0.0^_1[33}.!8.4,&1{%2'0,.1,,#0.0,.4,.6,:0,&4{%2.0p~?{.1]2}:1"
|
||||
"?{${.2a,:0^[01}}{f}?{:2,'(s41:misplaced ellipsis in syntax-case patter"
|
||||
"n),@(y7:x-error)[22}'1,.2I+,.1d,:3^[22}.!0.0^_1[22}.!9.7,.5,.4,.(i12),"
|
||||
".5,.(i13),.6,.(i19),.(i14),&9{%3k3,.0,,#0.1,&1{%0f,:0[01}.!0f,n,.6,.6,"
|
||||
",#0:8,:7,:6,:5,:4,:3,.6,.(i12),:2,:1,.(i20),:0,&(i12){%4,#0:4,.4,&2{%1"
|
||||
".0?{:0]1}:1^[10}.!0.4~?{${.3,:0^[01}}{f}?{.3]5}${.3,@(y3:id?)[01}?{${."
|
||||
"3,:3^[01}?{${.4,@(y3:id?)[01}?{${:2,.4,:1,.7,@(y9:free-id=?)[04}}{f},."
|
||||
"1^[51}.3,.3,.3cc]5}.1V0?{.2V0,.0?{.0}{${:4^[00}}_1.4,.4,.4X0,.4X0,:5^["
|
||||
"54}.1Y2?{.2Y2,.0?{.0}{${:4^[00}}_1.4,.4,.4z,.4z,:5^[54}.1p~?{.2,.2e,.1"
|
||||
"^[51}.4~?{${.3a,:(i10)^[01}?{${.3,@(y6:list2?)[01}}{f}}{f}?{t,.4,.4,.4"
|
||||
"da,:5^[54}.4~?{${.3a,:(i10)^[01}?{${.3,@(y6:list3?)[01}?{${:(i11)^,.4d"
|
||||
"a,@(y20:pattern-escape->test)[02}}{f}}{f}}{f},.0?{.0,${.6,.3[01}?{.6,."
|
||||
"6,.6,.6dda,:5^[74}:4^[70}.5~?{${.4a,:(i10)^[01}}{f}?{.2,'(s27:unrecogn"
|
||||
"ized pattern escape),@(y7:x-error)[62}.5~?{${.4d,:9^[01}}{f}?{${t,.5dd"
|
||||
",:8^[02},${f,.7,:8^[02},.1,.1I-,.0<0?{${:4^[00}}{.0,.7A6},${.3,.(i10),"
|
||||
"@(y9:list-head)[02},${:7^,t,.(i11)a,:6^[03},,#0:5,.(i10),.(i14),&3{%1$"
|
||||
"{:0,n,.4,:1a,:2^[04},@(y3:cdr),@(y5:%25map1)[12}.!0${.(i14),.(i14),.7,"
|
||||
".(i14)dd,:5^[04},${${.7,.6^,@(y5:%25map1)[02},.5c,@(y4:list)c,@(y4:%25"
|
||||
"map),@(y13:apply-to-list)[02}L6](i13)}.3p?{.5,${.8,.8,.8d,.8d,:5^[04},"
|
||||
".5a,.5a,:5^[64}:4^[60}.!0.0^_1[64}.!(i10).(i12),.2,.(i10),.(i10),.8,.7"
|
||||
",&6{%4,,,#0#1#2,#0${${.(i10),&1{%1:0,.1A3~]1},t,.(i11),:3^[03},:5,.4,&"
|
||||
"2{%1${:0,&1{%0:0^]0},:1,.4,@(y14:new-literal-id)[03},.1c]1},@(y5:%25ma"
|
||||
"p1)[02}.!0.0^_1.!0${:4^,f,.7,:3^[03}.!1.1,:3,&2{%1:1,&1{%1:0^,.1A0]1},"
|
||||
"t,.2,:0^[13}.!2f,.6,.6,,#0.9,.5,.2,.9,:0,:1,:2,&7{%3.2,.1,,#0:0,:1,:2,"
|
||||
":3,:4,.9,.6,:5,:6,&9{%2${.2,@(y3:id?)[01}?{:3,.1A3,.0?{.0}{:0,.2A3,.0?"
|
||||
"{.0}{:1^,.3A3}_1}_1d]2}.0V0?{${.3,.3X0,:2^[02}X1]2}.0Y2?{${.3,.3z,:2^["
|
||||
"02}b]2}.0p~?{.0]2}.1~?{${.2a,:7^[01}?{${.2,@(y7:list3+?)[01}?{${:8^,.3"
|
||||
"da,@(y21:template-escape->conv)[02}}{f}}{f}}{f},.0?{.0,${.5,.5dd,:2^[0"
|
||||
"2},.1[41}.2~?{${.3a,:7^[01}?{${.3,@(y6:list2?)[01}}{f}}{f}?{t,.2da,:2^"
|
||||
"[32}.2~?{${.3a,:7^[01}}{f}?{.1,'(s28:unrecognized template escape),@(y"
|
||||
"7:x-error)[32}.2~?{${.3d,:6^[01}}{f}?{${.3a,:5^[01},,,#0#1:3,&1{%1:0,."
|
||||
"1A3d]1}.!0.2,.5,:4,&3{%!1.1,${.3,:2,@(y4:cons),@(y5:%25map2)[03},:1a,:"
|
||||
"0^[23}.!1.2u?{${.7,.7dd,:2^[02},${.8,.8a,:2^[02}c]6}.5,.2,&2{%!0.0,:1c"
|
||||
",:0^,@(y13:apply-to-list)[12},${.5,.4^,@(y5:%25map1)[02},${.9,.9dd,:2^"
|
||||
"[02},${.3,.5c,@(y4:%25map),@(y13:apply-to-list)[02}L6]8}${.4,.4d,:2^[0"
|
||||
"2},${.5,.5a,:2^[02}c]3}.!0.0^_1[32}.!0.0^_1[73}.!(i11).(i15),.(i11),.("
|
||||
"i13),&3{%2:2,,#0.0,:0,.5,:1,.6,&5{%1.0u?{${:0,'(s14:invalid syntax),@("
|
||||
"y7:x-error)[02}}.0d,.1a,${.2,@(y6:list2?)[01}~?{${.2,'(s19:invalid syn"
|
||||
"tax rule),@(y7:x-error)[02}}.0ap?{${.2aa,@(y3:id?)[01}?{:0p}{f}}{f},.0"
|
||||
"?{.1ad}{.1a},.1?{:0d}{:0},.3da,${:2,.4,.6,:1^[03},.0?{.0,:2,.1,.4,.7,:"
|
||||
"3^[94}.6,:4^[81}.!0.0^_1[21}](i16)",
|
||||
|
||||
"P", "make-include-transformer",
|
||||
"%1,,,,#0#1#2#3&0{%2${.2,@(y6:list2?)[01}?{.0daS0}{f}~?{${.2,'(s14:inva"
|
||||
|
@ -1698,21 +1705,22 @@ char *t_code[] = {
|
|||
",@(y16:repl-environment),.8^,@(y14:repl-from-port)[04}_3}t]3",
|
||||
|
||||
"C", 0,
|
||||
"'(l10:l5:y7:verbose;s2:-v;s9:--verbose;f;s25:Increase output verbosity"
|
||||
"'(l11:l5:y7:verbose;s2:-v;s9:--verbose;f;s25:Increase output verbosity"
|
||||
";;l5:y5:quiet;s2:-q;s7:--quiet;f;s30:Suppress nonessential messages;;l"
|
||||
"5:y13:append-libdir;s2:-A;s15:--append-libdir;s3:DIR;s33:Append a libr"
|
||||
"ary search directory;;l5:y14:prepend-libdir;s2:-I;s16:--prepend-libdir"
|
||||
";s3:DIR;s34:Prepend a library search directory;;l5:y14:define-feature;"
|
||||
"s2:-D;s16:--define-feature;s4:NAME;s32:Add name to the list of feature"
|
||||
"s;;l5:y4:eval;s2:-e;s6:--eval;s4:SEXP;s32:Evaluate and print an expres"
|
||||
"sion;;l5:y6:script;s2:-s;s8:--script;s4:FILE;s27:Run file as a Scheme "
|
||||
"script;;l5:y7:program;s2:-p;s9:--program;s4:FILE;s28:Run file as a Sch"
|
||||
"eme program;;l5:y7:version;s2:-V;s9:--version;f;s20:Display version in"
|
||||
"fo;;l5:y4:help;s2:-h;s6:--help;f;s17:Display this help;;)@!(y15:*skint"
|
||||
"-options*)",
|
||||
"sion;;l5:y4:load;s2:-l;s6:--load;s4:FILE;s33:Load file and continue pr"
|
||||
"ocessing;;l5:y6:script;s2:-s;s8:--script;s4:FILE;s27:Run file as a Sch"
|
||||
"eme script;;l5:y7:program;s2:-p;s9:--program;s4:FILE;s28:Run file as a"
|
||||
" Scheme program;;l5:y7:version;s2:-V;s9:--version;f;s20:Display versio"
|
||||
"n info;;l5:y4:help;s2:-h;s6:--help;f;s17:Display this help;;)@!(y15:*s"
|
||||
"kint-options*)",
|
||||
|
||||
"C", 0,
|
||||
"'(s5:0.4.9)@!(y15:*skint-version*)",
|
||||
"'(s5:0.5.0)@!(y15:*skint-version*)",
|
||||
|
||||
"P", "implementation-version",
|
||||
"%0@(y15:*skint-version*)]0",
|
||||
|
@ -1742,20 +1750,21 @@ char *t_code[] = {
|
|||
"ibrary-path!)[01}t,.4,:2^[42}${.2,'(l2:y14:prepend-libdir;y1:*;),@(y11"
|
||||
":sexp-match?)[02}?{${.4,@(y21:prepend-library-path!)[01}t,.4,:2^[42}${"
|
||||
".2,'(l2:y14:define-feature;y1:*;),@(y11:sexp-match?)[02}?{${.4,:5^[01}"
|
||||
"t,.4,:2^[42}${.2,'(l2:y4:eval;y1:*;),@(y11:sexp-match?)[02}?{${t,.5,:4"
|
||||
"^[02}f,.4,:2^[42}${.2,'(l2:y6:script;y1:*;),@(y11:sexp-match?)[02}?{t@"
|
||||
"!(y7:*quiet*)${.5,.5,@(y10:run-script)[02},@(y4:exit)[41}${.2,'(l2:y7:"
|
||||
"program;y1:*;),@(y11:sexp-match?)[02}?{t@!(y7:*quiet*)${.5,.5,@(y11:ru"
|
||||
"n-program)[02},@(y4:exit)[41}${.2,'(l2:y9:benchmark;y1:*;),@(y11:sexp-"
|
||||
"match?)[02}?{${.5,.5,@(y10:run-script)[02},@(y4:exit)[41}${.2,'(l1:y7:"
|
||||
"version;),@(y11:sexp-match?)[02}?{${:3^[00}f,n,:2^[42}${.2,'(l1:y4:hel"
|
||||
"p;),@(y11:sexp-match?)[02}?{${:1^[00}f,n,:2^[42}${.2,'(l1:f;),@(y11:se"
|
||||
"xp-match?)[02}?{.3p?{t@!(y7:*quiet*)${.5d,.6a,@(y10:run-script)[02},@("
|
||||
"y4:exit)[41}:0~?{t,@(y4:exit)[41}f]4}]4},@(y15:*skint-options*),.2,@(y"
|
||||
"28:get-next-command-line-option)[23}.!0.0^_1[02}PiP09?{PoP09}{f}?{${@("
|
||||
"y15:*skint-version*),'(s30:SKINT Scheme Interpreter v~a~%25),t,@(y6:fo"
|
||||
"rmat)[03}${'(s35:Copyright (c) 2024 False Schemers~%25),t,@(y6:format)"
|
||||
"[02}}t]5",
|
||||
"t,.4,:2^[42}${.2,'(l2:y4:load;y1:*;),@(y11:sexp-match?)[02}?{${.4,@(y4"
|
||||
":load)[01}t,.4,:2^[42}${.2,'(l2:y4:eval;y1:*;),@(y11:sexp-match?)[02}?"
|
||||
"{${t,.5,:4^[02}f,.4,:2^[42}${.2,'(l2:y6:script;y1:*;),@(y11:sexp-match"
|
||||
"?)[02}?{t@!(y7:*quiet*)${.5,.5,@(y10:run-script)[02},@(y4:exit)[41}${."
|
||||
"2,'(l2:y7:program;y1:*;),@(y11:sexp-match?)[02}?{t@!(y7:*quiet*)${.5,."
|
||||
"5,@(y11:run-program)[02},@(y4:exit)[41}${.2,'(l2:y9:benchmark;y1:*;),@"
|
||||
"(y11:sexp-match?)[02}?{${.5,.5,@(y10:run-script)[02},@(y4:exit)[41}${."
|
||||
"2,'(l1:y7:version;),@(y11:sexp-match?)[02}?{${:3^[00}f,n,:2^[42}${.2,'"
|
||||
"(l1:y4:help;),@(y11:sexp-match?)[02}?{${:1^[00}f,n,:2^[42}${.2,'(l1:f;"
|
||||
"),@(y11:sexp-match?)[02}?{.3p?{t@!(y7:*quiet*)${.5d,.6a,@(y10:run-scri"
|
||||
"pt)[02},@(y4:exit)[41}:0~?{t,@(y4:exit)[41}f]4}]4},@(y15:*skint-option"
|
||||
"s*),.2,@(y28:get-next-command-line-option)[23}.!0.0^_1[02}PiP09?{PoP09"
|
||||
"}{f}?{${@(y15:*skint-version*),'(s30:SKINT Scheme Interpreter v~a~%25)"
|
||||
",t,@(y6:format)[03}${'(s35:Copyright (c) 2024 False Schemers~%25),t,@("
|
||||
"y6:format)[02}}t]5",
|
||||
|
||||
0, 0, 0
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue