Combine TSParser and TSStateMachine objects
My original thought was to decouple the runtime from the LR parser generator by making TSParser a generic interface that LR parsers implement. I think this was more trouble than it was worth.
This commit is contained in:
parent
1c7d2d2d03
commit
9da7663e99
18 changed files with 586 additions and 645 deletions
|
|
@ -5,7 +5,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "tree_sitter/parser/state_machine.h"
|
||||
#include "tree_sitter/runtime.h"
|
||||
#include "tree_sitter/parser.h"
|
||||
|
||||
enum {
|
||||
dummy_sym1 = 2,
|
||||
|
|
@ -13,15 +14,7 @@ enum {
|
|||
dummy_sym3 = 4,
|
||||
};
|
||||
|
||||
struct test_parser {
|
||||
size_t state_count;
|
||||
size_t symbol_count;
|
||||
const TSParseAction **parse_table;
|
||||
const TSStateId *lex_states;
|
||||
const int *hidden_symbols;
|
||||
};
|
||||
|
||||
extern struct test_parser dummy_parser;
|
||||
extern TSParserConfig dummy_parser;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue