amath 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/artifacts/asciimath.bindings.python.json +1 -1
- data/artifacts/asciimath.bindings.rs.json +1 -1
- data/artifacts/asciimath.bindings.ruby.json +1 -1
- data/artifacts/asciimath.bindings.ts.json +1 -1
- data/artifacts/asciimath.checksums.txt +14 -14
- data/artifacts/asciimath.json +1 -1
- data/artifacts/pma.bindings.python.json +1 -1
- data/artifacts/pma.bindings.rs.json +1 -1
- data/artifacts/pma.bindings.ruby.json +1 -1
- data/artifacts/pma.bindings.ts.json +1 -1
- data/artifacts/pma.checksums.txt +14 -14
- data/artifacts/pma.json +1 -1
- data/docs/parser-contract.adoc +10 -4
- data/lib/amath/version.rb +1 -1
- metadata +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"python","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"python","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"3f4afe4310f041fb0802f6b91fb17c62ba499e94e2ef5b3ebaadfc8da42f7de9","shape":"parsanol-tree/v2","entries":{"document":{"bindings":[{"capture":"term","path":"term","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:ef8f67d5587a4c6cccf4b0bdd23575543252bac1ed0badd7db70bd5abae0b364"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"rs","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"rs","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"3f4afe4310f041fb0802f6b91fb17c62ba499e94e2ef5b3ebaadfc8da42f7de9","shape":"parsanol-tree/v2","entries":{"document":{"bindings":[{"capture":"term","path":"term","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:1911b01d2bc6fea8dfc0d552ff6860232b5c365464b095b45dd26c906f5cf2bc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"ruby","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"ruby","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"3f4afe4310f041fb0802f6b91fb17c62ba499e94e2ef5b3ebaadfc8da42f7de9","shape":"parsanol-tree/v2","entries":{"document":{"bindings":[{"capture":"term","path":"term","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:07d47f888729e013a84697ef17ca22709897799e7fa80ae99229af67861f7a8c"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"ts","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"ts","binding_version":1,"grammar":"Pma","grammar_version":"1.0.0","grammar_source_hash":"3f4afe4310f041fb0802f6b91fb17c62ba499e94e2ef5b3ebaadfc8da42f7de9","shape":"parsanol-tree/v2","entries":{"document":{"bindings":[{"capture":"term","path":"term","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:134161ece130a6cb96f160989dfb287a2a9ab8efb6cbc7507d173b53132686cf"}
|
data/artifacts/pma.checksums.txt
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Written by scripts/compile.rb. Envelope and binding checksums are Parsanol's
|
|
2
2
|
# own (PN 2); the sha256 lines are of the files' bytes.
|
|
3
|
-
artifact_checksum sha256:
|
|
3
|
+
artifact_checksum sha256:2136e4a2aab933f79bfbbb1df1c7e8d6e975177355c0b57e986a7a065e7c2295
|
|
4
4
|
compiler_version 1.5.1.0
|
|
5
|
-
source_hash sha256:
|
|
6
|
-
artifacts/pma.json sha256:
|
|
7
|
-
bindings_ruby_checksum sha256:
|
|
8
|
-
artifacts/pma.bindings.ruby.json sha256:
|
|
9
|
-
bindings_rs_checksum sha256:
|
|
10
|
-
artifacts/pma.bindings.rs.json sha256:
|
|
11
|
-
bindings_ts_checksum sha256:
|
|
12
|
-
artifacts/pma.bindings.ts.json sha256:
|
|
13
|
-
bindings_python_checksum sha256:
|
|
14
|
-
artifacts/pma.bindings.python.json sha256:
|
|
15
|
-
grammars/pma.parg sha256:
|
|
16
|
-
data/vocabulary.json amath-vocabulary/v2 sha256:
|
|
5
|
+
source_hash sha256:3f4afe4310f041fb0802f6b91fb17c62ba499e94e2ef5b3ebaadfc8da42f7de9
|
|
6
|
+
artifacts/pma.json sha256:603ec42fe28c8462b3d814b7b73f07c62965533b4ed13c1420d0589ba5bfcc69
|
|
7
|
+
bindings_ruby_checksum sha256:07d47f888729e013a84697ef17ca22709897799e7fa80ae99229af67861f7a8c binding_version 1
|
|
8
|
+
artifacts/pma.bindings.ruby.json sha256:744da058770cf0d99116a51d8ba7b9ac73ebcd52f38e1a2847c0540dd7ec31ff
|
|
9
|
+
bindings_rs_checksum sha256:1911b01d2bc6fea8dfc0d552ff6860232b5c365464b095b45dd26c906f5cf2bc binding_version 1
|
|
10
|
+
artifacts/pma.bindings.rs.json sha256:43e6df58e96deb3bb618e68a21673c4f08b6ebc42d7d0ebd8225a8435bfa2ce5
|
|
11
|
+
bindings_ts_checksum sha256:134161ece130a6cb96f160989dfb287a2a9ab8efb6cbc7507d173b53132686cf binding_version 1
|
|
12
|
+
artifacts/pma.bindings.ts.json sha256:2086a6655e0e42a354ae79560e9eeb441fabef2c5e040e04db2c12b9ed260610
|
|
13
|
+
bindings_python_checksum sha256:ef8f67d5587a4c6cccf4b0bdd23575543252bac1ed0badd7db70bd5abae0b364 binding_version 1
|
|
14
|
+
artifacts/pma.bindings.python.json sha256:74459094f493f06760806d98b064e2a3681bf70850c69844a7abfcc97cf9d9b4
|
|
15
|
+
grammars/pma.parg sha256:3f4afe4310f041fb0802f6b91fb17c62ba499e94e2ef5b3ebaadfc8da42f7de9
|
|
16
|
+
data/vocabulary.json amath-vocabulary/v2 sha256:ad6e762fab953af96acb52fdd1ce21bc586ff55423a8d12f8be05fa5b1c61072
|
|
17
17
|
registry_edition 1
|
|
18
|
-
asciiunits_artifact_checksum sha256:
|
|
18
|
+
asciiunits_artifact_checksum sha256:2159dfb6e4faaf04a846ed351dd84b545d4ecfeb3c33905bea378ac97cc4ab48 asciiunits 0.1.8
|
|
19
19
|
entries document
|
|
20
20
|
order_warnings 29
|
data/artifacts/pma.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"1.0.0","grammar":"Pma","shape":"parsanol-tree/v2","binding_version":1,"entries":{"document":{"root":"document","grammar":{"atoms":[{"Entity":{"atom":9}},{"Entity":{"atom":8}},{"Str":{"pattern":" "}},{"Str":{"pattern":"\t"}},{"Str":{"pattern":"\n"}},{"Str":{"pattern":"\r"}},{"Re":{"pattern":"[\\x0b]"}},{"Re":{"pattern":"[\\x0c]"}},{"Alternative":{"atoms":[2,3,4,5,6,7]}},{"Repetition":{"atom":1,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":358}},{"Entity":{"atom":352}},{"Str":{"pattern":"diff("}},{"Entity":{"atom":9}},{"Entity":{"atom":348}},{"Entity":{"atom":153}},{"Entity":{"atom":87}},{"Entity":{"atom":56}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Str":{"pattern":"-"}},{"Repetition":{"atom":21,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":32}},{"Entity":{"atom":25}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":24,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Entity":{"atom":25}},{"Repetition":{"atom":28,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[27,29]}},{"Repetition":{"atom":30,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[26,31]}},{"Sequence":{"atoms":[22,23]}},{"Named":{"name":"value","atom":20}},{"Entity":{"atom":9}},{"Str":{"pattern":"+/-"}},{"Named":{"name":"plus_minus","atom":36}},{"Entity":{"atom":9}},{"Entity":{"atom":32}},{"Named":{"name":"relative_magnitude","atom":39}},{"Str":{"pattern":"%"}},{"Entity":{"atom":9}},{"Entity":{"atom":51}},{"Str":{"pattern":"~"}},{"Entity":{"atom":49}},{"Str":{"pattern":"arcsine"}},{"Str":{"pattern":"triang"}},{"Str":{"pattern":"rect"}},{"Alternative":{"atoms":[46,47,48]}},{"Named":{"name":"distribution","atom":45}},{"Sequence":{"atoms":[44,50]}},{"Sequence":{"atoms":[42,43]}},{"Repetition":{"atom":52,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[18,19,34,35,37,38,40,41,53,54,55]}},{"Entity":{"atom":86}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":60}},{"Entity":{"atom":9}},{"Str":{"pattern":"+/-"}},{"Named":{"name":"plus_minus","atom":63}},{"Entity":{"atom":9}},{"Entity":{"atom":32}},{"Named":{"name":"magnitude","atom":66}},{"Entity":{"atom":9}},{"Entity":{"atom":51}},{"Sequence":{"atoms":[68,69]}},{"Repetition":{"atom":70,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Entity":{"atom":84}},{"Str":{"pattern":"e"}},{"Str":{"pattern":"+"}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[76,77]}},{"Repetition":{"atom":78,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":25}},{"Repetition":{"atom":80,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[79,81]}},{"Named":{"name":"shared_exponent","atom":82}},{"Sequence":{"atoms":[75,83]}},{"Repetition":{"atom":74,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[58,59,61,62,64,65,67,71,72,73,85]}},{"Alternative":{"atoms":[17,57]}},{"Entity":{"atom":104}},{"Str":{"pattern":"ustd"}},{"Named":{"name":"uncertainty_class","atom":89}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":93}},{"Entity":{"atom":99}},{"Entity":{"atom":9}},{"Str":{"pattern":","}},{"Entity":{"atom":9}},{"Sequence":{"atoms":[96,97,98]}},{"Entity":{"atom":32}},{"Named":{"name":"magnitude","atom":100}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[90,91,92,94,95,101,102,103]}},{"Entity":{"atom":125}},{"Str":{"pattern":"uexp"}},{"Named":{"name":"uncertainty_class","atom":106}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":110}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"magnitude","atom":113}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"coverage_factor","atom":116}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"coverage_probability","atom":119}},{"Sequence":{"atoms":[118,120]}},{"Repetition":{"atom":121,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[107,108,109,111,112,114,115,117,122,123,124]}},{"Entity":{"atom":152}},{"Str":{"pattern":"ucov"}},{"Named":{"name":"uncertainty_class","atom":127}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":131}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"lower","atom":134}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"upper","atom":137}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"coverage_probability","atom":140}},{"Entity":{"atom":99}},{"Entity":{"atom":146}},{"Str":{"pattern":"shortest"}},{"Str":{"pattern":"symmetric"}},{"Alternative":{"atoms":[144,145]}},{"Named":{"name":"interval_kind","atom":143}},{"Sequence":{"atoms":[142,147]}},{"Repetition":{"atom":148,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[128,129,130,132,133,135,136,138,139,141,149,150,151]}},{"Alternative":{"atoms":[16,88,105,126]}},{"Entity":{"atom":9}},{"Entity":{"atom":346}},{"Str":{"pattern":"unit("}},{"Entity":{"atom":9}},{"Entity":{"atom":334}},{"Entity":{"atom":303}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Str":{"pattern":")"}},{"Entity":{"atom":8}},{"Str":{"pattern":"::"}},{"Alternative":{"atoms":[161,162,163,164]}},{"Lookahead":{"atom":165,"positive":false}},{"Entity":{"atom":168}},{"Re":{"pattern":"[\\x00-\\u{10ffff}]"}},{"Sequence":{"atoms":[166,167]}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":291}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":279}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":267}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":255}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":243}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":231}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":219}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":207}},{"Entity":{"atom":169}},{"Entity":{"atom":8}},{"Repetition":{"atom":202,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Lookahead":{"atom":204,"positive":true}},{"Sequence":{"atoms":[203,205]}},{"Alternative":{"atoms":[201,206]}},{"Repetition":{"atom":200,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[198,199,208,209,210]}},{"Entity":{"atom":8}},{"Repetition":{"atom":212,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[214,215]}},{"Lookahead":{"atom":216,"positive":true}},{"Sequence":{"atoms":[213,217]}},{"Alternative":{"atoms":[197,211,218]}},{"Repetition":{"atom":196,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[194,195,220,221,222]}},{"Entity":{"atom":8}},{"Repetition":{"atom":224,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[226,227]}},{"Lookahead":{"atom":228,"positive":true}},{"Sequence":{"atoms":[225,229]}},{"Alternative":{"atoms":[193,223,230]}},{"Repetition":{"atom":192,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[190,191,232,233,234]}},{"Entity":{"atom":8}},{"Repetition":{"atom":236,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[238,239]}},{"Lookahead":{"atom":240,"positive":true}},{"Sequence":{"atoms":[237,241]}},{"Alternative":{"atoms":[189,235,242]}},{"Repetition":{"atom":188,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[186,187,244,245,246]}},{"Entity":{"atom":8}},{"Repetition":{"atom":248,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[250,251]}},{"Lookahead":{"atom":252,"positive":true}},{"Sequence":{"atoms":[249,253]}},{"Alternative":{"atoms":[185,247,254]}},{"Repetition":{"atom":184,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[182,183,256,257,258]}},{"Entity":{"atom":8}},{"Repetition":{"atom":260,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[262,263]}},{"Lookahead":{"atom":264,"positive":true}},{"Sequence":{"atoms":[261,265]}},{"Alternative":{"atoms":[181,259,266]}},{"Repetition":{"atom":180,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[178,179,268,269,270]}},{"Entity":{"atom":8}},{"Repetition":{"atom":272,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[274,275]}},{"Lookahead":{"atom":276,"positive":true}},{"Sequence":{"atoms":[273,277]}},{"Alternative":{"atoms":[177,271,278]}},{"Repetition":{"atom":176,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[174,175,280,281,282]}},{"Entity":{"atom":8}},{"Repetition":{"atom":284,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[286,287]}},{"Lookahead":{"atom":288,"positive":true}},{"Sequence":{"atoms":[285,289]}},{"Alternative":{"atoms":[173,283,290]}},{"Repetition":{"atom":172,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[170,171,292,293,294]}},{"Entity":{"atom":8}},{"Repetition":{"atom":296,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[298,299]}},{"Lookahead":{"atom":300,"positive":true}},{"Sequence":{"atoms":[297,301]}},{"Alternative":{"atoms":[160,295,302]}},{"Repetition":{"atom":159,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"literal","atom":304}},{"Entity":{"atom":9}},{"Str":{"pattern":"::"}},{"Entity":{"atom":9}},{"Entity":{"atom":332}},{"Entity":{"atom":331}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":320}},{"Entity":{"atom":169}},{"Entity":{"atom":8}},{"Repetition":{"atom":315,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Lookahead":{"atom":317,"positive":true}},{"Sequence":{"atoms":[316,318]}},{"Alternative":{"atoms":[314,319]}},{"Repetition":{"atom":313,"min":0,"max":null,"tag":"Repetition"}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[312,321,322]}},{"Entity":{"atom":8}},{"Repetition":{"atom":324,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[326,327]}},{"Lookahead":{"atom":328,"positive":true}},{"Sequence":{"atoms":[325,329]}},{"Alternative":{"atoms":[311,323,330]}},{"Repetition":{"atom":310,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"quantity","atom":309}},{"Sequence":{"atoms":[305,306,307,308,333]}},{"Entity":{"atom":341}},{"Entity":{"atom":303}},{"Repetition":{"atom":336,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"literal","atom":337}},{"Str":{"pattern":""}},{"Named":{"name":"empty_list","atom":339}},{"Alternative":{"atoms":[338,340]}},{"Alternative":{"atoms":[158,335]}},{"Named":{"name":"unit","atom":342}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[156,157,343,344,345]}},{"Sequence":{"atoms":[15,154,155]}},{"Named":{"name":"uncertainty","atom":347}},{"Named":{"name":"diff","atom":14}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[12,13,349,350,351]}},{"Entity":{"atom":348}},{"Entity":{"atom":356}},{"Entity":{"atom":153}},{"Named":{"name":"uncertainty","atom":355}},{"Entity":{"atom":346}},{"Alternative":{"atoms":[11,353,354,357]}},{"Named":{"name":"term","atom":10}},{"Entity":{"atom":9}},{"Sequence":{"atoms":[0,359,360]}}],"root":361},"bindings":[{"capture":"term","path":"term","type":"any","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule interval_kind: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured_literal: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule unit_chunk_0: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_0: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_1: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_1: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_2: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_2: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_3: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_3: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_4: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_4: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_5: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_5: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_6: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_6: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_7: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_7: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_8: branches 1 and 2 are order-dependent (first set not statically known)","rule quantity_chunk_0: branches 1 and 2 are order-dependent (first set not statically known)","rule quantity_chunk_0: branches 1 and 3 are order-dependent (first set not statically known)","rule quantity_chunk_1: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_plain: branches 1 and 2 are order-dependent (first set not statically known)","rule term: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule term: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule term: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"document","render":{},"derive":{},"tests":[],"docs":{},"source":"# Template for grammars/pma.parg, the grammar of pma (dialect P, \"plurimath\n# ascii\"). Do not edit the generated .parg by hand: edit this file or\n# data/vocabulary.json and run\n# ruby scripts/generate_grammar.rb\n# Placeholders (a name in double braces) are replaced by generated text.\n# Lines that start with `#!` are template-only notes and are not copied.\n#\n# GENERATED by scripts/generate_grammar.rb -- do not edit.\n# pma (dialect P) grammar, plurimath docs/pma.adoc (amath#16).\n# registry data/vocabulary.json amath-vocabulary/v2 edition 1 sha256:768016984baee3ea142b69f0f31f4b9e9255ddedea078d6c7fb1728dc718695c\n# unit(...) content: asciiunits 0.1.6 artifact sha256:aa22618c80dc02f3fe1edf2c798dbe34aceae5f4d84524ff98f76a2b91af151d\n# reserved words (terminals): unit ustd uexp ucov diff quantity\n#\n# Version 1 reads one term: a measured value (a measured literal or one of\n# the constructors ustd, uexp, ucov), optionally with a trailing unit(...),\n# a unit(...) on its own, or diff(...) of a measured value with its unit.\n# Whitespace may stand between tokens and never inside one. `ustd(`,\n# `uexp(`, `ucov(`, `unit(` and `diff(` are single tokens, so a reserved\n# word followed by whitespace matches nothing. The content of unit(...) is\n# captured as text and parsed by the asciiunits artifact (see\n# Amath::Pma); its brackets nest at most 8 deep. A unit may be\n# followed by `::` and one quantity name (the quantity assertion).\n\ngrammar Pma version \"1.0.0\" {\n any_char = %x00-10FFFF\n ws = \" \" / \"\\t\" / \"\\n\" / \"\\r\" / %x0B / %x0C\n sp = *(ws)\n digit = %x30-39\n pma_number = 1*(digit) [\".\" 1*(digit)]\n pma_value = [\"-\"] pma_number\n\n # Distribution tags: the registry's pma distribution names, longest first.\n distribution_name = \"arcsine\" / \"triang\" / \"rect\"\n distribution_tag = \"~\" (distribution_name) as distribution\n shared_exponent = \"e\" ([\"+\" / \"-\"] 1*(digit)) as shared_exponent\n interval_kind = \"shortest\" / \"symmetric\"\n\n # Measured literals: (v +/- u), (v +/- p%), with an optional tag inside\n # the bracket after the uncertainty; only the absolute form takes a\n # shared exponent.\n ml_relative = \"(\" sp (pma_value) as value sp (\"+/-\") as plus_minus sp (pma_number) as relative_magnitude \"%\" [sp distribution_tag] sp \")\"\n ml_absolute = \"(\" sp (pma_value) as value sp (\"+/-\") as plus_minus sp (pma_number) as magnitude [sp distribution_tag] sp \")\" [shared_exponent]\n measured_literal = ml_relative / ml_absolute\n\n # Constructors.\n ctor_sep = sp \",\" sp\n ustd_ctor = (\"ustd\") as uncertainty_class \"(\" sp (pma_value) as value ctor_sep (pma_number) as magnitude sp \")\"\n uexp_ctor = (\"uexp\") as uncertainty_class \"(\" sp (pma_value) as value ctor_sep (pma_number) as magnitude ctor_sep (pma_number) as coverage_factor [ctor_sep (pma_number) as coverage_probability] sp \")\"\n ucov_ctor = (\"ucov\") as uncertainty_class \"(\" sp (pma_value) as value ctor_sep (pma_number) as lower ctor_sep (pma_number) as upper ctor_sep (pma_number) as coverage_probability [ctor_sep (interval_kind) as interval_kind] sp \")\"\n measured = measured_literal / ustd_ctor / uexp_ctor / ucov_ctor\n\n # unit(...): the unit expression text, brackets balanced to a fixed depth.\n # A run of whitespace inside it is kept only before more content.\n unit_char = !(\"(\" / \")\" / ws / \"::\") any_char\n unit_chunk_0 = unit_char / \"(\" sp *(unit_chunk_1) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_1 = unit_char / \"(\" sp *(unit_chunk_2) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_2 = unit_char / \"(\" sp *(unit_chunk_3) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_3 = unit_char / \"(\" sp *(unit_chunk_4) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_4 = unit_char / \"(\" sp *(unit_chunk_5) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_5 = unit_char / \"(\" sp *(unit_chunk_6) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_6 = unit_char / \"(\" sp *(unit_chunk_7) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_7 = unit_char / \"(\" sp *(unit_chunk_8) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_8 = unit_char / 1*(ws) &(unit_char)\n\n # The quantity assertion: `::` and a quantity name after the unit\n # expression, at most one. The name is text up to the closing bracket;\n # its own brackets balance one deep (unitsdb names such as\n # \"ratio logarithm (Np)\"). Whether the name is a unitsdb quantity is\n # checked by Amath::Pma, not here.\n quantity_chunk_0 = unit_char / \"(\" *(quantity_chunk_1) \")\" / 1*(ws) &(unit_char / \"(\")\n quantity_chunk_1 = unit_char / 1*(ws) &(unit_char)\n quantity_ref = 1*(quantity_chunk_0)\n unit_plain = (1*(unit_chunk_0)) as literal / \"\" as empty_list\n unit_asserted = (1*(unit_chunk_0)) as literal sp \"::\" sp (quantity_ref) as quantity\n unit_ctor = \"unit(\" sp (unit_asserted / unit_plain) as unit sp \")\"\n\n # A measured value carries its unit inside the uncertainty node, as the\n # dialect L \"unitsml(...)\" argument does.\n attached = (measured sp unit_ctor) as uncertainty\n bare = (measured) as uncertainty\n diff_ctor = \"diff(\" sp (attached) as diff sp \")\"\n term = diff_ctor / attached / bare / unit_ctor\n document = sp (term) as term sp\n}\n\nentry document: document\n\nbindings document { term -> term (any) }\n","source_hash":"18e952417a1ba8f3bb753c9d5ce1fb7d3d013018dea6e070c96717723fb34828","unicode_tables":"onigmo (Ruby 4.0.7)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:4f2408e726cc69da2bf005775a3ee2f9c6e07deaf36fed0138e2310dc953b366","checksum":"sha256:66e6429b3c8d092086aa189e823b61f4b0956ba2dc6c68a66db386f7d87326a0","validated":{"lint_errors":0,"lint_warnings":29,"tests_total":0,"tests_failures":0,"self_test":true},"byte_checksum":"sha256:c7101ddc1f33d2f9813a52a235441cf6b68c07deb07e9c570cb386e98918d8ab"}
|
|
1
|
+
{"bindings":null,"version":"1.0.0","grammar":"Pma","shape":"parsanol-tree/v2","binding_version":1,"entries":{"document":{"root":"document","grammar":{"atoms":[{"Entity":{"atom":9}},{"Entity":{"atom":8}},{"Str":{"pattern":" "}},{"Str":{"pattern":"\t"}},{"Str":{"pattern":"\n"}},{"Str":{"pattern":"\r"}},{"Re":{"pattern":"[\\x0b]"}},{"Re":{"pattern":"[\\x0c]"}},{"Alternative":{"atoms":[2,3,4,5,6,7]}},{"Repetition":{"atom":1,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":358}},{"Entity":{"atom":352}},{"Str":{"pattern":"diff("}},{"Entity":{"atom":9}},{"Entity":{"atom":348}},{"Entity":{"atom":153}},{"Entity":{"atom":87}},{"Entity":{"atom":56}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Str":{"pattern":"-"}},{"Repetition":{"atom":21,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":32}},{"Entity":{"atom":25}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":24,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Entity":{"atom":25}},{"Repetition":{"atom":28,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[27,29]}},{"Repetition":{"atom":30,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[26,31]}},{"Sequence":{"atoms":[22,23]}},{"Named":{"name":"value","atom":20}},{"Entity":{"atom":9}},{"Str":{"pattern":"+/-"}},{"Named":{"name":"plus_minus","atom":36}},{"Entity":{"atom":9}},{"Entity":{"atom":32}},{"Named":{"name":"relative_magnitude","atom":39}},{"Str":{"pattern":"%"}},{"Entity":{"atom":9}},{"Entity":{"atom":51}},{"Str":{"pattern":"~"}},{"Entity":{"atom":49}},{"Str":{"pattern":"arcsine"}},{"Str":{"pattern":"triang"}},{"Str":{"pattern":"rect"}},{"Alternative":{"atoms":[46,47,48]}},{"Named":{"name":"distribution","atom":45}},{"Sequence":{"atoms":[44,50]}},{"Sequence":{"atoms":[42,43]}},{"Repetition":{"atom":52,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[18,19,34,35,37,38,40,41,53,54,55]}},{"Entity":{"atom":86}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":60}},{"Entity":{"atom":9}},{"Str":{"pattern":"+/-"}},{"Named":{"name":"plus_minus","atom":63}},{"Entity":{"atom":9}},{"Entity":{"atom":32}},{"Named":{"name":"magnitude","atom":66}},{"Entity":{"atom":9}},{"Entity":{"atom":51}},{"Sequence":{"atoms":[68,69]}},{"Repetition":{"atom":70,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Entity":{"atom":84}},{"Str":{"pattern":"e"}},{"Str":{"pattern":"+"}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[76,77]}},{"Repetition":{"atom":78,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":25}},{"Repetition":{"atom":80,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[79,81]}},{"Named":{"name":"shared_exponent","atom":82}},{"Sequence":{"atoms":[75,83]}},{"Repetition":{"atom":74,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[58,59,61,62,64,65,67,71,72,73,85]}},{"Alternative":{"atoms":[17,57]}},{"Entity":{"atom":104}},{"Str":{"pattern":"ustd"}},{"Named":{"name":"uncertainty_class","atom":89}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":93}},{"Entity":{"atom":99}},{"Entity":{"atom":9}},{"Str":{"pattern":","}},{"Entity":{"atom":9}},{"Sequence":{"atoms":[96,97,98]}},{"Entity":{"atom":32}},{"Named":{"name":"magnitude","atom":100}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[90,91,92,94,95,101,102,103]}},{"Entity":{"atom":125}},{"Str":{"pattern":"uexp"}},{"Named":{"name":"uncertainty_class","atom":106}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":110}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"magnitude","atom":113}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"coverage_factor","atom":116}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"coverage_probability","atom":119}},{"Sequence":{"atoms":[118,120]}},{"Repetition":{"atom":121,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[107,108,109,111,112,114,115,117,122,123,124]}},{"Entity":{"atom":152}},{"Str":{"pattern":"ucov"}},{"Named":{"name":"uncertainty_class","atom":127}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":33}},{"Named":{"name":"value","atom":131}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"lower","atom":134}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"upper","atom":137}},{"Entity":{"atom":99}},{"Entity":{"atom":32}},{"Named":{"name":"coverage_probability","atom":140}},{"Entity":{"atom":99}},{"Entity":{"atom":146}},{"Str":{"pattern":"shortest"}},{"Str":{"pattern":"symmetric"}},{"Alternative":{"atoms":[144,145]}},{"Named":{"name":"interval_kind","atom":143}},{"Sequence":{"atoms":[142,147]}},{"Repetition":{"atom":148,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[128,129,130,132,133,135,136,138,139,141,149,150,151]}},{"Alternative":{"atoms":[16,88,105,126]}},{"Entity":{"atom":9}},{"Entity":{"atom":346}},{"Str":{"pattern":"unit("}},{"Entity":{"atom":9}},{"Entity":{"atom":334}},{"Entity":{"atom":303}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Str":{"pattern":")"}},{"Entity":{"atom":8}},{"Str":{"pattern":"::"}},{"Alternative":{"atoms":[161,162,163,164]}},{"Lookahead":{"atom":165,"positive":false}},{"Entity":{"atom":168}},{"Re":{"pattern":"[\\x00-\\u{10ffff}]"}},{"Sequence":{"atoms":[166,167]}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":291}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":279}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":267}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":255}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":243}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":231}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":219}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":9}},{"Entity":{"atom":207}},{"Entity":{"atom":169}},{"Entity":{"atom":8}},{"Repetition":{"atom":202,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Lookahead":{"atom":204,"positive":true}},{"Sequence":{"atoms":[203,205]}},{"Alternative":{"atoms":[201,206]}},{"Repetition":{"atom":200,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[198,199,208,209,210]}},{"Entity":{"atom":8}},{"Repetition":{"atom":212,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[214,215]}},{"Lookahead":{"atom":216,"positive":true}},{"Sequence":{"atoms":[213,217]}},{"Alternative":{"atoms":[197,211,218]}},{"Repetition":{"atom":196,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[194,195,220,221,222]}},{"Entity":{"atom":8}},{"Repetition":{"atom":224,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[226,227]}},{"Lookahead":{"atom":228,"positive":true}},{"Sequence":{"atoms":[225,229]}},{"Alternative":{"atoms":[193,223,230]}},{"Repetition":{"atom":192,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[190,191,232,233,234]}},{"Entity":{"atom":8}},{"Repetition":{"atom":236,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[238,239]}},{"Lookahead":{"atom":240,"positive":true}},{"Sequence":{"atoms":[237,241]}},{"Alternative":{"atoms":[189,235,242]}},{"Repetition":{"atom":188,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[186,187,244,245,246]}},{"Entity":{"atom":8}},{"Repetition":{"atom":248,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[250,251]}},{"Lookahead":{"atom":252,"positive":true}},{"Sequence":{"atoms":[249,253]}},{"Alternative":{"atoms":[185,247,254]}},{"Repetition":{"atom":184,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[182,183,256,257,258]}},{"Entity":{"atom":8}},{"Repetition":{"atom":260,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[262,263]}},{"Lookahead":{"atom":264,"positive":true}},{"Sequence":{"atoms":[261,265]}},{"Alternative":{"atoms":[181,259,266]}},{"Repetition":{"atom":180,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[178,179,268,269,270]}},{"Entity":{"atom":8}},{"Repetition":{"atom":272,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[274,275]}},{"Lookahead":{"atom":276,"positive":true}},{"Sequence":{"atoms":[273,277]}},{"Alternative":{"atoms":[177,271,278]}},{"Repetition":{"atom":176,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[174,175,280,281,282]}},{"Entity":{"atom":8}},{"Repetition":{"atom":284,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[286,287]}},{"Lookahead":{"atom":288,"positive":true}},{"Sequence":{"atoms":[285,289]}},{"Alternative":{"atoms":[173,283,290]}},{"Repetition":{"atom":172,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[170,171,292,293,294]}},{"Entity":{"atom":8}},{"Repetition":{"atom":296,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[298,299]}},{"Lookahead":{"atom":300,"positive":true}},{"Sequence":{"atoms":[297,301]}},{"Alternative":{"atoms":[160,295,302]}},{"Repetition":{"atom":159,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"literal","atom":304}},{"Entity":{"atom":9}},{"Str":{"pattern":"::"}},{"Entity":{"atom":9}},{"Entity":{"atom":332}},{"Entity":{"atom":331}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Entity":{"atom":320}},{"Entity":{"atom":169}},{"Entity":{"atom":8}},{"Repetition":{"atom":315,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Lookahead":{"atom":317,"positive":true}},{"Sequence":{"atoms":[316,318]}},{"Alternative":{"atoms":[314,319]}},{"Repetition":{"atom":313,"min":0,"max":null,"tag":"Repetition"}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[312,321,322]}},{"Entity":{"atom":8}},{"Repetition":{"atom":324,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":169}},{"Str":{"pattern":"("}},{"Alternative":{"atoms":[326,327]}},{"Lookahead":{"atom":328,"positive":true}},{"Sequence":{"atoms":[325,329]}},{"Alternative":{"atoms":[311,323,330]}},{"Repetition":{"atom":310,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"quantity","atom":309}},{"Sequence":{"atoms":[305,306,307,308,333]}},{"Entity":{"atom":341}},{"Entity":{"atom":303}},{"Repetition":{"atom":336,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"literal","atom":337}},{"Str":{"pattern":""}},{"Named":{"name":"empty_list","atom":339}},{"Alternative":{"atoms":[338,340]}},{"Alternative":{"atoms":[158,335]}},{"Named":{"name":"unit","atom":342}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[156,157,343,344,345]}},{"Sequence":{"atoms":[15,154,155]}},{"Named":{"name":"uncertainty","atom":347}},{"Named":{"name":"diff","atom":14}},{"Entity":{"atom":9}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[12,13,349,350,351]}},{"Entity":{"atom":348}},{"Entity":{"atom":356}},{"Entity":{"atom":153}},{"Named":{"name":"uncertainty","atom":355}},{"Entity":{"atom":346}},{"Alternative":{"atoms":[11,353,354,357]}},{"Named":{"name":"term","atom":10}},{"Entity":{"atom":9}},{"Sequence":{"atoms":[0,359,360]}}],"root":361},"bindings":[{"capture":"term","path":"term","type":"any","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule interval_kind: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured_literal: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule measured: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule unit_chunk_0: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_0: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_1: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_1: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_2: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_2: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_3: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_3: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_4: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_4: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_5: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_5: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_6: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_6: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_7: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_chunk_7: branches 1 and 3 are order-dependent (first set not statically known)","rule unit_chunk_8: branches 1 and 2 are order-dependent (first set not statically known)","rule quantity_chunk_0: branches 1 and 2 are order-dependent (first set not statically known)","rule quantity_chunk_0: branches 1 and 3 are order-dependent (first set not statically known)","rule quantity_chunk_1: branches 1 and 2 are order-dependent (first set not statically known)","rule unit_plain: branches 1 and 2 are order-dependent (first set not statically known)","rule term: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule term: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule term: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"document","render":{},"derive":{},"tests":[],"docs":{},"source":"# Template for grammars/pma.parg, the grammar of pma (dialect P, \"plurimath\n# ascii\"). Do not edit the generated .parg by hand: edit this file or\n# data/vocabulary.json and run\n# ruby scripts/generate_grammar.rb\n# Placeholders (a name in double braces) are replaced by generated text.\n# Lines that start with `#!` are template-only notes and are not copied.\n#\n# GENERATED by scripts/generate_grammar.rb -- do not edit.\n# pma (dialect P) grammar, plurimath docs/pma.adoc (amath#16).\n# registry data/vocabulary.json amath-vocabulary/v2 edition 1 sha256:ad6e762fab953af96acb52fdd1ce21bc586ff55423a8d12f8be05fa5b1c61072\n# unit(...) content: asciiunits 0.1.8 artifact sha256:2159dfb6e4faaf04a846ed351dd84b545d4ecfeb3c33905bea378ac97cc4ab48\n# reserved words (terminals): unit ustd uexp ucov diff quantity\n#\n# Version 1 reads one term: a measured value (a measured literal or one of\n# the constructors ustd, uexp, ucov), optionally with a trailing unit(...),\n# a unit(...) on its own, or diff(...) of a measured value with its unit.\n# Whitespace may stand between tokens and never inside one. `ustd(`,\n# `uexp(`, `ucov(`, `unit(` and `diff(` are single tokens, so a reserved\n# word followed by whitespace matches nothing. The content of unit(...) is\n# captured as text and parsed by the asciiunits artifact (see\n# Amath::Pma); its brackets nest at most 8 deep. A unit may be\n# followed by `::` and one quantity name (the quantity assertion).\n\ngrammar Pma version \"1.0.0\" {\n any_char = %x00-10FFFF\n ws = \" \" / \"\\t\" / \"\\n\" / \"\\r\" / %x0B / %x0C\n sp = *(ws)\n digit = %x30-39\n pma_number = 1*(digit) [\".\" 1*(digit)]\n pma_value = [\"-\"] pma_number\n\n # Distribution tags: the registry's pma distribution names, longest first.\n distribution_name = \"arcsine\" / \"triang\" / \"rect\"\n distribution_tag = \"~\" (distribution_name) as distribution\n shared_exponent = \"e\" ([\"+\" / \"-\"] 1*(digit)) as shared_exponent\n interval_kind = \"shortest\" / \"symmetric\"\n\n # Measured literals: (v +/- u), (v +/- p%), with an optional tag inside\n # the bracket after the uncertainty; only the absolute form takes a\n # shared exponent.\n ml_relative = \"(\" sp (pma_value) as value sp (\"+/-\") as plus_minus sp (pma_number) as relative_magnitude \"%\" [sp distribution_tag] sp \")\"\n ml_absolute = \"(\" sp (pma_value) as value sp (\"+/-\") as plus_minus sp (pma_number) as magnitude [sp distribution_tag] sp \")\" [shared_exponent]\n measured_literal = ml_relative / ml_absolute\n\n # Constructors.\n ctor_sep = sp \",\" sp\n ustd_ctor = (\"ustd\") as uncertainty_class \"(\" sp (pma_value) as value ctor_sep (pma_number) as magnitude sp \")\"\n uexp_ctor = (\"uexp\") as uncertainty_class \"(\" sp (pma_value) as value ctor_sep (pma_number) as magnitude ctor_sep (pma_number) as coverage_factor [ctor_sep (pma_number) as coverage_probability] sp \")\"\n ucov_ctor = (\"ucov\") as uncertainty_class \"(\" sp (pma_value) as value ctor_sep (pma_number) as lower ctor_sep (pma_number) as upper ctor_sep (pma_number) as coverage_probability [ctor_sep (interval_kind) as interval_kind] sp \")\"\n measured = measured_literal / ustd_ctor / uexp_ctor / ucov_ctor\n\n # unit(...): the unit expression text, brackets balanced to a fixed depth.\n # A run of whitespace inside it is kept only before more content.\n unit_char = !(\"(\" / \")\" / ws / \"::\") any_char\n unit_chunk_0 = unit_char / \"(\" sp *(unit_chunk_1) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_1 = unit_char / \"(\" sp *(unit_chunk_2) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_2 = unit_char / \"(\" sp *(unit_chunk_3) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_3 = unit_char / \"(\" sp *(unit_chunk_4) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_4 = unit_char / \"(\" sp *(unit_chunk_5) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_5 = unit_char / \"(\" sp *(unit_chunk_6) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_6 = unit_char / \"(\" sp *(unit_chunk_7) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_7 = unit_char / \"(\" sp *(unit_chunk_8) sp \")\" / 1*(ws) &(unit_char / \"(\")\n unit_chunk_8 = unit_char / 1*(ws) &(unit_char)\n\n # The quantity assertion: `::` and a quantity name after the unit\n # expression, at most one. The name is text up to the closing bracket;\n # its own brackets balance one deep (unitsdb names such as\n # \"ratio logarithm (Np)\"). Whether the name is a unitsdb quantity is\n # checked by Amath::Pma, not here.\n quantity_chunk_0 = unit_char / \"(\" *(quantity_chunk_1) \")\" / 1*(ws) &(unit_char / \"(\")\n quantity_chunk_1 = unit_char / 1*(ws) &(unit_char)\n quantity_ref = 1*(quantity_chunk_0)\n unit_plain = (1*(unit_chunk_0)) as literal / \"\" as empty_list\n unit_asserted = (1*(unit_chunk_0)) as literal sp \"::\" sp (quantity_ref) as quantity\n unit_ctor = \"unit(\" sp (unit_asserted / unit_plain) as unit sp \")\"\n\n # A measured value carries its unit inside the uncertainty node, as the\n # dialect L \"unitsml(...)\" argument does.\n attached = (measured sp unit_ctor) as uncertainty\n bare = (measured) as uncertainty\n diff_ctor = \"diff(\" sp (attached) as diff sp \")\"\n term = diff_ctor / attached / bare / unit_ctor\n document = sp (term) as term sp\n}\n\nentry document: document\n\nbindings document { term -> term (any) }\n","source_hash":"3f4afe4310f041fb0802f6b91fb17c62ba499e94e2ef5b3ebaadfc8da42f7de9","unicode_tables":"onigmo (Ruby 4.0.1)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:8444c238be035bd35c6386b77380c7ae446dc649088e3eee2bf003810e6ac6b5","checksum":"sha256:2136e4a2aab933f79bfbbb1df1c7e8d6e975177355c0b57e986a7a065e7c2295","validated":{"lint_errors":0,"lint_warnings":29,"tests_total":0,"tests_failures":0,"self_test":true},"byte_checksum":"sha256:68946a1419b1f8a81249e40abcdea42b68c5c4f065c5cbbadbba45b8047e2b2f"}
|
data/docs/parser-contract.adoc
CHANGED
|
@@ -217,10 +217,16 @@ Limits of what `last_engine` proves:
|
|
|
217
217
|
[[deep-nesting]]
|
|
218
218
|
=== Deep nesting
|
|
219
219
|
|
|
220
|
-
Parsanol's native
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
220
|
+
Parsanol's native recursion limits depend on its version and the parsed
|
|
221
|
+
construct. With Parsanol 1.5.9, the Ruby tree transform stops at depth 500
|
|
222
|
+
("Maximum recursion depth (500) exceeded"): about 110 levels of `(` and
|
|
223
|
+
about 80 of `{` with the AsciiMath artifact. Newer Parsanol engines raise
|
|
224
|
+
that transform limit to 8192; Parsanol 1.5.16 and 1.5.18 parse 200 levels
|
|
225
|
+
of either bracket natively. Other native limits can report
|
|
226
|
+
"Recursion limit exceeded: depth 1000". Other constructs (`sqrt`, `/`,
|
|
227
|
+
unary `-`) reach the limits at other depths. Under `engine: :auto`, Ruby
|
|
228
|
+
fallback happens when native actually reaches a limit, not at a fixed
|
|
229
|
+
bracket depth. On a thread
|
|
224
230
|
other than the main one, the native call can also exhaust the thread's Ruby
|
|
225
231
|
stack (1 MiB by default) much earlier (at about 40 levels of `(` on x86_64 Linux); Ruby reports
|
|
226
232
|
that as `SystemStackError`.
|
data/lib/amath/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: amath
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciiunits
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.1.
|
|
19
|
+
version: 0.1.8
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.1.
|
|
26
|
+
version: 0.1.8
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: lutaml-model
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|