mirror of
https://github.com/false-schemers/skint.git
synced 2024-12-27 21:58:53 +01:00
compiler support for P records, -l option
This commit is contained in:
parent
de3deba498
commit
2031aed6b2
2 changed files with 123 additions and 87 deletions
39
pre/t.scm
39
pre/t.scm
|
@ -150,6 +150,15 @@
|
||||||
; for now, we will just use read with no support for circular structures
|
; for now, we will just use read with no support for circular structures
|
||||||
(read-simple port))
|
(read-simple port))
|
||||||
|
|
||||||
|
(define (lookup-global k . ?alloc) ;=> box | #f if !defined and !alloc
|
||||||
|
(let* ([v (global-store)] [i (immediate-hash k (vector-length v))])
|
||||||
|
(cond [(assq k (vector-ref v i)) => cdr]
|
||||||
|
[(and (pair? ?alloc) (car ?alloc))
|
||||||
|
(let ([b (box k)]) ; default value is k itself
|
||||||
|
(vector-set! v i (cons (cons k b) (vector-ref v i)))
|
||||||
|
b)]
|
||||||
|
[else #f])))
|
||||||
|
|
||||||
(define (error* msg args)
|
(define (error* msg args)
|
||||||
(raise (error-object #f msg args)))
|
(raise (error-object #f msg args)))
|
||||||
|
|
||||||
|
@ -2478,10 +2487,13 @@
|
||||||
(let ([x0 (read-code-sexp port)]) ; support loading fasl files too
|
(let ([x0 (read-code-sexp port)]) ; support loading fasl files too
|
||||||
(if (eq? x0 (symbol->shebang (string->symbol "/usr/bin/env skint -f")))
|
(if (eq? x0 (symbol->shebang (string->symbol "/usr/bin/env skint -f")))
|
||||||
(run-fasl-from-port port #f) ; do not call main even if it is there
|
(run-fasl-from-port port #f) ; do not call main even if it is there
|
||||||
|
(begin
|
||||||
|
(when (eq? x0 (symbol->shebang (string->symbol "/usr/bin/env skint -s")))
|
||||||
|
(set! x0 (read-code-sexp port))) ; just skip -- this file is loadable
|
||||||
(let loop ([x x0])
|
(let loop ([x x0])
|
||||||
(unless (eof-object? x)
|
(unless (eof-object? x)
|
||||||
(eval x env)
|
(eval x env)
|
||||||
(loop (read-code-sexp port))))))))
|
(loop (read-code-sexp port)))))))))
|
||||||
; we aren't asked by the spec to call last expr tail-recursively, so this
|
; we aren't asked by the spec to call last expr tail-recursively, so this
|
||||||
(void))
|
(void))
|
||||||
|
|
||||||
|
@ -2496,6 +2508,11 @@
|
||||||
(define (exec code)
|
(define (exec code)
|
||||||
(define cl (closure (deserialize-code code)))
|
(define cl (closure (deserialize-code code)))
|
||||||
(cl))
|
(cl))
|
||||||
|
(define (def id code)
|
||||||
|
(define cl (closure (deserialize-code code)))
|
||||||
|
(set-box! (lookup-global id #t) cl))
|
||||||
|
(define (fail! lno hd)
|
||||||
|
(error "unexpected line header on FASL body line" lno hd))
|
||||||
(when (eqv? (peek-char port) #\#) ; header is optional if call is explicit
|
(when (eqv? (peek-char port) #\#) ; header is optional if call is explicit
|
||||||
(define x (read-code-sexp port))
|
(define x (read-code-sexp port))
|
||||||
(unless (eq? x (symbol->shebang (string->symbol "/usr/bin/env skint -f")))
|
(unless (eq? x (symbol->shebang (string->symbol "/usr/bin/env skint -f")))
|
||||||
|
@ -2503,7 +2520,7 @@
|
||||||
(let loop ([c (peek-char port)])
|
(let loop ([c (peek-char port)])
|
||||||
(when (memv c '(#\newline #\return))
|
(when (memv c '(#\newline #\return))
|
||||||
(read-char port) (loop (peek-char port))))
|
(read-char port) (loop (peek-char port))))
|
||||||
(let loop ([line 1])
|
(let loop ([lno 1])
|
||||||
(unless (eof-object? (peek-char port))
|
(unless (eof-object? (peek-char port))
|
||||||
(define c1 (read-char port))
|
(define c1 (read-char port))
|
||||||
(define c2 (read-char port))
|
(define c2 (read-char port))
|
||||||
|
@ -2511,10 +2528,18 @@
|
||||||
(define hd (list c1 c2 c3))
|
(define hd (list c1 c2 c3))
|
||||||
(cond [(equal? hd '(#\C #\tab #\tab))
|
(cond [(equal? hd '(#\C #\tab #\tab))
|
||||||
(exec (read-line port))
|
(exec (read-line port))
|
||||||
(loop (+ line 1))]
|
(loop (+ lno 1))]
|
||||||
|
[(and (eqv? c1 #\P) (eqv? c2 #\tab) (not (eof-object? c3)))
|
||||||
|
(let scan ([c (read-char port)] [l (list c3)])
|
||||||
|
(cond [(eof-object? c) (fail! lno 'eof)]
|
||||||
|
[(eqv? c #\tab)
|
||||||
|
(define id (string->symbol (list->string (reverse! l))))
|
||||||
|
(def id (read-line port))
|
||||||
|
(loop (+ lno 1))]
|
||||||
|
[else (scan (read-char port) (cons c l))]))]
|
||||||
[(equal? hd '(#\M #\tab #\tab))
|
[(equal? hd '(#\M #\tab #\tab))
|
||||||
(and (pair? main-args) (eval `(main (quote ,main-args)) env))]
|
(and (pair? main-args) (eval `(main (quote ,main-args)) env))]
|
||||||
[else (error "unexpected line header on FASL body line" line hd)]))))
|
[else (fail! lno hd)]))))
|
||||||
|
|
||||||
(define (run-fasl filename args)
|
(define (run-fasl filename args)
|
||||||
(define main-args (cons filename args))
|
(define main-args (cons filename args))
|
||||||
|
@ -2619,9 +2644,7 @@
|
||||||
(name-remove! *user-name-registry* (car args)) (display "done!\n" op)]
|
(name-remove! *user-name-registry* (car args)) (display "done!\n" op)]
|
||||||
[else (display "name not found: " op) (write name op) (newline op)])]
|
[else (display "name not found: " op) (write name op) (newline op)])]
|
||||||
[(gs) (write (global-store) op) (newline op)]
|
[(gs) (write (global-store) op) (newline op)]
|
||||||
[(gs <symbol>)
|
[(gs <symbol>) (write (lookup-global (car args)) op) (newline op)]
|
||||||
(let* ([k (car args)] [v (global-store)] [i (immediate-hash k (vector-length v))])
|
|
||||||
(write (cond [(assq k (vector-ref v i)) => cdr] [else #f]) op) (newline op))]
|
|
||||||
[(load <string>) (load (car args))]
|
[(load <string>) (load (car args))]
|
||||||
[(v) (set! *verbose* #t) (format #t "verbosity is on~%")]
|
[(v) (set! *verbose* #t) (format #t "verbosity is on~%")]
|
||||||
[(v-) (set! *verbose* #f) (format #t "verbosity is off~%")]
|
[(v-) (set! *verbose* #f) (format #t "verbosity is off~%")]
|
||||||
|
@ -2727,6 +2750,7 @@
|
||||||
[prepend-libdir "-I" "--prepend-libdir" "DIR" "Prepend a library search directory"]
|
[prepend-libdir "-I" "--prepend-libdir" "DIR" "Prepend a library search directory"]
|
||||||
[define-feature "-D" "--define-feature" "NAME" "Add name to the list of features"]
|
[define-feature "-D" "--define-feature" "NAME" "Add name to the list of features"]
|
||||||
[eval "-e" "--eval" "SEXP" "Evaluate and print an expression"]
|
[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"]
|
[script "-s" "--script" "FILE" "Run file as a Scheme script"]
|
||||||
[fasl "-f" "--fasl" "FILE" "Run file as a compiled script"]
|
[fasl "-f" "--fasl" "FILE" "Run file as a compiled script"]
|
||||||
[program "-p" "--program" "FILE" "Run file as a Scheme program"]
|
[program "-p" "--program" "FILE" "Run file as a Scheme program"]
|
||||||
|
@ -2769,6 +2793,7 @@
|
||||||
[(append-libdir *) (append-library-path! optarg) (loop restargs #t)]
|
[(append-libdir *) (append-library-path! optarg) (loop restargs #t)]
|
||||||
[(prepend-libdir *) (prepend-library-path! optarg) (loop restargs #t)]
|
[(prepend-libdir *) (prepend-library-path! optarg) (loop restargs #t)]
|
||||||
[(define-feature *) (add-feature! 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)]
|
[(eval *) (eval! optarg #t) (loop restargs #f)]
|
||||||
[(script *) (set! *quiet* #t) (exit (run-script optarg restargs))]
|
[(script *) (set! *quiet* #t) (exit (run-script optarg restargs))]
|
||||||
[(fasl *) (set! *quiet* #t) (exit (run-fasl optarg restargs))]
|
[(fasl *) (set! *quiet* #t) (exit (run-fasl optarg restargs))]
|
||||||
|
|
165
t.c
165
t.c
|
@ -100,6 +100,10 @@ char *t_code[] = {
|
||||||
"P", "read-code-sexp",
|
"P", "read-code-sexp",
|
||||||
"%1.0,@(y11:read-simple)[11",
|
"%1.0,@(y11:read-simple)[11",
|
||||||
|
|
||||||
|
"P", "lookup-global",
|
||||||
|
"%!1U2,.0V3,.3H2,.0,.2V4,.4A3,.0?{.0d]5}.3p?{.3a}{f}?{.4b,.2,.4V4,.1,.7"
|
||||||
|
"cc,.3,.5V5.0]6}f]5",
|
||||||
|
|
||||||
"P", "error*",
|
"P", "error*",
|
||||||
"%2${.3,.3,f,@(y12:error-object)[03},@(y5:raise)[21",
|
"%2${.3,.3,f,@(y12:error-object)[03},@(y5:raise)[21",
|
||||||
|
|
||||||
|
@ -1550,26 +1554,31 @@ char *t_code[] = {
|
||||||
|
|
||||||
"P", "load",
|
"P", "load",
|
||||||
"%!1,,#0#1.2p?{.2a}{${@(y23:interaction-environment)[00}}.!0f.!1${.2,.4"
|
"%!1,,#0#1.2p?{.2a}{${@(y23:interaction-environment)[00}}.!0f.!1${.2,.4"
|
||||||
",&2{%1:0^?{t,.1P79}${.2,@(y14:read-code-sexp)[01},'(s21:/usr/bin/env s"
|
",&2{%1:0^?{t,.1P79}${.2,@(y14:read-code-sexp)[01},#0'(s21:/usr/bin/env"
|
||||||
"kint -f)X5Y6,.1q?{f,.2,@(y18:run-fasl-from-port)[22}.0,,#0:1,.4,.2,&3{"
|
" skint -f)X5Y6,.1^q?{f,.2,@(y18:run-fasl-from-port)[22}'(s21:/usr/bin/"
|
||||||
"%1.0R8~?{${:2^,.3,@(y4:eval)[02}${:1,@(y14:read-code-sexp)[01},:0^[11}"
|
"env skint -s)X5Y6,.1^q?{${.3,@(y14:read-code-sexp)[01}.!0}.0^,,#0:1,.4"
|
||||||
"]1}.!0.0^_1[21},.6,@(y28:call-with-current-input-file)[02}Y9]4",
|
",.2,&3{%1.0R8~?{${:2^,.3,@(y4:eval)[02}${:1,@(y14:read-code-sexp)[01},"
|
||||||
|
":0^[11}]1}.!0.0^_1[21},.6,@(y28:call-with-current-input-file)[02}Y9]4",
|
||||||
|
|
||||||
"P", "expand",
|
"P", "expand",
|
||||||
"%!1,#0.1p?{.1a}{${@(y23:interaction-environment)[00}}.!0.0^,.3,t,@(y5:"
|
"%!1,#0.1p?{.1a}{${@(y23:interaction-environment)[00}}.!0.0^,.3,t,@(y5:"
|
||||||
"xpand)[33",
|
"xpand)[33",
|
||||||
|
|
||||||
"P", "run-fasl-from-port",
|
"P", "run-fasl-from-port",
|
||||||
"%2,,#0#1${@(y23:interaction-environment)[00}.!0&0{%1,#0.1U4,U91.!0.0^["
|
"%2,,,,#0#1#2#3${@(y23:interaction-environment)[00}.!0&0{%1,#0.1U4,U91."
|
||||||
"20}.!1'(c#),.3R1v?{,#0${.5,@(y14:read-code-sexp)[01}.!0'(s21:/usr/bin/"
|
"!0.0^[20}.!1&0{%2,#0.2U4,U91.!0.0^,${t,.5,@(y13:lookup-global)[02}sz]3"
|
||||||
"env skint -f)X5Y6,.1^q~?{${.2^,'(s30:unexpected header in FASL file),@"
|
"}.!2&0{%2.1,.1,'(s40:unexpected line header on FASL body line),@(y5:er"
|
||||||
"(y5:error)[02}}_1}${.4R1,,#0.6,.1,&2{%1'(l2:c%0a;c%0d;),.1A1?{:1R0:1R1"
|
"ror)[23}.!3'(c#),.5R1v?{,#0${.7,@(y14:read-code-sexp)[01}.!0'(s21:/usr"
|
||||||
",:0^[11}]1}.!0.0^_1[01}'1,,#0.0,.4,.6,.8,.6,&5{%1:2R1R8~?{,,,,#0#1#2#3"
|
"/bin/env skint -f)X5Y6,.1^q~?{${.2^,'(s30:unexpected header in FASL fi"
|
||||||
":2R0.!0:2R0.!1:2R0.!2.2^,.2^,.2^,l3.!3'(l3:cC;c%09;c%09;),.4^e?{${${:2"
|
"le),@(y5:error)[02}}_1}${.6R1,,#0.8,.1,&2{%1'(l2:c%0a;c%0d;),.1A1?{:1R"
|
||||||
",@(y9:read-line)[01},:3^[01}'1,.5+,:4^[51}'(l3:cM;c%09;c%09;),.4^e?{:1"
|
"0:1R1,:0^[11}]1}.!0.0^_1[01}'1,,#0.3,.7,.6,.3,.(i11),.7,.(i11),&7{%1:5"
|
||||||
"p?{:0^,n,n,:1c,'(y5:quote)cc,'(y4:main)c,@(y4:eval)[52}f]5}.3^,.5,'(s4"
|
"R1R8~?{,,,,#0#1#2#3:5R0.!0:5R0.!1:5R0.!2.2^,.2^,.2^,l3.!3'(l3:cC;c%09;"
|
||||||
"0:unexpected line header on FASL body line),@(y5:error)[53}]1}.!0.0^_1"
|
"c%09;),.4^e?{${${:5,@(y9:read-line)[01},:6^[01}'1,.5+,:3^[51}'(cP),.1^"
|
||||||
"[41",
|
"v?{'(c%09),.2^v?{.2^R8~}{f}}{f}?{.2^,l1,:5R0,,#0:5,.1,:3,.(i10),:4,:0,"
|
||||||
|
"&6{%2.0R8?{'(y3:eof),:2,:0^[22}'(c%09),.1v?{,#0.2A9X3X5.!0${${:5,@(y9:"
|
||||||
|
"read-line)[01},.3^,:1^[02}'1,:2+,:3^[31}.1,.1c,:5R0,:4^[22}.!0.0^_1[52"
|
||||||
|
"}'(l3:cM;c%09;c%09;),.4^e?{:2p?{:1^,n,n,:2c,'(y5:quote)cc,'(y4:main)c,"
|
||||||
|
"@(y4:eval)[52}f]5}.3^,.5,:0^[52}]1}.!0.0^_1[61",
|
||||||
|
|
||||||
"P", "run-fasl",
|
"P", "run-fasl",
|
||||||
"%2,#0.2,.2c.!0.0,&1{%1:0^,.1,@(y18:run-fasl-from-port)[12},.2,@(y28:ca"
|
"%2,#0.2,.2c.!0.0,&1{%1:0^,.1,@(y18:run-fasl-from-port)[12},.2,@(y28:ca"
|
||||||
|
@ -1635,47 +1644,47 @@ char *t_code[] = {
|
||||||
"registry*),@(y11:name-lookup)[03}?{${:0^a,@(y20:*user-name-registry*),"
|
"registry*),@(y11:name-lookup)[03}?{${:0^a,@(y20:*user-name-registry*),"
|
||||||
"@(y12:name-remove!)[02}:2,'(s6:done!%0a)W4]1}:2,'(s16:name not found: "
|
"@(y12:name-remove!)[02}:2,'(s6:done!%0a)W4]1}:2,'(s16:name not found: "
|
||||||
")W4:2,@(y4:name)W5:2W6]1}${.2,'(l1:y2:gs;),@(y11:sexp-match?)[02}?{:2,"
|
")W4:2,@(y4:name)W5:2W6]1}${.2,'(l1:y2:gs;),@(y11:sexp-match?)[02}?{:2,"
|
||||||
"U2W5:2W6]1}${.2,'(l2:y2:gs;y8:<symbol>;),@(y11:sexp-match?)[02}?{:0^a,"
|
"U2W5:2W6]1}${.2,'(l2:y2:gs;y8:<symbol>;),@(y11:sexp-match?)[02}?{:2,${"
|
||||||
"U2,.0V3,.2H2,:2,.1,.3V4,.4A3,.0?{.0d}{f}_1W5:2W6]4}${.2,'(l2:y4:load;y"
|
":0^a,@(y13:lookup-global)[01}W5:2W6]1}${.2,'(l2:y4:load;y8:<string>;),"
|
||||||
"8:<string>;),@(y11:sexp-match?)[02}?{:0^a,@(y4:load)[11}${.2,'(l1:y1:v"
|
"@(y11:sexp-match?)[02}?{:0^a,@(y4:load)[11}${.2,'(l1:y1:v;),@(y11:sexp"
|
||||||
";),@(y11:sexp-match?)[02}?{t@!(y9:*verbose*)'(s17:verbosity is on~%25)"
|
"-match?)[02}?{t@!(y9:*verbose*)'(s17:verbosity is on~%25),t,@(y6:forma"
|
||||||
",t,@(y6:format)[12}${.2,'(l1:y2:v-;),@(y11:sexp-match?)[02}?{f@!(y9:*v"
|
"t)[12}${.2,'(l1:y2:v-;),@(y11:sexp-match?)[02}?{f@!(y9:*verbose*)'(s18"
|
||||||
"erbose*)'(s18:verbosity is off~%25),t,@(y6:format)[12}${.2,'(l1:y1:q;)"
|
":verbosity is off~%25),t,@(y6:format)[12}${.2,'(l1:y1:q;),@(y11:sexp-m"
|
||||||
",@(y11:sexp-match?)[02}?{t@!(y7:*quiet*)'(s13:quiet is on~%25),t,@(y6:"
|
"atch?)[02}?{t@!(y7:*quiet*)'(s13:quiet is on~%25),t,@(y6:format)[12}${"
|
||||||
"format)[12}${.2,'(l1:y2:q-;),@(y11:sexp-match?)[02}?{f@!(y7:*quiet*)'("
|
".2,'(l1:y2:q-;),@(y11:sexp-match?)[02}?{f@!(y7:*quiet*)'(s14:quiet is "
|
||||||
"s14:quiet is off~%25),t,@(y6:format)[12}${.2,'(l2:y4:time;y1:*;),@(y11"
|
"off~%25),t,@(y6:format)[12}${.2,'(l2:y4:time;y1:*;),@(y11:sexp-match?)"
|
||||||
":sexp-match?)[02}?{Z3,${:2,@(y16:repl-environment),:0^a,@(y22:repl-eva"
|
"[02}?{Z3,${:2,@(y16:repl-environment),:0^a,@(y22:repl-evaluate-top-for"
|
||||||
"luate-top-form)[03}Z4,.1,Z3-/,'(i1000)*,'(s24:; elapsed time: ~s ms.~%"
|
"m)[03}Z4,.1,Z3-/,'(i1000)*,'(s24:; elapsed time: ~s ms.~%25),t,@(y6:fo"
|
||||||
"25),t,@(y6:format)[23}${.2,'(l1:y3:pwd;),@(y11:sexp-match?)[02}?{:2,${"
|
"rmat)[23}${.2,'(l1:y3:pwd;),@(y11:sexp-match?)[02}?{:2,${@(y17:current"
|
||||||
"@(y17:current-directory)[00}W4:2W6]1}${.2,'(l2:y2:cd;y8:<string>;),@(y"
|
"-directory)[00}W4:2W6]1}${.2,'(l2:y2:cd;y8:<string>;),@(y11:sexp-match"
|
||||||
"11:sexp-match?)[02}?{:0^a,@(y17:current-directory)[11}${.2,'(l2:y2:sh;"
|
"?)[02}?{:0^a,@(y17:current-directory)[11}${.2,'(l2:y2:sh;y8:<string>;)"
|
||||||
"y8:<string>;),@(y11:sexp-match?)[02}?{:0^aZ6]1}${.2,'(l1:y2:si;),@(y11"
|
",@(y11:sexp-match?)[02}?{:0^aZ6]1}${.2,'(l1:y2:si;),@(y11:sexp-match?)"
|
||||||
":sexp-match?)[02}?{Zh,Zb,Zc,'(s49:~d collections, ~d reallocs, heap si"
|
"[02}?{Zh,Zb,Zc,'(s49:~d collections, ~d reallocs, heap size ~d words~%"
|
||||||
"ze ~d words~%25),t,@(y6:format)[15}${.2,'(l1:y2:gc;),@(y11:sexp-match?"
|
"25),t,@(y6:format)[15}${.2,'(l1:y2:gc;),@(y11:sexp-match?)[02}?{Zg'(l1"
|
||||||
")[02}?{Zg'(l1:y2:si;),:1^[11}${.2,'(l1:y4:help;),@(y11:sexp-match?)[02"
|
":y2:si;),:1^[11}${.2,'(l1:y4:help;),@(y11:sexp-match?)[02}?{:2,'(s57:%"
|
||||||
"}?{:2,'(s57:%0aREPL commands (,load ,cd ,sh arguments need no quotes):"
|
"0aREPL commands (,load ,cd ,sh arguments need no quotes):%0a)W4:2,'(s4"
|
||||||
"%0a)W4:2,'(s44: ,load <fname> load <fname> into REPL%0a)W4:2,'(s"
|
"4: ,load <fname> load <fname> into REPL%0a)W4:2,'(s59: ,q "
|
||||||
"59: ,q quiet: disable informational messages%0a)W4:2,"
|
" quiet: disable informational messages%0a)W4:2,'(s51: ,q- "
|
||||||
"'(s51: ,q- enable informational messages%0a)W4:2,'(s39"
|
" enable informational messages%0a)W4:2,'(s39: ,v "
|
||||||
": ,v turn verbosity on%0a)W4:2,'(s40: ,v- "
|
" turn verbosity on%0a)W4:2,'(s40: ,v- turn ver"
|
||||||
" turn verbosity off%0a)W4:2,'(s48: ,ref <name> show denota"
|
"bosity off%0a)W4:2,'(s48: ,ref <name> show denotation for <nam"
|
||||||
"tion for <name>%0a)W4:2,'(s45: ,rnr show root name regi"
|
"e>%0a)W4:2,'(s45: ,rnr show root name registry%0a)W4:2,"
|
||||||
"stry%0a)W4:2,'(s50: ,rref <name> lookup name in root registry%0"
|
"'(s50: ,rref <name> lookup name in root registry%0a)W4:2,'(s52:"
|
||||||
"a)W4:2,'(s52: ,rrem! <name> remove name from root registry%0a)W4"
|
" ,rrem! <name> remove name from root registry%0a)W4:2,'(s45: ,un"
|
||||||
":2,'(s45: ,unr show user name registry%0a)W4:2,'(s50: ,"
|
"r show user name registry%0a)W4:2,'(s50: ,uref <name> "
|
||||||
"uref <name> lookup name in user registry%0a)W4:2,'(s52: ,urem! "
|
" lookup name in user registry%0a)W4:2,'(s52: ,urem! <name> "
|
||||||
"<name> remove name from user registry%0a)W4:2,'(s46: ,gs "
|
"remove name from user registry%0a)W4:2,'(s46: ,gs show"
|
||||||
" show global store (big!)%0a)W4:2,'(s55: ,gs <name> l"
|
" global store (big!)%0a)W4:2,'(s55: ,gs <name> lookup global "
|
||||||
"ookup global location for <name>%0a)W4:2,'(s56: ,time <expr> ti"
|
"location for <name>%0a)W4:2,'(s56: ,time <expr> time single-lin"
|
||||||
"me single-line expression <expr>%0a)W4:2,'(s60: ,pwd sh"
|
"e expression <expr>%0a)W4:2,'(s60: ,pwd show skint's cu"
|
||||||
"ow skint's current working directory%0a)W4:2,'(s62: ,cd <dir> "
|
"rrent working directory%0a)W4:2,'(s62: ,cd <dir> change skin"
|
||||||
" change skint's current working directory%0a)W4:2,'(s51: ,sh <cmdline"
|
"t's current working directory%0a)W4:2,'(s51: ,sh <cmdline> send "
|
||||||
"> send <cmdline> to local shell%0a)W4:2,'(s41: ,si "
|
"<cmdline> to local shell%0a)W4:2,'(s41: ,si display sy"
|
||||||
" display system info%0a)W4:2,'(s55: ,gc force gc to "
|
"stem info%0a)W4:2,'(s55: ,gc force gc to finalize lost"
|
||||||
"finalize lost objects%0a)W4:2,'(s31: ,help this help%0a)"
|
" objects%0a)W4:2,'(s31: ,help this help%0a)W4]1}${.2,'(l"
|
||||||
"W4]1}${.2,'(l1:y1:h;),@(y11:sexp-match?)[02}?{'(l1:y4:help;),:1^[11}:2"
|
"1:y1:h;),@(y11:sexp-match?)[02}?{'(l1:y4:help;),:1^[11}:2,'(s29:syntax"
|
||||||
",'(s29:syntax error in repl command%0a)W4:2,'(s37:type ,help to see av"
|
" error in repl command%0a)W4:2,'(s37:type ,help to see available comma"
|
||||||
"ailable commands%0a)W4]1}.!0.0^_1[41",
|
"nds%0a)W4]1}.!0.0^_1[41",
|
||||||
|
|
||||||
"P", "repl-from-port",
|
"P", "repl-from-port",
|
||||||
"%4,#0${@(y18:current-file-stack)[00}.!0${k0,.0,${.2,.9,.(i12),.(i12),."
|
"%4,#0${@(y18:current-file-stack)[00}.!0${k0,.0,${.2,.9,.(i12),.(i12),."
|
||||||
|
@ -1712,19 +1721,20 @@ char *t_code[] = {
|
||||||
",@(y16:repl-environment),.8^,@(y14:repl-from-port)[04}_3}t]3",
|
",@(y16:repl-environment),.8^,@(y14:repl-from-port)[04}_3}t]3",
|
||||||
|
|
||||||
"C", 0,
|
"C", 0,
|
||||||
"'(l11:l5:y7:verbose;s2:-v;s9:--verbose;f;s25:Increase output verbosity"
|
"'(l12: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"
|
";;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"
|
"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"
|
"ary search directory;;l5:y14:prepend-libdir;s2:-I;s16:--prepend-libdir"
|
||||||
";s3:DIR;s34:Prepend a library search directory;;l5:y14:define-feature;"
|
";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"
|
"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"
|
"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 "
|
"sion;;l5:y4:load;s2:-l;s6:--load;s4:FILE;s33:Load file and continue pr"
|
||||||
"script;;l5:y4:fasl;s2:-f;s6:--fasl;s4:FILE;s29:Run file as a compiled "
|
"ocessing;;l5:y6:script;s2:-s;s8:--script;s4:FILE;s27:Run file as a Sch"
|
||||||
"script;;l5:y7:program;s2:-p;s9:--program;s4:FILE;s28:Run file as a Sch"
|
"eme script;;l5:y4:fasl;s2:-f;s6:--fasl;s4:FILE;s29:Run file as a compi"
|
||||||
"eme program;;l5:y7:version;s2:-V;s9:--version;f;s20:Display version in"
|
"led script;;l5:y7:program;s2:-p;s9:--program;s4:FILE;s28:Run file as a"
|
||||||
"fo;;l5:y4:help;s2:-h;s6:--help;f;s17:Display this help;;)@!(y15:*skint"
|
" Scheme program;;l5:y7:version;s2:-V;s9:--version;f;s20:Display versio"
|
||||||
"-options*)",
|
"n info;;l5:y4:help;s2:-h;s6:--help;f;s17:Display this help;;)@!(y15:*s"
|
||||||
|
"kint-options*)",
|
||||||
|
|
||||||
"C", 0,
|
"C", 0,
|
||||||
"'(s5:0.4.9)@!(y15:*skint-version*)",
|
"'(s5:0.4.9)@!(y15:*skint-version*)",
|
||||||
|
@ -1757,21 +1767,22 @@ char *t_code[] = {
|
||||||
"ibrary-path!)[01}t,.4,:2^[42}${.2,'(l2:y14:prepend-libdir;y1:*;),@(y11"
|
"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}${"
|
":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}"
|
".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"
|
"t,.4,:2^[42}${.2,'(l2:y4:load;y1:*;),@(y11:sexp-match?)[02}?{${.4,@(y4"
|
||||||
"^[02}f,.4,:2^[42}${.2,'(l2:y6:script;y1:*;),@(y11:sexp-match?)[02}?{t@"
|
":load)[01}t,.4,:2^[42}${.2,'(l2:y4:eval;y1:*;),@(y11:sexp-match?)[02}?"
|
||||||
"!(y7:*quiet*)${.5,.5,@(y10:run-script)[02},@(y4:exit)[41}${.2,'(l2:y4:"
|
"{${t,.5,:4^[02}f,.4,:2^[42}${.2,'(l2:y6:script;y1:*;),@(y11:sexp-match"
|
||||||
"fasl;y1:*;),@(y11:sexp-match?)[02}?{t@!(y7:*quiet*)${.5,.5,@(y8:run-fa"
|
"?)[02}?{t@!(y7:*quiet*)${.5,.5,@(y10:run-script)[02},@(y4:exit)[41}${."
|
||||||
"sl)[02},@(y4:exit)[41}${.2,'(l2:y7:program;y1:*;),@(y11:sexp-match?)[0"
|
"2,'(l2:y4:fasl;y1:*;),@(y11:sexp-match?)[02}?{t@!(y7:*quiet*)${.5,.5,@"
|
||||||
"2}?{t@!(y7:*quiet*)${.5,.5,@(y11:run-program)[02},@(y4:exit)[41}${.2,'"
|
"(y8:run-fasl)[02},@(y4:exit)[41}${.2,'(l2:y7:program;y1:*;),@(y11:sexp"
|
||||||
"(l2:y9:benchmark;y1:*;),@(y11:sexp-match?)[02}?{${.5,.5,@(y10:run-scri"
|
"-match?)[02}?{t@!(y7:*quiet*)${.5,.5,@(y11:run-program)[02},@(y4:exit)"
|
||||||
"pt)[02},@(y4:exit)[41}${.2,'(l1:y7:version;),@(y11:sexp-match?)[02}?{$"
|
"[41}${.2,'(l2:y9:benchmark;y1:*;),@(y11:sexp-match?)[02}?{${.5,.5,@(y1"
|
||||||
"{:3^[00}f,n,:2^[42}${.2,'(l1:y4:help;),@(y11:sexp-match?)[02}?{${:1^[0"
|
"0:run-script)[02},@(y4:exit)[41}${.2,'(l1:y7:version;),@(y11:sexp-matc"
|
||||||
"0}f,n,:2^[42}${.2,'(l1:f;),@(y11:sexp-match?)[02}?{.3p?{t@!(y7:*quiet*"
|
"h?)[02}?{${:3^[00}f,n,:2^[42}${.2,'(l1:y4:help;),@(y11:sexp-match?)[02"
|
||||||
")${.5d,.6a,@(y10:run-script)[02},@(y4:exit)[41}:0~?{t,@(y4:exit)[41}f]"
|
"}?{${:1^[00}f,n,:2^[42}${.2,'(l1:f;),@(y11:sexp-match?)[02}?{.3p?{t@!("
|
||||||
"4}]4},@(y15:*skint-options*),.2,@(y28:get-next-command-line-option)[23"
|
"y7:*quiet*)${.5d,.6a,@(y10:run-script)[02},@(y4:exit)[41}:0~?{t,@(y4:e"
|
||||||
"}.!0.0^_1[02}PiP09?{PoP09}{f}?{${@(y15:*skint-version*),'(s30:SKINT Sc"
|
"xit)[41}f]4}]4},@(y15:*skint-options*),.2,@(y28:get-next-command-line-"
|
||||||
"heme Interpreter v~a~%25),t,@(y6:format)[03}${'(s35:Copyright (c) 2024"
|
"option)[23}.!0.0^_1[02}PiP09?{PoP09}{f}?{${@(y15:*skint-version*),'(s3"
|
||||||
" False Schemers~%25),t,@(y6:format)[02}}t]5",
|
"0:SKINT Scheme Interpreter v~a~%25),t,@(y6:format)[03}${'(s35:Copyrigh"
|
||||||
|
"t (c) 2024 False Schemers~%25),t,@(y6:format)[02}}t]5",
|
||||||
|
|
||||||
0, 0, 0
|
0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue