How do I make a Brainf*ck compiler?

  softwareengineering

So before I get all those downvotes and comments that say this has already been done, I will say: NO! I’m not asking how to run Brainf*ck. No, no, no, please don’t tell me how to interpret Brainf*ck, I want to compile it! By that, I mean, say I have main.bf, I run a script, and I get a file called main. Then, when I run ./main (and if needed, chmod +x main), the Brainf*ck is executed.

I have two possible options that I would like to use to compile the Brainf*ck. JavaScript or Bash. Once again, I don’t want to run it, I want to compile it, as in I want to make an executable file.

So what I’m asking is whether I should use JavaScript (node) or Bash to create an executable, and how I would do it in general, not in a specific language.

New contributor

OnyxWingman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

LEAVE A COMMENT