From b5649fca8c7c9ccb5ab926c0da7291bcb30b0f30 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 16 Apr 2014 15:59:56 -0400 Subject: [PATCH] A3t - Relocated calls to findCommand, findUUIDList, findIdSequence from A3t::parse to Context::initialize. --- src/A3t.cpp | 3 --- src/A3t.h | 7 ++++--- src/Context.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/A3t.cpp b/src/A3t.cpp index e0dd1db02..ab854ebae 100644 --- a/src/A3t.cpp +++ b/src/A3t.cpp @@ -120,14 +120,11 @@ Tree* A3t::parse () { findBinary (); findTerminator (); - findCommand (); findSubstitution (); findPattern (); findTag (); findAttribute (); findAttributeModifier (); - findUUIDList (); // Before findIdSequence - findIdSequence (); findOperator (); validate (); diff --git a/src/A3t.h b/src/A3t.h index ac2911763..48cc3e4da 100644 --- a/src/A3t.h +++ b/src/A3t.h @@ -45,6 +45,10 @@ public: void findFileOverride (); void findConfigOverride (); + void findCommand (); + void findIdSequence (); + void findUUIDList (); + void get_overrides (std::string&, File&); void get_data_location (Path&); void apply_overrides (); @@ -54,14 +58,11 @@ public: private: void findBinary (); void findTerminator (); - void findCommand (); void findPattern (); void findSubstitution (); void findTag (); void findAttribute (); void findAttributeModifier (); - void findIdSequence (); - void findUUIDList (); void findOperator (); void validate (); diff --git a/src/Context.cpp b/src/Context.cpp index 2d215ef85..8aa40fb42 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -195,6 +195,12 @@ int Context::initialize (int argc, const char** argv) for (op = operators.begin (); op != operators.end (); ++op) a3t.entity ("operator", *op); + // Now the entities are loaded, parsing may resume. + a3t.findCommand (); // + a3t.findUUIDList (); // Before findIdSequence + a3t.findIdSequence (); // + a3t.inject_defaults (); // rc.default.command + // Static initialization to decouple code. staticInitialization (); @@ -205,7 +211,6 @@ int Context::initialize (int argc, const char** argv) // Handle default command and assumed 'info' command. a3.inject_defaults (); - a3t.inject_defaults (); // The re-categorization allows all injected arguments to be properly given // a category.