brainfuck
v2.7.3
C.에서 작성된 Brainfuck 통역사
brainfuck [-veh] file...
-e --eval run code directly
-v --version show version information
-h --help show a help message.
대화식 콘솔은 인수를 전달하여 액세스 할 수 있습니다.
우리는 또한 C API를 제공합니다.
#include <stdio.h>
#include <stdlib.h>
#include <brainfuck.h>
int main () {
BrainfuckState * state = brainfuck_state ();
BrainfuckExecutionContext * context = brainfuck_context ( BRAINFUCK_TAPE_SIZE );
BrainfuckInstruction * instruction = brainfuck_parse_string ( ",+++++." );
brainfuck_add ( state , instruction );
brainfuck_execute ( state -> root , context );
brainfuck_destroy_context ( context );
brainfuck_destroy_state ( state );
return EXIT_SUCCESS ;
}예/ 디렉토리에는 많은 양의 Brainfuck 예제 프로그램이 포함되어 있습니다. 우리는 가능한 경우 이러한 프로그램의 원래 저자를 속이려고 노력했습니다.
명령 프롬프트에서 다음 코드를 실행하여 소스 코드를 다운로드하십시오.
$ git clone https://github.com/fabianishere/brainfuck.git또는 소스 코드의 사본을 zip 파일로 가져옵니다.
빌드 디렉토리를 만듭니다.
$ mkdir build
$ cd buildBrainfuck은 실행하려면 CMake 및 C 컴파일러 (예 : Clang 또는 GCC)가 필요합니다. 또한 대부분의 Linux 배포판 (예 : Debian/Ubuntu의 Libedit-Dev)의 주요 저장소에서 사용할 수있는 Libedit에 의존하며 MacOS Xcode 명령 줄 도구와 함께 제공됩니다. 그런 다음 makefiles를 만듭니다.
$ cmake ..마지막으로 선택한 건물 시스템을 사용하여 구축하십시오 (예 : Make).
$ make빌드가 완료되면 바이너리를 로컬 시스템에 설치할 수 있습니다 (설치 접두사에 대한 정보는 cmake_install_prefix 참조) :
$ make install또는 예를 들어 설치없이 통역사를 직접 실행할 수 있습니다.
$ ./brainfuck ../examples/hello.bf코드는 Apache 라이센스 버전 2.0에 따라 릴리스됩니다. license.txt를 참조하십시오.
Fabian Mastenbroek https://github.com/fabianishere
aliclubb https://github.com/aliclubb
diekmann https://github.com/diekmann
SevenBits https://github.com/SevenBits
Alex Burka https://github.com/durka
outis https://github.com/outis
rien333 https://github.com/rien333
boweiliu https://github.com/boweiliu
Rotartsi https://github.com/ROTARTSI82
Saket Upadhyay https://github.com/Saket-Upadhyay
outis https://github.com/outis
Jalmari91 https://github.com/Jalmari91
Alok Singh https://github.com/alok
Lasse Damsgaard Skaalum https://github.com/humleflue