Changed Parser to be a virtual base class, inherited by LALRParser

This commit is contained in:
Nathan Braswell
2013-07-30 01:42:51 -04:00
parent 733fe1c08d
commit 3fba45591b
6 changed files with 128 additions and 79 deletions

39
include/LALRParser.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef LALRPARSER_H
#define LALRPARSER_H
#include "Parser.h"
/*
#include "util.h"
#include "ParseRule.h"
#include "ParseAction.h"
#include "Symbol.h"
#include "State.h"
#include "StringReader.h"
#include "Lexer.h"
#include "NodeTree.h"
#include "Table.h"
#include <map>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <iostream>
*/
class LALRParser: public Parser {
public:
LALRParser();
~LALRParser();
//using Parser::loadGrammer;
//Defaults in parser are mostly LALR, so we only need to
//implement the actual parsing function
NodeTree<Symbol*>* parseInput(std::string inputString);
private:
//Nothing
};
#endif