May. 31st, 2007

LOL

May. 31st, 2007 10:43 am
It has become clear that I must prevent myself from writing about anything even vaguely related to sex, or any other self-expression that is dirty and should be properly repressed. And yea verily - idle hands do the Devil's work! So to keep my hands busy, I'm teaching myself how lex and yacc work. The motivation I'm using - LOLCODE!!!1 (ty [livejournal.com profile] fj!!).

So far my interpreter can understands this:

HAI
CAN HAS STDIO?
I HAS A BUCKET ITS 3
I HAS A VAR
BTW I HAS A STRING ITS "HAI"
IM IN UR LOOP
	UP VAR!!1
	BTW VISIBLE STRING
	VISIBLE "NXT"
	VISIBLE BUCKET
	VISIBLE VAR
	IZ VAR EEQWULZ 5 KTHXBYE
IM OUT OF UR LOOP
KTHXBYE


Output:
MEOW
OK
NXT
3
1
NXT
3
2
NXT
3
3
NXT
3
4
NXT
3
5


HAHAHA!!!111

I'm still trying to figure out how to do dynamic casting lyk perl does, so I had to comment some stuff out ("BTW").

Profile

Robert I Murillo

March 2009

S M T W T F S
1 234567
891011121314
15 161718192021
22232425262728
293031    

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 30th, 2025 03:48 am
Powered by Dreamwidth Studios