Skip to main content
3 of 18
deleted 3 characters in body

C++: Visual C++ 2013 = 431, g++ 4.9.0 = 450

This will never win but since I have decided that all my future software projects will be be written in this awesome language I needed an intepreter for it and I figured I might as well share the one I made...

The difference in score is that Visual C++ doesn't need the first include but g++ does. The score assumes that line endings count as 1.

#include<string.h>
#include<string>
#define M(x)memset(x,0,99);
#define N(x)else if(n<x)o[i]==92?
#define O (o[++i]):o[i]==47?n++:
#define P o[i])
#define S std::string
int main(int n,char**m){S o=m[1];char p[99],*q=p,r[99],*s=r;M(p)M(r)for(int i=0,t;i<=o.size();++i){if(!P;N(3)putchar O putchar(P;N(4)*q++=O(*q++=P;N(5)*s++=O(*s++=P;if(n>4){for(;;){if((t=o.find(p,i+1))==S::npos)break;o=o.substr(0,t)+r+o.substr(t+strlen(p));}M(p)M(r)n=2;q=p;s=r;}}}