2014-07-30 23:40:02 -07:00
|
|
|
#ifndef RUNTIME_PARSER_H_
|
|
|
|
|
#define RUNTIME_PARSER_H_
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2015-09-18 18:04:52 -07:00
|
|
|
#include "runtime/stack.h"
|
2015-11-18 08:47:15 -08:00
|
|
|
#include "runtime/vector.h"
|
2014-07-30 23:40:02 -07:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
TSLexer lexer;
|
2015-09-18 18:04:52 -07:00
|
|
|
Stack *stack;
|
2014-07-30 23:40:02 -07:00
|
|
|
const TSLanguage *language;
|
2015-11-20 12:55:01 -08:00
|
|
|
Vector lookahead_states;
|
2015-11-20 00:01:53 -08:00
|
|
|
Vector reduce_parents;
|
2014-07-30 23:40:02 -07:00
|
|
|
} TSParser;
|
|
|
|
|
|
2014-10-13 01:02:12 -07:00
|
|
|
TSParser ts_parser_make();
|
2014-07-30 23:40:02 -07:00
|
|
|
void ts_parser_destroy(TSParser *);
|
2015-09-08 23:33:43 -07:00
|
|
|
TSDebugger ts_parser_debugger(const TSParser *);
|
2014-10-17 17:52:54 -07:00
|
|
|
void ts_parser_set_debugger(TSParser *, TSDebugger);
|
2015-09-18 23:20:06 -07:00
|
|
|
TSTree *ts_parser_parse(TSParser *, TSInput, TSTree *);
|
2014-07-30 23:40:02 -07:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif // RUNTIME_PARSER_H_
|