7#ifndef BFX_LANGS_PBRAIN_H
8#define BFX_LANGS_PBRAIN_H
12#ifndef BFX_PBRAIN_MAX_PROCEDURES
19#define BFX_PBRAIN_MAX_PROCEDURES 256
22#ifndef BFX_PBRAIN_STACK_SIZE
23#define BFX_PBRAIN_STACK_SIZE 16
BFX_Error
Definition: bfx.h:93
BFX_Error bfx_pbrain_init(BFX *)
Initialize the P-Brain interpreter.
Definition: pbrain.c:18
BFX_Error bfx_op_pbrain_call(BFX *, BFX_FileIndex *)
Call a procedure by its identifier (pbrain).
Definition: pbrain.c:86
BFX_Error bfx_op_pbrain_ret(BFX *, BFX_FileIndex *)
Return from a procedure (pbrain).
Definition: pbrain.c:107
#define BFX_PBRAIN_STACK_SIZE
Definition: pbrain.h:23
#define BFX_PBRAIN_MAX_PROCEDURES
Maximum number of procedures allowed in the P-Brain language.
Definition: pbrain.h:19
BFX_Error bfx_op_pbrain_start_procedure(BFX *, BFX_FileIndex *)
Begin procedure definition (pbrain).
Definition: pbrain.c:65
BFX_Error bfx_pbrain_run(BFX *)
Run the P-Brain interpreter.
Definition: pbrain.c:35
Structure to represent an index in a file (or user input).
Definition: bfx.h:126
Structure to represent data for the pbrain language.
Definition: pbrain.h:40
size_t procedures_len
Length of the procedures array.
Definition: pbrain.h:42
size_t stack_top
Top index of the stack.
Definition: pbrain.h:44
Structure to represent a procedure in the pbrain language.
Definition: pbrain.h:29
char identifier
Identifier of the procedure.
Definition: pbrain.h:30
size_t start_idx
Start index of the procedure.
Definition: pbrain.h:31
size_t end_idx
End index of the procedure.
Definition: pbrain.h:32
Structure to store generic data for a brainfuck-like esolang interpreter.
Definition: bfx.h:149