~! in format, prompt flush, ,load repl cmd

This commit is contained in:
ESL 2024-07-13 02:41:19 -04:00
parent a2da6a23e8
commit 781fa509e2
4 changed files with 135 additions and 144 deletions

34
s.c
View file

@ -1,4 +1,4 @@
/* s.c -- partially generated via skint -c s.scm */ /* s.c -- generated via skint -c s.scm */
#include "s.h" #include "s.h"
#include "n.h" #include "n.h"
@ -17,7 +17,6 @@ int dirsep = '\\';
int dirsep = '/'; int dirsep = '/';
#endif #endif
char *s_code[] = { char *s_code[] = {
"S", "let-syntax", "S", "let-syntax",
@ -1028,9 +1027,9 @@ char *s_code[] = {
"${@(y7:newline),@(y14:make-parameter)[01}@!(y17:format-fresh-line)", "${@(y7:newline),@(y14:make-parameter)[01}@!(y17:format-fresh-line)",
"C", 0, "C", 0,
"${'(s78:supported directives: ~~ ~%25 ~%25 ~& ~t ~_ ~a ~s ~w ~y ~c ~b " "${'(s78:supported directives: ~~ ~%25 ~& ~t ~_ ~a ~s ~w ~y ~c ~b ~o ~d"
"~o ~d ~x ~f ~? ~k ~*),@(y14:make-parameter)[01}@!(y18:format-help-stri" " ~x ~f ~? ~k ~* ~!),@(y14:make-parameter)[01}@!(y18:format-help-string"
"ng)", ")",
"P", "fprintf", "P", "fprintf",
"%!2,,,,#0#1#2#3&0{%1.0p?{.0a]1}'(s35:format: no argument for ~ directi" "%!2,,,,#0#1#2#3&0{%1.0p?{.0a]1}'(s35:format: no argument for ~ directi"
@ -1044,18 +1043,19 @@ char *s_code[] = {
".2d,:4^[62}'(c~),.1v?{:3,'(c~)W0.5,.2d,:4^[62}'(c%25),.1v?{:3W6.5,.2d," ".2d,:4^[62}'(c~),.1v?{:3,'(c~)W0.5,.2d,:4^[62}'(c%25),.1v?{:3W6.5,.2d,"
":4^[62}'(ct),.1v?{:3,'(c%09)W0.5,.2d,:4^[62}'(c_),.1v?{:3,'(c )W0.5,.2" ":4^[62}'(ct),.1v?{:3,'(c%09)W0.5,.2d,:4^[62}'(c_),.1v?{:3,'(c )W0.5,.2"
"d,:4^[62}'(c&),.1v?{${:3,${@(y17:format-fresh-line)[00}[01}.5,.2d,:4^[" "d,:4^[62}'(c&),.1v?{${:3,${@(y17:format-fresh-line)[00}[01}.5,.2d,:4^["
"62}'(cs),.1v?{:3,${.8,:1^[01}W5.5d,.2d,:4^[62}'(ca),.1v?{:3,${.8,:1^[0" "62}'(c!),.1v?{:3P71.5,.2d,:4^[62}'(cs),.1v?{:3,${.8,:1^[01}W5.5d,.2d,:"
"1}W4.5d,.2d,:4^[62}'(cw),.1v?{:3,${.8,:1^[01}W7.5d,.2d,:4^[62}'(cc),.1" "4^[62}'(ca),.1v?{:3,${.8,:1^[01}W4.5d,.2d,:4^[62}'(cw),.1v?{:3,${.8,:1"
"v?{:3,${.8,:1^[01}W0.5d,.2d,:4^[62}'(cb),.1v?{${:3,${.(i10),:1^[01},'2" "^[01}W7.5d,.2d,:4^[62}'(cc),.1v?{:3,${.8,:1^[01}W0.5d,.2d,:4^[62}'(cb)"
",:0^[03}.5d,.2d,:4^[62}'(co),.1v?{${:3,${.(i10),:1^[01},'8,:0^[03}.5d," ",.1v?{${:3,${.(i10),:1^[01},'2,:0^[03}.5d,.2d,:4^[62}'(co),.1v?{${:3,$"
".2d,:4^[62}'(cd),.1v?{${:3,${.(i10),:1^[01},'(i10),:0^[03}.5d,.2d,:4^[" "{.(i10),:1^[01},'8,:0^[03}.5d,.2d,:4^[62}'(cd),.1v?{${:3,${.(i10),:1^["
"62}'(cx),.1v?{${:3,${.(i10),:1^[01},'(i16),:0^[03}.5d,.2d,:4^[62}'(ch)" "01},'(i10),:0^[03}.5d,.2d,:4^[62}'(cx),.1v?{${:3,${.(i10),:1^[01},'(i1"
",.1v?{:3,${@(y18:format-help-string)[00}W4.5,.2d,:4^[62}'(cy),.1v?{${:" "6),:0^[03}.5d,.2d,:4^[62}'(ch),.1v?{:3,${@(y18:format-help-string)[00}"
"3,${.(i10),:1^[01},${@(y19:format-pretty-print)[00}[02}.5d,.2d,:4^[62}" "W4.5,.2d,:4^[62}'(cy),.1v?{${:3,${.(i10),:1^[01},${@(y19:format-pretty"
"'(cf),.1v?{${:3,.5^,.7^,${.(i12),:1^[01},${@(y18:format-fixed-print)[0" "-print)[00}[02}.5d,.2d,:4^[62}'(cf),.1v?{${:3,.5^,.7^,${.(i12),:1^[01}"
"0}[04}.5d,.2d,:4^[62}'(l2:c?;ck;),.1A1?{${${${.(i11),:1^[01},:1^[01},$" ",${@(y18:format-fixed-print)[00}[04}.5d,.2d,:4^[62}'(l2:c?;ck;),.1A1?{"
"{.(i10),:1^[01}X2,:4^[02}.5dd,.2d,:4^[62}.1a,'(s32:format: unrecognize" "${${${.(i11),:1^[01},:1^[01},${.(i10),:1^[01}X2,:4^[02}.5dd,.2d,:4^[62"
"d ~ directive),@(y5:error)[62}:3,.1aW0.1,.1d,:4^[22}.!0.0^_1[72", "}.1a,'(s32:format: unrecognized ~ directive),@(y5:error)[62}:3,.1aW0.1"
",.1d,:4^[22}.!0.0^_1[72",
"P", "format", "P", "format",
"%!1f,.2q,.0?{.0}{.2S0}_1?{P51,.2?{.1,.3c}{.1},${.2,.4c,@(y7:fprintf),@" "%!1f,.2q,.0?{.0}{.2S0}_1?{P51,.2?{.1,.3c}{.1},${.2,.4c,@(y7:fprintf),@"

View file

@ -1964,7 +1964,7 @@
(define format-fresh-line ; TODO: add (fresh-line [p]) instruction for source ports (define format-fresh-line ; TODO: add (fresh-line [p]) instruction for source ports
(make-parameter newline)) (make-parameter newline))
(define format-help-string (define format-help-string
(make-parameter "supported directives: ~~ ~% ~% ~& ~t ~_ ~a ~s ~w ~y ~c ~b ~o ~d ~x ~f ~? ~k ~*")) (make-parameter "supported directives: ~~ ~% ~& ~t ~_ ~a ~s ~w ~y ~c ~b ~o ~d ~x ~f ~? ~k ~* ~!"))
(define (fprintf p fs . args) (define (fprintf p fs . args)
(define (hd args) (define (hd args)
@ -1988,12 +1988,13 @@
(when (null? (cdr fl)) (error "format: incomplete escape sequence")) (when (null? (cdr fl)) (error "format: incomplete escape sequence"))
(let* ([w -1] [d -1] [fl (memd (cdr fl) (set& w) (set& d))]) (let* ([w -1] [d -1] [fl (memd (cdr fl) (set& w) (set& d))])
(case (char-downcase (car fl)) (case (char-downcase (car fl))
[(#\*) (lp (cdr fl) (cddr args))] ;+ CL [(#\*) (lp (cdr fl) (cddr args))] ;+ CL, skips 1 arg
[(#\~) (write-char #\~ p) (lp (cdr fl) args)] [(#\~) (write-char #\~ p) (lp (cdr fl) args)]
[(#\%) (newline p) (lp (cdr fl) args)] [(#\%) (newline p) (lp (cdr fl) args)]
[(#\t) (write-char #\tab p) (lp (cdr fl) args)] [(#\t) (write-char #\tab p) (lp (cdr fl) args)]
[(#\_) (write-char #\space p) (lp (cdr fl) args)] [(#\_) (write-char #\space p) (lp (cdr fl) args)]
[(#\&) ((format-fresh-line) p) (lp (cdr fl) args)] [(#\&) ((format-fresh-line) p) (lp (cdr fl) args)]
[(#\!) (flush-output-port p) (lp (cdr fl) args)] ;+ common
[(#\s) (write (hd args) p) (lp (cdr fl) (cdr args))] [(#\s) (write (hd args) p) (lp (cdr fl) (cdr args))]
[(#\a) (display (hd args) p) (lp (cdr fl) (cdr args))] [(#\a) (display (hd args) p) (lp (cdr fl) (cdr args))]
[(#\w) (write-shared (hd args) p) (lp (cdr fl) (cdr args))] [(#\w) (write-shared (hd args) p) (lp (cdr fl) (cdr args))]

123
src/t.scm
View file

@ -2244,76 +2244,69 @@
(for-each print vals))) (for-each print vals)))
(define (repl-read ip prompt op) (define (repl-read ip prompt op)
(when prompt (newline op) (display prompt op) (display " " op)) (when prompt (format op "~%~a ~!" prompt))
(read-code-sexp ip)) (read-code-sexp ip))
(define (repl-exec-command cmd argstr op) (define (repl-exec-command cmd argstr op)
(define args (define args
(if (memq cmd '(peek sh)) ; do not expect s-exps! (if (memq cmd '(load sh)) ; do not expect s-exps!
(list (string-trim-whitespace argstr)) (list (string-trim-whitespace argstr))
(guard (err [else (void)]) (read-port-sexps (open-input-string argstr))))) (guard (err [else (void)]) (read-port-sexps (open-input-string argstr)))))
(define cmd+args (cons cmd args)) (let retry ([cmd+args (cons cmd args)])
(sexp-case cmd+args (sexp-case cmd+args
[(say hello) (display "Well, hello!\n" op)] [(ref <symbol>) (write (repl-environment (car args) 'ref) op) (newline op)]
[(ref <symbol>) (write (repl-environment (car args) 'ref) op) (newline op)] [(ref (* * ...)) (write (repl-environment (car args) 'ref) op) (newline op)]
[(ref (* * ...)) (write (repl-environment (car args) 'ref) op) (newline op)] [(rnr) (write *root-name-registry* op) (newline op)]
[(rnr) (write *root-name-registry* op) (newline op)] [(rref *) (write (name-lookup *root-name-registry* (car args) #f) op) (newline op)]
[(rref *) (write (name-lookup *root-name-registry* (car args) #f) op) (newline op)] [(rrem! *) (cond [(name-lookup *root-name-registry* (car args) #f)
[(rrem! *) (cond [(name-lookup *root-name-registry* (car args) #f) (name-remove! *root-name-registry* (car args)) (display "done!\n" op)]
(name-remove! *root-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)])] [(unr) (write *user-name-registry* op) (newline op)]
[(unr) (write *user-name-registry* op) (newline op)] [(uref *) (write (name-lookup *user-name-registry* (car args) #f) op) (newline op)]
[(uref *) (write (name-lookup *user-name-registry* (car args) #f) op) (newline op)] [(urem! *) (cond [(name-lookup *user-name-registry* (car args) #f)
[(urem! *) (cond [(name-lookup *user-name-registry* (car args) #f) (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>) (let* ([k (car args)] [v (global-store)] [i (immediate-hash k (vector-length v))]) (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))] (write (cond [(assq k (vector-ref v i)) => cdr] [else #f]) op) (newline op))]
[(peek *) [(load <string>) (load (car args))]
(cond [(string? (car args)) [(verbose on) (set! *verbose* #t)]
(display (if (file-exists? (car args)) [(verbose off) (set! *verbose* #f)]
"file exists\n" "file does not exist\n") op)] [(v) (set! *verbose* #t)]
[(symbol? (car args)) [(quiet on) (set! *quiet* #t)]
(display (if (file-exists? (symbol->string (car args))) [(quiet off) (set! *quiet* #f)]
"file exists\n" "file does not exist\n") op)] [(q) (set! *quiet* #t)]
[else (display "invalid file name; use double quotes\n" op)])] [(time *) (let ([start (current-jiffy)])
[(v) (set! *verbose* #t)] (repl-evaluate-top-form (car args) repl-environment op)
[(verbose on) (set! *verbose* #t)] (format #t "; elapsed time: ~s ms.~%"
[(verbose off) (set! *verbose* #f)] (* 1000 (/ (- (current-jiffy) start) (jiffies-per-second)))))]
[(q) (set! *quiet* #t)] [(sh <string>) (%system (car args))]
[(quiet on) (set! *quiet* #t)] [(help)
[(quiet off) (set! *quiet* #f)] (display "\nAvailable commands:\n" op)
[(time *) (let ([start (current-jiffy)]) (display " ,load <fname> -- loads <fname> (no quotes needed)\n" op)
(repl-evaluate-top-form (car args) repl-environment op) (display " ,q -- disable informational messages\n" op)
(format #t "; elapsed time: ~s ms.~%" (display " ,quiet on -- disable informational messages\n" op)
(* 1000 (/ (- (current-jiffy) start) (jiffies-per-second)))))] (display " ,quiet off -- enable informational messages\n" op)
[(sh <string>) (%system (car args))] (display " ,v -- turn verbosity on\n" op)
[(help) (display " ,verbose on -- turn verbosity on\n" op)
(display "Available commands:\n" op) (display " ,verbose off -- turn verbosity off\n" op)
(display " ,say hello -- displays nice greeting\n" op) (display " ,ref <name> -- show denotation for <name> (may alloc)\n" op)
(display " ,peek <fname> -- check if file exists\n" op) (display " ,rnr -- show root name registry\n" op)
(display " ,q -- disable informational messages\n" op) (display " ,rref <name> -- lookup name in root registry\n" op)
(display " ,quiet on -- disable informational messages\n" op) (display " ,rrem! <name> -- remove name from root registry\n" op)
(display " ,quiet off -- enable informational messages\n" op) (display " ,unr -- show user name registry\n" op)
(display " ,v -- turn verbosity on\n" op) (display " ,uref <name> -- lookup name in user registry\n" op)
(display " ,verbose on -- turn verbosity on\n" op) (display " ,urem! <name> -- remove name from user registry\n" op)
(display " ,verbose off -- turn verbosity off\n" op) (display " ,gs -- show global store (big!)\n" op)
(display " ,ref <name> -- show denotation for <name> (may alloc)\n" op) (display " ,gs <name> -- lookup global location for <name>\n" op)
(display " ,rnr -- show root name registry\n" op) (display " ,time <expr> -- time short expression <expr>\n" op)
(display " ,rref <name> -- lookup name in root registry\n" op) (display " ,sh <cmdline> -- send <cmdline> to local shell\n" op)
(display " ,rrem! <name> -- remove name from root registry\n" op) (display " ,help -- this help\n" op)]
(display " ,unr -- show user name registry\n" op) [(h) (retry '(help))]
(display " ,uref <name> -- lookup name in user registry\n" op) [else
(display " ,urem! <name> -- remove name from user registry\n" op) (display "syntax error in repl command\n" op)
(display " ,gs -- show global store (big!)\n" op) (display "type ,help to see available commands\n" op)])))
(display " ,gs <name> -- lookup global location for <name>\n" op)
(display " ,time <expr> -- time short expression <expr>\n" op)
(display " ,sh <cmdline> -- send <cmdline> to local shell\n" op)
(display " ,help -- this help\n" op)]
[else
(display "syntax error in repl command\n" op)
(display "type ,help to see available commands\n" op)]))
(define (repl-from-port ip env prompt op) (define (repl-from-port ip env prompt op)
(define cfs (current-file-stack)) (define cfs (current-file-stack))
@ -2354,7 +2347,7 @@
(when (and (tty-port? (current-input-port)) (tty-port? (current-output-port))) (when (and (tty-port? (current-input-port)) (tty-port? (current-output-port)))
; quick check for non-interactive use failed, greet ; quick check for non-interactive use failed, greet
(display "SKINT Scheme Interpreter v0.0.9\n") (display "SKINT Scheme Interpreter v0.0.9\n")
(display "Copyright (c) 2024 False Schemers\n\n")) (display "Copyright (c) 2024 False Schemers\n"))
#t) ; exited normally #t) ; exited normally
(define (repl) (define (repl)

117
t.c
View file

@ -1398,67 +1398,64 @@ char *t_code[] = {
"list1?)[01}?{.0^aY8}{f}~?{.0^,.2^,@(y10:%25for-each1)[52}]5", "list1?)[01}?{.0^aY8}{f}~?{.0^,.2^,@(y10:%25for-each1)[52}]5",
"P", "repl-read", "P", "repl-read",
"%3.1?{.2W6.2,.2W4.2,'(s1: )W4}.0,@(y14:read-code-sexp)[31", "%3.1?{${.3,'(s7:~%25~a ~!),.6,@(y6:format)[03}}.0,@(y14:read-code-sexp"
")[31",
"P", "repl-exec-command", "P", "repl-exec-command",
"%3,,#0#1'(l2:y4:peek;y2:sh;),.3A0?{${.5,@(y22:string-trim-whitespace)[" "%3,#0'(l2:y4:load;y2:sh;),.2A0?{${.4,@(y22:string-trim-whitespace)[01}"
"01},l1}{${${k0,.0,${.2,.(i12),&2{%0:1,&1{%!0.0,&1{%0:0,@(y6:values),@(" ",l1}{${${k0,.0,${.2,.(i11),&2{%0:1,&1{%!0.0,&1{%0:0,@(y6:values),@(y13"
"y13:apply-to-list)[02},:0[11},:0,&1{%0:0P50,@(y15:read-port-sexps)[01}" ":apply-to-list)[02},:0[11},:0,&1{%0:0P50,@(y15:read-port-sexps)[01},@("
",@(y16:call-with-values)[02},.3,&1{%1${k0,.0,${.6,&1{%0:0,Y9]1},:0[01}" "y16:call-with-values)[02},.3,&1{%1${k0,.0,${.6,&1{%0:0,Y9]1},:0[01}_1_"
"_1_3}[10},@(y22:with-exception-handler)[02}_1_3}[00}}.!0.0^,.3c.!1${.3" "3}[10},@(y22:with-exception-handler)[02}_1_3}[00}}.!0.0^,.2c,,#0.5,.1,"
"^,'(l2:y3:say;y5:hello;),@(y11:sexp-match?)[02}?{.4,'(s13:Well, hello!" ".4,&3{%1${.2,'(l2:y3:ref;y8:<symbol>;),@(y11:sexp-match?)[02}?{:2,${'("
"%0a)W4]5}${.3^,'(l2:y3:ref;y8:<symbol>;),@(y11:sexp-match?)[02}?{.4,${" "y3:ref),:0^a,@(y16:repl-environment)[02}W5:2W6]1}${.2,'(l2:y3:ref;l3:y"
"'(y3:ref),.4^a,@(y16:repl-environment)[02}W5.4W6]5}${.3^,'(l2:y3:ref;l" "1:*;y1:*;y3:...;;),@(y11:sexp-match?)[02}?{:2,${'(y3:ref),:0^a,@(y16:r"
"3:y1:*;y1:*;y3:...;;),@(y11:sexp-match?)[02}?{.4,${'(y3:ref),.4^a,@(y1" "epl-environment)[02}W5:2W6]1}${.2,'(l1:y3:rnr;),@(y11:sexp-match?)[02}"
"6:repl-environment)[02}W5.4W6]5}${.3^,'(l1:y3:rnr;),@(y11:sexp-match?)" "?{:2,@(y20:*root-name-registry*)W5:2W6]1}${.2,'(l2:y4:rref;y1:*;),@(y1"
"[02}?{.4,@(y20:*root-name-registry*)W5.4W6]5}${.3^,'(l2:y4:rref;y1:*;)" "1:sexp-match?)[02}?{:2,${f,:0^a,@(y20:*root-name-registry*),@(y11:name"
",@(y11:sexp-match?)[02}?{.4,${f,.4^a,@(y20:*root-name-registry*),@(y11" "-lookup)[03}W5:2W6]1}${.2,'(l2:y5:rrem!;y1:*;),@(y11:sexp-match?)[02}?"
":name-lookup)[03}W5.4W6]5}${.3^,'(l2:y5:rrem!;y1:*;),@(y11:sexp-match?" "{${f,:0^a,@(y20:*root-name-registry*),@(y11:name-lookup)[03}?{${:0^a,@"
")[02}?{${f,.3^a,@(y20:*root-name-registry*),@(y11:name-lookup)[03}?{${" "(y20:*root-name-registry*),@(y12:name-remove!)[02}:2,'(s6:done!%0a)W4]"
".2^a,@(y20:*root-name-registry*),@(y12:name-remove!)[02}.4,'(s6:done!%" "1}:2,'(s16:name not found: )W4:2,@(y4:name)W5:2W6]1}${.2,'(l1:y3:unr;)"
"0a)W4]5}.4,'(s16:name not found: )W4.4,@(y4:name)W5.4W6]5}${.3^,'(l1:y" ",@(y11:sexp-match?)[02}?{:2,@(y20:*user-name-registry*)W5:2W6]1}${.2,'"
"3:unr;),@(y11:sexp-match?)[02}?{.4,@(y20:*user-name-registry*)W5.4W6]5" "(l2:y4:uref;y1:*;),@(y11:sexp-match?)[02}?{:2,${f,:0^a,@(y20:*user-nam"
"}${.3^,'(l2:y4:uref;y1:*;),@(y11:sexp-match?)[02}?{.4,${f,.4^a,@(y20:*" "e-registry*),@(y11:name-lookup)[03}W5:2W6]1}${.2,'(l2:y5:urem!;y1:*;),"
"user-name-registry*),@(y11:name-lookup)[03}W5.4W6]5}${.3^,'(l2:y5:urem" "@(y11:sexp-match?)[02}?{${f,:0^a,@(y20:*user-name-registry*),@(y11:nam"
"!;y1:*;),@(y11:sexp-match?)[02}?{${f,.3^a,@(y20:*user-name-registry*)," "e-lookup)[03}?{${:0^a,@(y20:*user-name-registry*),@(y12:name-remove!)["
"@(y11:name-lookup)[03}?{${.2^a,@(y20:*user-name-registry*),@(y12:name-" "02}:2,'(s6:done!%0a)W4]1}:2,'(s16:name not found: )W4:2,@(y4:name)W5:2"
"remove!)[02}.4,'(s6:done!%0a)W4]5}.4,'(s16:name not found: )W4.4,@(y4:" "W6]1}${.2,'(l1:y2:gs;),@(y11:sexp-match?)[02}?{:2,U2W5:2W6]1}${.2,'(l2"
"name)W5.4W6]5}${.3^,'(l1:y2:gs;),@(y11:sexp-match?)[02}?{.4,U2W5.4W6]5" ":y2:gs;y8:<symbol>;),@(y11:sexp-match?)[02}?{:0^a,U2,.0V3,.2H2,:2,.1,."
"}${.3^,'(l2:y2:gs;y8:<symbol>;),@(y11:sexp-match?)[02}?{.0^a,U2,.0V3,." "3V4,.4A3,.0?{.0d}{f}_1W5:2W6]4}${.2,'(l2:y4:load;y8:<string>;),@(y11:s"
"2H2,.7,.1,.3V4,.4A3,.0?{.0d}{f}_1W5.7W6]8}${.3^,'(l2:y4:peek;y1:*;),@(" "exp-match?)[02}?{:0^a,@(y4:load)[11}${.2,'(l2:y7:verbose;y2:on;),@(y11"
"y11:sexp-match?)[02}?{.0^aS0?{.4,.1^aF0?{'(s12:file exists%0a)}{'(s20:" ":sexp-match?)[02}?{t@!(y9:*verbose*)]1}${.2,'(l2:y7:verbose;y3:off;),@"
"file does not exist%0a)}W4]5}.0^aY0?{.4,.1^aX4F0?{'(s12:file exists%0a" "(y11:sexp-match?)[02}?{f@!(y9:*verbose*)]1}${.2,'(l1:y1:v;),@(y11:sexp"
")}{'(s20:file does not exist%0a)}W4]5}.4,'(s37:invalid file name; use " "-match?)[02}?{t@!(y9:*verbose*)]1}${.2,'(l2:y5:quiet;y2:on;),@(y11:sex"
"double quotes%0a)W4]5}${.3^,'(l1:y1:v;),@(y11:sexp-match?)[02}?{t@!(y9" "p-match?)[02}?{t@!(y7:*quiet*)]1}${.2,'(l2:y5:quiet;y3:off;),@(y11:sex"
":*verbose*)]5}${.3^,'(l2:y7:verbose;y2:on;),@(y11:sexp-match?)[02}?{t@" "p-match?)[02}?{f@!(y7:*quiet*)]1}${.2,'(l1:y1:q;),@(y11:sexp-match?)[0"
"!(y9:*verbose*)]5}${.3^,'(l2:y7:verbose;y3:off;),@(y11:sexp-match?)[02" "2}?{t@!(y7:*quiet*)]1}${.2,'(l2:y4:time;y1:*;),@(y11:sexp-match?)[02}?"
"}?{f@!(y9:*verbose*)]5}${.3^,'(l1:y1:q;),@(y11:sexp-match?)[02}?{t@!(y" "{Z3,${:2,@(y16:repl-environment),:0^a,@(y22:repl-evaluate-top-form)[03"
"7:*quiet*)]5}${.3^,'(l2:y5:quiet;y2:on;),@(y11:sexp-match?)[02}?{t@!(y" "}Z4,.1,Z3-/,'(i1000)*,'(s24:; elapsed time: ~s ms.~%25),t,@(y6:format)"
"7:*quiet*)]5}${.3^,'(l2:y5:quiet;y3:off;),@(y11:sexp-match?)[02}?{f@!(" "[23}${.2,'(l2:y2:sh;y8:<string>;),@(y11:sexp-match?)[02}?{:0^aZ6]1}${."
"y7:*quiet*)]5}${.3^,'(l2:y4:time;y1:*;),@(y11:sexp-match?)[02}?{Z3,${." "2,'(l1:y4:help;),@(y11:sexp-match?)[02}?{:2,'(s21:%0aAvailable command"
"7,@(y16:repl-environment),.5^a,@(y22:repl-evaluate-top-form)[03}Z4,.1," "s:%0a)W4:2,'(s52: ,load <fname> -- loads <fname> (no quotes needed)%0"
"Z3-/,'(i1000)*,'(s24:; elapsed time: ~s ms.~%25),t,@(y6:format)[63}${." "a)W4:2,'(s50: ,q -- disable informational messages%0a)W4:2"
"3^,'(l2:y2:sh;y8:<string>;),@(y11:sexp-match?)[02}?{.0^aZ6]5}${.3^,'(l" ",'(s50: ,quiet on -- disable informational messages%0a)W4:2,'(s49"
"1:y4:help;),@(y11:sexp-match?)[02}?{.4,'(s20:Available commands:%0a)W4" ": ,quiet off -- enable informational messages%0a)W4:2,'(s37: ,v "
".4,'(s42: ,say hello -- displays nice greeting%0a)W4.4,'(s40: ,pee" " -- turn verbosity on%0a)W4:2,'(s37: ,verbose on -- turn v"
"k <fname> -- check if file exists%0a)W4.4,'(s50: ,q -- di" "erbosity on%0a)W4:2,'(s38: ,verbose off -- turn verbosity off%0a)W4:"
"sable informational messages%0a)W4.4,'(s50: ,quiet on -- disable " "2,'(s58: ,ref <name> -- show denotation for <name> (may alloc)%0a)W"
"informational messages%0a)W4.4,'(s49: ,quiet off -- enable informa" "4:2,'(s43: ,rnr -- show root name registry%0a)W4:2,'(s48: ,r"
"tional messages%0a)W4.4,'(s37: ,v -- turn verbosity on%0a)" "ref <name> -- lookup name in root registry%0a)W4:2,'(s50: ,rrem! <na"
"W4.4,'(s37: ,verbose on -- turn verbosity on%0a)W4.4,'(s38: ,verbos" "me> -- remove name from root registry%0a)W4:2,'(s43: ,unr -"
"e off -- turn verbosity off%0a)W4.4,'(s58: ,ref <name> -- show de" "- show user name registry%0a)W4:2,'(s48: ,uref <name> -- lookup name"
"notation for <name> (may alloc)%0a)W4.4,'(s43: ,rnr -- show " " in user registry%0a)W4:2,'(s50: ,urem! <name> -- remove name from us"
"root name registry%0a)W4.4,'(s48: ,rref <name> -- lookup name in roo" "er registry%0a)W4:2,'(s44: ,gs -- show global store (big!)%"
"t registry%0a)W4.4,'(s50: ,rrem! <name> -- remove name from root regi" "0a)W4:2,'(s53: ,gs <name> -- lookup global location for <name>%0a)"
"stry%0a)W4.4,'(s43: ,unr -- show user name registry%0a)W4.4," "W4:2,'(s48: ,time <expr> -- time short expression <expr>%0a)W4:2,'(s"
"'(s48: ,uref <name> -- lookup name in user registry%0a)W4.4,'(s50: ," "49: ,sh <cmdline> -- send <cmdline> to local shell%0a)W4:2,'(s29: ,he"
"urem! <name> -- remove name from user registry%0a)W4.4,'(s44: ,gs " "lp -- this help%0a)W4]1}${.2,'(l1:y1:h;),@(y11:sexp-match?)[0"
" -- show global store (big!)%0a)W4.4,'(s53: ,gs <name> -- l" "2}?{'(l1:y4:help;),:1^[11}:2,'(s29:syntax error in repl command%0a)W4:"
"ookup global location for <name>%0a)W4.4,'(s48: ,time <expr> -- time" "2,'(s37:type ,help to see available commands%0a)W4]1}.!0.0^_1[41",
" short expression <expr>%0a)W4.4,'(s49: ,sh <cmdline> -- send <cmdlin"
"e> to local shell%0a)W4.4,'(s29: ,help -- this help%0a)W4]5}."
"4,'(s29:syntax error in repl command%0a)W4.4,'(s37:type ,help to see a"
"vailable commands%0a)W4]5",
"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),."
@ -1489,7 +1486,7 @@ char *t_code[] = {
"P", "repl-main", "P", "repl-main",
"%0PiP09?{PoP09}{f}?{Po,'(s32:SKINT Scheme Interpreter v0.0.9%0a)W4Po,'" "%0PiP09?{PoP09}{f}?{Po,'(s32:SKINT Scheme Interpreter v0.0.9%0a)W4Po,'"
"(s35:Copyright (c) 2024 False Schemers%0a%0a)W4}t]0", "(s34:Copyright (c) 2024 False Schemers%0a)W4}t]0",
"P", "repl", "P", "repl",
"%0,,,#0#1#2Pi.!0Po.!1.0^P09?{'(s6:skint])}{f}.!2${n,@(y23:set-current-" "%0,,,#0#1#2Pi.!0Po.!1.0^P09?{'(s6:skint])}{f}.!2${n,@(y23:set-current-"