diff --git a/alib/src/regexp/Alternation.cpp b/alib/src/regexp/Alternation.cpp index 2b72bf0cd94b1602a1a53f3f6b28684485d4d9df..125fc0b5c0010be676af0df2423f8a074d166a37 100644 --- a/alib/src/regexp/Alternation.cpp +++ b/alib/src/regexp/Alternation.cpp @@ -75,7 +75,7 @@ bool Alternation::operator<(const Alternation& other) const { auto thisIter = this->elements.begin(); auto otherIter = other.elements.begin(); - for(; thisIter != this->elements.end(); thisIter++) { + for(; thisIter != this->elements.end(); thisIter++, otherIter++) { if(**thisIter < **otherIter) return true; } @@ -87,7 +87,7 @@ bool Alternation::operator==(const Alternation& other) const { auto thisIter = this->elements.begin(); auto otherIter = other.elements.begin(); - for(; thisIter != this->elements.end(); thisIter++) { + for(; thisIter != this->elements.end(); thisIter++, otherIter++) { if(**thisIter != **otherIter) return false; } @@ -102,7 +102,7 @@ bool Alternation::operator>(const Alternation& other) const { auto thisIter = this->elements.begin(); auto otherIter = other.elements.begin(); - for(; thisIter != this->elements.end(); thisIter++) { + for(; thisIter != this->elements.end(); thisIter++, otherIter++) { if(**thisIter > **otherIter) return true; } diff --git a/alib/src/regexp/Concatenation.cpp b/alib/src/regexp/Concatenation.cpp index c09e9018271a88215ecbf5d6c8717e2b433078e4..adadd7b1e16616c583cb6ccf612f796510e652a3 100644 --- a/alib/src/regexp/Concatenation.cpp +++ b/alib/src/regexp/Concatenation.cpp @@ -71,7 +71,7 @@ bool Concatenation::operator<(const Concatenation& other) const { auto thisIter = this->elements.begin(); auto otherIter = other.elements.begin(); - for(; thisIter != this->elements.end(); thisIter++) { + for(; thisIter != this->elements.end(); thisIter++, otherIter++) { if(**thisIter < **otherIter) return true; } @@ -83,7 +83,7 @@ bool Concatenation::operator==(const Concatenation& other) const { auto thisIter = this->elements.begin(); auto otherIter = other.elements.begin(); - for(; thisIter != this->elements.end(); thisIter++) { + for(; thisIter != this->elements.end(); thisIter++, otherIter++) { if(**thisIter != **otherIter) return false; } @@ -98,7 +98,7 @@ bool Concatenation::operator>(const Concatenation& other) const { auto thisIter = this->elements.begin(); auto otherIter = other.elements.begin(); - for(; thisIter != this->elements.end(); thisIter++) { + for(; thisIter != this->elements.end(); thisIter++, otherIter++) { if(**thisIter > **otherIter) return true; } diff --git a/alib/src/regexp/RegExp.cpp b/alib/src/regexp/RegExp.cpp index bd65c9a8da07e6343f781b2ed1606a6f26427ba4..e8eb6ed7c85ffbb6f1adf6b7768ec90bc5d9e1c8 100644 --- a/alib/src/regexp/RegExp.cpp +++ b/alib/src/regexp/RegExp.cpp @@ -76,15 +76,15 @@ ostream& operator <<(ostream& out, RegExp& regexp) { } bool RegExp::operator<(const RegExp& other) const { - return this->regExp < other.regExp; + return *(this->regExp) < *(other.regExp); } bool RegExp::operator==(const RegExp& other) const { - return this->regExp == other.regExp; + return *(this->regExp) == *(other.regExp); } bool RegExp::operator>(const RegExp& other) const { - return this->regExp > other.regExp; + return *(this->regExp) > *(other.regExp); } } /* namespace regexp */ diff --git a/makefile b/makefile index 861018a33a0f460876c205a58c117c1ec87db0e8..8e287aac5f2525bfbafe72b1a007a36b37e88f11 100644 --- a/makefile +++ b/makefile @@ -3,7 +3,13 @@ LIBPATH = /usr/lib/ BINFOLDER = bin SUBDIRS_LIBS = alib adeterminize -SUBDIRS_BINS = acat aconvert aconvert.dot aconvert.gastex aconvert.regexp aconvert.automaton aconvert.grammar aminimize adeterminize.fsm adeterminize.idpda adeterminize.vpa adeterminize.vpa2 adeterminize.vpa3 adiff adiff.automaton adiff.grammar aepsilon atrim +SUBDIRS_BINS = acat \ + aconvert aconvert.dot aconvert.gastex aconvert.regexp aconvert.automaton aconvert.grammar \ + aminimize \ + adeterminize.fsm adeterminize.idpda adeterminize.vpa adeterminize.vpa2 adeterminize.vpa3 \ + adiff adiff.automaton adiff.grammar \ + aepsilon \ + atrim SUBDIRS_WITH_MAKE = $(dir $(wildcard */makefile))