• Mood:
• Music:
Input:
#define x 3
#define f(a) f(x * (a))
#undef x
#define x 2
#define g f
#define z z
#define h g( ~
#define m(a) a(w)
#define w 0,1
#define t(a) a
f(y+1) + f(f(z)) % t(t(g)(0) + t)(1);
g(x+(3,4)-w) | h 5) & m
(f)^m(m);
My program's output:
f(2*(y+1))+f(2*(f(2*(z))))%f(2*(0))+t(1);f(2*(2+(3,4)-0,1))|f(2*(~5))&f(2*(0,1))^0,1(0,1);
The necessary output:
f(2*(y+1))+f(2*(f(2*(z))))%f(2*(0))+t(1);f(2*(2+(3,4)-0,1))|f(2*(~5))&f(2*(0,1))^m(0,1);
GAAAH.

So close! And the worst part is, I can't hack the logic slightly to make it work. It's impossible at this point - not for that part. So, once again, back to the drawing board to figure out what insane twist of logic is required to properly implement an ANSI C++ preprocessor.

I think I've finally figured it out - I need a "finished" flag in my identifiers. I think that could work. But at the moment, I'm too sleepy to make *sure* before I start coding it. And I don't want to code it until I'm sure. I might actually be right if I wait for that :P

Ah well. Tomorrow.
• Post a new comment

#### Error

default userpic

Your IP address will be recorded

When you submit the form an invisible reCAPTCHA check will be performed.
You must follow the Privacy Policy and Google Terms of use.
• 0 comments