Commit graph

2318 commits

Author SHA1 Message Date
Paul Beckingham
aa8d872466 Expressions
- Implemented !~ operator.
- Hid debug output for now.
2011-06-19 23:50:05 -04:00
Paul Beckingham
1bf6c8a9fa Expressions
- DOM::get now returns the input name by default, rather than "", which
  was the cause of many filter elements not working.
- Modified Variant to have no private data, which means fewer copies of
  Variants and less code.
- Eliminated Variant::operator^ - not needed.
2011-06-19 18:15:09 -04:00
Paul Beckingham
7762ee2f9e Commands
- Promoted filtering code to the Command base class.
- Added filtering short-circuit.
2011-06-19 10:25:53 -04:00
Paul Beckingham
db17536266 Expressions
- Filter processing short-circuits if there is no filter.
- Variant code was not only incomplete, but very broken.  It should not have
  been used.  It still doesn't handle dates and durations.
- Converted all logical and relational Variant operators to return Boolean
  values.
- Stack size is now checked for every operator.
- All operators implemented (without any advanced special case handling) except
  %, ~ and !~.
- Added lazy DOM expansion at the last possible moment.
- Implemented Expression::create_variant to create appropriate Variant instances
  based on categorized and inferred type.
- Removed Variant math functions.  No point.
- Debug code left in place for now.
2011-06-19 09:49:43 -04:00
Paul Beckingham
c57f880be7 Expressions
- Simplified ::eval.
- Added standard operand handling.
- Added type information to the value_stack.
2011-06-17 23:53:26 -04:00
Paul Beckingham
c77c6f172f Expressions
- Many operators implemented
- DOM::get partially implemented
2011-06-17 01:00:03 -04:00
Paul Beckingham
4fca40fc69 Expressions
- Added Expression::eval short-circuit.
- Added int/number exlclusions for Nibbler::getDOM.
- Added Variant::boolean for exatracting filter results.
2011-06-16 20:30:48 -04:00
Paul Beckingham
6a48d86f2c L10N
- Localized all column objects, some commands.
2011-06-16 20:28:46 -04:00
Paul Beckingham
c7bfba103e I18N
- Localized some more.
2011-06-16 00:42:03 -04:00
Paul Beckingham
f971fcd110 Code Cleanup
- Obsoleted Filter.{h,cpp}.
- Obsoleted Sequence.{h,cpp}.
- Eliminated Context::autoFilter.
- Stubbed Expression::eval.
2011-06-15 23:45:50 -04:00
Paul Beckingham
6b85669812 Build
- Fixed a broken build.
2011-06-15 07:22:08 -04:00
Paul Beckingham
c23c374b17 Duration
- Implemented operator- for us by the Variant.
2011-06-14 21:29:17 -04:00
Paul Beckingham
6242c4a8ae Bug #788
- Fixed bug #788, which reported regex and readline versions, even though they
  are not used.
2011-06-14 21:27:28 -04:00
Paul Beckingham
8f6bf9ff45 I18N
- Localized a few more files.
2011-06-14 21:02:38 -04:00
Paul Beckingham
e0abee7f9f Expressions
- Command line arguments are now handled a little differently.  Each
  argument is subjected to further splitting, to break up expressions
  early in the process, prior to categorization.
- Patterns are now treated as quoted string, where the quote character
  is /.
2011-06-13 23:06:54 -04:00
Paul Beckingham
087cf7e5ed Feature #479
- Added filtering to the calendar command.
2011-06-13 23:03:50 -04:00
Paul Beckingham
ded55c360b Export - query
- Output from the query command is now optionally surrounded by [ ... ]
  to make this a syntactically correct JSON document.  This is off by
  default.
- Updated documents.
2011-06-13 18:11:44 -04:00
Paul Beckingham
69fc2c3be8 View
- Modified layout algorithm to not attempt to distribute negative
  overage.
- Modified wrapText to enforce a minimum wrap width of 1.
2011-06-13 00:57:04 -04:00
Paul Beckingham
5d2528bff6 Command: tip
- Removed (stubbed) 'tip' command from core.  Will be external, if
  and when it is developed.
2011-06-13 00:49:37 -04:00
Paul Beckingham
d6670ba198 Expressions
- Reordered operator table so that longer operators match first, thus
  disambiguating between ! and !=.
- Eliminated Expression::expand_expression.
- Modified Nibbler to know what a DOM reference looks like.
- Removed alpha equivalent operators (lt, le, gt, ge, not, eq, ne) because
  these are common in descriptions (French: le, ne).
- Modified Arguments and Nibbler unit tests.
2011-06-13 00:45:06 -04:00
Paul Beckingham
a749f83da3 Parsing
- Nibbler learned how to parse formtted dates.  Date now uses Nibbler.
- Added Nibbler unit tests.
2011-06-12 13:59:25 -04:00
Paul Beckingham
236738c708 Date Processing
- Dates now support 'j' and 'J' julian day format.
2011-06-12 13:23:13 -04:00
Paul Beckingham
c8d9a2a268 Expressions
- Support and documentation for rc.patterns, which enables/disables
  support for /pattern/ command line arguments.
- Support and documentation for rc.expressions, which enables/disables
  support for command line expressions.
- Now canonicalizes attribute names.
- Now canonicalizes modifier names.
- New colorization (temporary) that colors all Arguments::dump output
  green when processed.
- New distinction between 'old' and 'new' style command lines.  Old style
  is "pro:A +foo pri.not:M" with implicit "and" operators.  New style
  includes operators but does not include "+foo" and "/foo/".
- Many tokens are converted directly to primitive types (int, number,
  string) when no further processing is required.
- Restored CmdShow to functionality, and linearized the list of supported
  configuration variables, for easier insertion.
- Modified arguments.t.cpp unit tests.
2011-06-12 09:17:50 -04:00
Paul Beckingham
94fa671522 Expressions
- Arguments::categorize is now functioning as designed.
2011-06-11 17:12:11 -04:00
Paul Beckingham
a9b942e913 Expressions
- Corrected interpretation of integers outside the location of a
  sequence as a word.
- Corrected interpretation of uuids outside the location of a
  sequence as a word.
2011-06-11 16:08:38 -04:00
Paul Beckingham
62d2dd316b Build
- Fixed broken build on CentOS.
2011-06-11 15:32:33 -04:00
Paul Beckingham
56bc5cf755 Code Cleanup
- Removed the last uses of 'foreach'.  What remains is only code that
  is being obsoleted, and therefore there is no need to clean that up.
- The definition of 'foreach' in util.h must remain until last.
2011-06-11 15:15:47 -04:00
Paul Beckingham
76b30d8d10 L10N
- More file conversions.
2011-06-11 14:57:11 -04:00
Paul Beckingham
63e6c08fdd Expressions
- Re-enabled read-only commands that were broken because expressions
  were not implemented.  Currently they don't work, but the mechanism
  is in place.
2011-06-11 14:30:19 -04:00
Paul Beckingham
ad75ba49a4 Expressions
- Broke up the parsing process into smaller steps to allow second pass
  parsing when "exp" tokens are expanded.
2011-06-11 13:44:11 -04:00
Paul Beckingham
8f20efc739 Parsing
- Nibbler now understands parsing from a list of tokens, with getOneOf.
2011-06-11 11:13:56 -04:00
Paul Beckingham
a5feb6ef83 Parsing
- Implemented Nibbler::getDigit to retrieve a single numeric digit.
- Implemented Nibbler::getISODate.
2011-06-11 08:12:05 -04:00
Paul Beckingham
ffcc2a49d8 Duration
- Converted Duration::valid to a static method, to match Date.
2011-06-10 18:36:10 -04:00
Paul Beckingham
74d9eac588 L10N
- Localized API.cpp.
2011-06-10 18:35:23 -04:00
Paul Beckingham
f8d9338102 Expressions
- Added list of non-word characters to assist is_attr.
2011-06-10 00:17:52 -04:00
Paul Beckingham
2ab24fa08b Expressions
- Fixed some compiler warnings.
- Added DOM detection of primitives: int, double, string.
- Began implementation of DOM task access.
- Implemented support for .startswith, .endswith, .word and .noword.
- Removed obsolete subst.t.cpp.
2011-06-09 22:19:10 -04:00
Paul Beckingham
199bb85d88 Expressions
- Improved strictness of attr and attmod detection, although it needs
  more.
- Added unit tests arguments.t.cpp, to test the detection methods.
2011-06-08 00:16:19 -04:00
Paul Beckingham
390ffb65f9 Bug #785
- Fixed bug #785, which fixes a broken build on Solaris (thanks to Owen Clarke).
2011-06-07 22:51:16 -04:00
Paul Beckingham
90f6f537fe Bug #783
+ Fixed bug #783, which fixes completed and deleted tasks still showing as
  active (thanks to Adam Wolk).
2011-06-07 01:21:46 -04:00
Paul Beckingham
7c910e46be Code Cleanup
- Just found out about std::vector::back, after all these years.
2011-06-07 00:48:00 -04:00
Paul Beckingham
d83b2d5e36 Expressions
- Implemented an operator lookup table with type, associativity and
  precedence.
- Implemented Expression::to_postfix that generates a postfix
  expression list using a Dijkstra Shunt.
2011-06-07 00:25:21 -04:00
Paul Beckingham
ed8454c202 Expressions
- Implemented sequence --> infix converter.
- Added new Lexer code.
- Added Lexer unit tests.
2011-06-06 01:46:11 -04:00
Paul Beckingham
86dcec8aea Expressions
- Began Expression::toInfix to upgrade old-style filters to infix
  algebraic filters.
- Added operator support to Arguments::categorize.
- Modified CmdCustom.cpp as a read-only command guinea-pig for the
  new argument processing.
2011-06-05 13:47:52 -04:00
Paul Beckingham
68a749ee16 Argument Parsing
- Implemented Arguments::extract_read_only_filter to isolate the
  arguments that pertain to read-only command filters
- Implemented Arguments::extract_write_filter to isolate the arguments
  that pertain to write command filters.
- Implemented Arguments::extract_modifications to isolate the arguments
  that pertain to write command modifications.
- Created stubbed Expression object.
- Began integration of Expression and Arguments into commands/CmdCustom.
2011-06-05 02:09:25 -04:00
Paul Beckingham
61e549c80c Code Cleanup
- Removed many more uses of the 'foreach' macro.
2011-06-04 23:02:18 -04:00
Paul Beckingham
f9c1820740 Argument Parsing
- Added proper handling for sequences, in that they must be contiguous.
- Added placeholder code for default command, and automatic info report.
- Eliminated Context::parse.
- Eliminated Context::run Timer, because when it goes out of scope, it
  adds timing messages to the deubg output, which at the end of Context::run
  has already been displayed.  In addition, the Context::dispatch timer
  is about 0.2 milliseconds shorter, so the two are redundant.
2011-06-04 18:42:33 -04:00
Paul Beckingham
19aa78a922 Argument Parsing
- Fixed bug in Nibbler::getUUID.
- Implemented Arguments::is_id.
- Implemented Arguments::is_uuid.
- Implemented Arguments::is_tag.
- Implemented Arguments::extract_id.
- Implemented Arguments::extract_uuid.
- Implemented Arguments::extract_tag.
- Implemented Arguments::valid_modifier.
- Implemented nibbler.t.cpp unit tests.
2011-06-04 17:02:19 -04:00
Paul Beckingham
354d66a5ac Parsing
- Implemented Nibbler::getUUID to assist parsing efforts.
2011-06-04 16:15:44 -04:00
Paul Beckingham
58a677ffb5 Argument Parsing
- Eliminated stored arg_overrides and file_override in Context.
- Removed Filter, Subst, Task, Sequence from Context.
- Remove shadow file support.  Hallelujah.
- Disabled/commented out most commands, ready for the big transition
  to the new parsing style.
- Obsoleted Subst.{h,cpp}.
2011-06-04 15:11:34 -04:00
Paul Beckingham
b4c1e47ab4 Argument Parsing
- Added argument categorization, and a colorful diagnostic output
  in debug mode.
- Localized all argument parsing in Arguments object, while still
  allowing specific commands to choose which elements are parsed
  from the command line.
2011-06-04 14:30:45 -04:00