- Removed obsolete ::infix method.
This commit is contained in:
Paul Beckingham 2014-05-25 09:15:49 -04:00
parent 87a48ab7f5
commit 1a75039cf7
2 changed files with 0 additions and 35 deletions

View file

@ -759,40 +759,6 @@ const A3 A3::tokenize (const A3& input) const
return output; return output;
} }
////////////////////////////////////////////////////////////////////////////////
// Insert 'and' operators between adjacent non-operators.
//
// ) <non-op> --> ) and <non-op>
// <non-op> ( --> <non-op> <and> (
// ) ( --> ) and (
// <non-op> <non-op> --> <non-op> and <non-op>
//
const A3 A3::infix (const A3& input) const
{
if (input.size () == 1)
return input;
Arg previous ("?", Arg::cat_op);
A3 modified;
std::vector <Arg>::const_iterator arg;
for (arg = input.begin (); arg != input.end (); ++arg)
{
// Old-style filters need 'and' conjunctions.
if ((previous._category != Arg::cat_op || previous._raw == ")") &&
(arg->_category != Arg::cat_op || arg->_raw == "("))
{
modified.push_back (Arg ("and", Arg::cat_op));
}
// Now insert the adjacent non-operator.
modified.push_back (*arg);
previous = *arg;
}
modified.dump ("A3::infix");
return modified;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
const A3 A3::expand (const A3& input) const const A3 A3::expand (const A3& input) const
{ {

View file

@ -62,7 +62,6 @@ public:
const A3 extract_modifications () const; const A3 extract_modifications () const;
const A3 tokenize (const A3&) const; const A3 tokenize (const A3&) const;
const A3 infix (const A3&) const;
const A3 expand (const A3&) const; const A3 expand (const A3&) const;
const A3 sequence (const A3&) const; const A3 sequence (const A3&) const;
const A3 postfix (const A3&) const; const A3 postfix (const A3&) const;