libsnobol4 1.0.2
High-performance SNOBOL4-style pattern matching library
Loading...
Searching...
No Matches
compiler.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7
8#include <stdbool.h>
9#include <stddef.h>
10#include <stdint.h>
11
18
19#include "snobol/ast.h"
20
30int compile_ast_to_bytecode_c(ast_node_t *ast, bool case_insensitive,
31 uint8_t **out_bc, size_t *out_len);
32
40const char *compile_ast_error(void);
41
51int compile_template_to_bytecode(const char *tpl, size_t len, uint8_t **out_bc,
52 size_t *out_len);
53
58void compiler_free(uint8_t *bc);
59
83int snobol_template_bind_tables(uint8_t *bc, size_t bc_len, const char **names,
84 const uint16_t *ids, size_t n);
85
86#ifdef __cplusplus
87}
88#endif
Abstract Syntax Tree representation for SNOBOL patterns.
struct ast_node ast_node_t
Definition ast.h:129
const char * compile_ast_error(void)
void compiler_free(uint8_t *bc)
int snobol_template_bind_tables(uint8_t *bc, size_t bc_len, const char **names, const uint16_t *ids, size_t n)
int compile_template_to_bytecode(const char *tpl, size_t len, uint8_t **out_bc, size_t *out_len)
int compile_ast_to_bytecode_c(ast_node_t *ast, bool case_insensitive, uint8_t **out_bc, size_t *out_len)