- TW-1434 Parser issue in description.contains (thanks to Ralph Bean).
This commit is contained in:
Paul Beckingham 2014-11-09 18:44:12 -05:00
parent 4bbb6fea99
commit d38e606a50
2 changed files with 4 additions and 14 deletions

View file

@ -171,6 +171,7 @@
- TW-1424 Using a date of '1824days' (in the future) fails (thanks to Black Ops
Testing).
- TW-1428 Add support for color.uda.<name>.<value> rules.
- TW-1434 Parser issue in description.contains (thanks to Ralph Bean).
- TW-1436 Parser hangs when multiple slashes are used.
- TW-1437 taskd.trust has a bad default value.
- TW-1441 task import continues happily if filename doesn't exist.

View file

@ -1128,6 +1128,7 @@ void CLI::desugarFilterAttributeModifiers ()
A op ("argAttmod", "");
op.tag ("FILTER");
op.tag ("OP");
A rhs ("argAttMod", "");
rhs.tag ("FILTER");
@ -1135,77 +1136,66 @@ void CLI::desugarFilterAttributeModifiers ()
if (modifier == "before" || modifier == "under" || modifier == "below")
{
op.attribute ("raw", "<");
op.tag ("OP");
rhs.attribute ("raw", value);
rhs.tag ("LITERAL");
}
else if (modifier == "after" || modifier == "over" || modifier == "above")
{
op.attribute ("raw", ">");
op.tag ("OP");
rhs.attribute ("raw", value);
rhs.tag ("LITERAL");
}
else if (modifier == "none")
{
op.attribute ("raw", "==");
op.tag ("OP");
rhs.attribute ("raw", "''");
rhs.tag ("LITERAL");
}
else if (modifier == "any")
{
op.attribute ("raw", "!=");
op.tag ("OP");
rhs.attribute ("raw", "''");
rhs.tag ("LITERAL");
}
else if (modifier == "is" || modifier == "equals")
{
op.attribute ("raw", "==");
op.tag ("OP");
rhs.attribute ("raw", value);
rhs.tag ("LITERAL");
}
else if (modifier == "isnt" || modifier == "not")
{
op.attribute ("raw", "!=");
op.tag ("OP");
rhs.attribute ("raw", value);
rhs.tag ("LITERAL");
}
else if (modifier == "has" || modifier == "contains")
{
op.attribute ("raw", "~");
op.tag ("OP");
rhs.attribute ("raw", value);
rhs.attribute ("raw", "'" + value + "'");
rhs.tag ("LITERAL");
}
else if (modifier == "hasnt")
{
op.attribute ("raw", "!~");
op.tag ("OP");
rhs.attribute ("raw", value);
rhs.attribute ("raw", "'" + value + "'");
rhs.tag ("LITERAL");
}
else if (modifier == "startswith" || modifier == "left")
{
op.attribute ("raw", "~");
op.tag ("OP");
rhs.attribute ("raw", "'^" + value + "'");
rhs.tag ("REGEX");
}
else if (modifier == "endswith" || modifier == "right")
{
op.attribute ("raw", "~");
op.tag ("OP");
rhs.attribute ("raw", "'" + value + "$'");
rhs.tag ("REGEX");
}
else if (modifier == "word")
{
op.attribute ("raw", "~");
op.tag ("OP");
#if defined (DARWIN)
rhs.attribute ("raw", value);
#elif defined (SOLARIS)
@ -1218,7 +1208,6 @@ void CLI::desugarFilterAttributeModifiers ()
else if (modifier == "noword")
{
op.attribute ("raw", "!~");
op.tag ("OP");
#if defined (DARWIN)
rhs.attribute ("raw", value);
#elif defined (SOLARIS)