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
fj!!).
So far my interpreter can understands this:
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").
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
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").