May 17th, 2007

What can you do with a free weekend, yacc+lex compilers and a stupid idea? Just another highly requested esoteric language I suppose.

This one is based on a slang of one of the Polish street subcultures (the one with a special love to the track suits. Track suit = "Dres"). It employs a rather dirty language. Language specification and the idea itself was developed about a year ago by me and my two colleagues (tmd and shm) on IRC, but we were lacking the necessary wisdom and a will to implement it.

Language is called "Dress". Its compiler is able to compile conditional expressions (branching and loops), few register operations (inc/dec/set) and simple I/O into x86 assembler. It's by no means complete but I doubt if I'll do something more with this compiler. I just wanted to prove it's not so difficult to implement.

Theoretically it should be easy to port language specification so it would be based on a facultative dialect.

Exemplary code, compilation process (involving naming tokens), resultant assembly and resultant output is available
here. But understanding the Dress itself requires deep knowledge of Polish language and long period of intense studies of Dres community, their subculture and traditions...

I've started writing it using pure yacc and flex, but then I've switched back to the ocaml versions. I think functional language works here much better than C does. Nevertheless code is available from SVN where you can find also some previous code examples, specification and some related/unrelated stuff.

Add a comment [+] Hide the comment form [-]

I'm a bot, please ignore this comment.

I'm not a bot. Tick this box.

This is a mail of my good friend who loves rubbish email. Send him some if you want to land on my not-so-welcome lists: John Sparrow john@thera.be john(at)thera.be