tree-sitter/src/compiler/build_tables/build_parse_table.h
Max Brunsfeld 1d314d71c2 Separate functions for building parse and lex tables
Now, instead of adding states to the lex table as they are needed
by the parse states, we iterate over the parse states after the fact
and set up their corresponding lex states. This has the nice side
effect that the lex states are in a more readable order.
2014-05-04 22:07:52 -07:00

18 lines
501 B
C++

#ifndef COMPILER_BUILD_TABLES_BUILD_PARSE_TABLE_H_
#define COMPILER_BUILD_TABLES_BUILD_PARSE_TABLE_H_
#include <utility>
#include <vector>
#include "tree_sitter/compiler.h"
#include "compiler/parse_table.h"
namespace tree_sitter {
class PreparedGrammar;
namespace build_tables {
std::pair<ParseTable, std::vector<Conflict>>
build_parse_table(const PreparedGrammar &grammar, const PreparedGrammar &lex_grammar);
}
}
#endif // COMPILER_BUILD_TABLES_BUILD_PARSE_TABLE_H_