Kestrel Interface
Loading...
Searching...
No Matches
kest_eff_parser.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  kest_ast_node
struct  kest_eff_parsing_state

Macros

#define KEST_EFF_PARSER_MEM_POOL_SIZE_KB   512
#define KEST_AST_NODE_ROOT   0
#define KEST_AST_NODE_SECTION   1
#define KEST_AST_NODE_DICT   2

Functions

int kest_parse_dictionary (kest_eff_parsing_state *ps, kest_dictionary **result, const char *name)
kest_effect_desckest_read_eff_desc_from_file (char *fname)
void kest_parser_print_info (kest_eff_parsing_state *ps, const char *error_msg,...)
void kest_parser_warn (kest_eff_parsing_state *ps, const char *error_msg,...)
void kest_parser_error (kest_eff_parsing_state *ps, const char *error_msg,...)
void kest_parser_print_info_at (kest_eff_parsing_state *ps, kest_token_ll *token, const char *error_msg,...)
void kest_parser_warn_at (kest_eff_parsing_state *ps, kest_token_ll *token, const char *error_msg,...)
void kest_parser_error_at (kest_eff_parsing_state *ps, kest_token_ll *token, const char *error_msg,...)
void kest_parser_print_info_at_line (kest_eff_parsing_state *ps, int line, const char *error_msg,...)
void kest_parser_warn_at_line (kest_eff_parsing_state *ps, int line, const char *error_msg,...)
void kest_parser_error_at_line (kest_eff_parsing_state *ps, int line, const char *error_msg,...)
void kest_parser_print_info_at_node (kest_eff_parsing_state *ps, kest_ast_node *node, const char *error_msg,...)
void kest_parser_warn_at_node (kest_eff_parsing_state *ps, kest_ast_node *node, const char *error_msg,...)
void kest_parser_error_at_node (kest_eff_parsing_state *ps, kest_ast_node *node, const char *error_msg,...)
int kest_eff_parser_init_mempool ()
int kest_eff_parser_reset_mempool ()
int kest_eff_parser_deinit_mempool ()
void * kest_parser_alloc (size_t size)
char * kest_parser_strndup (const char *str, int n)

Variables

const char * ver_str
kest_allocatorkest_parser_allocator

Macro Definition Documentation

◆ KEST_AST_NODE_DICT

#define KEST_AST_NODE_DICT   2

Definition at line 8 of file kest_eff_parser.h.

◆ KEST_AST_NODE_ROOT

#define KEST_AST_NODE_ROOT   0

Definition at line 6 of file kest_eff_parser.h.

Referenced by kest_parse_tokens().

◆ KEST_AST_NODE_SECTION

◆ KEST_EFF_PARSER_MEM_POOL_SIZE_KB

#define KEST_EFF_PARSER_MEM_POOL_SIZE_KB   512

Definition at line 4 of file kest_eff_parser.h.

Referenced by kest_eff_parser_init_mempool().

Function Documentation

◆ kest_eff_parser_deinit_mempool()

int kest_eff_parser_deinit_mempool ( )

Definition at line 42 of file kest_eff_parser.c.

Referenced by load_effects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_eff_parser_init_mempool()

int kest_eff_parser_init_mempool ( )

Definition at line 21 of file kest_eff_parser.c.

Referenced by kest_read_eff_desc_from_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_eff_parser_reset_mempool()

int kest_eff_parser_reset_mempool ( )

Definition at line 32 of file kest_eff_parser.c.

Referenced by load_effects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parse_dictionary()

int kest_parse_dictionary ( kest_eff_parsing_state * ps,
kest_dictionary ** result,
const char * name )

Definition at line 938 of file kest_dictionary.c.

Referenced by kest_parse_dict_val(), and kest_parse_dictionary_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parser_alloc()

void * kest_parser_alloc ( size_t size)

Definition at line 48 of file kest_eff_parser.c.

Referenced by kest_dictionary_bucket_ensure_capacity(), kest_dictionary_ensure_capacity(), kest_new_dictionary(), kest_parse_asm_line(), kest_parse_dict_list(), kest_parse_tokens(), kest_parser_lineize_content(), kest_parser_strndup(), kest_read_eff_desc_from_file(), and kest_token_ll_safe_aappend().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parser_error()

void kest_parser_error ( kest_eff_parsing_state * ps,
const char * error_msg,
... )

Definition at line 887 of file kest_eff_parser.c.

Referenced by kest_parse_dictionary(), kest_parse_tokens(), and kest_read_eff_desc_from_file().

Here is the caller graph for this function:

◆ kest_parser_error_at()

void kest_parser_error_at ( kest_eff_parsing_state * ps,
kest_token_ll * token,
const char * error_msg,
... )

Definition at line 699 of file kest_eff_parser.c.

Referenced by kest_parse_asm_arg(), kest_parse_asm_arg_2(), kest_parse_asm_line(), kest_parse_dict_val(), kest_parse_dictionary(), kest_parse_expression_rec_pratt(), and kest_parse_tokens().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parser_error_at_line()

void kest_parser_error_at_line ( kest_eff_parsing_state * ps,
int line,
const char * error_msg,
... )

Definition at line 771 of file kest_eff_parser.c.

Referenced by kest_defs_section_extract(), kest_process_asm_line(), and kest_tokenize_content().

Here is the caller graph for this function:

◆ kest_parser_error_at_node()

void kest_parser_error_at_node ( kest_eff_parsing_state * ps,
kest_ast_node * node,
const char * error_msg,
... )

◆ kest_parser_print_info()

void kest_parser_print_info ( kest_eff_parsing_state * ps,
const char * error_msg,
... )

Definition at line 849 of file kest_eff_parser.c.

◆ kest_parser_print_info_at()

void kest_parser_print_info_at ( kest_eff_parsing_state * ps,
kest_token_ll * token,
const char * error_msg,
... )

Definition at line 643 of file kest_eff_parser.c.

Here is the call graph for this function:

◆ kest_parser_print_info_at_line()

void kest_parser_print_info_at_line ( kest_eff_parsing_state * ps,
int line,
const char * error_msg,
... )

Definition at line 733 of file kest_eff_parser.c.

◆ kest_parser_print_info_at_node()

void kest_parser_print_info_at_node ( kest_eff_parsing_state * ps,
kest_ast_node * node,
const char * error_msg,
... )

Definition at line 791 of file kest_eff_parser.c.

◆ kest_parser_strndup()

char * kest_parser_strndup ( const char * str,
int n )

Definition at line 53 of file kest_eff_parser.c.

Referenced by kest_parse_asm_line(), kest_parse_dict_val(), kest_parse_dictionary(), kest_parse_tokens(), kest_read_eff_desc_from_file(), and kest_tokenize_content().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kest_parser_warn()

void kest_parser_warn ( kest_eff_parsing_state * ps,
const char * error_msg,
... )

Definition at line 868 of file kest_eff_parser.c.

◆ kest_parser_warn_at()

void kest_parser_warn_at ( kest_eff_parsing_state * ps,
kest_token_ll * token,
const char * error_msg,
... )

Definition at line 671 of file kest_eff_parser.c.

Here is the call graph for this function:

◆ kest_parser_warn_at_line()

void kest_parser_warn_at_line ( kest_eff_parsing_state * ps,
int line,
const char * error_msg,
... )

Definition at line 752 of file kest_eff_parser.c.

◆ kest_parser_warn_at_node()

void kest_parser_warn_at_node ( kest_eff_parsing_state * ps,
kest_ast_node * node,
const char * error_msg,
... )

Definition at line 810 of file kest_eff_parser.c.

Referenced by kest_extract_bool_setting_from_dict(), kest_extract_int_setting_from_dict(), kest_extract_parameter_from_dict(), and kest_extract_setting_from_dict().

Here is the caller graph for this function:

◆ kest_read_eff_desc_from_file()

kest_effect_desc * kest_read_eff_desc_from_file ( char * fname)

Definition at line 456 of file kest_eff_parser.c.

Referenced by load_effects().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ kest_parser_allocator

kest_allocator* kest_parser_allocator
extern

Definition at line 19 of file kest_eff_parser.c.

Referenced by kest_eff_parser_init_mempool(), and kest_parse_dict_list().

◆ ver_str

const char* ver_str
extern

Definition at line 14 of file kest_eff_parser.c.

Referenced by kest_tokenize_content().