Skip to content

Parser updates

Dirk HOFFMANN requested to merge github/fork/ederag/parser-updates into master

Created by: ederag

The first commit is #476. The next two were from #475 (that will be closed).

Breaking change: double comma ,, is now always required to start a description. Single comma does not work any longer for this purpose. If a single comma happens to be used by mistake, the comma and the following text would end in the category. So comma will be forbidden in the category, to raise an error instead of merging a wrong fact in the database. That will be the purpose of a forthcoming PR.

This allows to enter a comma in the activity (fixes #280 (closed)), while even clarifying the parser.

Then with a double comma barrier ,, before tags, hashes can be anywhere in the activity, category or description. (fixes #423 (closed))

The same parser is used in gui (cmdline) and terminal (command line). (Fixes #438 (closed)) The only difference is the location of start-end: head or tail, respectively (no change).

New: dates can be entered on the gui cmdline. Otherwise facts overlapping day-start would be impossible to enter due to #476. For standard facts that fit in a single hamster day, times are enough (no change).

Almost finished, just need

  • documentation update (meanwhile, a good way to investigate: enter in the separate fields and look at the cmdline)
  • cleanup code (could be easier to navigate)

Merge request reports

Loading