Created
May 6, 2014 03:01
-
-
Save cb372/6f91419653e8ec8b0c29 to your computer and use it in GitHub Desktop.
Brainf*ck interpreter in LOLCODE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HAI | |
BTW BrainFuck interpreter in LOLCODE by Chris Birchall | |
I HAS A MEMORY BTW array of size 30,000 | |
I HAS A POINTER | |
POINTER R 0 | |
I HAS A BRACKETS BTW array mapping opening and closing brackets | |
CAN HAS STDIO? | |
PLZ OPEN FILE "LOLCATS.TXT"? | |
AWSUM THX | |
IM IN YR BRACKETSLOOP | |
IM IN YR BFLOOP | |
I HAS A CODE | |
REED CODE IN FILE | |
WTF? | |
OMG "+" | |
UP POINTER IN MAH MEMORY!!1 | |
OMG "-" | |
NERF POINTER IN MAH MEMORY!!1 | |
OMG ">" | |
BOTH SAEM POINTER AN 29999, O RLY? | |
YA RLY | |
POINTER R 0 | |
NO WAI | |
UP POINTER!!1 | |
OIC | |
OMG "<" | |
BOTH SAEM POINTER AN 0, O RLY? | |
YA RLY | |
POINTER R 29999 | |
NO WAI | |
NERF POINTER!!1 | |
OIC | |
IM OUTTA YR BFLOOP | |
O NOES | |
INVISIBLE "ERROR!" | |
KTHXBYE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like a work in progress. Doesn't support
[
,]
,.
,,