Execute SNUSP/Perl: Difference between revisions

m
Fixed syntax highlighting.
mNo edit summary
m (Fixed syntax highlighting.)
 
(One intermediate revision by one other user not shown)
Line 19:
 
Here's the main program:
<langsyntaxhighlight Perllang="perl">#!perl
use strict;
use warnings;
Line 295:
EX
 
__END__</syntaxhighlight>
</lang>
 
The following is the file which is included by each compiled perl program.
Line 303 ⟶ 302:
the main program.
 
<langsyntaxhighlight Perllang="perl">#!perl
use strict;
use warnings;
Line 359 ⟶ 358:
 
1;
__END__</syntaxhighlight>
</lang>
 
Here's a basic Hello, World! program, which I found at:
http://www.quirkster.com/iano/snusp/snusp-js.html
 
<langsyntaxhighlight SNUSPlang=snusp"> \/\ /\ /\ /\
+++ ++ ++ ++
+++ ++ /++++\ ++ ++ /++++\
Line 381 ⟶ 379:
. +> + + + + +- - +- -.
\.+/\++/ \++++/ + . +\ /-.+/- --
\ / \< / \ / \/</syntaxhighlight>
</lang>
 
When compiled, the SNUSP code above produces the Perl code below:
 
<langsyntaxhighlight lang="perl">#!perl
use strict;
use warnings;
Line 419 ⟶ 415:
goto (pop @st);# U_40_9 '#'
STACK_UNDERFLOW: ;
EXIT: exit($data[$col] || 0);</syntaxhighlight>
</lang>
 
This code produces:
9,476

edits