Commit graph

101 commits

Author SHA1 Message Date
Paul Beckingham
84b3055690 CLI2: Pseudo-args demoted to config settings
- When 'limit:N' is encountered, it is removed from the command line, and
  added as a config setting, equivalent to 'rc.limit:N'.
- This simplifieѕ subsequent command line parsing.
2015-09-12 09:03:15 -04:00
Paul Beckingham
c59afe34c4 TW-1656: Implicitly parenthesize argv filter
- Thanks to Daniel Shahaf.
2015-09-12 08:57:38 -04:00
Paul Beckingham
3b4dc9acb3 CLI2: Removed unused arg
- Thanks to Tomas Babej.
2015-09-07 12:44:41 -04:00
Paul Beckingham
3897c23c8d CLI2: Prevent loops
- Context was sometimes causing looping:

    ::analyze -> ::addContexFilter -> ::addFilter -> ::analyze

  This is prevented by a simple latch.
2015-09-06 01:42:30 -04:00
Paul Beckingham
a82927cb54 CLI2: Refactored some of ::prepareFilter into ::categorizeArgs 2015-09-04 17:14:50 -04:00
Paul Beckingham
6f294e2968 Debug: rc.sugar enables ID/UUID snytactic sugar
- This is not documented.  It is not for users.
2015-08-07 11:35:27 -04:00
Paul Beckingham
941e8c9f37 CLI2: When applying extra filters, insert at the beginning, thus avoiding '--' 2015-08-02 10:20:12 -04:00
Paul Beckingham
758df84539 Context: Now obeys command DNA
- Applying a context filter is now performed only when a command requests it.
2015-08-02 10:08:04 -04:00
Paul Beckingham
251eedf7e5 CLI2: Dead code removal 2015-07-17 15:35:11 -04:00
Paul Beckingham
a7eb32272c TW-1419: On add '-tag' is considered a tag removal, which makes no sense. 2015-07-13 14:24:24 -04:00
Paul Beckingham
a09a2bc241 CLI2: Added conditional expression eval
- Only non-'string' type attributes ('numeric', 'date', 'duration') support the
  evaluation of values in FILTER arguments, for example:
    due.before:now+1d
  If evaluation is supported, values need to be lexed into tokens, and if there
  are multiple tokens, parenthesize the set.
2015-07-13 01:09:11 -04:00
Paul Beckingham
694323a8f1 CLI2: Implemented ::lexFilterArgs
- Now spots filter elements that need to be Lexed.
2015-07-12 17:57:52 -04:00
Paul Beckingham
023fd9d38a CLI2: Removed obsolete ::decomposeModSubstitutions 2015-07-05 16:31:30 -04:00
Paul Beckingham
af71af1085 CLI2: Removed obsolete ::decomposeModTags 2015-07-05 16:30:59 -04:00
Paul Beckingham
f5ece63ec0 CLI2: Removed obsolete ::decomposeModAttributes 2015-07-05 16:29:54 -04:00
Paul Beckingham
460f2aeea5 CLI2: Refactoring
- Whenever A2::attribute sees 'raw' being set, it automaticall decomposes the
  arg, which can now be removed from other methods.
- New ::canonicalizeNames method means that the ::decomposeMod* methods are no
  longer needed.
- Removed ::findOverrides which now does nothing.
2015-07-05 16:13:56 -04:00
Paul Beckingham
0c568580b3 CLI2: Removed obsolete ::isUUIDList
- Removed unsupported UUID lists, which shoudl have been removed earlier when
  Lexer::Type::list was dropped.
- Reversed logic in 'if' statements to perform the lowest cost comparison first.
2015-07-05 10:39:34 -04:00
Paul Beckingham
bce24da6a5 CLI2: Eliminated unnecessary ::findTerminator 2015-07-01 21:47:19 -04:00
Paul Beckingham
1b83734392 CLI2: Added ::demoteDOM to demote unrecognized DOM args to words 2015-07-01 18:02:48 -04:00
Paul Beckingham
b67b2ccc96 CLI2: Added ::addContextFilter, and supporting processing 2015-06-27 15:53:24 -04:00
Paul Beckingham
82c5d019a3 CLI2: Added ::addFilter method 2015-06-22 10:30:29 -04:00
Paul Beckingham
30ad00fb7f CLI2: Removed unused default constructor A::A 2015-06-22 10:18:43 -04:00
Paul Beckingham
7432c0aead CLI2: Added ::getToken method for obtaining the canonical form, if possible 2015-06-22 00:35:35 -04:00
Paul Beckingham
54b2227729 CLI2: Removed unused ::decomposeModAttributeModifiers method 2015-06-21 23:47:05 -04:00
Paul Beckingham
82acbb28e3 CLI2: Added ::decomposeModAttributes 2015-06-21 23:43:02 -04:00
Paul Beckingham
c369f37509 CLI2: Removed unused A::unTagAll method 2015-06-21 23:06:06 -04:00
Paul Beckingham
77b97d658a CLI2: Added ::getLimit method 2015-06-21 21:19:19 -04:00
Paul Beckingham
867910f7de CLI2: Remove unused ::disqualifyOnlyParenOps method 2015-06-21 21:15:05 -04:00
Paul Beckingham
4b11ac2dae CLI2: Removed unused ::disqualifyOnlyParenOps method 2015-06-21 21:13:34 -04:00
Paul Beckingham
5c44929acb CLI2: Removed unused ::disqualifyNoOps method 2015-06-21 21:13:08 -04:00
Paul Beckingham
d9b15cec2e CLI2: Removed unused ::disqualifyInsufficientTerms method 2015-06-21 21:12:19 -04:00
Paul Beckingham
c1f4cc3554 CLI2: Added ::decomposeModSubstitutions 2015-06-21 21:08:42 -04:00
Paul Beckingham
b4b15c7f45 CLI2: Added polymorphic ::attribute 2015-06-21 21:08:11 -04:00
Paul Beckingham
15e9c91d85 CLI2: Added ::decomposeModTags 2015-06-21 20:43:42 -04:00
Paul Beckingham
706ca72a75 CLI2: Added ::insertJunctions 2015-06-21 20:15:05 -04:00
Paul Beckingham
e504149a43 CLI2: Removed unused ::desugarFilterAttributeModifiers method 2015-06-21 15:55:44 -04:00
Paul Beckingham
fe9891f2f9 CLI2: Added ::desugarFilterAttributes 2015-06-21 15:43:52 -04:00
Paul Beckingham
4162756560 CLI2: Removed unused ::findAttributes method 2015-06-20 12:39:44 -07:00
Paul Beckingham
62307f64da CLI2: Added ::desugarFilterPlainArgs 2015-06-20 12:37:10 -07:00
Paul Beckingham
8229d29100 CLI2: Added ::desugarFilterPatterns 2015-06-20 12:15:11 -07:00
Paul Beckingham
20d259a129 CLI2: Removed unused ::addArgs method 2015-06-20 11:59:37 -07:00
Paul Beckingham
db3150d7b2 CLI2: Added ::findStrayModifications 2015-06-20 11:50:42 -07:00
Paul Beckingham
c235b63572 CLI2: Added ::unTag 2015-06-20 11:49:53 -07:00
Paul Beckingham
eca0e35451 CLI2: Removed unused ::findOperators method 2015-06-20 11:18:09 -07:00
Paul Beckingham
a21767aa15 CLI2: Added ::desugarFilterTags 2015-06-20 11:14:37 -07:00
Paul Beckingham
c44b155e97 CLI2: Added ::insertIDExpr
- Converted ::_id_ranges to std::vector <std::pair <std::string, std::string>>,
  which reduced the nubmer of string->int conversions, and the need for integer
  formatting.
2015-06-20 10:47:02 -07:00
Paul Beckingham
c49b9f352c CLI2: Removed unused ::isAttribute method 2015-06-20 10:03:54 -07:00
Paul Beckingham
b80c103043 CLI2: Removed unused members _strict, _terminated 2015-06-20 10:01:12 -07:00
Paul Beckingham
0ef3cff4c6 CLI2: Removed unused A::attribute methods 2015-06-20 09:59:11 -07:00
Paul Beckingham
e186082a9b CLI2: Added necessary includes 2015-06-20 09:57:52 -07:00