|
bfx
An interpreter, compiler, and REPL for brainfuck-like languages
|
#include "bfx.h"Go to the source code of this file.
Data Structures | |
| struct | BFX_PBrainProcedure |
| Structure to represent a procedure in the pbrain language. More... | |
| struct | BFX_PBrainData |
| Structure to represent data for the pbrain language. More... | |
Macros | |
| #define | BFX_PBRAIN_MAX_PROCEDURES 256 |
| Maximum number of procedures allowed in the P-Brain language. | |
| #define | BFX_PBRAIN_STACK_SIZE 16 |
Functions | |
| BFX_Error | bfx_pbrain_init (BFX *) |
| Initialize the P-Brain interpreter. | |
| BFX_Error | bfx_pbrain_run (BFX *) |
| Run the P-Brain interpreter. | |
| BFX_Error | bfx_op_pbrain_start_procedure (BFX *, BFX_FileIndex *) |
| Begin procedure definition (pbrain). | |
| BFX_Error | bfx_op_pbrain_call (BFX *, BFX_FileIndex *) |
| Call a procedure by its identifier (pbrain). | |
| BFX_Error | bfx_op_pbrain_ret (BFX *, BFX_FileIndex *) |
| Return from a procedure (pbrain). | |
This file contains public definitions for the implementation of the P-Brain interpreter.
| #define BFX_PBRAIN_MAX_PROCEDURES 256 |
Maximum number of procedures allowed in the P-Brain language.
This limit is set to the maximum possible value since procedures are designated by 8-bit identifiers.
| #define BFX_PBRAIN_STACK_SIZE 16 |
| BFX_Error bfx_op_pbrain_call | ( | BFX * | bfx, |
| BFX_FileIndex * | index | ||
| ) |
Call a procedure by its identifier (pbrain).
| BFX_Error bfx_op_pbrain_ret | ( | BFX * | bfx, |
| BFX_FileIndex * | index | ||
| ) |
Return from a procedure (pbrain).
| BFX_Error bfx_op_pbrain_start_procedure | ( | BFX * | bfx, |
| BFX_FileIndex * | idx | ||
| ) |
Begin procedure definition (pbrain).
| bf | Pointer to the interpreter struct |
| idx | Pointer to the file index struct |
Initialize the P-Brain interpreter.
| bfx | Pointer to the already-allocated interpreter struct |