Make parser template class
This commit is contained in:
parent
419ebb43d1
commit
b3e5bf0941
9 changed files with 50 additions and 94 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue