Sign in to follow this  
  • entries
    292
  • comments
    557
  • views
    153359

BF Macro Step One Solution

Sign in to follow this  
TANSTAAFL

68 views

Thinking a bit since my earlier entry...

since the macro handler is much like the C/C++ handler, I thought I might as well just use a C preprocessor, and see where it lead me.

I wound up using the Cybiko preprocessor.

Now I've got a tool that takes the following:

#define SET(x,y) >(x)[-]+(y)<(x)
#define ZERO(x) SET(x,0)
#define POSITIONA 10
#define POSITIONB 12
#define VALUE ~5

ZERO(POSITIONA)
SET(POSITIONB,VALUE)


and converts it to the following:








>(10)[-]+(0)<(10)
>(12)[-]+(~5)<(12)



So, most of the hard part is done... all I need now is to make a tool to take it the rest of the way, and I'm done!
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now