Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Cestps

BrainF*ck compiler?

This topic is 5610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve tried to find one, but I can''t get the "official" one to work (there is no executable?), and there doesn''t seem to be terribly many other compilers around. Where can I find a working one, or how can i get the "official" one to work?

Share this post


Link to post
Share on other sites
Advertisement
If you do a google search, you can find a BF=>C translator written in BF and you can find a page written in javascript that will run a BF program. So what you do is put the BF=>C translator in the box as the code to run, and in the "input to script" box you put the BF=>C tranlsator, and let it run. The output will be C code for a BF=>C translator, and then you won''t need to use the slow javascript page anymore =-P

There are several BF=>C translators written in BF, and generally, the shorter the BF version is, the shorter the C version is, so you might want to look for the shortest BF=>C compiler in BF you can find. If you can''t find the javascript page, it shouldn''t be hard to write a BF=>C translator in C based on the source of the BF program (aka manual translation of the translator should be easy since BF only has operators for getch(), putch(), p++, p--, *p++, and *p--, and while(p){ and }. If you want to get fancy, you could even make the translator invoke GCC after creating the C file to make it a fully automated BF=>executable translator =-)

----------
Almost typo-ified using Extrarius'' AUTOMATIC Typo Generator, but I decided to be nice =-)

Share this post


Link to post
Share on other sites
Sorry for being a newbie, but there doesn''t seem to be any documentation on either the bf or the ook .NET compilers, and it seems like I have to pass a command line parameter to them to compile. What is this parameter, anyone?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!