Commit Graph

4 Commits (b716e8c2cdb6d6d2a8bf922056e46627f8c951f0)

Author SHA1 Message Date
Mike Gerwitz 397710c055 csvm: Auto-sort expanded output
This will allow the variable abstractions to fully encapsulate values while
still permitting binary searches on sorted rows.

* csvm-expand: Renamed from `csvm2csv'.  Add directive support.
* csvm2csv: New script to perform sorting.  Invokes aforementioned.
* test/test-csvm2csv: Update for sorting.
2018-10-03 14:21:35 -04:00
Mike Gerwitz c675207696 csvm2csv: Add some error checks
* build-aux/csvm2csv: Fail on invalid var definition.
  (expand_vars): Fail in invalid reference.
  (parseline): Fail on non-numeric range.
* build-aux/test/test-csvm2csv
  (test-fail-unknown-var-ref, test-fail-non-numeric-range)
  (test-fail-invalid-var-dfn): New tests.
2018-10-02 13:35:06 -04:00
Mike Gerwitz c741b4a84e csvm: Add test cases and support for all variable expressions
This allows variables to contain any type of expansion, treating them
as (recursively) string replacements.

* csvm2csv: Add Copyright year.
  (expand_vars): New function.
  (parseline): Use it.  Expand before all other replacements so that
    variable expansions may support all types of expressions.  Expand
    variables in range expressions.
* test/test-csvm2csv: New file.
2018-10-01 16:14:05 -04:00
Mike Gerwitz 70f9e9c277 Move {src/current/tools=>build-aux}/* 2018-05-04 11:17:47 -04:00