Diagnostics

- Further removal of diagnostic output.
This commit is contained in:
Paul Beckingham 2014-05-25 14:59:09 -04:00
parent fa02eb4ed2
commit 949063102a
3 changed files with 6 additions and 14 deletions

View file

@ -221,9 +221,7 @@ int Context::initialize (int argc, const char** argv)
a3.categorize ();
// Parse the command line.
Tree* parseTree = parser.parse ();
if (parseTree && config.getBoolean ("debug"))
debug (parseTree->dump ());
parser.parse ();
// Initialize the database.
tdb2.set_location (data_dir);

View file

@ -157,7 +157,7 @@ void Eval::evaluatePostfixExpression (const std::string& e, Variant& v) const
tokens.push_back (std::pair <std::string, Lexer::Type> (token, type));
if (_debug)
context.debug ("Filter postfix tokens " + dump (tokens));
context.debug ("Postfix tokens " + dump (tokens));
// Call the postfix evaluator.
evaluatePostfixStack (tokens, v);
@ -176,7 +176,7 @@ void Eval::compileExpression (const std::string& e)
// Parse for syntax checking and operator replacement.
if (_debug)
context.debug ("Filter infix tokens " + dump (_compiled));
context.debug ("Filter infix tokens " + dump (_compiled));
infixParse (_compiled);
if (_debug)
context.debug ("Filter parsed tokens " + dump (_compiled));
@ -184,7 +184,7 @@ void Eval::compileExpression (const std::string& e)
// Convert infix --> postfix.
infixToPostfix (_compiled);
if (_debug)
context.debug ("Postfix tokens " + dump (_compiled));
context.debug ("Postfix tokens " + dump (_compiled));
}
////////////////////////////////////////////////////////////////////////////////
@ -805,8 +805,7 @@ std::string Eval::dump (
{
// Set up a color mapping.
std::map <Lexer::Type, Color> color_map;
color_map[Lexer::typeNone] = Color ("color15 on gray4");
color_map[Lexer::typeOperator] = Color ("green on gray4");
color_map[Lexer::typeNone] = Color ("white on green");
/*
Lexer::typeOperator
Lexer::typeNone
@ -841,7 +840,7 @@ std::string Eval::dump (
output += c.colorize (i->first);
}
return output;
return output + "\n";
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -72,7 +72,6 @@ Filter::~Filter ()
void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output)
{
context.timer_filter.start ();
_startCount = (int) input.size ();
if (context.config.getBoolean ("debug"))
@ -83,8 +82,6 @@ void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output
}
std::string filterExpr = context.parser.getFilterExpression ();
context.debug ("\033[1;37;42mFILTER\033[0m " + filterExpr);
if (filterExpr.length ())
{
Eval eval;
@ -132,8 +129,6 @@ void Filter::subset (std::vector <Task>& output)
bool shortcut = false;
std::string filterExpr = context.parser.getFilterExpression ();
context.debug ("\033[1;37;42mFILTER\033[0m " + filterExpr);
if (filterExpr.length ())
{
context.timer_filter.stop ();