|
BFC-Compiler
A C23 Brainfuck compiler
|
Bracket-matching validation pass. More...
#include "bfc_jumptable.h"#include <inttypes.h>#include <stddef.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include "bfc_memory.h"Functions | |
| bfc_error_t | bfc_parse_jump_table (int64_t **jump_table, bfc_token_stream_t const *const tok_stream) |
| Validates nested brackets and fills a bidirectional matching-index table. | |
| void | bfc_jump_table_destroy (int64_t **pjump_table) |
| Releases the matching-index table and nulls the caller pointer. | |
Bracket-matching validation pass.
Uses a stack of opening-bracket indices to build a bidirectional jump table and produce source-aware bracket errors.
| void bfc_jump_table_destroy | ( | int64_t ** | pjump_table | ) |
Releases the matching-index table and nulls the caller pointer.
Releases a jump table and nulls the caller pointer.
Releases the matching-index table and nulls the caller pointer.
| bfc_error_t bfc_parse_jump_table | ( | int64_t ** | jump_table, |
| bfc_token_stream_t const *const | tok_stream ) |
Validates nested brackets and fills a bidirectional matching-index table.
Validates loop delimiters and builds matching bracket indices.
Validates nested brackets and fills a bidirectional matching-index table.
| [out] | jump_table | Receives an allocated table indexed by token position. |
| [in] | tok_stream | Token stream to validate. |