From 3636de11c8260bb25662b7c90e8ceee8987502c8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 19 Jun 2015 12:33:06 -0700 Subject: [PATCH] CLI2: Removed obsolete ::analyze method --- src/CLI2.cpp | 82 ---------------------------------------------------- src/CLI2.h | 1 - 2 files changed, 83 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 353df7eca..5f49efdd1 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -536,88 +536,6 @@ void CLI2::addRawFilter (const std::string& arg) add (lexeme); } -//////////////////////////////////////////////////////////////////////////////// -// Intended to be called after ::initialize() and ::add(), to perform the final -// analysis. Analysis is also performed directly after the above, because there -// is a need to extract overrides early, before entities are proviedd. -void CLI2::analyze (bool parse, bool strict) -{ - // Clean what needs to be cleaned. Most in this case. - _args.clear (); - _id_ranges.clear (); - _uuid_list.clear (); - - // For propagation. - _strict = strict; - - for (unsigned int i = 0; i < _original_args.size (); ++i) - { - std::string raw = _original_args[i]; - A a ("arg", raw); - a.tag ("ORIGINAL"); - - if (i == 0) - { - a.tag ("BINARY"); - - std::string basename = "task"; - auto slash = raw.rfind ('/'); - if (slash != std::string::npos) - basename = raw.substr (slash + 1); - - a.attribute ("basename", basename); - if (basename == "cal" || basename == "calendar") - a.tag ("CALENDAR"); - else if (basename == "task" || basename == "tw" || basename == "t") - a.tag ("TW"); - } - - _args.push_back (a); - - if (a.hasTag ("CALENDAR")) - { - A cal ("argCal", "calendar"); - _args.push_back (cal); - } - } - - if (context.config.getInteger ("debug.parser") >= 3) - context.debug (dump ("CLI2::analyze start")); - - // Find argument types. - aliasExpansion (); - findOverrides (); - applyOverrides (); - injectDefaults (); - categorize (); - - if (parse) - { - // Remove all the syntactic sugar for FILTERs. - findIDs (); - findUUIDs (); - insertIDExpr (); - desugarFilterTags (); - findStrayModifications (); - desugarFilterAttributes (); - desugarFilterAttributeModifiers (); - desugarFilterPatterns (); - findOperators (); - findAttributes (); - desugarFilterPlainArgs (); - insertJunctions (); // Deliberately after all desugar calls. - - // Decompose the elements for MODIFICATIONs. - decomposeModAttributes (); - decomposeModAttributeModifiers (); - decomposeModTags (); - decomposeModSubstitutions (); - } - - if (context.config.getInteger ("debug.parser") >= 3) - context.debug ("CLI2::analyze end"); -} - //////////////////////////////////////////////////////////////////////////////// // Scan arguments, looking for any tagged CONFIG, in which case extract the name // and value, applying it to context.config. diff --git a/src/CLI2.h b/src/CLI2.h index 4e2ffdcc4..5f6950c38 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -90,7 +90,6 @@ public: void add (const std::string&); void addContextFilter (); void addRawFilter (const std::string& arg); - void analyze (bool parse = true, bool strict = false); void applyOverrides (); const std::string getFilter (bool applyContext = true); */