Make parser template class

This commit is contained in:
IlyaShurupov 2023-11-06 15:43:31 +03:00 committed by Ilusha
parent 38957e678b
commit 656da1fd76
9 changed files with 50 additions and 94 deletions

View file

@ -1,17 +1,15 @@
#include "NewPlacement.hpp"
#include "Test.hpp"
using namespace tp;
void test() {
auto parser = SimpleParser();
auto grammar = Sentence(gGrammar);
auto sentence = Sentence(gSentence);
auto parser = SimpleParser<int1>();
auto ast = AST();
parser.compileTables(grammar);
parser.parse(sentence, ast);
parser.compileTables(gGrammar, String::Logic::calcLength(gGrammar));
parser.parse(gSentence, String::Logic::calcLength(gSentence), ast);
}
int main() {