From d37a99645588c634dcc0510e8846bdf361844234 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Thu, 27 Feb 2014 00:10:54 +0100 Subject: [PATCH] simplify regexps Conflicts: aconversions/src/re2fa/Brzozowski.cpp libaderivation/src/RegExpDerivation.cpp libaregexptree/src/RegExpAlphabet.cpp --- aconvert.regexp/src/RegExpPrinter.cpp | 2 +- alib/src/regexp/RegExpPrinter.cpp | 2 +- alib/src/regexp/RegExpSymbol.cpp | 4 ++-- alib/src/regexp/RegExpSymbol.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aconvert.regexp/src/RegExpPrinter.cpp b/aconvert.regexp/src/RegExpPrinter.cpp index 8535be8997..2b1e7d3335 100644 --- a/aconvert.regexp/src/RegExpPrinter.cpp +++ b/aconvert.regexp/src/RegExpPrinter.cpp @@ -69,7 +69,7 @@ void RegExpPrinter::printIteration(regexp::Iteration* iteration) { } void RegExpPrinter::printSymbol(regexp::RegExpSymbol* symbol) { - m_Out << symbol->getSymbol().getSymbol(); + m_Out << symbol->getSymbol(); } void RegExpPrinter::printEpsilon(regexp::RegExpEpsilon* symbol) { diff --git a/alib/src/regexp/RegExpPrinter.cpp b/alib/src/regexp/RegExpPrinter.cpp index e49db76e03..f3757b3025 100644 --- a/alib/src/regexp/RegExpPrinter.cpp +++ b/alib/src/regexp/RegExpPrinter.cpp @@ -83,7 +83,7 @@ void RegExpPrinter::printIteration(Iteration* iteration, ostream& out, string pr void RegExpPrinter::printSymbol(RegExpSymbol* symbol, ostream& out, string prefix) { out << prefix << "<symbol>"; - out << symbol->getSymbol().getSymbol(); + out << symbol->getSymbol(); out << "</symbol>\n"; } diff --git a/alib/src/regexp/RegExpSymbol.cpp b/alib/src/regexp/RegExpSymbol.cpp index 2283563829..66b85aed26 100644 --- a/alib/src/regexp/RegExpSymbol.cpp +++ b/alib/src/regexp/RegExpSymbol.cpp @@ -18,7 +18,7 @@ RegExpSymbol::RegExpSymbol(const string& symbol) : } RegExpElement* RegExpSymbol::clone() const { - return new RegExpSymbol(this->symbol.getSymbol()); + return new RegExpSymbol(this->symbol); } bool RegExpSymbol::operator<(const RegExpElement& other) const { @@ -58,7 +58,7 @@ bool RegExpSymbol::containsEmptyString() const { return false; } -const Symbol& RegExpSymbol::getSymbol() const { +const string& RegExpSymbol::getSymbol() const { return this->symbol; } diff --git a/alib/src/regexp/RegExpSymbol.h b/alib/src/regexp/RegExpSymbol.h index 1c337bc115..77d24348e9 100644 --- a/alib/src/regexp/RegExpSymbol.h +++ b/alib/src/regexp/RegExpSymbol.h @@ -21,7 +21,7 @@ using namespace alphabet; * Represents symbol in the regular expression. Contains name of the symbol. */ class RegExpSymbol: public RegExpElement { - Symbol symbol; + string symbol; public: RegExpSymbol(); RegExpSymbol(const string& symbol); @@ -47,7 +47,7 @@ public: */ bool containsEmptyString() const; - const Symbol& getSymbol() const; + const string& getSymbol() const; }; } /* namespace regexp */ -- GitLab