Store parse states with few lookahead symbols in a more compact way
This commit is contained in:
parent
48a883c1d4
commit
09a2755399
7 changed files with 135 additions and 11 deletions
|
|
@ -114,6 +114,9 @@ struct TSLanguage {
|
|||
const TSFieldMapSlice *field_map_slices;
|
||||
const TSFieldMapEntry *field_map_entries;
|
||||
const char **field_names;
|
||||
uint32_t large_state_count;
|
||||
const uint16_t *small_parse_table;
|
||||
const uint32_t *small_parse_table_map;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -155,6 +158,8 @@ struct TSLanguage {
|
|||
* Parse Table Macros
|
||||
*/
|
||||
|
||||
#define SMALL_STATE(id) id - LARGE_STATE_COUNT
|
||||
|
||||
#define STATE(id) id
|
||||
|
||||
#define ACTIONS(id) id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue