Commit graph

3289 commits

Author SHA1 Message Date
Paul Beckingham
3727d2f09c Task
- The 'recur' attribute should be stored in raw form.
2014-06-10 20:05:50 -04:00
Paul Beckingham
2554b29041 Lexer
- Needed a shift counter, rather than a read counter, as ::token was
  lexing '-10d' into '-' and '-10d', which when evaluated is '--10d',
  which yields 10d.
2014-06-10 15:42:21 -04:00
Paul Beckingham
3c0a17c195 Task
- Removed urgency diagnostics, now that the 'info' command displays them.
2014-06-09 23:11:47 -04:00
Paul Beckingham
0a67913b48 Dates
- Fixed a loose, ill-defined, poorly constructed excuse for a detector
  of date ordinals ("1st, "22nd", "3rd" and "6th").
2014-06-09 22:19:41 -04:00
Paul Beckingham
11a4c58735 Lexer
- Factored out an invariant.
2014-06-09 18:02:34 -04:00
Paul Beckingham
05d4ac16a3 Eval
- Now prints the evaluated form, instead of the input form in debug mode, after
  successful source lookup.
2014-06-09 18:01:45 -04:00
Paul Beckingham
d0d8d5eece Duration
- Dropped support for parsing many intermediate representations. For example,
  this list:

   monthly, months, month, mnths, mths, mth, mos, mo

  is now reduced to:

    monthly, months, month, mo
2014-06-09 17:14:32 -04:00
Paul Beckingham
ff966c069c Tasksh
- Took the broken tasksh program out back behind the barn and shot it.
  It will be rewritten as a separate project, and extension.
2014-06-08 18:24:30 -04:00
Paul Beckingham
63eb32d177 Task
- Disabled ambiguous date parsing. Ain't nobody got time for that.
2014-06-08 16:20:31 -04:00
Paul Beckingham
20d4e37b40 Dates
- Corrected implementation of all named dates. There were ... issues.
2014-06-08 15:02:08 -04:00
Paul Beckingham
22f1bf709e CmdCalc
- Set ambiguity to false, thus disabling recognition of certain date forms.
2014-06-08 14:18:34 -04:00
Paul Beckingham
ddcadb35f7 Filter
- Set ambiguity to false, thus disabling recognition of certain date forms.
2014-06-08 14:17:50 -04:00
Paul Beckingham
4041639e36 Lexer
- Added downgrade from typeNumber to typeIdentifer if a number is followed by a
  letter, thus supporting "9th" as an identifier. This causes much breakage.
2014-06-08 14:15:07 -04:00
Paul Beckingham
f316413139 CmdCalc
- The 'calc' command (and only the 'calc' command) propagates the rc.debug
  setting to Eval.  This provides the means to debug expression problems.
2014-06-08 13:10:20 -04:00
Paul Beckingham
9390e17871 Documentation
- Removed obsolete task-tutorial.5 man page. Tutorials will now only
  reside online. This represents a gradual move towards single-source
  documentation.
2014-06-08 11:19:11 -04:00
Paul Beckingham
e0917f4397 Documentation
- Removed obsolete task-faq.5 man page.
2014-06-07 13:06:19 -04:00
Paul Beckingham
dcab169987 CmdDenotate
- Corrected use of command line arguments for a pattern - now uses
  modification args instead of all words.
2014-06-07 12:50:39 -04:00
Paul Beckingham
85481e3e69 Diagnostics
- Consolidated two debug lines into one, so that ViewTask::render now
  reports available width, and Context::getWidth does not.
2014-06-07 09:54:22 -04:00
Paul Beckingham
9537a91e89 Text
- Added another format overload. Time for variadics?
2014-06-07 09:52:01 -04:00
Paul Beckingham
f969bcbe59 DOM
- Extended DOM support:
    <id|uuid>.<date>.year
    <id|uuid>.<date>.month
    <id|uuid>.<date>.day
    <id|uuid>.<date>.week
    <id|uuid>.<date>.weekday
    <id|uuid>.<date>.julian
    <id|uuid>.<date>.hour
    <id|uuid>.<date>.minute
    <id|uuid>.<date>.second
    <id|uuid>.tags.<literal>
    <id|uuid>.annotations.<N>.entry
    <id|uuid>.annotations.<N>.entry.year
    <id|uuid>.annotations.<N>.entry.month
    <id|uuid>.annotations.<N>.entry.day
    <id|uuid>.annotations.<N>.entry.week
    <id|uuid>.annotations.<N>.entry.weekday
    <id|uuid>.annotations.<N>.entry.julian
    <id|uuid>.annotations.<N>.entry.hour
    <id|uuid>.annotations.<N>.entry.minute
    <id|uuid>.annotations.<N>.entry.second
    <id|uuid>.annotations.<N>.description
2014-06-06 19:43:20 -04:00
Paul Beckingham
61dab3eeb9 DOM
- Extended DOM.
2014-06-05 17:55:24 -04:00
Paul Beckingham
e6df1b38e2 DOM
- Standardized DOM interface to return success/failure, with the possibility
  of blank values. This matches the Eval::source callback interface‥
- Added more unit tests.
2014-06-04 18:57:36 -04:00
Paul Beckingham
850dbb36f0 Context
- ::clear now calls Parser::clear, which prevents the parse tree from growing
  with every shell command.
2014-06-03 01:31:25 -04:00
Paul Beckingham
512fe2f6c7 Variant
- ::operator_match and ::operator_nomatch now take a 'const Task&' argument to
  use for description/annotation matching.
- Updated unit tests.
2014-06-03 01:27:02 -04:00
Paul Beckingham
ca6940ba2e Variant
::operator_hastag now uses contextTask for resolution.
2014-06-03 01:10:58 -04:00
Paul Beckingham
56a70b00c4 Context
- No longer segfaults when ::initialize (argç, argv) is called with zero
  arguments, which is what the shell is doing.
2014-06-03 00:55:18 -04:00
Paul Beckingham
cd837a006c Task
- ::modify was not casting strings to dates for date types.
2014-06-03 00:42:21 -04:00
Paul Beckingham
1cd09bc87b Alias
- Implemented simple word substitution aliases. This is not the ultimate form
  which will involve the ability to insert arbitrary constructs.  Later.
2014-06-03 00:11:42 -04:00
Paul Beckingham
a470e50ee6 Variant
- Attempts legacy date conversion ahead of ISO.
2014-06-02 23:30:40 -04:00
Paul Beckingham
7196ac8554 Variant
- ::operator_match disobeyed rc.search.case.sensitive.
2014-06-02 23:15:25 -04:00
Paul Beckingham
ac07189941 Task
- ::modify was setting the wrong attribute value, namely the original, not the
  one that had passed through the expression evaluator's intestines.
2014-06-02 22:22:39 -04:00
Paul Beckingham
870e45be0d Lexer
- Extended Lexer to consider forms like '123.abc' as identifiers. This is
  essential to recignizing and extending DOM support.
2014-06-02 22:19:38 -04:00
Paul Beckingham
43718cbce5 Task
- Evaluates attribute values on modify.
2014-06-01 22:50:33 -04:00
Paul Beckingham
6a0c61ad27 Portability
- Fixed wcwidth error in the #ifdef CYGWIN.
2014-06-01 19:39:28 -04:00
Paul Beckingham
55b5149be0 TW-72
- TW-72 extend info report with urgency column
2014-06-01 16:33:14 -04:00
Paul Beckingham
6706d1b955 Date/ISO8601
- Changed the order of parsing from ISO, Date to Date, ISO. This favors the
  old dateformat mechanism more than the new one. One day this will flip.
2014-06-01 00:10:16 -04:00
Paul Beckingham
5df49ec5e3 Parser
- ::findAttributeModifier now tolerates missing values and generates the
  correct expression term.
2014-05-31 22:26:44 -04:00
Paul Beckingham
fc5dad7a9a Parser
- Now that all (?) Parser methods for tree scanning can be called more than
  once, move all methods into the ::parse method.
2014-05-31 22:17:56 -04:00
Paul Beckingham
5b8aef5463 Parser
- ::findAttribute now tolerates missing values, as it should if I'd written
  it properly in the first place.
2014-05-31 18:18:20 -04:00
Paul Beckingham
4f8d6c877d Variant
- Implemented an (unused) operator_nopartial for the sake of symmetry.
2014-05-31 17:54:43 -04:00
Paul Beckingham
cefbaf779b Parser
- ::initialize only overrides Parser::minimumMatchLength when
  rc.abbreviation.minimum is non-zero.
2014-05-31 17:23:00 -04:00
Paul Beckingham
68555315e0 Parser
- Scans the tree to find the binary, after the calendar report runs the main
  report and prepares to run the detail report. Now I think about it, this
  feature could be implemented vai hooks.
2014-05-31 15:36:12 -04:00
Paul Beckingham
382881c0e1 CmdCustom
- Filter args must contain spaces between them.  Splitting on token boundaries
  goes too far and separates '-' from 'tag'.
2014-05-31 15:11:24 -04:00
Paul Beckingham
a1ee44ac17 Parser
- ::findPlainArgs will now only upgrade an arg to a search if the arg itself
  cannot be lexed into subtokens.
2014-05-31 14:11:53 -04:00
Paul Beckingham
cf5eb73f04 CmdCustom
- Now places ( ) around the custom report filter. This gives it a chance at
  allowing 'or' and 'xor' operators when combined with a command lne filter.
2014-05-31 13:58:40 -04:00
Paul Beckingham
5ac3db3168 Parser
- Modified ::injectDefault to use Lexer::token_split instead of
  Lexer::word_split which allows stranger default commands. Not sure if this
  is necessary, but it seems like the right thing.
2014-05-31 13:54:56 -04:00
Paul Beckingham
f4605a1bc7 Parser
- Implemented ::capture_last, so that new args can be injected at either end
  of the command line.
2014-05-31 13:52:59 -04:00
Paul Beckingham
7598997e70 Lexer
- Implemented ::token_split, which performs a full lex, and doesn't require
  white space like ::word_split does.
- Added unit tests.
2014-05-31 13:51:10 -04:00
Paul Beckingham
0af9bbdc03 Lexer
- Renamed ::split to ::word_split, for clarity and because of the need for a
  full token split, coming next.
2014-05-31 13:48:52 -04:00
Paul Beckingham
30fee92914 Parser
- ::findPlainArgs was only being run in debug mode. Not a good idea.
2014-05-31 12:27:56 -04:00