Advertisement
DEMcKnight

Lolcode

Sep 25th, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.61 KB | None | 0 0
  1. // LOLCODE C++ Header by Entar
  2. // Version 1.0
  3. // http://entardev.wordpress.com
  4. // Loosely based on LOLCODE by Adam Lindsay - http://www.lolcode.com
  5. // Include in your project for instant LOLCODE keywords and syntax in C++
  6. // For best results, you may want to turn Caps Lock ON.
  7.  
  8. // This code is released under the BSD License. For any other arrangements, please contact the author.
  9.  
  10. // OPTIONS
  11.  
  12. //#define LOLCODE_LOWER to enable lowercase equivalents
  13. //#define LOLCODE_LOWER
  14.  
  15. //#define LOLCODE_CPLUSPLUS to enable C++ keywords
  16. #define LOLCODE_CPLUSPLUS
  17.  
  18. //
  19.  
  20. // functions
  21. #define HAI             {
  22. #define KTHXBYE         }
  23. #define WIF             (
  24. #define ALL             (
  25. #define KDONE           );
  26. #define DONE            )
  27. #define FOUNDYR         return
  28.  
  29. // classes
  30. #ifdef LOLCODE_CPLUSPLUS
  31. #define DOOHICKY        class
  32. #define MINE            private:
  33. #define SHARE           protected:
  34. #define ALLCANHAS       public:
  35. #define DOES            ::
  36. // inheritance
  37. #define LRNS            :
  38. #endif
  39.  
  40. // misc
  41. #define OHHAI           int main (int ARGC, char *ARGV[])
  42. #define DIAF            exit(0);
  43. #define MAEK            new
  44. #define NEWONE          new
  45. #define DELEET          delete
  46. #define OMNOM           delete
  47. #define STAY            static
  48. #define WIN             true
  49. #define FAIL            false
  50. #define PRT             .
  51. #define LOOK            ->
  52.  
  53. // conditional
  54. #define IZ              if(
  55. #define ORLY            )
  56. #define KTHX            }
  57. #define YARLY           {
  58. #define NOWAI           } else {
  59. #define SRSLY           ?
  60. #define NOPE            :
  61. #define CHOOS           switch (
  62. #define PICK            case
  63. // use KTHX to close curly braces mid program/function - HAI ... IZ(...) YARLY ... NOWAI ... KTHX ... KTHXBYE
  64.  
  65. /* loops - example:
  66. IM IN YR LOOP
  67.     IZ A BIGR THAN B ORLY
  68.     YARLY
  69.         OKBYE
  70.     NOWAI
  71.         A UP MKAY
  72.     KTHX
  73. KTHX
  74. */
  75. #define IM              while
  76. #define IN              (
  77. #define YR              1
  78. #define LOOP            ) {
  79. #define OKBYE           break;
  80. #define KEEPGOIN        continue;
  81.  
  82. // operators
  83. #define BIGR            >
  84. #define SMALR           <
  85. #define LIEK            ==
  86. #define BIGRLIEK        >=
  87. #define SMALRLIEK       <=
  88. #define MKAY            ;
  89. #define K               ;
  90. #define R               =
  91. #define ITZ             =
  92. #define UPD             ++
  93. #define DOWND           --
  94. #define LEFTOVRZ        %
  95. #define NOT             !
  96. #define UP              +
  97. #define UPZ             +=
  98. #define NERF            -
  99. #define NERFZ           -=
  100. #define TIEMZ           *
  101. #define TIEMZD          *=
  102. #define OVAR            /
  103. #define OVARZ           /=
  104. #define AND             &&
  105. #define OR              ||
  106.  
  107. // bitwise (itteh bitteh kitteh committeh)
  108. #define MOOVLEFT        <<
  109. #define MOOVRIGHT       >>
  110. #define ANDBITTEH       &
  111. #define ORBITTEH        |
  112. #define XORBITTEH       ^
  113. #define NOTBITTEH       ~
  114.  
  115. // syntactic sugar
  116. #define CALLED
  117. #define LOL
  118. #define THAN
  119. #define AS
  120. #define OF
  121. #define ALSO ,
  122. #define IHASA
  123. #define I
  124. #define HAS
  125. #define A
  126. #define U
  127.  
  128. // variables
  129. #define VOID            void
  130. #define IHASAVOID       void
  131. #define NUFFIN          void
  132. #define NUMBR           int
  133. #define INT             int
  134. #define IHASAINT        int
  135. #define NUMBAR          float
  136. #define FLOAT           float
  137. #define IHASAFLOAT      float
  138. #define DOUBLE          double
  139. #define IHASADOUBLE     double
  140. #define CHAR            char
  141. #define IHASACHAR       char
  142. #define TROOF           bool
  143. #define IHASATROOF      bool
  144. #define THISCALLED      typedef
  145. #define IHASASTRUCT     struct
  146. #define STRUKSHUR       struct
  147. #define POINTY          *
  148. #define RLY             &
  149.  
  150. // array indexing
  151. // creating
  152. #define THISBIG         [
  153. #define WOW             ]
  154. // accessing
  155. #define WHICH           [
  156. #define OKAI            ]
  157.  
  158. // output
  159. #define VISIBLE         printf(
  160. #define SEEZ            printf(
  161. // input
  162. #define GIMMEH          gets(
  163.  
  164. #ifdef LOLCODE_LOWER
  165. // functions
  166. #define hai             {
  167. #define kthxbye         }
  168. #define wif             (
  169. #define all             (
  170. #define kdone           );
  171. #define done            )
  172. #define foundyr         return
  173.  
  174. // classes
  175. #ifdef LOLCODE_CPLUSPLUS
  176. #define doohicky        class
  177. #define mine            private:
  178. #define share           protected:
  179. #define allcanhas       public:
  180. #define does            ::
  181. // inheritance
  182. #define lrns            :
  183. #endif
  184.  
  185. // misc
  186. #define ohhai           int main (int argc, char *argv[])
  187. #define diaf            exit(0);
  188. #define maek            new
  189. #define newone          new
  190. #define deleet          delete
  191. #define omnom           delete
  192. #define stay            static
  193. #define win             true
  194. #define fail            false
  195. #define prt             .
  196. #define look            ->
  197.  
  198. // conditional
  199. #define iz              if(
  200. #define orly            )
  201. #define kthx            }
  202. #define yarly           {
  203. #define nowai           } else {
  204. #define srsly           ?
  205. #define nope            :
  206. #define choos           switch (
  207. #define pick            case
  208.  
  209. // loops
  210. #define im              while
  211. #define in              (
  212. #define yr              1
  213. #define loop            ) {
  214. #define okbye           break;
  215. #define keepgoin        continue;
  216.  
  217. // operators
  218. #define bigr            >
  219. #define smalr           <
  220. #define liek            ==
  221. #define bigrliek        >=
  222. #define smalrliek       <=
  223. #define mkay            ;
  224. #define k               ;
  225. #define r               =
  226. #define itz             =
  227. #define upd             ++
  228. #define downd           --
  229. #define leftovrz        %
  230. #define not             !
  231. #define up              +
  232. #define upz             +=
  233. #define nerf            -
  234. #define nerfz           -=
  235. #define tiemz           *
  236. #define tiemzd          *=
  237. #define ovar            /
  238. #define ovarz           /=
  239.  
  240. #ifndef and
  241. #define and             &&
  242. #endif
  243. #ifndef or
  244. #define or              ||
  245. #endif
  246.  
  247. // bitwise (itteh bitteh kitteh committeh)
  248. #define moovleft        <<
  249. #define moovright       >>
  250. #define andbitteh       &
  251. #define orbitteh        |
  252. #define xorbitteh       ^
  253. #define notbitteh       ~
  254.  
  255. // syntactic sugar
  256. #define called
  257. #define lol
  258. #define than
  259. #define as
  260. #define of
  261. #define also ,
  262. #define ihasa
  263. #define i
  264. #define has
  265. #define a
  266. #define u
  267.  
  268. // variables
  269. #define ihasavoid       void
  270. #define nuffin          void
  271. #define ihasaint        int
  272. #define ihasafloat      float
  273. #define ihasadouble     double
  274. #define ihasachar       char
  275. #define ihasatroof      bool
  276. #define thiscalled      typedef
  277. #define ihasastruct     struct
  278. #define strukshur       struct
  279. #define pointy          *
  280. #define rly             &
  281.  
  282. // array indexing
  283. // creating
  284. #define thisbig         [
  285. #define wow             ]
  286. // accessing
  287. #define which           [
  288. #define okai            ]
  289.  
  290. // output
  291. #define visible         printf(
  292. #define seez            printf(
  293. // input
  294. #define gimmeh          gets(
  295. #endif
  296.  
  297. #include <stdlib.h>
  298. #include <stdio.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement