splitted parser and grammar into two separate .a
This commit is contained in:
parent
84705f955e
commit
6cc16ff7ef
16 changed files with 6548 additions and 7381 deletions
|
|
@ -12,7 +12,7 @@ typedef uint16_t t_state_id;
|
|||
typedef uint16_t t_symbol;
|
||||
typedef uint64_t t_parser_clock;
|
||||
typedef uint64_t t_parser_duration;
|
||||
typedef unsigned t_stack_version;
|
||||
typedef uint32_t t_stack_version;
|
||||
|
||||
typedef union u_parse_action_entry t_parse_action_entry;
|
||||
typedef union u_subtree t_subtree;
|
||||
|
|
@ -126,8 +126,7 @@ struct s_parse_range
|
|||
struct s_parse_input
|
||||
{
|
||||
void *payload;
|
||||
const char *(*read)(void *payload, uint32_t byte_index, t_point position,
|
||||
uint32_t *bytes_read);
|
||||
const char *(*read)(void *payload, uint32_t byte_index, t_point position, uint32_t *bytes_read);
|
||||
t_input_encoding encoding;
|
||||
};
|
||||
|
||||
|
|
@ -257,19 +256,19 @@ struct s_external_scanner_state
|
|||
uint32_t length;
|
||||
};
|
||||
|
||||
#define SUBTREE_BITS \
|
||||
bool visible : 1; \
|
||||
bool named : 1; \
|
||||
bool extra : 1; \
|
||||
bool has_changes : 1; \
|
||||
bool is_missing : 1; \
|
||||
#define SUBTREE_BITS \
|
||||
bool visible : 1; \
|
||||
bool named : 1; \
|
||||
bool extra : 1; \
|
||||
bool has_changes : 1; \
|
||||
bool is_missing : 1; \
|
||||
bool is_keyword : 1;
|
||||
|
||||
#define SUBTREE_SIZE \
|
||||
uint8_t padding_columns; \
|
||||
uint8_t padding_rows : 4; \
|
||||
uint8_t lookahead_bytes : 4; \
|
||||
uint8_t padding_bytes; \
|
||||
#define SUBTREE_SIZE \
|
||||
uint8_t padding_columns; \
|
||||
uint8_t padding_rows : 4; \
|
||||
uint8_t lookahead_bytes : 4; \
|
||||
uint8_t padding_bytes; \
|
||||
uint8_t size_bytes;
|
||||
|
||||
#if TS_BIG_ENDIAN
|
||||
|
|
@ -520,8 +519,8 @@ struct s_language
|
|||
void *(*create)(void);
|
||||
void (*destroy)(void *);
|
||||
bool (*scan)(void *, t_lexer_data *, const bool *symbol_whitelist);
|
||||
unsigned (*serialize)(void *, char *);
|
||||
void (*deserialize)(void *, const char *, unsigned);
|
||||
uint32_t (*serialize)(void *, char *);
|
||||
void (*deserialize)(void *, const char *, uint32_t);
|
||||
} external_scanner;
|
||||
const t_state_id *primary_state_ids;
|
||||
};
|
||||
|
|
@ -550,10 +549,10 @@ struct s_lexer
|
|||
|
||||
struct s_reduce_action
|
||||
{
|
||||
uint32_t count;
|
||||
t_symbol symbol;
|
||||
int dynamic_precedence;
|
||||
unsigned short production_id;
|
||||
uint32_t count;
|
||||
t_symbol symbol;
|
||||
int32_t dynamic_precedence;
|
||||
uint16_t production_id;
|
||||
};
|
||||
|
||||
struct s_stack_entry
|
||||
|
|
@ -574,7 +573,7 @@ struct s_first_tree
|
|||
t_subtree root;
|
||||
const t_language *language;
|
||||
t_parse_range *included_ranges;
|
||||
unsigned included_range_count;
|
||||
uint32_t included_range_count;
|
||||
};
|
||||
|
||||
#endif // API_STRUCTS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue