Commit Graph

4 Commits (854f87a60d70a7294089a89ef284dc34fc6a938b)

Author SHA1 Message Date
Mike Gerwitz c207fad008 Allow ##other nodes in apply nodes
The primary motivation for this is to allow for template conditionals.

* src/current/calc.xsd (applyArgs): New group.
  (apply,recurse): Use it in sequence.
2017-12-04 13:40:12 -05:00
Mike Gerwitz 0fb1bae487 Add c:sum/@dim
This allows the result of a rate block to be a matrix; there was previously
no way for a named value to be assigned a matrix unless it was a parameter.

This is a bit of a kluge---the compiler won't discover the proper type
information and won't perform the proper safeguards.

* src/current/calc.xsd (sum)[@dim]: Add attribute.
* src/current/compiler/js-calc.xsl: Add xs namespace.
  (compile-calc): Do not perform casting when @dim > 1.
* src/current/include/preproc/expand.xsl
  (lv:rate-each): Include @dim in c:sum expansion.
* src/current/include/preproc/macros.xsl:
  (c:*/@generates): Use @dim to determine symbol dimensions.
* src/current/include/preproc/expand.xsl: Parse @dim aliases (e.g. "vector",
  "matrix").
2017-12-04 13:39:55 -05:00
Mike Gerwitz c0d95b4a05 Add copyright headers to src/current/ 2016-08-24 12:38:03 -04:00
Mike Gerwitz ff01f39c1e Liberate current implementation of "Calc DSL"
(Copyright headers will be added in the next commit; these are the
original files, unaltered in any way.)

The internal project name at LoVullo is simply "Calc DSL".  This
liberates the entire thing.  If anything was missed, I'll be added
later.

To continue building at LoVullo with this move, symlinks are used for
the transition; this is the exact code that is used in production.

There is a lot here---over 25,000 lines.  Much of it is in disarray from
the environment surrounding its development, but it does work well for
what it was intended to do.

(LoVullo folks: fork point is 65723a0 in calcdsl.git.)
2016-08-24 12:38:00 -04:00