Commit graph

131 commits

Author SHA1 Message Date
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
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
62d2dd316b Build
- Fixed broken build on CentOS.
2011-06-11 15:32:33 -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
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
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
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
56ccd16730 Helpers
- Implemented longestLine, which finds the longest line in a string.
2011-05-30 21:22:26 -04:00
Paul Beckingham
306f10b420 Command Line Parsing
- Implemented Arguments::extract_command to locate the command
  keyword in an argument list.
- Implemented Arguments::extract_sequence to locate and remove an ID
  sequence from an argument list.
- Added unit test for extract_sequence.
- Stubbed all Argument::extract_<object> methods.
- Simplified code in (soon to be obsolete) Sequence.cpp.
2011-05-28 12:09:25 -04:00
Paul Beckingham
8f85b0e194 Utils - combine
- Implemented combine, which takes two integer vectors and combines
  them resulting in a single vector contianing the unique values of
  both.
2011-05-28 09:49:22 -04:00
Paul Beckingham
8fabffe18c Code Cleanup
- Eliminated '#include "x"' by changing all to '#include <x>'.
2011-05-28 00:19:59 -04:00
Paul Beckingham
32e7af4610 i18n
- Added several overloaded positional string formatters.  May need
  more.
2011-05-26 21:56:23 -04:00
Paul Beckingham
02065c3cdc i18n
- Localized a few strings, for fun.
2011-05-25 01:13:19 -04:00
Paul Beckingham
f1635c3eff Code Cleanup
- Removed obsolete Rectangle code.
2011-05-23 23:24:43 -04:00
Paul Beckingham
3f58e5a2ee Code Cleanup
- Removed unused Tree code.
2011-05-23 22:29:24 -04:00
Paul Beckingham
f0f3e55cc6 Text Handling
- Implemented nontrivial (), which detemines whether a string contains
  any non-space characters.  Used to detect strings with no content.
2011-05-23 20:08:33 -04:00
Paul Beckingham
f669b5f56f Unit Tests
- Added JSON samples to test the parser.
2011-05-22 14:41:40 -04:00
Paul Beckingham
df1920d75c JSON
- Completed JSON parser with the addition of syntax error messages.
2011-05-21 15:06:42 -04:00
Paul Beckingham
df652d2ec7 Unit Tests
- Added unit tests to verify that appending or prepending nothing
  generates an error.
2011-05-21 10:35:46 -04:00
Paul Beckingham
bb24701f36 Unit Tests
- Added the first few JSON unit tests.
2011-05-20 01:17:46 -04:00
Paul Beckingham
690fa6e206 JSON
- Replaced old Tree-based parser with a faster, leaner parser.
  Currently lacking good error handling and a large test suite.
- Integrated new parser into Task object, for encode/decode.
- Replicated same basic unit tests.  Needs more.
- Fixed bug in handleShell that failed to call the new Context::initialize2.
- Removed debugging code from CmdInstall.
- Implemented format() that does not require width and precision args.
2011-05-20 00:18:36 -04:00
Paul Beckingham
05b3fa0bb6 Text Processing
- Implemented splitq, which can handle quoted and oddly-quoted string
  splits.
2011-05-16 00:22:14 -04:00
Paul Beckingham
52599dca63 Unit Tests
- Fixed tests that assumed no color.
2011-05-14 16:02:35 -04:00
Paul Beckingham
bb04a58bdc Unit Tests
- Corrected use of rc.fontunderline with the new Views.
- Added new sample todo.sh import data, thanks to Daniel Wilcox.
- Added rc.defaultwidth to various tests.
- Modified tests to accomodate new next report.
- Corrected regex in rc.override.t.
2011-05-13 23:55:01 -04:00
Paul Beckingham
73f72c54c1 Bug
- Fixed bug that required the '%YAML' prologue in a YAML import.
2011-05-13 20:23:32 -04:00
Paul Beckingham
1d10370341 Bug
- Fixed bug that caused dependencies to be sorted by UUID, although
  they are shown as IDs.
- Updated unit test to accomodate new comma-less formatting of
  dependencies.
2011-05-13 18:05:26 -04:00
Paul Beckingham
6fb3bc5b03 View
- Integrated ViewTask and ViewText completely.
- Obsoleted Table.{h,cpp}, Grid.{h,cpp}, grid.t.cpp
- Fixed ViewTask rendering bug that caused the full width to be used every time.
2011-05-13 01:10:30 -04:00
Paul Beckingham
e5555b579d View
- Converted undo to use TextView.
2011-05-12 00:34:34 -04:00
Paul Beckingham
c1b4f34a70 Sorting
- Added missing custom sorting for due dates.
2011-05-11 22:21:43 -04:00
Paul Beckingham
ec7d9ed765 View
- Converted history reports to use ViewText.
- Fixed unit test.
2011-05-11 00:20:35 -04:00
Paul Beckingham
1a833af2a4 View
- Broke out View into ViewTask and ViewText, where the former uses an
  external std::vector <Task> as storage, thus eliminating the additional
  copy, and the latter that duplicates data and color into 2D vectors
  for rendering non-task data.
2011-05-10 22:49:20 -04:00
Paul Beckingham
6464a2bca5 Color
- Implemented Color::strip which can remove the color codes from a
  string.
2011-05-09 20:24:16 -04:00
Paul Beckingham
5da435e70d Unit Tests
- Corrected several tests with respect to the new custom report columns
  and sort fields.
2011-05-08 18:10:03 -04:00
Paul Beckingham
04033911c3 Unit Tests
- Modified several unit tests to accomodate new column names.
2011-05-08 17:14:28 -04:00
Paul Beckingham
00125c19d1 Unit Test
- Reworded new error message to more closely match an old error message,
  modified unit test accordingly.
2011-05-08 16:28:36 -04:00
Paul Beckingham
041bcfdf21 Custom Reports
- Integrated new View in place of Table for all custom reports.
- Implemented legacy field mapping for columns and sort fields.
- Implemented rc.indent.report.
- Implemented rc.row.padding.
- Implemented rc.column.padding.
- Implemented rc.color.label.
- Modified default rc.indent.annotation from 1 to 2.
- Implemented urgency value caching.
- Implemented View truncation by line and row.
- Columns now know which report thy belong to, so they can use the
  rc.report.<report>.dateformat override.
- Assorted bugs remain.
2011-05-08 09:29:55 -04:00
Paul Beckingham
4584da8895 Sorting
- Sorting implemented using a non-relocatable task list, a stable
  sort, and type-specific comparisons.
2011-05-05 22:37:54 -04:00
Paul Beckingham
1d0ad3838b Text Handling
- Implemented longestWord, a UTF8-aware helper for word-wrapping.
2011-05-05 19:45:09 -04:00
Paul Beckingham
28b0960015 View
- Implemented 'description.default', 'description.count', and
  'description.oneline'.
- New 'indent.annotation' for the 'description.default' field format.
2011-05-04 23:15:17 -04:00
Paul Beckingham
f37a250894 View
- Implemented description.desc
2011-05-03 00:58:06 -04:00
Paul Beckingham
d0cbf43478 View
- Implemented due.countdown.
- Fixed formatting bug in description.truncated.
- Fixed bug in start.indicator.
2011-05-02 23:43:41 -04:00
Paul Beckingham
f9ab8f2a1c View
- Implemented start.active.
2011-05-02 22:53:47 -04:00
Paul Beckingham
27752bd510 Date
- Implemented Date::dayOfYear which yields a number, 1 to 366.
2011-05-02 22:13:15 -04:00
Paul Beckingham
b4be5991b8 View
- Implemented urgency.default.
2011-05-02 21:44:42 -04:00