|
| #define | BFX_SET_PROPERTY_BOOL(property, value) |
| |
| #define | BFX_SET_PROPERTY_INT(property, value) fprintf(output, "bfx.%s = %d;", property, value) |
| |
| #define | BFX_SET_PROPERTY_SIZE_T(property, value) fprintf(output, "bfx.%s = %ld;", property, value) |
| |
| #define | BFX_SET_PROPERTY_UINT16_T(property, value) fprintf(output, "bfx.%s = %d;", property, value) |
| |
| #define | BFX_SET_PROPERTY_CONST_CHAR(property, value) fprintf(output, "bfx.%s = \"%s\";", property, value) |
| |
This file contains the implementation of the Brainfuck-like language compiler.
| void bfx_compile |
( |
const char * |
input_path, |
|
|
const char * |
output_path, |
|
|
BFX * |
bfx |
|
) |
| |
Compile Brainfuck code from input_path to output_path.
This function takes a Brainfuck source code file specified by input_path, compiles it into a C program, compiles the C program, and writes the resulting code to the file specified by output_path. If input_path is NULL, the function will read from stdin. If output_path is NULL, the function will write to ./a.out.
- Parameters
-
| input_path | Path to the input Brainfuck source code file. |
| output_path | Path to the output binary or C file. |
| bfx | BFX configuration to use for compilation. |