2014-06-08 16:31:45 -07:00
|
|
|
#ifndef HELPERS_TREE_HELPERS_H_
|
|
|
|
|
#define HELPERS_TREE_HELPERS_H_
|
|
|
|
|
|
2018-05-10 15:11:14 -07:00
|
|
|
#include "runtime/subtree.h"
|
2014-06-03 13:19:49 -07:00
|
|
|
#include <vector>
|
2015-05-25 20:44:23 -07:00
|
|
|
#include <string>
|
2014-06-03 13:19:49 -07:00
|
|
|
|
2016-02-23 00:08:20 -08:00
|
|
|
extern const char *symbol_names[24];
|
2018-05-11 15:06:13 -07:00
|
|
|
SubtreeArray *tree_array(std::vector<const Subtree *> trees);
|
2014-06-08 16:31:45 -07:00
|
|
|
|
2018-05-10 15:11:14 -07:00
|
|
|
std::ostream &operator<<(std::ostream &stream, const Subtree *tree);
|
2015-12-02 07:53:15 -08:00
|
|
|
std::ostream &operator<<(std::ostream &stream, const TSNode &node);
|
2015-09-18 23:20:06 -07:00
|
|
|
bool operator==(const TSNode &left, const TSNode &right);
|
2018-05-11 15:06:13 -07:00
|
|
|
bool operator==(const std::vector<const Subtree *> &right, const SubtreeArray &array);
|
2015-05-25 20:44:23 -07:00
|
|
|
|
2017-06-30 21:55:50 -07:00
|
|
|
void assert_consistent_tree_sizes(TSNode node);
|
|
|
|
|
|
2014-07-17 23:29:11 -07:00
|
|
|
#endif // HELPERS_TREE_HELPERS_H_
|