shen-ruby 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,27 +61,27 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
61
61
 
62
62
  (defun shen.initialise_environment () (shen.multiple-set (cons shen.*call* (cons 0 (cons shen.*infs* (cons 0 (cons shen.*process-counter* (cons 0 (cons shen.*catch* (cons 0 ()))))))))))
63
63
 
64
- (defun shen.multiple-set (V2298) (cond ((= () V2298) ()) ((and (cons? V2298) (cons? (tl V2298))) (do (set (hd V2298) (hd (tl V2298))) (shen.multiple-set (tl (tl V2298))))) (true (shen.sys-error shen.multiple-set))))
64
+ (defun shen.multiple-set (V2316) (cond ((= () V2316) ()) ((and (cons? V2316) (cons? (tl V2316))) (do (set (hd V2316) (hd (tl V2316))) (shen.multiple-set (tl (tl V2316))))) (true (shen.sys-error shen.multiple-set))))
65
65
 
66
- (defun destroy (V2299) (declare V2299 symbol))
66
+ (defun destroy (V2317) (declare V2317 symbol))
67
67
 
68
68
  (set shen.*history* ())
69
69
 
70
70
  (defun shen.read-evaluate-print () (let Lineread (shen.toplineread) (let History (value shen.*history*) (let NewLineread (shen.retrieve-from-history-if-needed Lineread History) (let NewHistory (shen.update_history NewLineread History) (let Parsed (fst NewLineread) (shen.toplevel Parsed)))))))
71
71
 
72
- (defun shen.retrieve-from-history-if-needed (V2309 V2310) (cond ((and (tuple? V2309) (and (cons? (snd V2309)) (element? (hd (snd V2309)) (cons (shen.space) (cons (shen.newline) ()))))) (shen.retrieve-from-history-if-needed (@p (fst V2309) (tl (snd V2309))) V2310)) ((and (tuple? V2309) (and (cons? (snd V2309)) (and (cons? (tl (snd V2309))) (and (= () (tl (tl (snd V2309)))) (and (cons? V2310) (and (= (hd (snd V2309)) (shen.exclamation)) (= (hd (tl (snd V2309))) (shen.exclamation)))))))) (let PastPrint (shen.prbytes (snd (hd V2310))) (hd V2310))) ((and (tuple? V2309) (and (cons? (snd V2309)) (= (hd (snd V2309)) (shen.exclamation)))) (let Key? (shen.make-key (tl (snd V2309)) V2310) (let Find (head (shen.find-past-inputs Key? V2310)) (let PastPrint (shen.prbytes (snd Find)) Find)))) ((and (tuple? V2309) (and (cons? (snd V2309)) (and (= () (tl (snd V2309))) (= (hd (snd V2309)) (shen.percent))))) (do (shen.print-past-inputs (lambda X true) (reverse V2310) 0) (abort))) ((and (tuple? V2309) (and (cons? (snd V2309)) (= (hd (snd V2309)) (shen.percent)))) (let Key? (shen.make-key (tl (snd V2309)) V2310) (let Pastprint (shen.print-past-inputs Key? (reverse V2310) 0) (abort)))) (true V2309)))
72
+ (defun shen.retrieve-from-history-if-needed (V2327 V2328) (cond ((and (tuple? V2327) (and (cons? (snd V2327)) (element? (hd (snd V2327)) (cons (shen.space) (cons (shen.newline) ()))))) (shen.retrieve-from-history-if-needed (@p (fst V2327) (tl (snd V2327))) V2328)) ((and (tuple? V2327) (and (cons? (snd V2327)) (and (cons? (tl (snd V2327))) (and (= () (tl (tl (snd V2327)))) (and (cons? V2328) (and (= (hd (snd V2327)) (shen.exclamation)) (= (hd (tl (snd V2327))) (shen.exclamation)))))))) (let PastPrint (shen.prbytes (snd (hd V2328))) (hd V2328))) ((and (tuple? V2327) (and (cons? (snd V2327)) (= (hd (snd V2327)) (shen.exclamation)))) (let Key? (shen.make-key (tl (snd V2327)) V2328) (let Find (head (shen.find-past-inputs Key? V2328)) (let PastPrint (shen.prbytes (snd Find)) Find)))) ((and (tuple? V2327) (and (cons? (snd V2327)) (and (= () (tl (snd V2327))) (= (hd (snd V2327)) (shen.percent))))) (do (shen.print-past-inputs (lambda X true) (reverse V2328) 0) (abort))) ((and (tuple? V2327) (and (cons? (snd V2327)) (= (hd (snd V2327)) (shen.percent)))) (let Key? (shen.make-key (tl (snd V2327)) V2328) (let Pastprint (shen.print-past-inputs Key? (reverse V2328) 0) (abort)))) (true V2327)))
73
73
 
74
74
  (defun shen.percent () 37)
75
75
 
76
76
  (defun shen.exclamation () 33)
77
77
 
78
- (defun shen.prbytes (V2311) (do (map (lambda Byte (pr (n->string Byte) (stoutput))) V2311) (nl 1)))
78
+ (defun shen.prbytes (V2329) (do (map (lambda Byte (pr (n->string Byte) (stoutput))) V2329) (nl 1)))
79
79
 
80
- (defun shen.update_history (V2312 V2313) (set shen.*history* (cons V2312 V2313)))
80
+ (defun shen.update_history (V2330 V2331) (set shen.*history* (cons V2330 V2331)))
81
81
 
82
82
  (defun shen.toplineread () (shen.toplineread_loop (read-byte (stinput)) ()))
83
83
 
84
- (defun shen.toplineread_loop (V2315 V2316) (cond ((= V2315 (shen.hat)) (simple-error "line read aborted")) ((element? V2315 (cons (shen.newline) (cons (shen.carriage-return) ()))) (let Line (compile shen.<st_input> V2316 (lambda E shen.nextline)) (if (or (= Line shen.nextline) (empty? Line)) (shen.toplineread_loop (read-byte (stinput)) (append V2316 (cons V2315 ()))) (@p Line V2316)))) (true (shen.toplineread_loop (read-byte (stinput)) (append V2316 (cons V2315 ()))))))
84
+ (defun shen.toplineread_loop (V2333 V2334) (cond ((= V2333 (shen.hat)) (simple-error "line read aborted")) ((element? V2333 (cons (shen.newline) (cons (shen.carriage-return) ()))) (let Line (compile shen.<st_input> V2334 (lambda E shen.nextline)) (if (or (= Line shen.nextline) (empty? Line)) (shen.toplineread_loop (read-byte (stinput)) (append V2334 (cons V2333 ()))) (@p Line V2334)))) (true (shen.toplineread_loop (read-byte (stinput)) (append V2334 (cons V2333 ()))))))
85
85
 
86
86
  (defun shen.hat () 94)
87
87
 
@@ -89,7 +89,7 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
89
89
 
90
90
  (defun shen.carriage-return () 13)
91
91
 
92
- (defun tc (V2321) (cond ((= + V2321) (set shen.*tc* true)) ((= - V2321) (set shen.*tc* false)) (true (simple-error "tc expects a + or -"))))
92
+ (defun tc (V2339) (cond ((= + V2339) (set shen.*tc* true)) ((= - V2339) (set shen.*tc* false)) (true (simple-error "tc expects a + or -"))))
93
93
 
94
94
  (defun shen.prompt () (if (value shen.*tc*) (shen.prhush (cn "
95
95
 
@@ -97,16 +97,16 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
97
97
 
98
98
  (" (shen.app (length (value shen.*history*)) "-) " shen.a)) (stoutput))))
99
99
 
100
- (defun shen.toplevel (V2322) (shen.toplevel_evaluate V2322 (value shen.*tc*)))
100
+ (defun shen.toplevel (V2340) (shen.toplevel_evaluate V2340 (value shen.*tc*)))
101
101
 
102
- (defun shen.find-past-inputs (V2323 V2324) (let F (shen.find V2323 V2324) (if (empty? F) (simple-error "input not found
102
+ (defun shen.find-past-inputs (V2341 V2342) (let F (shen.find V2341 V2342) (if (empty? F) (simple-error "input not found
103
103
  ") F)))
104
104
 
105
- (defun shen.make-key (V2325 V2326) (let Atom (hd (compile shen.<st_input> V2325 (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
105
+ (defun shen.make-key (V2343 V2344) (let Atom (hd (compile shen.<st_input> V2343 (lambda E (if (cons? E) (simple-error (cn "parse error here: " (shen.app E "
106
106
  " shen.s))) (simple-error "parse error
107
- "))))) (if (integer? Atom) (lambda X (= X (nth (+ Atom 1) (reverse V2326)))) (lambda X (shen.prefix? V2325 (shen.trim-gubbins (snd X)))))))
107
+ "))))) (if (integer? Atom) (lambda X (= X (nth (+ Atom 1) (reverse V2344)))) (lambda X (shen.prefix? V2343 (shen.trim-gubbins (snd X)))))))
108
108
 
109
- (defun shen.trim-gubbins (V2327) (cond ((and (cons? V2327) (= (hd V2327) (shen.space))) (shen.trim-gubbins (tl V2327))) ((and (cons? V2327) (= (hd V2327) (shen.newline))) (shen.trim-gubbins (tl V2327))) ((and (cons? V2327) (= (hd V2327) (shen.carriage-return))) (shen.trim-gubbins (tl V2327))) ((and (cons? V2327) (= (hd V2327) (shen.tab))) (shen.trim-gubbins (tl V2327))) ((and (cons? V2327) (= (hd V2327) (shen.left-round))) (shen.trim-gubbins (tl V2327))) (true V2327)))
109
+ (defun shen.trim-gubbins (V2345) (cond ((and (cons? V2345) (= (hd V2345) (shen.space))) (shen.trim-gubbins (tl V2345))) ((and (cons? V2345) (= (hd V2345) (shen.newline))) (shen.trim-gubbins (tl V2345))) ((and (cons? V2345) (= (hd V2345) (shen.carriage-return))) (shen.trim-gubbins (tl V2345))) ((and (cons? V2345) (= (hd V2345) (shen.tab))) (shen.trim-gubbins (tl V2345))) ((and (cons? V2345) (= (hd V2345) (shen.left-round))) (shen.trim-gubbins (tl V2345))) (true V2345)))
110
110
 
111
111
  (defun shen.space () 32)
112
112
 
@@ -114,22 +114,22 @@ port " (shen.app (value *port*) (cn " ported by " (shen.app (value *porters*) "
114
114
 
115
115
  (defun shen.left-round () 40)
116
116
 
117
- (defun shen.find (V2334 V2335) (cond ((= () V2335) ()) ((and (cons? V2335) (V2334 (hd V2335))) (cons (hd V2335) (shen.find V2334 (tl V2335)))) ((cons? V2335) (shen.find V2334 (tl V2335))) (true (shen.sys-error shen.find))))
117
+ (defun shen.find (V2352 V2353) (cond ((= () V2353) ()) ((and (cons? V2353) (V2352 (hd V2353))) (cons (hd V2353) (shen.find V2352 (tl V2353)))) ((cons? V2353) (shen.find V2352 (tl V2353))) (true (shen.sys-error shen.find))))
118
118
 
119
- (defun shen.prefix? (V2346 V2347) (cond ((= () V2346) true) ((and (cons? V2346) (and (cons? V2347) (= (hd V2347) (hd V2346)))) (shen.prefix? (tl V2346) (tl V2347))) (true false)))
119
+ (defun shen.prefix? (V2364 V2365) (cond ((= () V2364) true) ((and (cons? V2364) (and (cons? V2365) (= (hd V2365) (hd V2364)))) (shen.prefix? (tl V2364) (tl V2365))) (true false)))
120
120
 
121
- (defun shen.print-past-inputs (V2357 V2358 V2359) (cond ((= () V2358) _) ((and (cons? V2358) (not (V2357 (hd V2358)))) (shen.print-past-inputs V2357 (tl V2358) (+ V2359 1))) ((and (cons? V2358) (tuple? (hd V2358))) (do (shen.prhush (shen.app V2359 ". " shen.a) (stoutput)) (do (shen.prbytes (snd (hd V2358))) (shen.print-past-inputs V2357 (tl V2358) (+ V2359 1))))) (true (shen.sys-error shen.print-past-inputs))))
121
+ (defun shen.print-past-inputs (V2375 V2376 V2377) (cond ((= () V2376) _) ((and (cons? V2376) (not (V2375 (hd V2376)))) (shen.print-past-inputs V2375 (tl V2376) (+ V2377 1))) ((and (cons? V2376) (tuple? (hd V2376))) (do (shen.prhush (shen.app V2377 ". " shen.a) (stoutput)) (do (shen.prbytes (snd (hd V2376))) (shen.print-past-inputs V2375 (tl V2376) (+ V2377 1))))) (true (shen.sys-error shen.print-past-inputs))))
122
122
 
123
- (defun shen.toplevel_evaluate (V2360 V2361) (cond ((and (cons? V2360) (and (cons? (tl V2360)) (and (= : (hd (tl V2360))) (and (cons? (tl (tl V2360))) (and (= () (tl (tl (tl V2360)))) (= true V2361)))))) (shen.typecheck-and-evaluate (hd V2360) (hd (tl (tl V2360))))) ((and (cons? V2360) (cons? (tl V2360))) (do (shen.toplevel_evaluate (cons (hd V2360) ()) V2361) (do (nl 1) (shen.toplevel_evaluate (tl V2360) V2361)))) ((and (cons? V2360) (and (= () (tl V2360)) (= true V2361))) (shen.typecheck-and-evaluate (hd V2360) (gensym A))) ((and (cons? V2360) (and (= () (tl V2360)) (= false V2361))) (let Eval (shen.eval-without-macros (hd V2360)) (print Eval))) (true (shen.sys-error shen.toplevel_evaluate))))
123
+ (defun shen.toplevel_evaluate (V2378 V2379) (cond ((and (cons? V2378) (and (cons? (tl V2378)) (and (= : (hd (tl V2378))) (and (cons? (tl (tl V2378))) (and (= () (tl (tl (tl V2378)))) (= true V2379)))))) (shen.typecheck-and-evaluate (hd V2378) (hd (tl (tl V2378))))) ((and (cons? V2378) (cons? (tl V2378))) (do (shen.toplevel_evaluate (cons (hd V2378) ()) V2379) (do (nl 1) (shen.toplevel_evaluate (tl V2378) V2379)))) ((and (cons? V2378) (and (= () (tl V2378)) (= true V2379))) (shen.typecheck-and-evaluate (hd V2378) (gensym A))) ((and (cons? V2378) (and (= () (tl V2378)) (= false V2379))) (let Eval (shen.eval-without-macros (hd V2378)) (print Eval))) (true (shen.sys-error shen.toplevel_evaluate))))
124
124
 
125
- (defun shen.typecheck-and-evaluate (V2362 V2363) (let Typecheck (shen.typecheck V2362 V2363) (if (= Typecheck false) (simple-error "type error
126
- ") (let Eval (shen.eval-without-macros V2362) (let Type (shen.pretty-type Typecheck) (shen.prhush (shen.app Eval (cn " : " (shen.app Type "" shen.r)) shen.s) (stoutput)))))))
125
+ (defun shen.typecheck-and-evaluate (V2380 V2381) (let Typecheck (shen.typecheck V2380 V2381) (if (= Typecheck false) (simple-error "type error
126
+ ") (let Eval (shen.eval-without-macros V2380) (let Type (shen.pretty-type Typecheck) (shen.prhush (shen.app Eval (cn " : " (shen.app Type "" shen.r)) shen.s) (stoutput)))))))
127
127
 
128
- (defun shen.pretty-type (V2364) (shen.mult_subst (value shen.*alphabet*) (shen.extract-pvars V2364) V2364))
128
+ (defun shen.pretty-type (V2382) (shen.mult_subst (value shen.*alphabet*) (shen.extract-pvars V2382) V2382))
129
129
 
130
- (defun shen.extract-pvars (V2369) (cond ((shen.pvar? V2369) (cons V2369 ())) ((cons? V2369) (union (shen.extract-pvars (hd V2369)) (shen.extract-pvars (tl V2369)))) (true ())))
130
+ (defun shen.extract-pvars (V2387) (cond ((shen.pvar? V2387) (cons V2387 ())) ((cons? V2387) (union (shen.extract-pvars (hd V2387)) (shen.extract-pvars (tl V2387)))) (true ())))
131
131
 
132
- (defun shen.mult_subst (V2374 V2375 V2376) (cond ((= () V2374) V2376) ((= () V2375) V2376) ((and (cons? V2374) (cons? V2375)) (shen.mult_subst (tl V2374) (tl V2375) (subst (hd V2374) (hd V2375) V2376))) (true (shen.sys-error shen.mult_subst))))
132
+ (defun shen.mult_subst (V2392 V2393 V2394) (cond ((= () V2392) V2394) ((= () V2393) V2394) ((and (cons? V2392) (cons? V2393)) (shen.mult_subst (tl V2392) (tl V2393) (subst (hd V2392) (hd V2393) V2394))) (true (shen.sys-error shen.mult_subst))))
133
133
 
134
134
 
135
135
 
@@ -152,8 +152,6 @@
152
152
 
153
153
  (declare intersection (cons (cons list (cons A ())) (cons --> (cons (cons (cons list (cons A ())) (cons --> (cons (cons list (cons A ())) ()))) ()))))
154
154
 
155
- (declare kill (cons --> (cons A ())))
156
-
157
155
  (declare language (cons --> (cons string ())))
158
156
 
159
157
  (declare length (cons (cons list (cons A ())) (cons --> (cons number ()))))
@@ -204,7 +202,7 @@
204
202
 
205
203
  (declare shen.proc-nl (cons string (cons --> (cons string ()))))
206
204
 
207
- (declare profile-results (cons A (cons --> (cons symbol ()))))
205
+ (declare profile-results (cons (cons A (cons --> (cons B ()))) (cons --> (cons (cons (cons A (cons --> (cons B ()))) (cons * (cons number ()))) ()))))
208
206
 
209
207
  (declare protect (cons symbol (cons --> (cons symbol ()))))
210
208
 
@@ -274,8 +272,6 @@
274
272
 
275
273
  (declare trap-error (cons A (cons --> (cons (cons (cons exception (cons --> (cons A ()))) (cons --> (cons A ()))) ()))))
276
274
 
277
- (declare shen.truncate (cons string (cons --> (cons string ()))))
278
-
279
275
  (declare tuple? (cons A (cons --> (cons boolean ()))))
280
276
 
281
277
  (declare undefmacro (cons symbol (cons --> (cons symbol ()))))
@@ -47,59 +47,59 @@
47
47
  * explains this license in full. *
48
48
  * *
49
49
  *****************************************************************************************
50
- "(defun pr (V2220 V2221) (trap-error (shen.prh V2220 V2221 0) (lambda E V2220)))
50
+ "(defun pr (V2238 V2239) (trap-error (shen.prh V2238 V2239 0) (lambda E V2238)))
51
51
 
52
- (defun shen.prh (V2222 V2223 V2224) (shen.prh V2222 V2223 (shen.write-char-and-inc V2222 V2223 V2224)))
52
+ (defun shen.prh (V2240 V2241 V2242) (shen.prh V2240 V2241 (shen.write-char-and-inc V2240 V2241 V2242)))
53
53
 
54
- (defun shen.write-char-and-inc (V2225 V2226 V2227) (do (write-byte (string->n (pos V2225 V2227)) V2226) (+ V2227 1)))
54
+ (defun shen.write-char-and-inc (V2243 V2244 V2245) (do (write-byte (string->n (pos V2243 V2245)) V2244) (+ V2245 1)))
55
55
 
56
- (defun print (V2228) (let String (shen.insert V2228 "~S") (let Print (shen.prhush String (stoutput)) V2228)))
56
+ (defun print (V2246) (let String (shen.insert V2246 "~S") (let Print (shen.prhush String (stoutput)) V2246)))
57
57
 
58
- (defun shen.prhush (V2229 V2230) (if (value *hush*) V2229 (pr V2229 V2230)))
58
+ (defun shen.prhush (V2247 V2248) (if (value *hush*) V2247 (pr V2247 V2248)))
59
59
 
60
- (defun shen.mkstr (V2231 V2232) (cond ((string? V2231) (shen.mkstr-l (shen.proc-nl V2231) V2232)) (true (shen.mkstr-r (cons shen.proc-nl (cons V2231 ())) V2232))))
60
+ (defun shen.mkstr (V2249 V2250) (cond ((string? V2249) (shen.mkstr-l (shen.proc-nl V2249) V2250)) (true (shen.mkstr-r (cons shen.proc-nl (cons V2249 ())) V2250))))
61
61
 
62
- (defun shen.mkstr-l (V2233 V2234) (cond ((= () V2234) V2233) ((cons? V2234) (shen.mkstr-l (shen.insert-l (hd V2234) V2233) (tl V2234))) (true (shen.sys-error shen.mkstr-l))))
62
+ (defun shen.mkstr-l (V2251 V2252) (cond ((= () V2252) V2251) ((cons? V2252) (shen.mkstr-l (shen.insert-l (hd V2252) V2251) (tl V2252))) (true (shen.sys-error shen.mkstr-l))))
63
63
 
64
- (defun shen.insert-l (V2237 V2238) (cond ((= "" V2238) "") ((and (shen.+string? V2238) (and (= "~" (pos V2238 0)) (and (shen.+string? (tlstr V2238)) (= "A" (pos (tlstr V2238) 0))))) (cons shen.app (cons V2237 (cons (tlstr (tlstr V2238)) (cons shen.a ()))))) ((and (shen.+string? V2238) (and (= "~" (pos V2238 0)) (and (shen.+string? (tlstr V2238)) (= "R" (pos (tlstr V2238) 0))))) (cons shen.app (cons V2237 (cons (tlstr (tlstr V2238)) (cons shen.r ()))))) ((and (shen.+string? V2238) (and (= "~" (pos V2238 0)) (and (shen.+string? (tlstr V2238)) (= "S" (pos (tlstr V2238) 0))))) (cons shen.app (cons V2237 (cons (tlstr (tlstr V2238)) (cons shen.s ()))))) ((shen.+string? V2238) (shen.factor-cn (cons cn (cons (pos V2238 0) (cons (shen.insert-l V2237 (tlstr V2238)) ()))))) ((and (cons? V2238) (and (= cn (hd V2238)) (and (cons? (tl V2238)) (and (cons? (tl (tl V2238))) (= () (tl (tl (tl V2238)))))))) (cons cn (cons (hd (tl V2238)) (cons (shen.insert-l V2237 (hd (tl (tl V2238)))) ())))) ((and (cons? V2238) (and (= shen.app (hd V2238)) (and (cons? (tl V2238)) (and (cons? (tl (tl V2238))) (and (cons? (tl (tl (tl V2238)))) (= () (tl (tl (tl (tl V2238)))))))))) (cons shen.app (cons (hd (tl V2238)) (cons (shen.insert-l V2237 (hd (tl (tl V2238)))) (tl (tl (tl V2238))))))) (true (shen.sys-error shen.insert-l))))
64
+ (defun shen.insert-l (V2255 V2256) (cond ((= "" V2256) "") ((and (shen.+string? V2256) (and (= "~" (pos V2256 0)) (and (shen.+string? (tlstr V2256)) (= "A" (pos (tlstr V2256) 0))))) (cons shen.app (cons V2255 (cons (tlstr (tlstr V2256)) (cons shen.a ()))))) ((and (shen.+string? V2256) (and (= "~" (pos V2256 0)) (and (shen.+string? (tlstr V2256)) (= "R" (pos (tlstr V2256) 0))))) (cons shen.app (cons V2255 (cons (tlstr (tlstr V2256)) (cons shen.r ()))))) ((and (shen.+string? V2256) (and (= "~" (pos V2256 0)) (and (shen.+string? (tlstr V2256)) (= "S" (pos (tlstr V2256) 0))))) (cons shen.app (cons V2255 (cons (tlstr (tlstr V2256)) (cons shen.s ()))))) ((shen.+string? V2256) (shen.factor-cn (cons cn (cons (pos V2256 0) (cons (shen.insert-l V2255 (tlstr V2256)) ()))))) ((and (cons? V2256) (and (= cn (hd V2256)) (and (cons? (tl V2256)) (and (cons? (tl (tl V2256))) (= () (tl (tl (tl V2256)))))))) (cons cn (cons (hd (tl V2256)) (cons (shen.insert-l V2255 (hd (tl (tl V2256)))) ())))) ((and (cons? V2256) (and (= shen.app (hd V2256)) (and (cons? (tl V2256)) (and (cons? (tl (tl V2256))) (and (cons? (tl (tl (tl V2256)))) (= () (tl (tl (tl (tl V2256)))))))))) (cons shen.app (cons (hd (tl V2256)) (cons (shen.insert-l V2255 (hd (tl (tl V2256)))) (tl (tl (tl V2256))))))) (true (shen.sys-error shen.insert-l))))
65
65
 
66
- (defun shen.factor-cn (V2239) (cond ((and (cons? V2239) (and (= cn (hd V2239)) (and (cons? (tl V2239)) (and (cons? (tl (tl V2239))) (and (cons? (hd (tl (tl V2239)))) (and (= cn (hd (hd (tl (tl V2239))))) (and (cons? (tl (hd (tl (tl V2239))))) (and (cons? (tl (tl (hd (tl (tl V2239)))))) (and (= () (tl (tl (tl (hd (tl (tl V2239))))))) (and (= () (tl (tl (tl V2239)))) (and (string? (hd (tl V2239))) (string? (hd (tl (hd (tl (tl V2239))))))))))))))))) (cons cn (cons (cn (hd (tl V2239)) (hd (tl (hd (tl (tl V2239)))))) (tl (tl (hd (tl (tl V2239)))))))) (true V2239)))
66
+ (defun shen.factor-cn (V2257) (cond ((and (cons? V2257) (and (= cn (hd V2257)) (and (cons? (tl V2257)) (and (cons? (tl (tl V2257))) (and (cons? (hd (tl (tl V2257)))) (and (= cn (hd (hd (tl (tl V2257))))) (and (cons? (tl (hd (tl (tl V2257))))) (and (cons? (tl (tl (hd (tl (tl V2257)))))) (and (= () (tl (tl (tl (hd (tl (tl V2257))))))) (and (= () (tl (tl (tl V2257)))) (and (string? (hd (tl V2257))) (string? (hd (tl (hd (tl (tl V2257))))))))))))))))) (cons cn (cons (cn (hd (tl V2257)) (hd (tl (hd (tl (tl V2257)))))) (tl (tl (hd (tl (tl V2257)))))))) (true V2257)))
67
67
 
68
- (defun shen.proc-nl (V2240) (cond ((= "" V2240) "") ((and (shen.+string? V2240) (and (= "~" (pos V2240 0)) (and (shen.+string? (tlstr V2240)) (= "%" (pos (tlstr V2240) 0))))) (cn (n->string 10) (shen.proc-nl (tlstr (tlstr V2240))))) ((shen.+string? V2240) (cn (pos V2240 0) (shen.proc-nl (tlstr V2240)))) (true (shen.sys-error shen.proc-nl))))
68
+ (defun shen.proc-nl (V2258) (cond ((= "" V2258) "") ((and (shen.+string? V2258) (and (= "~" (pos V2258 0)) (and (shen.+string? (tlstr V2258)) (= "%" (pos (tlstr V2258) 0))))) (cn (n->string 10) (shen.proc-nl (tlstr (tlstr V2258))))) ((shen.+string? V2258) (cn (pos V2258 0) (shen.proc-nl (tlstr V2258)))) (true (shen.sys-error shen.proc-nl))))
69
69
 
70
- (defun shen.mkstr-r (V2241 V2242) (cond ((= () V2242) V2241) ((cons? V2242) (shen.mkstr-r (cons shen.insert (cons (hd V2242) (cons V2241 ()))) (tl V2242))) (true (shen.sys-error shen.mkstr-r))))
70
+ (defun shen.mkstr-r (V2259 V2260) (cond ((= () V2260) V2259) ((cons? V2260) (shen.mkstr-r (cons shen.insert (cons (hd V2260) (cons V2259 ()))) (tl V2260))) (true (shen.sys-error shen.mkstr-r))))
71
71
 
72
- (defun shen.insert (V2243 V2244) (shen.insert-h V2243 V2244 ""))
72
+ (defun shen.insert (V2261 V2262) (shen.insert-h V2261 V2262 ""))
73
73
 
74
- (defun shen.insert-h (V2247 V2248 V2249) (cond ((= "" V2248) V2249) ((and (shen.+string? V2248) (and (= "~" (pos V2248 0)) (and (shen.+string? (tlstr V2248)) (= "A" (pos (tlstr V2248) 0))))) (cn V2249 (shen.app V2247 (tlstr (tlstr V2248)) shen.a))) ((and (shen.+string? V2248) (and (= "~" (pos V2248 0)) (and (shen.+string? (tlstr V2248)) (= "R" (pos (tlstr V2248) 0))))) (cn V2249 (shen.app V2247 (tlstr (tlstr V2248)) shen.r))) ((and (shen.+string? V2248) (and (= "~" (pos V2248 0)) (and (shen.+string? (tlstr V2248)) (= "S" (pos (tlstr V2248) 0))))) (cn V2249 (shen.app V2247 (tlstr (tlstr V2248)) shen.s))) ((shen.+string? V2248) (shen.insert-h V2247 (tlstr V2248) (cn V2249 (pos V2248 0)))) (true (shen.sys-error shen.insert-h))))
74
+ (defun shen.insert-h (V2265 V2266 V2267) (cond ((= "" V2266) V2267) ((and (shen.+string? V2266) (and (= "~" (pos V2266 0)) (and (shen.+string? (tlstr V2266)) (= "A" (pos (tlstr V2266) 0))))) (cn V2267 (shen.app V2265 (tlstr (tlstr V2266)) shen.a))) ((and (shen.+string? V2266) (and (= "~" (pos V2266 0)) (and (shen.+string? (tlstr V2266)) (= "R" (pos (tlstr V2266) 0))))) (cn V2267 (shen.app V2265 (tlstr (tlstr V2266)) shen.r))) ((and (shen.+string? V2266) (and (= "~" (pos V2266 0)) (and (shen.+string? (tlstr V2266)) (= "S" (pos (tlstr V2266) 0))))) (cn V2267 (shen.app V2265 (tlstr (tlstr V2266)) shen.s))) ((shen.+string? V2266) (shen.insert-h V2265 (tlstr V2266) (cn V2267 (pos V2266 0)))) (true (shen.sys-error shen.insert-h))))
75
75
 
76
- (defun shen.app (V2250 V2251 V2252) (cn (shen.arg->str V2250 V2252) V2251))
76
+ (defun shen.app (V2268 V2269 V2270) (cn (shen.arg->str V2268 V2270) V2269))
77
77
 
78
- (defun shen.arg->str (V2258 V2259) (cond ((= V2258 (fail)) "...") ((shen.list? V2258) (shen.list->str V2258 V2259)) ((string? V2258) (shen.str->str V2258 V2259)) ((absvector? V2258) (shen.vector->str V2258 V2259)) (true (shen.atom->str V2258))))
78
+ (defun shen.arg->str (V2276 V2277) (cond ((= V2276 (fail)) "...") ((shen.list? V2276) (shen.list->str V2276 V2277)) ((string? V2276) (shen.str->str V2276 V2277)) ((absvector? V2276) (shen.vector->str V2276 V2277)) (true (shen.atom->str V2276))))
79
79
 
80
- (defun shen.list->str (V2260 V2261) (cond ((= shen.r V2261) (@s "(" (@s (shen.iter-list V2260 shen.r (shen.maxseq)) ")"))) (true (@s "[" (@s (shen.iter-list V2260 V2261 (shen.maxseq)) "]")))))
80
+ (defun shen.list->str (V2278 V2279) (cond ((= shen.r V2279) (@s "(" (@s (shen.iter-list V2278 shen.r (shen.maxseq)) ")"))) (true (@s "[" (@s (shen.iter-list V2278 V2279 (shen.maxseq)) "]")))))
81
81
 
82
82
  (defun shen.maxseq () (value *maximum-print-sequence-size*))
83
83
 
84
- (defun shen.iter-list (V2272 V2273 V2274) (cond ((= () V2272) "") ((= 0 V2274) "... etc") ((and (cons? V2272) (= () (tl V2272))) (shen.arg->str (hd V2272) V2273)) ((cons? V2272) (@s (shen.arg->str (hd V2272) V2273) (@s " " (shen.iter-list (tl V2272) V2273 (- V2274 1))))) (true (@s "|" (@s " " (shen.arg->str V2272 V2273))))))
84
+ (defun shen.iter-list (V2290 V2291 V2292) (cond ((= () V2290) "") ((= 0 V2292) "... etc") ((and (cons? V2290) (= () (tl V2290))) (shen.arg->str (hd V2290) V2291)) ((cons? V2290) (@s (shen.arg->str (hd V2290) V2291) (@s " " (shen.iter-list (tl V2290) V2291 (- V2292 1))))) (true (@s "|" (@s " " (shen.arg->str V2290 V2291))))))
85
85
 
86
- (defun shen.str->str (V2279 V2280) (cond ((= shen.a V2280) V2279) (true (@s (n->string 34) (@s V2279 (n->string 34))))))
86
+ (defun shen.str->str (V2297 V2298) (cond ((= shen.a V2298) V2297) (true (@s (n->string 34) (@s V2297 (n->string 34))))))
87
87
 
88
- (defun shen.vector->str (V2281 V2282) (if (shen.print-vector? V2281) ((<-address V2281 0) V2281) (if (vector? V2281) (@s "<" (@s (shen.iter-vector V2281 1 V2282 (shen.maxseq)) ">")) (@s "<" (@s "<" (@s (shen.iter-vector V2281 0 V2282 (shen.maxseq)) ">>"))))))
88
+ (defun shen.vector->str (V2299 V2300) (if (shen.print-vector? V2299) ((<-address V2299 0) V2299) (if (vector? V2299) (@s "<" (@s (shen.iter-vector V2299 1 V2300 (shen.maxseq)) ">")) (@s "<" (@s "<" (@s (shen.iter-vector V2299 0 V2300 (shen.maxseq)) ">>"))))))
89
89
 
90
- (defun shen.print-vector? (V2283) (let Zero (<-address V2283 0) (if (= Zero shen.tuple) true (if (= Zero shen.pvar) true (if (not (number? Zero)) (shen.fbound? Zero) false)))))
90
+ (defun shen.print-vector? (V2301) (let Zero (<-address V2301 0) (if (= Zero shen.tuple) true (if (= Zero shen.pvar) true (if (not (number? Zero)) (shen.fbound? Zero) false)))))
91
91
 
92
- (defun shen.fbound? (V2284) (trap-error (do (ps V2284) true) (lambda E false)))
92
+ (defun shen.fbound? (V2302) (trap-error (do (ps V2302) true) (lambda E false)))
93
93
 
94
- (defun shen.tuple (V2285) (cn "(@p " (shen.app (<-address V2285 1) (cn " " (shen.app (<-address V2285 2) ")" shen.s)) shen.s)))
94
+ (defun shen.tuple (V2303) (cn "(@p " (shen.app (<-address V2303 1) (cn " " (shen.app (<-address V2303 2) ")" shen.s)) shen.s)))
95
95
 
96
- (defun shen.iter-vector (V2292 V2293 V2294 V2295) (cond ((= 0 V2295) "... etc") (true (let Item (trap-error (<-address V2292 V2293) (lambda E shen.out-of-bounds)) (let Next (trap-error (<-address V2292 (+ V2293 1)) (lambda E shen.out-of-bounds)) (if (= Item shen.out-of-bounds) "" (if (= Next shen.out-of-bounds) (shen.arg->str Item V2294) (@s (shen.arg->str Item V2294) (@s " " (shen.iter-vector V2292 (+ V2293 1) V2294 (- V2295 1)))))))))))
96
+ (defun shen.iter-vector (V2310 V2311 V2312 V2313) (cond ((= 0 V2313) "... etc") (true (let Item (trap-error (<-address V2310 V2311) (lambda E shen.out-of-bounds)) (let Next (trap-error (<-address V2310 (+ V2311 1)) (lambda E shen.out-of-bounds)) (if (= Item shen.out-of-bounds) "" (if (= Next shen.out-of-bounds) (shen.arg->str Item V2312) (@s (shen.arg->str Item V2312) (@s " " (shen.iter-vector V2310 (+ V2311 1) V2312 (- V2313 1)))))))))))
97
97
 
98
- (defun shen.atom->str (V2296) (trap-error (str V2296) (lambda E (shen.funexstring))))
98
+ (defun shen.atom->str (V2314) (trap-error (str V2314) (lambda E (shen.funexstring))))
99
99
 
100
100
  (defun shen.funexstring () (@s "" (@s "f" (@s "u" (@s "n" (@s "e" (@s (shen.arg->str (gensym (intern "x")) shen.a) "")))))))
101
101
 
102
- (defun shen.list? (V2297) (or (empty? V2297) (cons? V2297)))
102
+ (defun shen.list? (V2315) (or (empty? V2315) (cons? V2315)))
103
103
 
104
104
 
105
105
 
@@ -47,59 +47,61 @@
47
47
  * explains this license in full. *
48
48
  * *
49
49
  *****************************************************************************************
50
- "(defun shen.yacc (V2133) (cond ((and (cons? V2133) (and (= defcc (hd V2133)) (cons? (tl V2133)))) (shen.yacc->shen (hd (tl V2133)) (tl (tl V2133)))) (true (shen.sys-error shen.yacc))))
50
+ "(defun shen.yacc (V2133) (cond ((and (cons? V2133) (and (= defcc (hd V2133)) (and (cons? (tl V2133)) (and (cons? (tl (tl V2133))) (and (= { (hd (tl (tl V2133)))) (and (cons? (tl (tl (tl V2133)))) (and (cons? (tl (tl (tl (tl V2133))))) (and (= ==> (hd (tl (tl (tl (tl V2133)))))) (and (cons? (tl (tl (tl (tl (tl V2133)))))) (and (cons? (tl (tl (tl (tl (tl (tl V2133))))))) (= } (hd (tl (tl (tl (tl (tl (tl V2133)))))))))))))))))) (shen.yacc (cons defcc (cons (hd (tl V2133)) (tl (tl (tl (tl (tl (tl (tl V2133))))))))))) ((and (cons? V2133) (and (= defcc (hd V2133)) (cons? (tl V2133)))) (shen.yacc->shen (hd (tl V2133)) (tl (tl V2133)))) (true (shen.sys-error shen.yacc))))
51
51
 
52
- (defun shen.yacc->shen (V2134 V2135) (let CCRules (shen.split_cc_rules V2135 ()) (let CCBody (map shen.cc_body CCRules) (let YaccCases (shen.yacc_cases CCBody) (cons define (cons V2134 (cons Stream (cons -> (cons YaccCases ())))))))))
52
+ (defun shen.yacc->shen (V2134 V2135) (let CCRules (shen.split_cc_rules true V2135 ()) (let CCBody (map shen.cc_body CCRules) (let YaccCases (shen.yacc_cases CCBody) (cons define (cons V2134 (cons Stream (cons -> (cons YaccCases ())))))))))
53
53
 
54
- (defun shen.split_cc_rules (V2136 V2137) (cond ((and (= () V2136) (= () V2137)) ()) ((= () V2136) (cons (shen.split_cc_rule (reverse V2137) ()) ())) ((and (cons? V2136) (= ; (hd V2136))) (cons (shen.split_cc_rule (reverse V2137) ()) (shen.split_cc_rules (tl V2136) ()))) ((cons? V2136) (shen.split_cc_rules (tl V2136) (cons (hd V2136) V2137))) (true (shen.sys-error shen.split_cc_rules))))
54
+ (defun shen.split_cc_rules (V2138 V2139 V2140) (cond ((and (= () V2139) (= () V2140)) ()) ((= () V2139) (cons (shen.split_cc_rule V2138 (reverse V2140) ()) ())) ((and (cons? V2139) (= ; (hd V2139))) (cons (shen.split_cc_rule V2138 (reverse V2140) ()) (shen.split_cc_rules V2138 (tl V2139) ()))) ((cons? V2139) (shen.split_cc_rules V2138 (tl V2139) (cons (hd V2139) V2140))) (true (shen.sys-error shen.split_cc_rules))))
55
55
 
56
- (defun shen.split_cc_rule (V2138 V2139) (cond ((and (cons? V2138) (and (= := (hd V2138)) (and (cons? (tl V2138)) (= () (tl (tl V2138)))))) (cons (reverse V2139) (tl V2138))) ((and (cons? V2138) (and (= := (hd V2138)) (and (cons? (tl V2138)) (and (cons? (tl (tl V2138))) (and (= where (hd (tl (tl V2138)))) (and (cons? (tl (tl (tl V2138)))) (= () (tl (tl (tl (tl V2138))))))))))) (cons (reverse V2139) (cons (cons where (cons (hd (tl (tl (tl V2138)))) (cons (hd (tl V2138)) ()))) ()))) ((= () V2138) (do (shen.prhush "warning: " (stoutput)) (do (map (lambda X (shen.prhush (shen.app X " " shen.a) (stoutput))) (reverse V2139)) (do (shen.prhush "has no semantics.
57
- " (stoutput)) (shen.split_cc_rule (cons := (cons (shen.default_semantics (reverse V2139)) ())) V2139))))) ((cons? V2138) (shen.split_cc_rule (tl V2138) (cons (hd V2138) V2139))) (true (shen.sys-error shen.split_cc_rule))))
56
+ (defun shen.split_cc_rule (V2145 V2146 V2147) (cond ((and (cons? V2146) (and (= := (hd V2146)) (and (cons? (tl V2146)) (= () (tl (tl V2146)))))) (cons (reverse V2147) (tl V2146))) ((and (cons? V2146) (and (= := (hd V2146)) (and (cons? (tl V2146)) (and (cons? (tl (tl V2146))) (and (= where (hd (tl (tl V2146)))) (and (cons? (tl (tl (tl V2146)))) (= () (tl (tl (tl (tl V2146))))))))))) (cons (reverse V2147) (cons (cons where (cons (hd (tl (tl (tl V2146)))) (cons (hd (tl V2146)) ()))) ()))) ((= () V2146) (do (shen.semantic-completion-warning V2145 V2147) (shen.split_cc_rule V2145 (cons := (cons (shen.default_semantics (reverse V2147)) ())) V2147))) ((cons? V2146) (shen.split_cc_rule V2145 (tl V2146) (cons (hd V2146) V2147))) (true (shen.sys-error shen.split_cc_rule))))
58
57
 
59
- (defun shen.default_semantics (V2140) (cond ((= () V2140) ()) ((and (cons? V2140) (and (= () (tl V2140)) (shen.grammar_symbol? (hd V2140)))) (hd V2140)) ((and (cons? V2140) (shen.grammar_symbol? (hd V2140))) (cons append (cons (hd V2140) (cons (shen.default_semantics (tl V2140)) ())))) ((cons? V2140) (cons cons (cons (hd V2140) (cons (shen.default_semantics (tl V2140)) ())))) (true (shen.sys-error shen.default_semantics))))
58
+ (defun shen.semantic-completion-warning (V2156 V2157) (cond ((= true V2156) (do (shen.prhush "warning: " (stoutput)) (do (map (lambda X (shen.prhush (shen.app X " " shen.a) (stoutput))) (reverse V2157)) (shen.prhush "has no semantics.
59
+ " (stoutput))))) (true shen.skip)))
60
60
 
61
- (defun shen.grammar_symbol? (V2141) (and (symbol? V2141) (let Cs (shen.strip-pathname (explode V2141)) (and (= (hd Cs) "<") (= (hd (reverse Cs)) ">")))))
61
+ (defun shen.default_semantics (V2158) (cond ((= () V2158) ()) ((and (cons? V2158) (and (= () (tl V2158)) (shen.grammar_symbol? (hd V2158)))) (hd V2158)) ((and (cons? V2158) (shen.grammar_symbol? (hd V2158))) (cons append (cons (hd V2158) (cons (shen.default_semantics (tl V2158)) ())))) ((cons? V2158) (cons cons (cons (hd V2158) (cons (shen.default_semantics (tl V2158)) ())))) (true (shen.sys-error shen.default_semantics))))
62
62
 
63
- (defun shen.yacc_cases (V2142) (cond ((and (cons? V2142) (= () (tl V2142))) (hd V2142)) ((cons? V2142) (let P YaccParse (cons let (cons P (cons (hd V2142) (cons (cons if (cons (cons = (cons P (cons (cons fail ()) ()))) (cons (shen.yacc_cases (tl V2142)) (cons P ())))) ())))))) (true (shen.sys-error shen.yacc_cases))))
63
+ (defun shen.grammar_symbol? (V2159) (and (symbol? V2159) (let Cs (shen.strip-pathname (explode V2159)) (and (= (hd Cs) "<") (= (hd (reverse Cs)) ">")))))
64
64
 
65
- (defun shen.cc_body (V2143) (cond ((and (cons? V2143) (and (cons? (tl V2143)) (= () (tl (tl V2143))))) (shen.syntax (hd V2143) Stream (hd (tl V2143)))) (true (shen.sys-error shen.cc_body))))
65
+ (defun shen.yacc_cases (V2160) (cond ((and (cons? V2160) (= () (tl V2160))) (hd V2160)) ((cons? V2160) (let P YaccParse (cons let (cons P (cons (hd V2160) (cons (cons if (cons (cons = (cons P (cons (cons fail ()) ()))) (cons (shen.yacc_cases (tl V2160)) (cons P ())))) ())))))) (true (shen.sys-error shen.yacc_cases))))
66
66
 
67
- (defun shen.syntax (V2144 V2145 V2146) (cond ((and (= () V2144) (and (cons? V2146) (and (= where (hd V2146)) (and (cons? (tl V2146)) (and (cons? (tl (tl V2146))) (= () (tl (tl (tl V2146))))))))) (cons if (cons (shen.semantics (hd (tl V2146))) (cons (cons shen.pair (cons (cons hd (cons V2145 ())) (cons (shen.semantics (hd (tl (tl V2146)))) ()))) (cons (cons fail ()) ()))))) ((= () V2144) (cons shen.pair (cons (cons hd (cons V2145 ())) (cons (shen.semantics V2146) ())))) ((cons? V2144) (if (shen.grammar_symbol? (hd V2144)) (shen.recursive_descent V2144 V2145 V2146) (if (variable? (hd V2144)) (shen.variable-match V2144 V2145 V2146) (if (shen.jump_stream? (hd V2144)) (shen.jump_stream V2144 V2145 V2146) (if (shen.terminal? (hd V2144)) (shen.check_stream V2144 V2145 V2146) (if (cons? (hd V2144)) (shen.list-stream (shen.decons (hd V2144)) (tl V2144) V2145 V2146) (simple-error (shen.app (hd V2144) " is not legal syntax
67
+ (defun shen.cc_body (V2161) (cond ((and (cons? V2161) (and (cons? (tl V2161)) (= () (tl (tl V2161))))) (shen.syntax (hd V2161) Stream (hd (tl V2161)))) (true (shen.sys-error shen.cc_body))))
68
+
69
+ (defun shen.syntax (V2162 V2163 V2164) (cond ((and (= () V2162) (and (cons? V2164) (and (= where (hd V2164)) (and (cons? (tl V2164)) (and (cons? (tl (tl V2164))) (= () (tl (tl (tl V2164))))))))) (cons if (cons (shen.semantics (hd (tl V2164))) (cons (cons shen.pair (cons (cons hd (cons V2163 ())) (cons (shen.semantics (hd (tl (tl V2164)))) ()))) (cons (cons fail ()) ()))))) ((= () V2162) (cons shen.pair (cons (cons hd (cons V2163 ())) (cons (shen.semantics V2164) ())))) ((cons? V2162) (if (shen.grammar_symbol? (hd V2162)) (shen.recursive_descent V2162 V2163 V2164) (if (variable? (hd V2162)) (shen.variable-match V2162 V2163 V2164) (if (shen.jump_stream? (hd V2162)) (shen.jump_stream V2162 V2163 V2164) (if (shen.terminal? (hd V2162)) (shen.check_stream V2162 V2163 V2164) (if (cons? (hd V2162)) (shen.list-stream (shen.decons (hd V2162)) (tl V2162) V2163 V2164) (simple-error (shen.app (hd V2162) " is not legal syntax
68
70
  " shen.a)))))))) (true (shen.sys-error shen.syntax))))
69
71
 
70
- (defun shen.list-stream (V2147 V2148 V2149 V2150) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V2149 ())) ())) (cons (cons cons? (cons (cons hd (cons (cons hd (cons V2149 ())) ())) ())) ()))) (let Placeholder (gensym shen.place) (let RunOn (shen.syntax V2148 (cons shen.pair (cons (cons tl (cons (cons hd (cons V2149 ())) ())) (cons (cons hd (cons (cons tl (cons V2149 ())) ())) ()))) V2150) (let Action (shen.insert-runon RunOn Placeholder (shen.syntax V2147 (cons shen.pair (cons (cons hd (cons (cons hd (cons V2149 ())) ())) (cons (cons hd (cons (cons tl (cons V2149 ())) ())) ()))) Placeholder)) (cons if (cons Test (cons Action (cons (cons fail ()) ())))))))))
72
+ (defun shen.list-stream (V2165 V2166 V2167 V2168) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V2167 ())) ())) (cons (cons cons? (cons (cons hd (cons (cons hd (cons V2167 ())) ())) ())) ()))) (let Placeholder (gensym shen.place) (let RunOn (shen.syntax V2166 (cons shen.pair (cons (cons tl (cons (cons hd (cons V2167 ())) ())) (cons (cons hd (cons (cons tl (cons V2167 ())) ())) ()))) V2168) (let Action (shen.insert-runon RunOn Placeholder (shen.syntax V2165 (cons shen.pair (cons (cons hd (cons (cons hd (cons V2167 ())) ())) (cons (cons hd (cons (cons tl (cons V2167 ())) ())) ()))) Placeholder)) (cons if (cons Test (cons Action (cons (cons fail ()) ())))))))))
71
73
 
72
- (defun shen.decons (V2151) (cond ((and (cons? V2151) (and (= cons (hd V2151)) (and (cons? (tl V2151)) (and (cons? (tl (tl V2151))) (and (= () (hd (tl (tl V2151)))) (= () (tl (tl (tl V2151))))))))) (cons (hd (tl V2151)) ())) ((and (cons? V2151) (and (= cons (hd V2151)) (and (cons? (tl V2151)) (and (cons? (tl (tl V2151))) (= () (tl (tl (tl V2151)))))))) (cons (hd (tl V2151)) (shen.decons (hd (tl (tl V2151)))))) (true V2151)))
74
+ (defun shen.decons (V2169) (cond ((and (cons? V2169) (and (= cons (hd V2169)) (and (cons? (tl V2169)) (and (cons? (tl (tl V2169))) (and (= () (hd (tl (tl V2169)))) (= () (tl (tl (tl V2169))))))))) (cons (hd (tl V2169)) ())) ((and (cons? V2169) (and (= cons (hd V2169)) (and (cons? (tl V2169)) (and (cons? (tl (tl V2169))) (= () (tl (tl (tl V2169)))))))) (cons (hd (tl V2169)) (shen.decons (hd (tl (tl V2169)))))) (true V2169)))
73
75
 
74
- (defun shen.insert-runon (V2162 V2163 V2164) (cond ((and (cons? V2164) (and (= shen.pair (hd V2164)) (and (cons? (tl V2164)) (and (cons? (tl (tl V2164))) (and (= () (tl (tl (tl V2164)))) (= (hd (tl (tl V2164))) V2163)))))) V2162) ((cons? V2164) (map (lambda Z (shen.insert-runon V2162 V2163 Z)) V2164)) (true V2164)))
76
+ (defun shen.insert-runon (V2180 V2181 V2182) (cond ((and (cons? V2182) (and (= shen.pair (hd V2182)) (and (cons? (tl V2182)) (and (cons? (tl (tl V2182))) (and (= () (tl (tl (tl V2182)))) (= (hd (tl (tl V2182))) V2181)))))) V2180) ((cons? V2182) (map (lambda Z (shen.insert-runon V2180 V2181 Z)) V2182)) (true V2182)))
75
77
 
76
- (defun shen.strip-pathname (V2170) (cond ((not (element? "." V2170)) V2170) ((cons? V2170) (shen.strip-pathname (tl V2170))) (true (shen.sys-error shen.strip-pathname))))
78
+ (defun shen.strip-pathname (V2188) (cond ((not (element? "." V2188)) V2188) ((cons? V2188) (shen.strip-pathname (tl V2188))) (true (shen.sys-error shen.strip-pathname))))
77
79
 
78
- (defun shen.recursive_descent (V2171 V2172 V2173) (cond ((cons? V2171) (let Test (cons (hd V2171) (cons V2172 ())) (let Action (shen.syntax (tl V2171) (concat Parse_ (hd V2171)) V2173) (let Else (cons fail ()) (cons let (cons (concat Parse_ (hd V2171)) (cons Test (cons (cons if (cons (cons not (cons (cons = (cons (cons fail ()) (cons (concat Parse_ (hd V2171)) ()))) ())) (cons Action (cons Else ())))) ())))))))) (true (shen.sys-error shen.recursive_descent))))
80
+ (defun shen.recursive_descent (V2189 V2190 V2191) (cond ((cons? V2189) (let Test (cons (hd V2189) (cons V2190 ())) (let Action (shen.syntax (tl V2189) (concat Parse_ (hd V2189)) V2191) (let Else (cons fail ()) (cons let (cons (concat Parse_ (hd V2189)) (cons Test (cons (cons if (cons (cons not (cons (cons = (cons (cons fail ()) (cons (concat Parse_ (hd V2189)) ()))) ())) (cons Action (cons Else ())))) ())))))))) (true (shen.sys-error shen.recursive_descent))))
79
81
 
80
- (defun shen.variable-match (V2174 V2175 V2176) (cond ((cons? V2174) (let Test (cons cons? (cons (cons hd (cons V2175 ())) ())) (let Action (cons let (cons (concat Parse_ (hd V2174)) (cons (cons hd (cons (cons hd (cons V2175 ())) ())) (cons (shen.syntax (tl V2174) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2175 ())) ())) (cons (cons shen.hdtl (cons V2175 ())) ()))) V2176) ())))) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.sys-error shen.variable-match))))
82
+ (defun shen.variable-match (V2192 V2193 V2194) (cond ((cons? V2192) (let Test (cons cons? (cons (cons hd (cons V2193 ())) ())) (let Action (cons let (cons (concat Parse_ (hd V2192)) (cons (cons hd (cons (cons hd (cons V2193 ())) ())) (cons (shen.syntax (tl V2192) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2193 ())) ())) (cons (cons shen.hdtl (cons V2193 ())) ()))) V2194) ())))) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.sys-error shen.variable-match))))
81
83
 
82
- (defun shen.terminal? (V2185) (cond ((cons? V2185) false) ((variable? V2185) false) (true true)))
84
+ (defun shen.terminal? (V2203) (cond ((cons? V2203) false) ((variable? V2203) false) (true true)))
83
85
 
84
- (defun shen.jump_stream? (V2190) (cond ((= V2190 _) true) (true false)))
86
+ (defun shen.jump_stream? (V2208) (cond ((= V2208 _) true) (true false)))
85
87
 
86
- (defun shen.check_stream (V2191 V2192 V2193) (cond ((cons? V2191) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V2192 ())) ())) (cons (cons = (cons (hd V2191) (cons (cons hd (cons (cons hd (cons V2192 ())) ())) ()))) ()))) (let Action (shen.syntax (tl V2191) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2192 ())) ())) (cons (cons shen.hdtl (cons V2192 ())) ()))) V2193) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.sys-error shen.check_stream))))
88
+ (defun shen.check_stream (V2209 V2210 V2211) (cond ((cons? V2209) (let Test (cons and (cons (cons cons? (cons (cons hd (cons V2210 ())) ())) (cons (cons = (cons (hd V2209) (cons (cons hd (cons (cons hd (cons V2210 ())) ())) ()))) ()))) (let Action (shen.syntax (tl V2209) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2210 ())) ())) (cons (cons shen.hdtl (cons V2210 ())) ()))) V2211) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.sys-error shen.check_stream))))
87
89
 
88
- (defun shen.jump_stream (V2194 V2195 V2196) (cond ((cons? V2194) (let Test (cons cons? (cons (cons hd (cons V2195 ())) ())) (let Action (shen.syntax (tl V2194) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2195 ())) ())) (cons (cons shen.hdtl (cons V2195 ())) ()))) V2196) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.sys-error shen.jump_stream))))
90
+ (defun shen.jump_stream (V2212 V2213 V2214) (cond ((cons? V2212) (let Test (cons cons? (cons (cons hd (cons V2213 ())) ())) (let Action (shen.syntax (tl V2212) (cons shen.pair (cons (cons tl (cons (cons hd (cons V2213 ())) ())) (cons (cons shen.hdtl (cons V2213 ())) ()))) V2214) (let Else (cons fail ()) (cons if (cons Test (cons Action (cons Else ())))))))) (true (shen.sys-error shen.jump_stream))))
89
91
 
90
- (defun shen.semantics (V2197) (cond ((= () V2197) ()) ((shen.grammar_symbol? V2197) (cons shen.hdtl (cons (concat Parse_ V2197) ()))) ((variable? V2197) (concat Parse_ V2197)) ((and (cons? V2197) (and (= function (hd V2197)) (and (cons? (tl V2197)) (= () (tl (tl V2197)))))) V2197) ((cons? V2197) (map shen.semantics V2197)) (true V2197)))
92
+ (defun shen.semantics (V2215) (cond ((= () V2215) ()) ((shen.grammar_symbol? V2215) (cons shen.hdtl (cons (concat Parse_ V2215) ()))) ((variable? V2215) (concat Parse_ V2215)) ((cons? V2215) (map shen.semantics V2215)) (true V2215)))
91
93
 
92
- (defun shen.snd-or-fail (V2204) (cond ((and (cons? V2204) (and (cons? (tl V2204)) (= () (tl (tl V2204))))) (hd (tl V2204))) (true (fail))))
94
+ (defun shen.snd-or-fail (V2222) (cond ((and (cons? V2222) (and (cons? (tl V2222)) (= () (tl (tl V2222))))) (hd (tl V2222))) (true (fail))))
93
95
 
94
96
  (defun fail () shen.fail!)
95
97
 
96
- (defun shen.pair (V2205 V2206) (cons V2205 (cons V2206 ())))
98
+ (defun shen.pair (V2223 V2224) (cons V2223 (cons V2224 ())))
97
99
 
98
- (defun shen.hdtl (V2207) (hd (tl V2207)))
100
+ (defun shen.hdtl (V2225) (hd (tl V2225)))
99
101
 
100
- (defun <!> (V2214) (cond ((and (cons? V2214) (and (cons? (tl V2214)) (= () (tl (tl V2214))))) (cons () (cons (hd V2214) ()))) (true (fail))))
102
+ (defun <!> (V2232) (cond ((and (cons? V2232) (and (cons? (tl V2232)) (= () (tl (tl V2232))))) (cons () (cons (hd V2232) ()))) (true (fail))))
101
103
 
102
- (defun <e> (V2219) (cond ((and (cons? V2219) (and (cons? (tl V2219)) (= () (tl (tl V2219))))) (cons (hd V2219) (cons () ()))) (true (shen.sys-error <e>))))
104
+ (defun <e> (V2237) (cond ((and (cons? V2237) (and (cons? (tl V2237)) (= () (tl (tl V2237))))) (cons (hd V2237) (cons () ()))) (true (shen.sys-error <e>))))
103
105
 
104
106
 
105
107
 
data/shen-ruby.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.email = ["greg@sourcematters.org"]
13
13
  s.homepage = "https://github.com/gregspurrier/shen-ruby"
14
14
  s.summary = %q{ShenRuby is a Ruby port of the Shen programming language}
15
- s.description = %q{ShenRuby is a port of the Shen programming language to Ruby. It currently supports Shen version 14.}
15
+ s.description = %q{ShenRuby is a port of the Shen programming language to Ruby. It currently supports Shen version 14.2.}
16
16
 
17
17
  s.required_ruby_version = ">= 1.9.3"
18
18
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shen-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
5
- prerelease:
4
+ version: 0.8.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Greg Spurrier
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-11-29 00:00:00.000000000 Z
12
+ date: 2014-01-28 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rspec
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
@@ -23,13 +21,12 @@ dependencies:
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
30
27
  version: '2.12'
31
28
  description: ShenRuby is a port of the Shen programming language to Ruby. It currently
32
- supports Shen version 14.
29
+ supports Shen version 14.2.
33
30
  email:
34
31
  - greg@sourcematters.org
35
32
  executables:
@@ -171,28 +168,27 @@ files:
171
168
  homepage: https://github.com/gregspurrier/shen-ruby
172
169
  licenses:
173
170
  - Shen License
171
+ metadata: {}
174
172
  post_install_message:
175
173
  rdoc_options: []
176
174
  require_paths:
177
175
  - lib
178
176
  - shen/lib
179
177
  required_ruby_version: !ruby/object:Gem::Requirement
180
- none: false
181
178
  requirements:
182
- - - ! '>='
179
+ - - '>='
183
180
  - !ruby/object:Gem::Version
184
181
  version: 1.9.3
185
182
  required_rubygems_version: !ruby/object:Gem::Requirement
186
- none: false
187
183
  requirements:
188
- - - ! '>='
184
+ - - '>='
189
185
  - !ruby/object:Gem::Version
190
186
  version: '0'
191
187
  requirements: []
192
188
  rubyforge_project:
193
- rubygems_version: 1.8.23
189
+ rubygems_version: 2.0.14
194
190
  signing_key:
195
- specification_version: 3
191
+ specification_version: 4
196
192
  summary: ShenRuby is a Ruby port of the Shen programming language
197
193
  test_files:
198
194
  - spec/kl/cons_spec.rb