Fixed some bugs, including modifing StringReader to treat quoted strings as whole words.

This commit is contained in:
Nathan Braswell
2013-07-02 13:14:40 -04:00
parent 85da0bf646
commit cc6ff21986
5 changed files with 29 additions and 13 deletions

View File

@@ -9,6 +9,11 @@ RegExState::RegExState(char inCharacter) {
inner = NULL;
}
RegExState::RegExState() {
character = 0;
inner = NULL;
}
RegExState::~RegExState() {
//No cleanup necessary
}
@@ -36,7 +41,7 @@ bool RegExState::isGoal() {
std::string RegExState::toString() {
std::string string = "";
string += character;
string += std::string("\"") + character + "\"";
for (std::vector<RegExState*>::size_type i = 0; i < nextStates.size(); i++)
string += "->" + nextStates[i]->toString() + " EC ";
//std::cout << "inner = " << inner << " nextStates size = " << nextStates.size() <<std::endl;