Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
63
Task/Execute-SNUSP/EasyLang/execute-snusp.easy
Normal file
63
Task/Execute-SNUSP/EasyLang/execute-snusp.easy
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
proc snusp dlen raw$ . .
|
||||
len ds[] dlen
|
||||
is$[] = strsplit raw$ "\n"
|
||||
for s$ in is$[]
|
||||
is$[][] &= strchars s$
|
||||
.
|
||||
for ipr to len is$[][]
|
||||
for ipc to len is$[ipr][]
|
||||
if is$[ipr][ipc] = "$"
|
||||
break 2
|
||||
.
|
||||
.
|
||||
.
|
||||
dp = 1
|
||||
id = 0
|
||||
#
|
||||
subr step
|
||||
if id mod 2 = 0
|
||||
ipc += 1 - bitand id 2
|
||||
else
|
||||
ipr += 1 - bitand id 2
|
||||
.
|
||||
.
|
||||
while ipr >= 1 and ipr <= len is$[][] and ipc >= 1 and ipc <= len is$[ipr][]
|
||||
c$ = is$[ipr][ipc]
|
||||
if c$ = ">"
|
||||
dp += 1
|
||||
elif c$ = "<"
|
||||
dp -= 1
|
||||
elif c$ = "+"
|
||||
ds[dp] += 1
|
||||
elif c$ = "-"
|
||||
ds[dp] -= 1
|
||||
elif c$ = "."
|
||||
write strchar ds[dp]
|
||||
elif c$ = ","
|
||||
# ds[dp] = strcode input
|
||||
elif c$ = "/"
|
||||
id = bitxor id 3
|
||||
elif c$ = "\\"
|
||||
id = bitxor id 1
|
||||
elif c$ = "!"
|
||||
step
|
||||
elif c$ = "?"
|
||||
if ds[dp] = 0
|
||||
step
|
||||
.
|
||||
.
|
||||
step
|
||||
.
|
||||
.
|
||||
s$ = input
|
||||
while s$ <> ""
|
||||
cod$ &= "\n" & s$
|
||||
s$ = input
|
||||
.
|
||||
snusp 5 cod$
|
||||
#
|
||||
input_data
|
||||
/++++!/===========?\>++.>+.+++++++..+++\
|
||||
\+++\ | /+>+++++++>/ /++++++++++<<.++>./
|
||||
$+++/ | \+++++++++>\ \+++++.>.+++.-----\
|
||||
\==-<<<<+>+++/ /=.>.+>.--------.-/`
|
||||
Loading…
Add table
Add a link
Reference in a new issue