1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Brainf**k のインタープリタを作ったった

Last updated at Posted at 2025-07-12

Githubリポジトリ

Web上で動かしていたBrainfu*kを、ローカルでも実行したい!
ということで、C++でインタープリタをつくりました。

環境構築

git clone git@github.com:K10-K10/Brainfuck-interpreter 

コンパイルしてbfファイルを作成

g++ main.cpp -o bf

一応コンパイル済みのファイルも含まれてます

bfのパスを通す。

sudo cp bf ~/.local/bin/bf
export PATH="$HOME/.local/bin:$PATH"

ターミナルの再起動
これで使えるようになります。

使用方法

bf file-name

Hello World

touch hello.bf

その中に

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

を記述。

bf hello.bf

出力

Hello World!

皆さんBrainfu*kを使いましょう。

いつかコンパイラを作りたい...

~ Thank you for reading! ~

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?