From 867910f7de7b89832a41e8a87d18a2f779b33f3b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 21 Jun 2015 21:15:05 -0400 Subject: [PATCH] CLI2: Remove unused ::disqualifyOnlyParenOps method --- src/CLI2.cpp | 53 ---------------------------------------------------- src/CLI2.h | 3 --- 2 files changed, 56 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 6a6577242..7ed4c462e 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -1721,59 +1721,6 @@ bool CLI2::isUUIDList (const std::string& raw) const return false; } - -//////////////////////////////////////////////////////////////////////////////// -bool CLI2::disqualifyOnlyParenOps ( - const std::vector >& lexemes) const -{ - int opCount = 0; - int opSugarCount = 0; - int opParenCount = 0; - - for (auto& lexeme : lexemes) - { - if (lexeme.second == Lexer::Type::op) - { - ++opCount; - - if (lexeme.first == "(" || - lexeme.first == ")") - ++opParenCount; - } - - else if (isTag (lexeme.first) || // obsolete - isUUIDList (lexeme.first) || - isUUID (lexeme.first) || // obsolete - isIDSequence (lexeme.first) || // obsolete - isID (lexeme.first) || // obsolete - isPattern (lexeme.first) || // obsolete - isAttribute (lexeme.first)) // obsolete - ++opSugarCount; - } - - return opCount == opParenCount && ! opSugarCount; -} - -//////////////////////////////////////////////////////////////////////////////// -// Disqualify terms when there are are binary operators at either end, as long -// as there are no operators in between, which includes syntactic sugar that -// hides operators. -bool CLI2::disqualifyFirstLastBinary ( - const std::vector >& lexemes) const -{ - bool firstBinary = false; - bool lastBinary = false; - - std::string dummy; - if (canonicalize (dummy, "binary_operator", lexemes[0].first)) - firstBinary = true; - - if (lexemes.size () > 1 && - canonicalize (dummy, "binary_operator", lexemes[lexemes.size () - 1].first)) - lastBinary = true; - - return firstBinary || lastBinary; -} */ //////////////////////////////////////////////////////////////////////////////// diff --git a/src/CLI2.h b/src/CLI2.h index 699734cae..e19e8ca0f 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -120,9 +120,6 @@ private: /* bool isUUIDList (const std::string&) const; - - // These methods come up iwht reasons not to Lex a token. Probably no longer needed. - bool disqualifyFirstLastBinary (const std::vector >&) const; */ public: