diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-11-09 14:53:19 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-11-09 15:41:49 +0100 |
commit | fe008d9a8e24e043de00cecc2754908f57d0a00e (patch) | |
tree | a43f899bfd366fd3b8bfcd90cf5a794a33d17094 /EXPRESSIONS | |
download | rules-typesetting-fe008d9a8e24e043de00cecc2754908f57d0a00e.tar.gz |
Initial commit
The rules are still very basic; in particular, the latex rules do not
support bibtex. Nevertheless, having typesetting rules in that basic
form is already useful, especially when creating documents (slides,
handbooks, web pages, etc) containing generated files, like sample
logs of tools under development.
Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
Diffstat (limited to 'EXPRESSIONS')
-rw-r--r-- | EXPRESSIONS | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/EXPRESSIONS b/EXPRESSIONS new file mode 100644 index 0000000..f1ca6f4 --- /dev/null +++ b/EXPRESSIONS @@ -0,0 +1,46 @@ +{ "stage_singleton_field": + { "vars": ["fieldname", "transition", "location"] + , "expression": + { "type": "assert_non_empty" + , "msg": + ["No artifact specified in field", {"type": "var", "name": "fieldname"}] + , "$1": + { "type": "disjoint_map_union" + , "msg": + [ "Expecting (essentially) a single artifact in field" + , {"type": "var", "name": "fieldname"} + ] + , "$1": + { "type": "foreach" + , "var": "src" + , "range": + {"type": "FIELD", "name": {"type": "var", "name": "fieldname"}} + , "body": + { "type": "disjoint_map_union" + , "$1": + { "type": "foreach" + , "var": "artifact" + , "range": + { "type": "values" + , "$1": + { "type": "DEP_ARTIFACTS" + , "dep": {"type": "var", "name": "src"} + , "transition": + { "type": "var" + , "name": "transition" + , "default": {"type": "empty_map"} + } + } + } + , "body": + { "type": "singleton_map" + , "key": {"type": "var", "name": "location"} + , "value": {"type": "var", "name": "artifact"} + } + } + } + } + } + } + } +} |