Commit graph

2326 commits

Author SHA1 Message Date
Paul Beckingham
3c1c900b5b Columns
- Refactored column objects to contain a ::validate method, for the
  validation of incoming data.
- Context.columns is now a vector of one of each column object,
  indexed by attribute name, for validation purposes.
2011-06-24 00:39:28 -04:00
Paul Beckingham
a7d6b91ad3 Cleanup
- Renamed RegX to RX.  Got sick of the RegX name - looked too much like GenX.
2011-06-21 18:15:58 -04:00
Paul Beckingham
03dbf7f468 Regex
- Added regex support to expressions.
- Implmented configurable case sensitivity.
2011-06-21 18:07:12 -04:00
Paul Beckingham
8040ed5430 I18N
- More localization.
2011-06-21 18:06:27 -04:00
Paul Beckingham
b63835757f I18N
- Localized more files.
2011-06-21 18:05:17 -04:00
Paul Beckingham
393ebae8aa Cleanup
- Removed obsolete grammar.bnf file.
- doc/misc scripts relocated to screencast.git.
2011-06-21 18:02:08 -04:00
Paul Beckingham
5808e2073f DOM Caching
- Implemented DOM caching on name.  May need a 'clear' method later.
2011-06-21 02:02:53 -04:00
Paul Beckingham
b49523c06d Regex
- Implemented RegX class to maintain a separate compile, and match
  method, thereby allowing efficient re-use of the regex.  This is
  critical to Expression::eval, where an identical regex might be
  applied to every task.
- Obsoleted rx.{h,cpp}, which combined the compile and match steps
  into a single call, and is therefore not efficient when used in
  the context of filtering.
- Fixed some unit tests that weren't building.  Now they do.  They
  don't work of course (don't be silly) but that's a problem for
  another day.
- Modified all code that relies on rx.h to use RegX.h.
2011-06-21 01:43:57 -04:00
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