#ifndef COMPILER_BUILD_TABLES_LEX_TABLE_BUILDER_H_ #define COMPILER_BUILD_TABLES_LEX_TABLE_BUILDER_H_ #include #include #include #include "compiler/lex_table.h" namespace tree_sitter { struct ParseTable; struct LexicalGrammar; namespace build_tables { class LexTableBuilder { public: static std::unique_ptr create(const LexicalGrammar &); LexTable build(ParseTable *); bool detect_conflict( rules::Symbol::Index, rules::Symbol::Index, const std::vector> &following_terminals_by_terminal_index ); protected: LexTableBuilder() = default; }; } // namespace build_tables } // namespace tree_sitter #endif // COMPILER_BUILD_TABLES_LEX_TABLE_BUILDER_H_