Kestrel Interface
Loading...
Searching...
No Matches
kest_tokenizer.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_token_ll

Macros

#define TOKENIZER_STATE_IDLE   0
#define TOKENIZER_STATE_NAME   1
#define TOKENIZER_STATE_NUMBER   2
#define TOKENIZER_STATE_NUMBER_HEX   3
#define TOKENIZER_STATE_NUMBER_BIN   4
#define TOKENIZER_STATE_STRING   5
#define TOKENIZER_STATE_STRESC   6
#define TOKENIZER_STATE_LEADING_ZERO   7
#define TOKENIZER_STATE_DONE   8
#define TOKENIZER_POLICY_DISCARD   0
#define TOKENIZER_POLICY_ACCEPT   1
#define TOKENIZER_POLICY_SINGULAR   2
#define TOKENIZER_POLICY_BEGIN   3
#define TOKENIZER_POLICY_END_ACCEPT   4
#define TOKENIZER_POLICY_END_DISCARD   5
#define TOKENIZER_POLICY_COMPLAIN   6

Functions

int char_is_letter (char c)
int kest_tokenize_content (struct kest_eff_parsing_state *ps)
int kest_token_ll_safe_aappend (kest_token_ll **list_ptr, char *x, int line, int index)
int kest_token_ll_advance (kest_token_ll **list)
int kest_token_ll_skip_ws (kest_token_ll **list)
int token_is_newline (char *str)
int token_is_char (char *str, char c)
int token_is_int (char *token)
int token_is_number (char *token)
int token_is_name (char *token)
int token_is_dict_entry_seperator (char *token)
float token_to_float (char *token)
kest_token_llkest_token_span_to_ll (kest_token_ll *start, kest_token_ll *end)

Macro Definition Documentation

◆ TOKENIZER_POLICY_ACCEPT

#define TOKENIZER_POLICY_ACCEPT   1

Definition at line 17 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_POLICY_BEGIN

#define TOKENIZER_POLICY_BEGIN   3

Definition at line 19 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_POLICY_COMPLAIN

#define TOKENIZER_POLICY_COMPLAIN   6

Definition at line 22 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_POLICY_DISCARD

#define TOKENIZER_POLICY_DISCARD   0

Definition at line 16 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_POLICY_END_ACCEPT

#define TOKENIZER_POLICY_END_ACCEPT   4

Definition at line 20 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_POLICY_END_DISCARD

#define TOKENIZER_POLICY_END_DISCARD   5

Definition at line 21 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_POLICY_SINGULAR

#define TOKENIZER_POLICY_SINGULAR   2

Definition at line 18 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_STATE_DONE

#define TOKENIZER_STATE_DONE   8

Definition at line 14 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_STATE_IDLE

#define TOKENIZER_STATE_IDLE   0

Definition at line 6 of file kest_tokenizer.h.

Referenced by kest_tokenize_content(), and tokenizer_policy().

◆ TOKENIZER_STATE_LEADING_ZERO

#define TOKENIZER_STATE_LEADING_ZERO   7

Definition at line 13 of file kest_tokenizer.h.

Referenced by tokenizer_policy().

◆ TOKENIZER_STATE_NAME

#define TOKENIZER_STATE_NAME   1

Definition at line 7 of file kest_tokenizer.h.

Referenced by tokenizer_policy().

◆ TOKENIZER_STATE_NUMBER

#define TOKENIZER_STATE_NUMBER   2

Definition at line 8 of file kest_tokenizer.h.

Referenced by tokenizer_policy().

◆ TOKENIZER_STATE_NUMBER_BIN

#define TOKENIZER_STATE_NUMBER_BIN   4

Definition at line 10 of file kest_tokenizer.h.

Referenced by tokenizer_policy().

◆ TOKENIZER_STATE_NUMBER_HEX

#define TOKENIZER_STATE_NUMBER_HEX   3

Definition at line 9 of file kest_tokenizer.h.

Referenced by tokenizer_policy().

◆ TOKENIZER_STATE_STRESC

#define TOKENIZER_STATE_STRESC   6

Definition at line 12 of file kest_tokenizer.h.

Referenced by tokenizer_policy().

◆ TOKENIZER_STATE_STRING

#define TOKENIZER_STATE_STRING   5

Definition at line 11 of file kest_tokenizer.h.

Referenced by tokenizer_policy().

Function Documentation

◆ char_is_letter()

int char_is_letter ( char c)

Definition at line 15 of file kest_tokenizer.c.

Referenced by char_is_alphanumeric(), fnames_agree(), token_is_name(), and tokenizer_policy().

Here is the caller graph for this function:

◆ kest_token_ll_advance()

int kest_token_ll_advance ( kest_token_ll ** list)

Definition at line 239 of file kest_tokenizer.c.

Referenced by kest_parse_dict_list(), kest_parse_dict_val(), and kest_parse_dictionary().

Here is the caller graph for this function:

◆ kest_token_ll_safe_aappend()

int kest_token_ll_safe_aappend ( kest_token_ll ** list_ptr,
char * x,
int line,
int index )

Definition at line 333 of file kest_tokenizer.c.

Referenced by kest_token_span_to_ll(), and kest_tokenize_content().

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

◆ kest_token_ll_skip_ws()

int kest_token_ll_skip_ws ( kest_token_ll ** list)

Definition at line 272 of file kest_tokenizer.c.

Referenced by kest_parse_asm(), kest_parse_dict_list(), and kest_parse_dictionary().

Here is the caller graph for this function:

◆ kest_token_span_to_ll()

kest_token_ll * kest_token_span_to_ll ( kest_token_ll * start,
kest_token_ll * end )

Definition at line 625 of file kest_tokenizer.c.

Referenced by kest_parse_tokens().

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

◆ kest_tokenize_content()

int kest_tokenize_content ( struct kest_eff_parsing_state * ps)

Definition at line 504 of file kest_tokenizer.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:

◆ token_is_char()

int token_is_char ( char * str,
char c )

Definition at line 53 of file kest_tokenizer.c.

Referenced by get_section_start_score(), and token_is_newline().

Here is the caller graph for this function:

◆ token_is_dict_entry_seperator()

int token_is_dict_entry_seperator ( char * token)

Definition at line 134 of file kest_tokenizer.c.

Referenced by kest_parse_dict_val().

Here is the caller graph for this function:

◆ token_is_int()

int token_is_int ( char * token)

Definition at line 63 of file kest_tokenizer.c.

Referenced by kest_parse_asm_arg(), and kest_parse_asm_arg_2().

Here is the caller graph for this function:

◆ token_is_name()

int token_is_name ( char * token)

Definition at line 215 of file kest_tokenizer.c.

Referenced by kest_parse_dictionary(), and kest_parse_expression_rec_pratt().

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

◆ token_is_newline()

int token_is_newline ( char * str)

Definition at line 58 of file kest_tokenizer.c.

Referenced by kest_parse_tokens().

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

◆ token_is_number()

int token_is_number ( char * token)

Definition at line 80 of file kest_tokenizer.c.

Referenced by kest_parse_expression_rec_pratt().

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

◆ token_to_float()

float token_to_float ( char * token)

Definition at line 163 of file kest_tokenizer.c.

Referenced by kest_parse_asm_arg_2(), and kest_parse_expression_rec_pratt().

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