Mercurial > repo
comparison src/ploki/try/poly.poly @ 4223:ac0403686959
<oerjan> rm -rf src/ploki; mv ploki src
author | HackBot |
---|---|
date | Fri, 20 Dec 2013 22:18:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4222:b0f3e267bb1e | 4223:ac0403686959 |
---|---|
1 # /* [ <!-- */ include <stdio.h> /*[0]0 \ | |
2 #{\ | |
3 `""""true \\#{"\n#"}; \ | |
4 \ | |
5 if [ -n "$ZSH_VERSION" ]; then \ | |
6 \ | |
7 echo exec echo I\'m a zsh script.; \ | |
8 \ | |
9 elif [ -n "$BASH_VERSION" ]; then \ | |
10 \ | |
11 echo exec echo I\'m a bash script.; \ | |
12 else \ | |
13 echo exec echo I\'m a sh script.; \ | |
14 fi`; #\ | |
15 BEGIN{print"I'm a ",(("I'm a ploki program.\n")[0?0:0]?0:0)?"Ruby" :"Perl", " program.\n"; exit; } | |
16 #\ | |
17 END{} | |
18 #\ | |
19 %q~ | |
20 | |
21 set dummy =0; puts [list "I'm" "a" "tcl" "script."]; exit | |
22 | |
23 all: ; @echo "I'm a Makefile." \ | |
24 #)*/ | |
25 /*: */ enum {a, b}; \ | |
26 \ | |
27 static int c99(void) { | |
28 | |
29 #ifndef __cplusplus /*[0]0) bah */ | |
30 | |
31 unused1: if ((enum {b, a})0) \ | |
32 (void)0; | |
33 #endif | |
34 | |
35 unused2: return a; \ | |
36 } \ | |
37 static int trigraphs(void) { \ | |
38 \ | |
39 return sizeof "??!" == 2; \ | |
40 } \ | |
41 char X; \ | |
42 \ | |
43 int main(void) { \ | |
44 \ | |
45 struct X { \ | |
46 \ | |
47 char a[2]; \ | |
48 };\ | |
49 if (sizeof(X) != 1) { \ | |
50 \ | |
51 printf("I'm a C++ program (trigraphs %sabled).\n", \ | |
52 \ | |
53 trigraphs() ? "en" : "dis");\ | |
54 \ | |
55 }else if (1//**/2 | |
56 | |
57 | |
58 )unused3 : { ; \ | |
59 printf("I'm a C program (C%s, trigraphs %sabled).\n", \ | |
60 c99() ? "89 with // comments" : "99", \ | |
61 trigraphs() ? "en" : "dis"); \ | |
62 } else { \ | |
63 printf("I'm a C program (C89, trigraphs %sabled).\n", \ | |
64 trigraphs() ? "en" : "dis"); \ | |
65 } \ | |
66 return 0; \ | |
67 } /* | |
68 # \ | |
69 | |
70 > main :: IO () -- -- \ | |
71 > main = putStr "I'm a Literate Haskell program.\n" | |
72 | |
73 # \ | |
74 ]>++++++++[<+++++++++>-]<+.>>++++[<++++++++++>-]<-.[-]>++++++++++ \ | |
75 [<+++++++++++>-]<-.>>++++[<++++++++>-]<.>>++++++++++[<++++++++++> \ | |
76 -]<- - -.<.>+.->>++++++++++[<+++++++++++>-]<++++.<.>>>++++++++++[ \ | |
77 <++++++++++>-]<+++++.<<<<+.->>>>- - -.<+++.- - -<++.- ->>>>>+++++ \ | |
78 +++++[<+++++++++++>-]<- - -.<<<<<.<+++.>>>.<<<-.- ->>>>+.<.<.<<.> \ | |
79 ++++++++++++++.[-]++++++++++"""` | |
80 # \ | |
81 print "I'm a Python program."; """[-][--><html><head> | |
82 <!--:--><title>I'm a HTML page</title></head><body> | |
83 <!--:--><h1>I'm a <marquee><blink>horrible HTML</blink></marquee> page</h1> | |
84 <!--:--><script language="JavaScript"> | |
85 <!--: # \ | |
86 setTimeout( // \ | |
87 function () { // \ | |
88 document.body.innerHTML = "<h1>I'm a javascript-generated HTML page</h1>"; // \ | |
89 }, 10000); // \ | |
90 //--> | |
91 </script><!--: \ | |
92 </body></html><!-- } # \ | |
93 say "I'm a Perl6 program", try { " ($?PUGS_VERSION)" } // "", "."; # """ # */ | |
94 #define FOO ]-->~ |