Make separate types for syntax and lexical grammars

This way, the separator characters can be added as a field to
lexical grammars only
This commit is contained in:
Max Brunsfeld 2014-06-25 13:27:16 -07:00
parent d5674d33c4
commit 7df35f9b8d
49 changed files with 467 additions and 395 deletions

View file

@ -7,14 +7,15 @@
#include "compiler/lex_table.h"
namespace tree_sitter {
class PreparedGrammar;
class SyntaxGrammar;
class LexicalGrammar;
namespace generate_code {
std::string c_code(std::string name,
const ParseTable &parse_table,
const LexTable &lex_table,
const PreparedGrammar &syntax_grammar,
const PreparedGrammar &lexical_grammar);
const SyntaxGrammar &syntax_grammar,
const LexicalGrammar &lexical_grammar);
}
}