Make parser template class
This commit is contained in:
parent
419ebb43d1
commit
b3e5bf0941
9 changed files with 50 additions and 94 deletions
|
|
@ -3,16 +3,17 @@
|
|||
|
||||
#include "AST.hpp"
|
||||
#include "GrammarCompiler.hpp"
|
||||
#include "Sentence.hpp"
|
||||
|
||||
namespace tp {
|
||||
|
||||
template <typename tAlphabetType>
|
||||
class Parser {
|
||||
public:
|
||||
Parser() = default;
|
||||
|
||||
public:
|
||||
void compileTables(const ContextFreeGrammar& cfGrammar, const RegularGrammar& reGrammar);
|
||||
void parse(const Sentence& sentence, AST& out);
|
||||
void compileTables(const ContextFreeGrammar& cfGrammar, const RegularGrammar<tAlphabetType, ualni>& reGrammar) {}
|
||||
void parse(const tAlphabetType* sentence, ualni sentenceLength, AST& out) {}
|
||||
|
||||
public:
|
||||
// save load compiled tables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue