@pubid/pubid 0.1.71 → 0.1.72
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.
- package/artifact/corpus.json.gz +0 -0
- package/dist/flavors/ansi/generated/substrate.d.ts +78 -0
- package/dist/flavors/ansi/generated/substrate.js +105 -0
- package/dist/flavors/ansi/implementation.d.ts +5 -0
- package/dist/flavors/ansi/implementation.js +125 -0
- package/dist/flavors/ansi/index.js +14 -117
- package/dist/flavors/api/generated/substrate.d.ts +78 -0
- package/dist/flavors/api/generated/substrate.js +105 -0
- package/dist/flavors/api/grammar.worker.d.ts +6 -0
- package/dist/flavors/api/{grammar.js → grammar.worker.js} +60 -16
- package/dist/flavors/api/implementation.d.ts +11 -0
- package/dist/flavors/api/implementation.js +106 -0
- package/dist/flavors/api/index.d.ts +1 -3
- package/dist/flavors/api/index.js +14 -98
- package/dist/flavors/arxiv/generated/substrate.d.ts +75 -0
- package/dist/flavors/arxiv/generated/substrate.js +102 -0
- package/dist/flavors/arxiv/index.js +17 -11
- package/dist/flavors/ashrae/generated/substrate.d.ts +78 -0
- package/dist/flavors/ashrae/generated/substrate.js +105 -0
- package/dist/flavors/ashrae/grammar.worker.d.ts +6 -0
- package/dist/flavors/ashrae/{grammar.js → grammar.worker.js} +76 -39
- package/dist/flavors/ashrae/implementation.d.ts +7 -0
- package/dist/flavors/ashrae/implementation.js +316 -0
- package/dist/flavors/ashrae/index.d.ts +1 -3
- package/dist/flavors/ashrae/index.js +14 -304
- package/dist/flavors/asme/generated/substrate.d.ts +78 -0
- package/dist/flavors/asme/generated/substrate.js +105 -0
- package/dist/flavors/asme/grammar.worker.d.ts +6 -0
- package/dist/flavors/asme/{grammar.js → grammar.worker.js} +41 -2
- package/dist/flavors/asme/implementation.d.ts +7 -0
- package/dist/flavors/asme/implementation.js +152 -0
- package/dist/flavors/asme/index.d.ts +1 -3
- package/dist/flavors/asme/index.js +14 -136
- package/dist/flavors/astm/generated/substrate.d.ts +78 -0
- package/dist/flavors/astm/generated/substrate.js +105 -0
- package/dist/flavors/astm/grammar.worker.d.ts +6 -0
- package/dist/flavors/astm/{grammar.js → grammar.worker.js} +39 -5
- package/dist/flavors/astm/implementation.d.ts +6 -0
- package/dist/flavors/astm/implementation.js +135 -0
- package/dist/flavors/astm/index.js +14 -125
- package/dist/flavors/bipm/generated/substrate.d.ts +78 -0
- package/dist/flavors/bipm/generated/substrate.js +105 -0
- package/dist/flavors/bipm/grammar.worker.d.ts +6 -0
- package/dist/flavors/bipm/grammar.worker.js +180 -0
- package/dist/flavors/bipm/implementation.d.ts +6 -0
- package/dist/flavors/bipm/implementation.js +244 -0
- package/dist/flavors/bipm/index.d.ts +1 -28
- package/dist/flavors/bipm/index.js +16 -650
- package/dist/flavors/bipm/model.d.ts +80 -0
- package/dist/flavors/bipm/model.js +271 -0
- package/dist/flavors/bipm/worker.d.ts +2 -0
- package/dist/flavors/bipm/worker.js +19 -0
- package/dist/flavors/bsi/generated/substrate.d.ts +78 -0
- package/dist/flavors/bsi/generated/substrate.js +105 -0
- package/dist/flavors/bsi/grammar.worker.d.ts +6 -0
- package/dist/flavors/bsi/{grammar.js → grammar.worker.js} +36 -7
- package/dist/flavors/bsi/implementation.d.ts +12 -0
- package/dist/flavors/bsi/implementation.js +967 -0
- package/dist/flavors/bsi/index.d.ts +1 -3
- package/dist/flavors/bsi/index.js +15 -940
- package/dist/flavors/bsi/model.js +16 -0
- package/dist/flavors/bsi/worker.js +11 -4
- package/dist/flavors/bsi_pfs/index.d.ts +25 -0
- package/dist/flavors/bsi_pfs/index.js +73 -10
- package/dist/flavors/calconnect/generated/substrate.d.ts +75 -0
- package/dist/flavors/calconnect/generated/substrate.js +102 -0
- package/dist/flavors/calconnect/grammar.worker.d.ts +6 -0
- package/dist/flavors/calconnect/grammar.worker.js +60 -0
- package/dist/flavors/calconnect/implementation.d.ts +6 -0
- package/dist/flavors/calconnect/implementation.js +69 -0
- package/dist/flavors/calconnect/index.d.ts +1 -19
- package/dist/flavors/calconnect/index.js +15 -111
- package/dist/flavors/calconnect/model.d.ts +26 -0
- package/dist/flavors/calconnect/model.js +52 -0
- package/dist/flavors/ccsds/generated/substrate.d.ts +75 -0
- package/dist/flavors/ccsds/generated/substrate.js +102 -0
- package/dist/flavors/ccsds/implementation.d.ts +5 -0
- package/dist/flavors/ccsds/implementation.js +67 -0
- package/dist/flavors/ccsds/index.js +13 -57
- package/dist/flavors/cen_cenelec/generated/substrate.d.ts +78 -0
- package/dist/flavors/cen_cenelec/generated/substrate.js +105 -0
- package/dist/flavors/cen_cenelec/grammar.worker.d.ts +6 -0
- package/dist/flavors/cen_cenelec/{grammar.js → grammar.worker.js} +41 -13
- package/dist/flavors/cen_cenelec/implementation.d.ts +15 -0
- package/dist/flavors/cen_cenelec/implementation.js +322 -0
- package/dist/flavors/cen_cenelec/index.d.ts +2 -4
- package/dist/flavors/cen_cenelec/index.js +16 -286
- package/dist/flavors/cen_cenelec/model.js +16 -1
- package/dist/flavors/cen_cenelec/worker.js +10 -4
- package/dist/flavors/cen_pfs/index.d.ts +5 -0
- package/dist/flavors/cen_pfs/index.js +28 -2
- package/dist/flavors/cie/generated/substrate.d.ts +78 -0
- package/dist/flavors/cie/generated/substrate.js +105 -0
- package/dist/flavors/cie/grammar.worker.d.ts +6 -0
- package/dist/flavors/cie/{grammar.js → grammar.worker.js} +71 -18
- package/dist/flavors/cie/implementation.d.ts +9 -0
- package/dist/flavors/cie/implementation.js +331 -0
- package/dist/flavors/cie/index.js +14 -309
- package/dist/flavors/csa/generated/substrate.d.ts +78 -0
- package/dist/flavors/csa/generated/substrate.js +105 -0
- package/dist/flavors/csa/grammar.worker.d.ts +12 -0
- package/dist/flavors/csa/{grammar.js → grammar.worker.js} +143 -27
- package/dist/flavors/csa/implementation.d.ts +9 -0
- package/dist/flavors/csa/implementation.js +661 -0
- package/dist/flavors/csa/index.js +14 -631
- package/dist/flavors/csa/worker.js +10 -4
- package/dist/flavors/easc/generated/substrate.d.ts +75 -0
- package/dist/flavors/easc/generated/substrate.js +102 -0
- package/dist/flavors/easc/grammar.worker.d.ts +6 -0
- package/dist/flavors/easc/grammar.worker.js +66 -0
- package/dist/flavors/easc/implementation.d.ts +6 -0
- package/dist/flavors/easc/implementation.js +58 -0
- package/dist/flavors/easc/index.d.ts +1 -2
- package/dist/flavors/easc/index.js +15 -105
- package/dist/flavors/easc/model.d.ts +10 -0
- package/dist/flavors/easc/model.js +43 -0
- package/dist/flavors/ecma/generated/substrate.d.ts +75 -0
- package/dist/flavors/ecma/generated/substrate.js +102 -0
- package/dist/flavors/ecma/grammar.worker.d.ts +6 -0
- package/dist/flavors/ecma/grammar.worker.js +63 -0
- package/dist/flavors/ecma/implementation.d.ts +6 -0
- package/dist/flavors/ecma/implementation.js +95 -0
- package/dist/flavors/ecma/index.d.ts +1 -2
- package/dist/flavors/ecma/index.js +15 -152
- package/dist/flavors/ecma/model.d.ts +10 -0
- package/dist/flavors/ecma/model.js +61 -0
- package/dist/flavors/etsi/generated/substrate.d.ts +75 -0
- package/dist/flavors/etsi/generated/substrate.js +102 -0
- package/dist/flavors/etsi/grammar.worker.d.ts +6 -0
- package/dist/flavors/etsi/grammar.worker.js +86 -0
- package/dist/flavors/etsi/implementation.d.ts +6 -0
- package/dist/flavors/etsi/implementation.js +110 -0
- package/dist/flavors/etsi/index.d.ts +2 -12
- package/dist/flavors/etsi/index.js +16 -305
- package/dist/flavors/etsi/model.d.ts +37 -0
- package/dist/flavors/etsi/model.js +169 -0
- package/dist/flavors/eu/generated/substrate.d.ts +75 -0
- package/dist/flavors/eu/generated/substrate.js +102 -0
- package/dist/flavors/eu/implementation.d.ts +7 -0
- package/dist/flavors/eu/implementation.js +150 -0
- package/dist/flavors/eu/index.js +14 -141
- package/dist/flavors/evs/generated/substrate.d.ts +78 -0
- package/dist/flavors/evs/generated/substrate.js +105 -0
- package/dist/flavors/evs/grammar.worker.d.ts +6 -0
- package/dist/flavors/evs/grammar.worker.js +98 -0
- package/dist/flavors/evs/implementation.d.ts +7 -0
- package/dist/flavors/evs/implementation.js +114 -0
- package/dist/flavors/evs/index.d.ts +1 -1
- package/dist/flavors/evs/index.js +14 -89
- package/dist/flavors/evs/worker.js +10 -4
- package/dist/flavors/gb/generated/substrate.d.ts +75 -0
- package/dist/flavors/gb/generated/substrate.js +102 -0
- package/dist/flavors/gb/grammar.worker.d.ts +6 -0
- package/dist/flavors/gb/grammar.worker.js +73 -0
- package/dist/flavors/gb/implementation.d.ts +6 -0
- package/dist/flavors/gb/implementation.js +87 -0
- package/dist/flavors/gb/index.d.ts +1 -29
- package/dist/flavors/gb/index.js +15 -157
- package/dist/flavors/gb/model.d.ts +36 -0
- package/dist/flavors/gb/model.js +79 -0
- package/dist/flavors/gost/generated/substrate.d.ts +78 -0
- package/dist/flavors/gost/generated/substrate.js +105 -0
- package/dist/flavors/gost/grammar.worker.d.ts +6 -0
- package/dist/flavors/gost/grammar.worker.js +82 -0
- package/dist/flavors/gost/implementation.d.ts +7 -0
- package/dist/flavors/gost/implementation.js +177 -0
- package/dist/flavors/gost/index.js +14 -162
- package/dist/flavors/gost/worker.js +12 -5
- package/dist/flavors/iala/generated/substrate.d.ts +78 -0
- package/dist/flavors/iala/generated/substrate.js +105 -0
- package/dist/flavors/iala/grammar.worker.d.ts +6 -0
- package/dist/flavors/iala/grammar.worker.js +127 -0
- package/dist/flavors/iala/implementation.d.ts +6 -0
- package/dist/flavors/iala/implementation.js +250 -0
- package/dist/flavors/iala/index.d.ts +1 -56
- package/dist/flavors/iala/index.js +17 -484
- package/dist/flavors/iala/model.d.ts +93 -0
- package/dist/flavors/iala/model.js +194 -0
- package/dist/flavors/iana/generated/substrate.d.ts +75 -0
- package/dist/flavors/iana/generated/substrate.js +102 -0
- package/dist/flavors/iana/grammar.worker.d.ts +6 -0
- package/dist/flavors/iana/grammar.worker.js +51 -0
- package/dist/flavors/iana/implementation.d.ts +6 -0
- package/dist/flavors/iana/implementation.js +47 -0
- package/dist/flavors/iana/index.d.ts +1 -17
- package/dist/flavors/iana/index.js +15 -69
- package/dist/flavors/iana/model.d.ts +22 -0
- package/dist/flavors/iana/model.js +33 -0
- package/dist/flavors/idf/generated/substrate.d.ts +78 -0
- package/dist/flavors/idf/generated/substrate.js +105 -0
- package/dist/flavors/idf/grammar.worker.d.ts +6 -0
- package/dist/flavors/idf/{grammar.js → grammar.worker.js} +58 -2
- package/dist/flavors/idf/implementation.d.ts +6 -0
- package/dist/flavors/idf/implementation.js +129 -0
- package/dist/flavors/idf/index.js +14 -98
- package/dist/flavors/iec/generated/substrate.d.ts +78 -0
- package/dist/flavors/iec/generated/substrate.js +105 -0
- package/dist/flavors/iec/grammar.worker.d.ts +6 -0
- package/dist/flavors/iec/grammar.worker.js +231 -0
- package/dist/flavors/iec/implementation.d.ts +15 -0
- package/dist/flavors/iec/implementation.js +956 -0
- package/dist/flavors/iec/index.d.ts +1 -2
- package/dist/flavors/iec/index.js +16 -869
- package/dist/flavors/iec/model.js +13 -1
- package/dist/flavors/iec/worker.d.ts +2 -0
- package/dist/flavors/iec/worker.js +19 -0
- package/dist/flavors/ieee/generated/substrate.d.ts +78 -0
- package/dist/flavors/ieee/generated/substrate.js +105 -0
- package/dist/flavors/ieee/implementation.d.ts +4 -0
- package/dist/flavors/ieee/implementation.js +48 -10
- package/dist/flavors/ieee/index.d.ts +3 -2
- package/dist/flavors/ieee/index.js +30 -12
- package/dist/flavors/ieee/model.js +3 -0
- package/dist/flavors/ieee/preprocessor.js +10 -10
- package/dist/flavors/ieee/worker.js +33 -11
- package/dist/flavors/ietf/generated/substrate.d.ts +75 -0
- package/dist/flavors/ietf/generated/substrate.js +102 -0
- package/dist/flavors/ietf/grammar.worker.d.ts +6 -0
- package/dist/flavors/ietf/grammar.worker.js +63 -0
- package/dist/flavors/ietf/implementation.d.ts +6 -0
- package/dist/flavors/ietf/implementation.js +60 -0
- package/dist/flavors/ietf/index.d.ts +1 -28
- package/dist/flavors/ietf/index.js +15 -149
- package/dist/flavors/ietf/model.d.ts +47 -0
- package/dist/flavors/ietf/model.js +92 -0
- package/dist/flavors/iho/generated/substrate.d.ts +78 -0
- package/dist/flavors/iho/generated/substrate.js +105 -0
- package/dist/flavors/iho/grammar.worker.d.ts +6 -0
- package/dist/flavors/iho/grammar.worker.js +150 -0
- package/dist/flavors/iho/implementation.d.ts +6 -0
- package/dist/flavors/iho/implementation.js +221 -0
- package/dist/flavors/iho/index.d.ts +1 -2
- package/dist/flavors/iho/index.js +15 -619
- package/dist/flavors/iho/model.d.ts +11 -0
- package/dist/flavors/iho/model.js +315 -0
- package/dist/flavors/index.js +3 -0
- package/dist/flavors/iso/generated/substrate.d.ts +93 -0
- package/dist/flavors/iso/generated/substrate.js +133 -0
- package/dist/flavors/iso/grammar.worker.d.ts +7 -0
- package/dist/flavors/iso/grammar.worker.js +406 -0
- package/dist/flavors/iso/implementation.d.ts +4 -0
- package/dist/flavors/iso/implementation.js +880 -0
- package/dist/flavors/iso/index.js +16 -706
- package/dist/flavors/iso/model.js +21 -2
- package/dist/flavors/iso/worker.d.ts +2 -0
- package/dist/flavors/iso/worker.js +19 -0
- package/dist/flavors/itu/generated/substrate.d.ts +78 -0
- package/dist/flavors/itu/generated/substrate.js +105 -0
- package/dist/flavors/itu/grammar.worker.d.ts +6 -0
- package/dist/flavors/itu/grammar.worker.js +306 -0
- package/dist/flavors/itu/implementation.d.ts +10 -0
- package/dist/flavors/itu/implementation.js +285 -0
- package/dist/flavors/itu/index.js +15 -246
- package/dist/flavors/itu/worker.d.ts +2 -0
- package/dist/flavors/itu/worker.js +19 -0
- package/dist/flavors/jcgm/generated/substrate.d.ts +78 -0
- package/dist/flavors/jcgm/generated/substrate.js +105 -0
- package/dist/flavors/jcgm/grammar.worker.d.ts +6 -0
- package/dist/flavors/jcgm/grammar.worker.js +98 -0
- package/dist/flavors/jcgm/implementation.d.ts +6 -0
- package/dist/flavors/jcgm/implementation.js +187 -0
- package/dist/flavors/jcgm/index.d.ts +1 -5
- package/dist/flavors/jcgm/index.js +16 -364
- package/dist/flavors/jcgm/model.d.ts +43 -0
- package/dist/flavors/jcgm/model.js +168 -0
- package/dist/flavors/jis/generated/substrate.d.ts +78 -0
- package/dist/flavors/jis/generated/substrate.js +105 -0
- package/dist/flavors/jis/grammar.worker.d.ts +6 -0
- package/dist/flavors/jis/grammar.worker.js +132 -0
- package/dist/flavors/jis/implementation.d.ts +6 -0
- package/dist/flavors/jis/implementation.js +129 -0
- package/dist/flavors/jis/index.d.ts +0 -2
- package/dist/flavors/jis/index.js +15 -390
- package/dist/flavors/jis/model.d.ts +30 -0
- package/dist/flavors/jis/model.js +205 -0
- package/dist/flavors/jis/worker.d.ts +2 -0
- package/dist/flavors/jis/worker.js +19 -0
- package/dist/flavors/nist/generated/substrate.d.ts +78 -0
- package/dist/flavors/nist/generated/substrate.js +105 -0
- package/dist/flavors/nist/index.js +18 -11
- package/dist/flavors/nist/worker.js +8 -4
- package/dist/flavors/oasis/generated/substrate.d.ts +75 -0
- package/dist/flavors/oasis/generated/substrate.js +102 -0
- package/dist/flavors/oasis/grammar.worker.d.ts +6 -0
- package/dist/flavors/oasis/grammar.worker.js +50 -0
- package/dist/flavors/oasis/implementation.d.ts +6 -0
- package/dist/flavors/oasis/implementation.js +80 -0
- package/dist/flavors/oasis/index.d.ts +1 -21
- package/dist/flavors/oasis/index.js +16 -108
- package/dist/flavors/oasis/model.d.ts +27 -0
- package/dist/flavors/oasis/model.js +34 -0
- package/dist/flavors/ogc/generated/substrate.d.ts +75 -0
- package/dist/flavors/ogc/generated/substrate.js +102 -0
- package/dist/flavors/ogc/grammar.worker.d.ts +6 -0
- package/dist/flavors/ogc/grammar.worker.js +55 -0
- package/dist/flavors/ogc/implementation.d.ts +6 -0
- package/dist/flavors/ogc/implementation.js +49 -0
- package/dist/flavors/ogc/index.d.ts +1 -18
- package/dist/flavors/ogc/index.js +15 -73
- package/dist/flavors/ogc/model.d.ts +23 -0
- package/dist/flavors/ogc/model.js +32 -0
- package/dist/flavors/oiml/generated/substrate.d.ts +78 -0
- package/dist/flavors/oiml/generated/substrate.js +105 -0
- package/dist/flavors/oiml/grammar.worker.d.ts +6 -0
- package/dist/flavors/oiml/grammar.worker.js +239 -0
- package/dist/flavors/oiml/implementation.d.ts +2 -1
- package/dist/flavors/oiml/implementation.js +16 -7
- package/dist/flavors/oiml/index.js +15 -6
- package/dist/flavors/oiml/model.js +19 -19
- package/dist/flavors/oiml/worker.js +14 -6
- package/dist/flavors/omg/generated/substrate.d.ts +78 -0
- package/dist/flavors/omg/generated/substrate.js +105 -0
- package/dist/flavors/omg/grammar.worker.d.ts +6 -0
- package/dist/flavors/omg/grammar.worker.js +64 -0
- package/dist/flavors/omg/implementation.d.ts +7 -0
- package/dist/flavors/omg/implementation.js +33 -0
- package/dist/flavors/omg/index.d.ts +1 -12
- package/dist/flavors/omg/index.js +15 -71
- package/dist/flavors/omg/model.d.ts +16 -0
- package/dist/flavors/omg/model.js +26 -0
- package/dist/flavors/plateau/generated/substrate.d.ts +78 -0
- package/dist/flavors/plateau/generated/substrate.js +105 -0
- package/dist/flavors/plateau/grammar.worker.d.ts +6 -0
- package/dist/flavors/plateau/grammar.worker.js +78 -0
- package/dist/flavors/plateau/implementation.d.ts +6 -0
- package/dist/flavors/plateau/implementation.js +74 -0
- package/dist/flavors/plateau/index.d.ts +1 -2
- package/dist/flavors/plateau/index.js +18 -114
- package/dist/flavors/plateau/model.d.ts +11 -0
- package/dist/flavors/plateau/model.js +51 -0
- package/dist/flavors/register-types.d.ts +20 -19
- package/dist/flavors/register-types.js +44 -19
- package/dist/flavors/sae/generated/substrate.d.ts +75 -0
- package/dist/flavors/sae/generated/substrate.js +102 -0
- package/dist/flavors/sae/grammar.worker.d.ts +6 -0
- package/dist/flavors/sae/grammar.worker.js +84 -0
- package/dist/flavors/sae/implementation.d.ts +11 -0
- package/dist/flavors/sae/implementation.js +109 -0
- package/dist/flavors/sae/index.d.ts +3 -0
- package/dist/flavors/sae/index.js +19 -0
- package/dist/flavors/sae/model.d.ts +86 -0
- package/dist/flavors/sae/model.js +185 -0
- package/dist/flavors/tgpp/generated/substrate.d.ts +78 -0
- package/dist/flavors/tgpp/generated/substrate.js +105 -0
- package/dist/flavors/tgpp/grammar.worker.d.ts +6 -0
- package/dist/flavors/tgpp/grammar.worker.js +69 -0
- package/dist/flavors/tgpp/implementation.d.ts +8 -0
- package/dist/flavors/tgpp/implementation.js +56 -0
- package/dist/flavors/tgpp/index.d.ts +1 -2
- package/dist/flavors/tgpp/index.js +15 -120
- package/dist/flavors/tgpp/model.d.ts +13 -0
- package/dist/flavors/tgpp/model.js +52 -0
- package/dist/flavors/w3c/generated/substrate.d.ts +78 -0
- package/dist/flavors/w3c/generated/substrate.js +105 -0
- package/dist/flavors/w3c/grammar.worker.d.ts +6 -0
- package/dist/flavors/w3c/grammar.worker.js +55 -0
- package/dist/flavors/w3c/implementation.d.ts +7 -0
- package/dist/flavors/w3c/implementation.js +49 -0
- package/dist/flavors/w3c/index.d.ts +1 -12
- package/dist/flavors/w3c/index.js +15 -146
- package/dist/flavors/w3c/model.d.ts +15 -0
- package/dist/flavors/w3c/model.js +103 -0
- package/dist/flavors/wmo/generated/substrate.d.ts +78 -0
- package/dist/flavors/wmo/generated/substrate.js +105 -0
- package/dist/flavors/wmo/implementation.d.ts +5 -0
- package/dist/flavors/wmo/implementation.js +79 -0
- package/dist/flavors/wmo/index.js +14 -68
- package/dist/flavors/worker-registry.js +246 -68
- package/dist/flavors/xsf/generated/substrate.d.ts +75 -0
- package/dist/flavors/xsf/generated/substrate.js +102 -0
- package/dist/flavors/xsf/grammar.worker.d.ts +6 -0
- package/dist/flavors/xsf/grammar.worker.js +53 -0
- package/dist/flavors/xsf/implementation.d.ts +6 -0
- package/dist/flavors/xsf/implementation.js +34 -0
- package/dist/flavors/xsf/index.d.ts +1 -16
- package/dist/flavors/xsf/index.js +16 -63
- package/dist/flavors/xsf/model.d.ts +20 -0
- package/dist/flavors/xsf/model.js +26 -0
- package/dist/model/identifier.d.ts +13 -1
- package/dist/model/identifier.js +71 -9
- package/dist/model/relation.d.ts +36 -0
- package/dist/model/relation.js +93 -0
- package/dist/parg/artifacts/ieee.d.ts +1 -1
- package/dist/parg/artifacts/ieee.js +1 -1
- package/dist/parg/worker.d.ts +4 -2
- package/dist/parg/worker.js +5 -3
- package/dist/parse-surface.js +4 -2
- package/dist/pubid-urn/decoder.d.ts +8 -0
- package/dist/pubid-urn/decoder.js +43 -0
- package/dist/pubid-urn/encoder.js +31 -0
- package/dist/pubid-urn/schema.d.ts +1 -1
- package/dist/pubid-urn/schema.js +1 -1
- package/dist/pubid-urn/schemas/bsi.js +1 -0
- package/dist/pubid-urn/schemas/bsi_pfs.js +9 -7
- package/dist/pubid-urn/schemas/cen_pfs.js +1 -0
- package/dist/pubid-urn/schemas/cencenelec.js +1 -0
- package/dist/pubid-urn/schemas/iec.js +1 -0
- package/dist/pubid-urn/schemas/ieee.js +1 -0
- package/dist/pubid-urn/schemas/iso.js +1 -0
- package/package.json +1 -1
- package/vendor/parg/bsi_pfs.json +1 -1
- package/vendor/parg/calconnect_pfs.json +1 -1
- package/vendor/parg/cen_pfs.json +1 -1
- package/vendor/parg/doi_pfs.json +1 -1
- package/vendor/parg/etsi_pfs.json +1 -1
- package/vendor/parg/ieee.json +1 -1
- package/vendor/parg/iho.json +1 -1
- package/vendor/parg/plateau.json +1 -1
- package/dist/flavors/api/grammar.d.ts +0 -4
- package/dist/flavors/ashrae/grammar.d.ts +0 -2
- package/dist/flavors/asme/grammar.d.ts +0 -2
- package/dist/flavors/astm/grammar.d.ts +0 -2
- package/dist/flavors/bsi/grammar.d.ts +0 -4
- package/dist/flavors/cen_cenelec/grammar.d.ts +0 -4
- package/dist/flavors/cie/grammar.d.ts +0 -5
- package/dist/flavors/csa/grammar.d.ts +0 -6
- package/dist/flavors/evs/grammar.d.ts +0 -2
- package/dist/flavors/evs/grammar.js +0 -68
- package/dist/flavors/gost/grammar.d.ts +0 -2
- package/dist/flavors/gost/grammar.js +0 -46
- package/dist/flavors/idf/grammar.d.ts +0 -2
- package/dist/flavors/iec/grammar.d.ts +0 -3
- package/dist/flavors/iec/grammar.js +0 -234
- package/dist/flavors/ieee/grammar.d.ts +0 -2
- package/dist/flavors/ieee/grammar.js +0 -777
- package/dist/flavors/iso/grammar.d.ts +0 -7
- package/dist/flavors/iso/grammar.js +0 -282
- package/dist/flavors/itu/grammar.d.ts +0 -4
- package/dist/flavors/itu/grammar.js +0 -276
- package/dist/flavors/nist/grammar.d.ts +0 -2
- package/dist/flavors/nist/grammar.js +0 -342
- package/dist/flavors/oiml/grammar.d.ts +0 -2
- package/dist/flavors/oiml/grammar.js +0 -206
- package/vendor/parg/csv.json +0 -1
- package/vendor/parg/ini.json +0 -1
- package/vendor/parg/json.json +0 -1
- package/vendor/parg/lua.json +0 -1
- package/vendor/parg/toml.json +0 -1
package/dist/parg/worker.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ declare const bundledArtifacts: Record<string, string>;
|
|
|
4
4
|
export type WorkerPargGrammar = keyof typeof bundledArtifacts;
|
|
5
5
|
/** Initialize the browser engine once per isolate (the lazy ~2.4 MB wasm). */
|
|
6
6
|
export declare function initWorkerEngine(wasm?: WorkerWasmInput): Promise<void>;
|
|
7
|
-
/** The artifact-backed runtime for one grammar over the browser engine
|
|
8
|
-
|
|
7
|
+
/** The artifact-backed runtime for one grammar over the browser engine;
|
|
8
|
+
* a named entry (the artifact's non-default roots) loads through the
|
|
9
|
+
* same bundled payload. */
|
|
10
|
+
export declare function workerPargRuntime(grammar: WorkerPargGrammar, wasm?: WorkerWasmInput, entry?: string): Promise<PargRuntime>;
|
|
9
11
|
export {};
|
package/dist/parg/worker.js
CHANGED
|
@@ -21,12 +21,14 @@ export function initWorkerEngine(wasm) {
|
|
|
21
21
|
enginePromise ??= initialize(wasm);
|
|
22
22
|
return enginePromise;
|
|
23
23
|
}
|
|
24
|
-
/** The artifact-backed runtime for one grammar over the browser engine
|
|
25
|
-
|
|
24
|
+
/** The artifact-backed runtime for one grammar over the browser engine;
|
|
25
|
+
* a named entry (the artifact's non-default roots) loads through the
|
|
26
|
+
* same bundled payload. */
|
|
27
|
+
export async function workerPargRuntime(grammar, wasm, entry) {
|
|
26
28
|
await initWorkerEngine(wasm);
|
|
27
29
|
const artifact = bundledArtifacts[grammar];
|
|
28
30
|
if (artifact === undefined) {
|
|
29
31
|
throw new Error(`no bundled PARG artifact for "${grammar}" (worker graph, pubid-ts#232)`);
|
|
30
32
|
}
|
|
31
|
-
return new PargRuntime(artifact);
|
|
33
|
+
return new PargRuntime(artifact, entry);
|
|
32
34
|
}
|
package/dist/parse-surface.js
CHANGED
|
@@ -16,8 +16,10 @@ export class ParseError extends Error {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
/** Memoized corpus-mode implementations for the flavors whose grammar is
|
|
19
|
-
* not ported yet (currently adobe
|
|
20
|
-
*
|
|
19
|
+
* not ported yet (currently adobe — sae joined the generated substrate
|
|
20
|
+
* in wave 5 batch 2, retiring the lookup tier as its first parse lane):
|
|
21
|
+
* they parse over the bundled corpus, loaded lazily — the grammar
|
|
22
|
+
* flavors never touch it. */
|
|
21
23
|
let bundledCorpusImplementations;
|
|
22
24
|
function corpusImplementation(flavor) {
|
|
23
25
|
if (bundledCorpusImplementations === undefined) {
|
|
@@ -21,6 +21,14 @@ export declare class Decoder {
|
|
|
21
21
|
* canonical position, so a legacy spelling obeys the same slot law. */
|
|
22
22
|
private atomPosition;
|
|
23
23
|
private atomValue;
|
|
24
|
+
/** The document graph (pubid#806): the inverse of Encoder#edgeValue —
|
|
25
|
+
* one "<type>-(<targets>)[-<clauses>]" segment per edge, joined by a
|
|
26
|
+
* top-level comma. The edge hash carries its keys in the reference's
|
|
27
|
+
* serialization order: type, targets, then the face clauses. */
|
|
28
|
+
private decodeEdges;
|
|
29
|
+
private decodeEdge;
|
|
30
|
+
/** One bracketed, comma-joined list of nested identifiers. */
|
|
31
|
+
private identifierGroup;
|
|
24
32
|
/** The value of a :string, :bool or list atom, or of a facet. */
|
|
25
33
|
private slotValue;
|
|
26
34
|
private scalar;
|
|
@@ -140,8 +140,51 @@ export class Decoder {
|
|
|
140
140
|
return this.nested(raw);
|
|
141
141
|
if (atom.kind === "ids")
|
|
142
142
|
return splitTop(raw, ",").map((item) => this.nested(item));
|
|
143
|
+
if (atom.kind === "edges")
|
|
144
|
+
return this.decodeEdges(raw);
|
|
143
145
|
return this.slotValue(raw, atom);
|
|
144
146
|
}
|
|
147
|
+
/** The document graph (pubid#806): the inverse of Encoder#edgeValue —
|
|
148
|
+
* one "<type>-(<targets>)[-<clauses>]" segment per edge, joined by a
|
|
149
|
+
* top-level comma. The edge hash carries its keys in the reference's
|
|
150
|
+
* serialization order: type, targets, then the face clauses. */
|
|
151
|
+
decodeEdges(raw) {
|
|
152
|
+
return splitTop(raw, ",").map((item) => this.decodeEdge(item));
|
|
153
|
+
}
|
|
154
|
+
decodeEdge(item) {
|
|
155
|
+
const parts = splitTop(item, "-");
|
|
156
|
+
const type = parts.shift();
|
|
157
|
+
if (!/^[a-z][a-z0-9_]*$/.test(type)) {
|
|
158
|
+
this.fail(`bad relation type ${JSON.stringify(type)}`);
|
|
159
|
+
}
|
|
160
|
+
const edge = {
|
|
161
|
+
type,
|
|
162
|
+
targets: this.identifierGroup(parts.shift()),
|
|
163
|
+
};
|
|
164
|
+
const intermediates = [];
|
|
165
|
+
while (parts.length > 0) {
|
|
166
|
+
const part = parts.shift();
|
|
167
|
+
if (part === "approved") {
|
|
168
|
+
edge["approved_amendments_flag"] = true;
|
|
169
|
+
}
|
|
170
|
+
else if (part.startsWith("(")) {
|
|
171
|
+
intermediates.push(...this.identifierGroup(part));
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.fail(`bad relation clause ${JSON.stringify(part)}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (intermediates.length > 0)
|
|
178
|
+
edge["intermediate_amendments"] = intermediates;
|
|
179
|
+
return edge;
|
|
180
|
+
}
|
|
181
|
+
/** One bracketed, comma-joined list of nested identifiers. */
|
|
182
|
+
identifierGroup(raw) {
|
|
183
|
+
if (!raw.startsWith("(") || !raw.endsWith(")")) {
|
|
184
|
+
this.fail(`nested identifier list ${JSON.stringify(raw)} needs brackets`);
|
|
185
|
+
}
|
|
186
|
+
return splitTop(raw.slice(1, -1), ",").map((item) => this.nested(item));
|
|
187
|
+
}
|
|
145
188
|
/** The value of a :string, :bool or list atom, or of a facet. */
|
|
146
189
|
slotValue(raw, slot) {
|
|
147
190
|
if (!slot.list)
|
|
@@ -98,6 +98,11 @@ export class Encoder {
|
|
|
98
98
|
.map((hash) => nested(hash))
|
|
99
99
|
.join(",");
|
|
100
100
|
}
|
|
101
|
+
if (atom.kind === "edges") {
|
|
102
|
+
return typed(value, "array", atom, schema)
|
|
103
|
+
.map((edge) => edgeValue(typed(edge, "hash", atom, schema), atom, schema))
|
|
104
|
+
.join(",");
|
|
105
|
+
}
|
|
101
106
|
return this.slotValue(value, atom, schema);
|
|
102
107
|
}
|
|
103
108
|
/** The value of a :string, :bool or list atom, or of a facet. */
|
|
@@ -131,6 +136,32 @@ export class Encoder {
|
|
|
131
136
|
function nested(hash) {
|
|
132
137
|
return `(${new _Encoder(hash).body()})`;
|
|
133
138
|
}
|
|
139
|
+
const RELATION_TYPE = /^[a-z][a-z0-9_]*$/;
|
|
140
|
+
/** The document graph (pubid#806): one "<type>-(<targets>)
|
|
141
|
+
* [-<clauses>]" segment per edge, joined by a top-level comma — the
|
|
142
|
+
* mirror of Encoder#edge_value. "-" separates and not ":", because a
|
|
143
|
+
* top-level ":" would end the atom token; everything bracketed is
|
|
144
|
+
* paren-protected from the splitters. The relation type words never
|
|
145
|
+
* carry a "-", so the type reads unambiguously before the first
|
|
146
|
+
* bracketed group. */
|
|
147
|
+
function edgeValue(edge, atom, schema) {
|
|
148
|
+
const type = edge["type"];
|
|
149
|
+
if (typeof type !== "string" || !RELATION_TYPE.test(type)) {
|
|
150
|
+
throw new InvalidInputError(`${schema.type} ${atom.path}: ${inspect(type)} is not a relation type`);
|
|
151
|
+
}
|
|
152
|
+
const targets = edge["targets"];
|
|
153
|
+
if (!Array.isArray(targets) || targets.length === 0) {
|
|
154
|
+
throw new InvalidInputError(`${schema.type} ${atom.path}: the ${JSON.stringify(type)} edge states no targets`);
|
|
155
|
+
}
|
|
156
|
+
const parts = [`${type}-(${targets.map((t) => nested(typed(t, "hash", atom, schema))).join(",")})`];
|
|
157
|
+
const intermediates = edge["intermediate_amendments"];
|
|
158
|
+
if (Array.isArray(intermediates) && intermediates.length > 0) {
|
|
159
|
+
parts.push(`(${intermediates.map((t) => nested(typed(t, "hash", atom, schema))).join(",")})`);
|
|
160
|
+
}
|
|
161
|
+
if (edge["approved_amendments_flag"] === true)
|
|
162
|
+
parts.push("approved");
|
|
163
|
+
return parts.join("-");
|
|
164
|
+
}
|
|
134
165
|
/** A decimal never has the shape of structure, so it needs no escape. */
|
|
135
166
|
function coreInteger(value, schema, index) {
|
|
136
167
|
if (typeof value === "number" && Number.isInteger(value))
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* flavor's FlavorSchema declares flavor-level atoms/facets that apply
|
|
13
13
|
* to every type, plus one TypeSchema per concrete type.
|
|
14
14
|
*/
|
|
15
|
-
export type AtomKind = "string" | "list" | "bool" | "bools" | "int" | "id" | "ids";
|
|
15
|
+
export type AtomKind = "string" | "list" | "bool" | "bools" | "int" | "id" | "ids" | "edges";
|
|
16
16
|
export type FacetKind = "string" | "list" | "bool" | "bools";
|
|
17
17
|
export type CoreKind = "string" | "int";
|
|
18
18
|
export declare class Atom {
|
package/dist/pubid-urn/schema.js
CHANGED
|
@@ -154,7 +154,7 @@ function buildFacet(path, name, kind) {
|
|
|
154
154
|
checkName(name, "facet name");
|
|
155
155
|
return new Facet(path, name, checkKind(path, kind, FACET_KINDS, "facet"));
|
|
156
156
|
}
|
|
157
|
-
const ATOM_KINDS = ["string", "list", "bool", "bools", "int", "id", "ids"];
|
|
157
|
+
const ATOM_KINDS = ["string", "list", "bool", "bools", "int", "id", "ids", "edges"];
|
|
158
158
|
const FACET_KINDS = ["string", "list", "bool", "bools"];
|
|
159
159
|
/** A path with "*" reads a list, so its kind must be a list kind. */
|
|
160
160
|
function checkKind(path, kind, kinds, what) {
|
|
@@ -61,6 +61,7 @@ export const bsiSchema = define("bsi", (s) => {
|
|
|
61
61
|
s.atom("bundle_type", "btype");
|
|
62
62
|
s.atom("identifiers", "ids", "ids");
|
|
63
63
|
s.atom("na_supplements", "nasup", "ids");
|
|
64
|
+
s.atom("relations", "edges", "edges");
|
|
64
65
|
s.type("pubid:bsi:addendum-document", "ad");
|
|
65
66
|
s.type("pubid:bsi:adopted-european-norm", "aen", { core: [] });
|
|
66
67
|
s.type("pubid:bsi:adopted-international-standard", "ais", { core: [] });
|
|
@@ -25,14 +25,16 @@ export const bsiPfsSchema = define("bsi_pfs", (s) => {
|
|
|
25
25
|
s.atom("typed_stage.type_code", "tstypecode");
|
|
26
26
|
s.atom("typed_stage.harmonized_stages", "tshs", "list");
|
|
27
27
|
s.atom("identifiers", "ids", "ids");
|
|
28
|
+
s.atom("relations", "edges", "edges");
|
|
28
29
|
s.type("pubid:bsi:adopted-european-norm", "aen", { core: [] });
|
|
29
30
|
s.type("pubid:bsi:adopted-international-standard", "ais", { core: [] });
|
|
30
|
-
s.type("pubid:bsi:amendment", "amd"
|
|
31
|
-
s.type("pubid:bsi:british-standard", "bs"
|
|
31
|
+
s.type("pubid:bsi:amendment", "amd");
|
|
32
|
+
s.type("pubid:bsi:british-standard", "bs");
|
|
32
33
|
s.type("pubid:bsi:consolidated-identifier", "consol", { core: [] });
|
|
33
|
-
s.type("pubid:bsi:corrigendum", "cor"
|
|
34
|
-
s.type("pubid:bsi:draft-document", "dd"
|
|
35
|
-
s.type("pubid:bsi:published-document", "pd"
|
|
36
|
-
s.type("pubid:bsi:publicly-available-specification", "pas"
|
|
37
|
-
s.type("pubid:bsi:
|
|
34
|
+
s.type("pubid:bsi:corrigendum", "cor");
|
|
35
|
+
s.type("pubid:bsi:draft-document", "dd");
|
|
36
|
+
s.type("pubid:bsi:published-document", "pd");
|
|
37
|
+
s.type("pubid:bsi:publicly-available-specification", "pas");
|
|
38
|
+
s.type("pubid:bsi:standalone-amendment", "sa");
|
|
39
|
+
s.type("pubid:bsi:technical-specification", "ts");
|
|
38
40
|
});
|
|
@@ -15,6 +15,7 @@ export const cenPfsSchema = define("cen_pfs", (s) => {
|
|
|
15
15
|
s.atom("stage", "stage");
|
|
16
16
|
s.atom("adopted", "adopted", "id");
|
|
17
17
|
s.atom("identifiers", "ids", "ids");
|
|
18
|
+
s.atom("relations", "edges", "edges");
|
|
18
19
|
s.type("pubid:cencenelec:adopted-european-norm", "aen", { core: [] });
|
|
19
20
|
s.type("pubid:cencenelec:amendment", "amd", { core: [] });
|
|
20
21
|
s.type("pubid:cencenelec:cen-report", "cr", { core: [] });
|
|
@@ -19,6 +19,7 @@ export const cencenelecSchema = define("cencenelec", (s) => {
|
|
|
19
19
|
s.atom("stage", "stage");
|
|
20
20
|
s.atom("adopted", "adopted", "id");
|
|
21
21
|
s.atom("identifiers", "ids", "ids");
|
|
22
|
+
s.atom("relations", "edges", "edges");
|
|
22
23
|
s.type("pubid:cencenelec:adopted-european-norm", "aen", { core: [] });
|
|
23
24
|
s.type("pubid:cencenelec:amendment", "amd");
|
|
24
25
|
s.type("pubid:cencenelec:base", "base");
|
|
@@ -31,6 +31,7 @@ export const iecSchema = define("iec", (s) => {
|
|
|
31
31
|
s.atom("cispr_identifier", "cispr", "id");
|
|
32
32
|
s.atom("languages.*.code", "lang");
|
|
33
33
|
s.atom("identifiers", "ids", "ids");
|
|
34
|
+
s.atom("relations", "edges", "edges");
|
|
34
35
|
s.facet("languages.*.original_code", "langsrc");
|
|
35
36
|
s.type("pubid:iec:all-parts", "all");
|
|
36
37
|
s.type("pubid:iec:amendment", "amd");
|
|
@@ -66,6 +66,7 @@ export const ieeeSchema = define("ieee", (s) => {
|
|
|
66
66
|
s.atom("note", "note");
|
|
67
67
|
s.atom("parenthetical_content", "paren");
|
|
68
68
|
s.atom("relationships.*.relationship_type", "rel");
|
|
69
|
+
s.atom("relations", "edges", "edges");
|
|
69
70
|
s.atom("ieee_identifier", "ieeeid", "id");
|
|
70
71
|
s.atom("iec_identifier", "iecid", "id");
|
|
71
72
|
s.atom("first_identifier", "first", "id");
|
|
@@ -21,6 +21,7 @@ export const isoSchema = define("iso", (s) => {
|
|
|
21
21
|
s.atom("supplement_version", "v");
|
|
22
22
|
s.atom("languages.*.code", "lang");
|
|
23
23
|
s.atom("locality.value", "loc");
|
|
24
|
+
s.atom("relations", "edges", "edges");
|
|
24
25
|
s.facet("languages.*.original_code", "langsrc");
|
|
25
26
|
s.facet("edition.original_text", "edsrc");
|
|
26
27
|
s.type("pubid:iso:international-standard", "is");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubid/pubid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.72",
|
|
4
4
|
"description": "TypeScript PubID identifiers: resolution, normalization and canonical hashes for every identifier in the pubid-testsuite corpus (41 standards bodies), with a conformance runner mirroring the Ruby reference",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/vendor/parg/bsi_pfs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.1.0","grammar":"PubidBsiPfs","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":7}},{"Str":{"pattern":"BS"}},{"Str":{"pattern":"PAS"}},{"Str":{"pattern":"PD"}},{"Str":{"pattern":"DD"}},{"Str":{"pattern":"TS"}},{"Alternative":{"atoms":[1,2,3,4,5]}},{"Named":{"name":"publisher","atom":6}},{"Str":{"pattern":" "}},{"Entity":{"atom":66}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"CEN"}},{"Str":{"pattern":"CLC"}},{"Str":{"pattern":"HD"}},{"Str":{"pattern":"ENV"}},{"Str":{"pattern":"ES"}},{"Str":{"pattern":"CR"}},{"Str":{"pattern":"CWA"}},{"Str":{"pattern":"ISO"}},{"Str":{"pattern":"IEC"}},{"Alternative":{"atoms":[10,11,12,13,14,15,16,17,18,19]}},{"Entity":{"atom":58}},{"Entity":{"atom":42}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":23}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":25}},{"Alternative":{"atoms":[24,26]}},{"Str":{"pattern":"A"}},{"Named":{"name":"supplement_kind","atom":28}},{"Entity":{"atom":34}},{"Entity":{"atom":32}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":31,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplement_number","atom":33}},{"Str":{"pattern":":"}},{"Entity":{"atom":39}},{"Entity":{"atom":32}},{"Repetition":{"atom":37,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"supplements_year","atom":38}},{"Sequence":{"atoms":[35,36]}},{"Repetition":{"atom":40,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[27,29,30,41]}},{"Entity":{"atom":56}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":44}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":46}},{"Alternative":{"atoms":[45,47]}},{"Str":{"pattern":"C"}},{"Named":{"name":"supplement_kind","atom":49}},{"Entity":{"atom":34}},{"Str":{"pattern":":"}},{"Entity":{"atom":39}},{"Sequence":{"atoms":[52,53]}},{"Repetition":{"atom":54,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[48,50,51,55]}},{"Alternative":{"atoms":[22,43]}},{"Named":{"name":"supplement","atom":57}},{"Lookahead":{"atom":21,"positive":false}},{"Re":{"pattern":"[\\x01-\\x09]"}},{"Re":{"pattern":"[\\x0b-\\u{10ffff}]"}},{"Alternative":{"atoms":[60,61]}},{"Sequence":{"atoms":[59,62]}},{"Repetition":{"atom":63,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[20,64]}},{"Named":{"name":"adopted","atom":65}},{"Sequence":{"atoms":[0,8,9]}},{"Entity":{"atom":7}},{"Str":{"pattern":" "}},{"Entity":{"atom":76}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":71,"min":1,"max":null,"tag":"Repetition"}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Repetition":{"atom":73,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[72,74]}},{"Named":{"name":"number","atom":75}},{"Str":{"pattern":"-"}},{"Entity":{"atom":96}},{"Entity":{"atom":32}},{"Entity":{"atom":83}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[81,82]}},{"Alternative":{"atoms":[79,80]}},{"Repetition":{"atom":84,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[86,87]}},{"Entity":{"atom":32}},{"Entity":{"atom":83}},{"Alternative":{"atoms":[89,90]}},{"Repetition":{"atom":91,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[88,92]}},{"Repetition":{"atom":93,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[85,94]}},{"Named":{"name":"part","atom":95}},{"Sequence":{"atoms":[77,78]}},{"Repetition":{"atom":97,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":103}},{"Entity":{"atom":32}},{"Repetition":{"atom":101,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":102}},{"Sequence":{"atoms":[99,100]}},{"Repetition":{"atom":104,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[68,69,70,98,105]}},{"Alternative":{"atoms":[67,106]}},{"Entity":{"atom":111}},{"Entity":{"atom":58}},{"Repetition":{"atom":109,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplements","atom":110}},{"Repetition":{"atom":108,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[107,112]}}],"root":113},"bindings":[{"capture":"publisher","path":"publisher","type":"string","card":null,"preprocess":null},{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"part","path":"part","type":"string","card":null,"preprocess":null},{"capture":"year","path":"year","type":"string","card":null,"preprocess":null},{"capture":"adopted","path":"adopted","type":"string","card":null,"preprocess":null},{"capture":"supplement","path":"supplements[].supplement","type":"raw","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":[]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"BS 10005:1995","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 1016-107.2:1991","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 1344-A1:1960","expect":{}},{"entry":"identifier","kind":"accept","input":"PD 5730","expect":{}},{"entry":"identifier","kind":"accept","input":"PAS 003:1994","expect":{}},{"entry":"identifier","kind":"accept","input":"DD 136-2:1986","expect":{}},{"entry":"identifier","kind":"accept","input":"TS 1:1995","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN 1073-2:2002","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN ISO 105-B06:2020","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN IEC 61851-1:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"BS ISO 8601:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"BS IEC 60747-8:2000","expect":{}},{"entry":"identifier","kind":"accept","input":"BS HD 60269-3","expect":{}},{"entry":"identifier","kind":"accept","input":"DD CEN ISO/TS 12180-1:2007","expect":{}},{"entry":"identifier","kind":"accept","input":"DD CLC/TS 50131-2-2:2004","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN IEC 60601-1/FRAG1","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN IEC 61535/AMD1/FRAG1","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 10125:2014+A1:2016","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN 1005-1:2001+A1:2008","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 646:1958+A2:2013","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}},{"entry":"identifier","kind":"reject","input":"BS","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 1325","expect":{}},{"entry":"identifier","kind":"reject","input":"ISO 9001:2015","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 2X 26:2001","expect":{}},{"entry":"identifier","kind":"reject","input":"DISC PD 0005:1995","expect":{}},{"entry":"identifier","kind":"reject","input":"BS A 103:2025","expect":{}},{"entry":"identifier","kind":"reject","input":"BSI Flex 1886 v2.0:2024-09","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 7671 AMD2","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1000[9]:1971","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1580:Parts 1 and 2:1962","expect":{}},{"entry":"identifier","kind":"reject","input":"BS CISPR 12:1997","expect":{}},{"entry":"identifier","kind":"reject","input":"14/30300822 DC","expect":{}},{"entry":"identifier","kind":"reject","input":"NA to BS EN 1996-1-2:2005","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 7722:2006 BOOK","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 31100:2021 ExComm","expect":{}},{"entry":"identifier","kind":"reject","input":"AMD 11015","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1425:Supplement No. 1:1966","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 185 Index:1962","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 2782-10:Method 1006:1978","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1902-2.3:Addendum No. 1:1976","expect":{}},{"entry":"identifier","kind":"example","input":"BS 10005:1995","expect":{"publisher":"BS","number":"10005","year":"1995"}},{"entry":"identifier","kind":"example","input":"BS 1016-107.2:1991","expect":{"publisher":"BS","number":"1016","part":"107.2","year":"1991"}},{"entry":"identifier","kind":"example","input":"BS 1344-A1:1960","expect":{"publisher":"BS","number":"1344","part":"A1","year":"1960"}},{"entry":"identifier","kind":"example","input":"PD 5730","expect":{"publisher":"PD","number":"5730"}},{"entry":"identifier","kind":"example","input":"PAS 003:1994","expect":{"publisher":"PAS","number":"003","year":"1994"}},{"entry":"identifier","kind":"example","input":"DD 136-2:1986","expect":{"publisher":"DD","number":"136","part":"2","year":"1986"}},{"entry":"identifier","kind":"example","input":"TS 1:1995","expect":{"publisher":"TS","number":"1","year":"1995"}},{"entry":"identifier","kind":"example","input":"BS EN 1073-2:2002","expect":{"publisher":"BS","adopted":"EN 1073-2:2002"}},{"entry":"identifier","kind":"example","input":"BS EN ISO 105-B06:2020","expect":{"publisher":"BS","adopted":"EN ISO 105-B06:2020"}},{"entry":"identifier","kind":"example","input":"BS EN IEC 61851-1:2019","expect":{"publisher":"BS","adopted":"EN IEC 61851-1:2019"}},{"entry":"identifier","kind":"example","input":"BS ISO 8601:2019","expect":{"publisher":"BS","adopted":"ISO 8601:2019"}},{"entry":"identifier","kind":"example","input":"BS IEC 60747-8:2000","expect":{"publisher":"BS","adopted":"IEC 60747-8:2000"}},{"entry":"identifier","kind":"example","input":"BS HD 60269-3","expect":{"publisher":"BS","adopted":"HD 60269-3"}},{"entry":"identifier","kind":"example","input":"DD CEN ISO/TS 12180-1:2007","expect":{"publisher":"DD","adopted":"CEN ISO/TS 12180-1:2007"}},{"entry":"identifier","kind":"example","input":"DD CLC/TS 50131-2-2:2004","expect":{"publisher":"DD","adopted":"CLC/TS 50131-2-2:2004"}},{"entry":"identifier","kind":"example","input":"BS EN IEC 60601-1/FRAG1","expect":{"publisher":"BS","adopted":"EN IEC 60601-1/FRAG1"}},{"entry":"identifier","kind":"example","input":"BS EN IEC 61535/AMD1/FRAG1","expect":{"publisher":"BS","adopted":"EN IEC 61535/AMD1/FRAG1"}},{"entry":"identifier","kind":"example","input":"BS 10125:2014+A1:2016","expect":{"publisher":"BS","number":"10125","year":"2014"}},{"entry":"identifier","kind":"example","input":"BS EN 1005-1:2001+A1:2008","expect":{"publisher":"BS","adopted":"EN 1005-1:2001"}},{"entry":"identifier","kind":"example","input":"BS 646:1958+A2:2013","expect":{"publisher":"BS","number":"646","year":"1958"}}],"docs":{},"source":"# PFS-generated grammar — DO NOT EDIT BY HAND.\n# Source: definitions/bsi.pfs (pfs:1) sha256:e16c91365a12ffa75c8645ce69774e04f808d85d531b1c2c3c0f75f614197cf8\n# Compiler: pubid/grammar/pfs 0.1.0\n# Flavor key: bsi_pfs (grammar PubidBsiPfs)\n# Regenerate: ruby scripts/pfs compile definitions/bsi.pfs --as bsi_pfs\n# Module: iso.inner v1 (sha256:7a088d2a7814...)\n# Module: iec.inner v1 (sha256:b9002f5d106b...)\n# Module: en.overlay v1 (sha256:b92ac2b27544...)\n# Module: national.prefix v1 (sha256:c7aa2f2442e8...)\n# Module: supplements.core v1 (sha256:9fa9656375c7...)\n\ngrammar PubidBsiPfs version \"0.1.0\" edition 2 {\n\n # Grammar fragments: named lexical terms declared under `grammar:`.\n iso_space = \" \"\n iso_colon = \":\"\n iso_dash = \"-\"\n iso_year = 4*digit\n iso_part = 1*digit [\"-\" 1*digit]\n iso_number = 1*(\"0\" %x31-39) as iso_zero_lead *digit [iso_dash iso_part]\n iso_document = \"ISO\" iso_space iso_number [iso_colon iso_year]\n iec_space = \" \"\n iec_colon = \":\"\n iec_dash = \"-\"\n iec_year = 4*digit\n iec_part = 1*digit\n iec_number = ((\"6\" 4*digit / 5*digit / 1*digit)) as iec_number_core [iec_dash iec_part]\n iec_document = \"IEC\" iec_space iec_number [iec_colon iec_year]\n en_space = \" \"\n en_draft = (\"pr\" / \"Fpr\") as en_draft_kind\n en_face = [en_draft] \"EN\"\n en_adoption = en_face en_space iso_document\n supplement_number = 1*digit\n supplement_year = 4*digit\n supplement_month = 2*digit\n digit = %x30-39\n alpha = %x41-5A / %x61-7A\n\n # Fields: one capture rule per declared field; the whole pattern\n # is the capture.\n bsi_publisher = ((\"BS\" / \"PAS\" / \"PD\" / \"DD\" / \"TS\")) as publisher\n bsi_number = (1*(%x30-39) [%x41-5A]) as number\n bsi_part = (1*(digit / alpha) *((\".\" / \"-\") 1*(digit / alpha))) as part\n bsi_year = (4digit) as year\n bsi_adopted = (( ( \"EN\" / \"CEN\" / \"CLC\" / \"HD\" / \"ENV\" / \"ES\" / \"CR\" / \"CWA\" / \"ISO\" / \"IEC\" ) ( *( !(bsi_supplement) ( %x01-09 / %x0B-10FFFF ) ) ) )) as adopted\n\n # Supplement run (compiled from the supplements declaration):\n # each item binds its separator, kind face, ordinal and date\n # columns; the builder folds the run into the declared wrapper\n # classes (the slash run standalone, the plus run consolidated).\n bsi_supplement_number = (1*digit) as supplement_number\n bsi_supplements_year = (4digit) as supplements_year\n bsi_supplement_amendment = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"A\" as supplement_kind bsi_supplement_number [\":\" bsi_supplements_year]\n }\n bsi_supplement_corrigendum = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"C\" as supplement_kind bsi_supplement_number [\":\" bsi_supplements_year]\n }\n bsi_supplement = ( bsi_supplement_amendment / bsi_supplement_corrigendum ) as supplement\n bsi_supplements = (1*bsi_supplement) as supplements\n\n # Identifier rule: the canonical template first, then the\n # declared alternates (parse-in spellings; they normalize to the\n # canonical render face).\n identifier = ( bsi_publisher \" \" bsi_adopted / bsi_publisher \" \" bsi_number [\"-\" bsi_part] [\":\" bsi_year] ) [bsi_supplements]\n entry identifier: identifier\n\n # Typed model bindings: every bound capture lands on the\n # consumer model's field of the same name.\n bindings identifier {\n publisher -> publisher (string)\n number -> number (string)\n part -> part (string)\n year -> year (string)\n adopted -> adopted (string)\n supplement -> supplements[].supplement (raw)\n }\n\n # REQUIRED examples from the definition — accepts, rejects, and\n # the capture expectations the compiler replayed at compile time.\n test {\n accept \"BS 10005:1995\"\n accept \"BS 1016-107.2:1991\"\n accept \"BS 1344-A1:1960\"\n accept \"PD 5730\"\n accept \"PAS 003:1994\"\n accept \"DD 136-2:1986\"\n accept \"TS 1:1995\"\n accept \"BS EN 1073-2:2002\"\n accept \"BS EN ISO 105-B06:2020\"\n accept \"BS EN IEC 61851-1:2019\"\n accept \"BS ISO 8601:2019\"\n accept \"BS IEC 60747-8:2000\"\n accept \"BS HD 60269-3\"\n accept \"DD CEN ISO/TS 12180-1:2007\"\n accept \"DD CLC/TS 50131-2-2:2004\"\n accept \"BS EN IEC 60601-1/FRAG1\"\n accept \"BS EN IEC 61535/AMD1/FRAG1\"\n accept \"BS 10125:2014+A1:2016\"\n accept \"BS EN 1005-1:2001+A1:2008\"\n accept \"BS 646:1958+A2:2013\"\n reject \"nonsense\"\n reject \"BS\"\n reject \"EN 1325\"\n reject \"ISO 9001:2015\"\n reject \"BS 2X 26:2001\"\n reject \"DISC PD 0005:1995\"\n reject \"BS A 103:2025\"\n reject \"BSI Flex 1886 v2.0:2024-09\"\n reject \"BS 7671 AMD2\"\n reject \"BS 1000[9]:1971\"\n reject \"BS 1580:Parts 1 and 2:1962\"\n reject \"BS CISPR 12:1997\"\n reject \"14/30300822 DC\"\n reject \"NA to BS EN 1996-1-2:2005\"\n reject \"BS 7722:2006 BOOK\"\n reject \"BS 31100:2021 ExComm\"\n reject \"AMD 11015\"\n reject \"BS 1425:Supplement No. 1:1966\"\n reject \"BS 185 Index:1962\"\n reject \"BS 2782-10:Method 1006:1978\"\n reject \"BS 1902-2.3:Addendum No. 1:1976\"\n example \"BS 10005:1995\" { publisher: \"BS\" number: \"10005\" year: \"1995\" }\n example \"BS 1016-107.2:1991\" { publisher: \"BS\" number: \"1016\" part: \"107.2\" year: \"1991\" }\n example \"BS 1344-A1:1960\" { publisher: \"BS\" number: \"1344\" part: \"A1\" year: \"1960\" }\n example \"PD 5730\" { publisher: \"PD\" number: \"5730\" }\n example \"PAS 003:1994\" { publisher: \"PAS\" number: \"003\" year: \"1994\" }\n example \"DD 136-2:1986\" { publisher: \"DD\" number: \"136\" part: \"2\" year: \"1986\" }\n example \"TS 1:1995\" { publisher: \"TS\" number: \"1\" year: \"1995\" }\n example \"BS EN 1073-2:2002\" { publisher: \"BS\" adopted: \"EN 1073-2:2002\" }\n example \"BS EN ISO 105-B06:2020\" { publisher: \"BS\" adopted: \"EN ISO 105-B06:2020\" }\n example \"BS EN IEC 61851-1:2019\" { publisher: \"BS\" adopted: \"EN IEC 61851-1:2019\" }\n example \"BS ISO 8601:2019\" { publisher: \"BS\" adopted: \"ISO 8601:2019\" }\n example \"BS IEC 60747-8:2000\" { publisher: \"BS\" adopted: \"IEC 60747-8:2000\" }\n example \"BS HD 60269-3\" { publisher: \"BS\" adopted: \"HD 60269-3\" }\n example \"DD CEN ISO/TS 12180-1:2007\" { publisher: \"DD\" adopted: \"CEN ISO/TS 12180-1:2007\" }\n example \"DD CLC/TS 50131-2-2:2004\" { publisher: \"DD\" adopted: \"CLC/TS 50131-2-2:2004\" }\n example \"BS EN IEC 60601-1/FRAG1\" { publisher: \"BS\" adopted: \"EN IEC 60601-1/FRAG1\" }\n example \"BS EN IEC 61535/AMD1/FRAG1\" { publisher: \"BS\" adopted: \"EN IEC 61535/AMD1/FRAG1\" }\n example \"BS 10125:2014+A1:2016\" { publisher: \"BS\" number: \"10125\" year: \"2014\" }\n example \"BS EN 1005-1:2001+A1:2008\" { publisher: \"BS\" adopted: \"EN 1005-1:2001\" }\n example \"BS 646:1958+A2:2013\" { publisher: \"BS\" number: \"646\" year: \"1958\" }\n }\n}\n","source_hash":"83631d43804920c9ef782eee3731a411bd60bc8dd63a4e5248be6f9a87fb01cd","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:f327b757c2ee8eede07056ba3f564caa81ea3332f9913285c86ca22001c46d06","checksum":"sha256:71f1a18a597a6601bf1b454514dcda1cfa40a2cb63506976d03082730bf559ae","validated":{"lint_errors":0,"lint_warnings":0,"tests_total":61,"tests_failures":0,"self_test":true}}
|
|
1
|
+
{"bindings":null,"version":"2.0.0","grammar":"PubidBsiPfs","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":8}},{"Str":{"pattern":"BS"}},{"Str":{"pattern":"PAS"}},{"Str":{"pattern":"PD"}},{"Str":{"pattern":"DD"}},{"Str":{"pattern":"TS"}},{"Str":{"pattern":"AMD"}},{"Alternative":{"atoms":[1,2,3,4,5,6]}},{"Named":{"name":"publisher","atom":7}},{"Str":{"pattern":" "}},{"Entity":{"atom":67}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"CEN"}},{"Str":{"pattern":"CLC"}},{"Str":{"pattern":"HD"}},{"Str":{"pattern":"ENV"}},{"Str":{"pattern":"ES"}},{"Str":{"pattern":"CR"}},{"Str":{"pattern":"CWA"}},{"Str":{"pattern":"ISO"}},{"Str":{"pattern":"IEC"}},{"Alternative":{"atoms":[11,12,13,14,15,16,17,18,19,20]}},{"Entity":{"atom":59}},{"Entity":{"atom":43}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":24}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":26}},{"Alternative":{"atoms":[25,27]}},{"Str":{"pattern":"A"}},{"Named":{"name":"supplement_kind","atom":29}},{"Entity":{"atom":35}},{"Entity":{"atom":33}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":32,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplement_number","atom":34}},{"Str":{"pattern":":"}},{"Entity":{"atom":40}},{"Entity":{"atom":33}},{"Repetition":{"atom":38,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"supplements_year","atom":39}},{"Sequence":{"atoms":[36,37]}},{"Repetition":{"atom":41,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[28,30,31,42]}},{"Entity":{"atom":57}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":45}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":47}},{"Alternative":{"atoms":[46,48]}},{"Str":{"pattern":"C"}},{"Named":{"name":"supplement_kind","atom":50}},{"Entity":{"atom":35}},{"Str":{"pattern":":"}},{"Entity":{"atom":40}},{"Sequence":{"atoms":[53,54]}},{"Repetition":{"atom":55,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[49,51,52,56]}},{"Alternative":{"atoms":[23,44]}},{"Named":{"name":"supplement","atom":58}},{"Lookahead":{"atom":22,"positive":false}},{"Re":{"pattern":"[\\x01-\\x09]"}},{"Re":{"pattern":"[\\x0b-\\u{10ffff}]"}},{"Alternative":{"atoms":[61,62]}},{"Sequence":{"atoms":[60,63]}},{"Repetition":{"atom":64,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[21,65]}},{"Named":{"name":"adopted","atom":66}},{"Sequence":{"atoms":[0,9,10]}},{"Entity":{"atom":8}},{"Str":{"pattern":" "}},{"Entity":{"atom":77}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":72,"min":1,"max":null,"tag":"Repetition"}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Repetition":{"atom":74,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[73,75]}},{"Named":{"name":"number","atom":76}},{"Str":{"pattern":"-"}},{"Entity":{"atom":97}},{"Entity":{"atom":33}},{"Entity":{"atom":84}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[82,83]}},{"Alternative":{"atoms":[80,81]}},{"Repetition":{"atom":85,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[87,88]}},{"Entity":{"atom":33}},{"Entity":{"atom":84}},{"Alternative":{"atoms":[90,91]}},{"Repetition":{"atom":92,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[89,93]}},{"Repetition":{"atom":94,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[86,95]}},{"Named":{"name":"part","atom":96}},{"Sequence":{"atoms":[78,79]}},{"Repetition":{"atom":98,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":104}},{"Entity":{"atom":33}},{"Repetition":{"atom":102,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":103}},{"Sequence":{"atoms":[100,101]}},{"Repetition":{"atom":105,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[69,70,71,99,106]}},{"Alternative":{"atoms":[68,107]}},{"Entity":{"atom":112}},{"Entity":{"atom":59}},{"Repetition":{"atom":110,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplements","atom":111}},{"Repetition":{"atom":109,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[108,113]}}],"root":114},"bindings":[{"capture":"publisher","path":"publisher","type":"string","card":null,"preprocess":null},{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"part","path":"part","type":"string","card":null,"preprocess":null},{"capture":"year","path":"year","type":"string","card":null,"preprocess":null},{"capture":"adopted","path":"adopted","type":"string","card":null,"preprocess":null},{"capture":"supplement","path":"supplements[].supplement","type":"raw","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":[]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"BS 10005:1995","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 1016-107.2:1991","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 1344-A1:1960","expect":{}},{"entry":"identifier","kind":"accept","input":"PD 5730","expect":{}},{"entry":"identifier","kind":"accept","input":"PAS 003:1994","expect":{}},{"entry":"identifier","kind":"accept","input":"DD 136-2:1986","expect":{}},{"entry":"identifier","kind":"accept","input":"TS 1:1995","expect":{}},{"entry":"identifier","kind":"accept","input":"AMD 11015","expect":{}},{"entry":"identifier","kind":"accept","input":"AMD 6262","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN 1073-2:2002","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN ISO 105-B06:2020","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN IEC 61851-1:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"BS ISO 8601:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"BS IEC 60747-8:2000","expect":{}},{"entry":"identifier","kind":"accept","input":"BS HD 60269-3","expect":{}},{"entry":"identifier","kind":"accept","input":"DD CEN ISO/TS 12180-1:2007","expect":{}},{"entry":"identifier","kind":"accept","input":"DD CLC/TS 50131-2-2:2004","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN IEC 60601-1/FRAG1","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN IEC 61535/AMD1/FRAG1","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 10125:2014+A1:2016","expect":{}},{"entry":"identifier","kind":"accept","input":"BS EN 1005-1:2001+A1:2008","expect":{}},{"entry":"identifier","kind":"accept","input":"BS 646:1958+A2:2013","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}},{"entry":"identifier","kind":"reject","input":"BS","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 1325","expect":{}},{"entry":"identifier","kind":"reject","input":"ISO 9001:2015","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 2X 26:2001","expect":{}},{"entry":"identifier","kind":"reject","input":"DISC PD 0005:1995","expect":{}},{"entry":"identifier","kind":"reject","input":"BS A 103:2025","expect":{}},{"entry":"identifier","kind":"reject","input":"BSI Flex 1886 v2.0:2024-09","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 7671 AMD2","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1000[9]:1971","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1580:Parts 1 and 2:1962","expect":{}},{"entry":"identifier","kind":"reject","input":"BS CISPR 12:1997","expect":{}},{"entry":"identifier","kind":"reject","input":"14/30300822 DC","expect":{}},{"entry":"identifier","kind":"reject","input":"NA to BS EN 1996-1-2:2005","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 7722:2006 BOOK","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 31100:2021 ExComm","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1425:Supplement No. 1:1966","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 185 Index:1962","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 2782-10:Method 1006:1978","expect":{}},{"entry":"identifier","kind":"reject","input":"BS 1902-2.3:Addendum No. 1:1976","expect":{}},{"entry":"identifier","kind":"example","input":"BS 10005:1995","expect":{"publisher":"BS","number":"10005","year":"1995"}},{"entry":"identifier","kind":"example","input":"BS 1016-107.2:1991","expect":{"publisher":"BS","number":"1016","part":"107.2","year":"1991"}},{"entry":"identifier","kind":"example","input":"BS 1344-A1:1960","expect":{"publisher":"BS","number":"1344","part":"A1","year":"1960"}},{"entry":"identifier","kind":"example","input":"PD 5730","expect":{"publisher":"PD","number":"5730"}},{"entry":"identifier","kind":"example","input":"PAS 003:1994","expect":{"publisher":"PAS","number":"003","year":"1994"}},{"entry":"identifier","kind":"example","input":"DD 136-2:1986","expect":{"publisher":"DD","number":"136","part":"2","year":"1986"}},{"entry":"identifier","kind":"example","input":"TS 1:1995","expect":{"publisher":"TS","number":"1","year":"1995"}},{"entry":"identifier","kind":"example","input":"AMD 11015","expect":{"publisher":"AMD","number":"11015"}},{"entry":"identifier","kind":"example","input":"AMD 6262","expect":{"publisher":"AMD","number":"6262"}},{"entry":"identifier","kind":"example","input":"BS EN 1073-2:2002","expect":{"publisher":"BS","adopted":"EN 1073-2:2002"}},{"entry":"identifier","kind":"example","input":"BS EN ISO 105-B06:2020","expect":{"publisher":"BS","adopted":"EN ISO 105-B06:2020"}},{"entry":"identifier","kind":"example","input":"BS EN IEC 61851-1:2019","expect":{"publisher":"BS","adopted":"EN IEC 61851-1:2019"}},{"entry":"identifier","kind":"example","input":"BS ISO 8601:2019","expect":{"publisher":"BS","adopted":"ISO 8601:2019"}},{"entry":"identifier","kind":"example","input":"BS IEC 60747-8:2000","expect":{"publisher":"BS","adopted":"IEC 60747-8:2000"}},{"entry":"identifier","kind":"example","input":"BS HD 60269-3","expect":{"publisher":"BS","adopted":"HD 60269-3"}},{"entry":"identifier","kind":"example","input":"DD CEN ISO/TS 12180-1:2007","expect":{"publisher":"DD","adopted":"CEN ISO/TS 12180-1:2007"}},{"entry":"identifier","kind":"example","input":"DD CLC/TS 50131-2-2:2004","expect":{"publisher":"DD","adopted":"CLC/TS 50131-2-2:2004"}},{"entry":"identifier","kind":"example","input":"BS EN IEC 60601-1/FRAG1","expect":{"publisher":"BS","adopted":"EN IEC 60601-1/FRAG1"}},{"entry":"identifier","kind":"example","input":"BS EN IEC 61535/AMD1/FRAG1","expect":{"publisher":"BS","adopted":"EN IEC 61535/AMD1/FRAG1"}},{"entry":"identifier","kind":"example","input":"BS 10125:2014+A1:2016","expect":{"publisher":"BS","number":"10125","year":"2014"}},{"entry":"identifier","kind":"example","input":"BS EN 1005-1:2001+A1:2008","expect":{"publisher":"BS","adopted":"EN 1005-1:2001"}},{"entry":"identifier","kind":"example","input":"BS 646:1958+A2:2013","expect":{"publisher":"BS","number":"646","year":"1958"}}],"docs":{},"source":"# PFS-generated grammar — DO NOT EDIT BY HAND.\n# Source: definitions/bsi.pfs (pfs:1) sha256:e8126cde50a41d8f0e6d8f3ec7e6d2717880637ee2cbce0fdae0ca6b0ee90a8e\n# Compiler: pubid/grammar/pfs 2.0.0\n# Flavor key: bsi_pfs (grammar PubidBsiPfs)\n# Regenerate: ruby scripts/pfs compile definitions/bsi.pfs --as bsi_pfs\n# Module: iso.inner v1 (sha256:7a088d2a7814...)\n# Module: iec.inner v1 (sha256:b9002f5d106b...)\n# Module: en.overlay v1 (sha256:b92ac2b27544...)\n# Module: national.prefix v1 (sha256:c7aa2f2442e8...)\n# Module: supplements.core v1 (sha256:9fa9656375c7...)\n\ngrammar PubidBsiPfs version \"2.0.0\" edition 2 {\n\n # Grammar fragments: named lexical terms declared under `grammar:`.\n iso_space = \" \"\n iso_colon = \":\"\n iso_dash = \"-\"\n iso_year = 4*digit\n iso_part = 1*digit [\"-\" 1*digit]\n iso_number = 1*(\"0\" %x31-39) as iso_zero_lead *digit [iso_dash iso_part]\n iso_document = \"ISO\" iso_space iso_number [iso_colon iso_year]\n iec_space = \" \"\n iec_colon = \":\"\n iec_dash = \"-\"\n iec_year = 4*digit\n iec_part = 1*digit\n iec_number = ((\"6\" 4*digit / 5*digit / 1*digit)) as iec_number_core [iec_dash iec_part]\n iec_document = \"IEC\" iec_space iec_number [iec_colon iec_year]\n en_space = \" \"\n en_draft = (\"pr\" / \"Fpr\") as en_draft_kind\n en_face = [en_draft] \"EN\"\n en_adoption = en_face en_space iso_document\n supplement_number = 1*digit\n supplement_year = 4*digit\n supplement_month = 2*digit\n digit = %x30-39\n alpha = %x41-5A / %x61-7A\n\n # Fields: one capture rule per declared field; the whole pattern\n # is the capture.\n bsi_publisher = ((\"BS\" / \"PAS\" / \"PD\" / \"DD\" / \"TS\" / \"AMD\")) as publisher\n bsi_number = (1*(%x30-39) [%x41-5A]) as number\n bsi_part = (1*(digit / alpha) *((\".\" / \"-\") 1*(digit / alpha))) as part\n bsi_year = (4digit) as year\n bsi_adopted = (( ( \"EN\" / \"CEN\" / \"CLC\" / \"HD\" / \"ENV\" / \"ES\" / \"CR\" / \"CWA\" / \"ISO\" / \"IEC\" ) ( *( !(bsi_supplement) ( %x01-09 / %x0B-10FFFF ) ) ) )) as adopted\n\n # Supplement run (compiled from the supplements declaration):\n # each item binds its separator, kind face, ordinal and date\n # columns; the builder folds the run into the declared wrapper\n # classes (the slash run standalone, the plus run consolidated).\n bsi_supplement_number = (1*digit) as supplement_number\n bsi_supplements_year = (4digit) as supplements_year\n bsi_supplement_amendment = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"A\" as supplement_kind bsi_supplement_number [\":\" bsi_supplements_year]\n }\n bsi_supplement_corrigendum = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"C\" as supplement_kind bsi_supplement_number [\":\" bsi_supplements_year]\n }\n bsi_supplement = ( bsi_supplement_amendment / bsi_supplement_corrigendum ) as supplement\n bsi_supplements = (1*bsi_supplement) as supplements\n\n # Identifier rule: the canonical template first, then the\n # declared alternates (parse-in spellings; they normalize to the\n # canonical render face).\n identifier = ( bsi_publisher \" \" bsi_adopted / bsi_publisher \" \" bsi_number [\"-\" bsi_part] [\":\" bsi_year] ) [bsi_supplements]\n entry identifier: identifier\n\n # Typed model bindings: every bound capture lands on the\n # consumer model's field of the same name.\n bindings identifier {\n publisher -> publisher (string)\n number -> number (string)\n part -> part (string)\n year -> year (string)\n adopted -> adopted (string)\n supplement -> supplements[].supplement (raw)\n }\n\n # REQUIRED examples from the definition — accepts, rejects, and\n # the capture expectations the compiler replayed at compile time.\n test {\n accept \"BS 10005:1995\"\n accept \"BS 1016-107.2:1991\"\n accept \"BS 1344-A1:1960\"\n accept \"PD 5730\"\n accept \"PAS 003:1994\"\n accept \"DD 136-2:1986\"\n accept \"TS 1:1995\"\n accept \"AMD 11015\"\n accept \"AMD 6262\"\n accept \"BS EN 1073-2:2002\"\n accept \"BS EN ISO 105-B06:2020\"\n accept \"BS EN IEC 61851-1:2019\"\n accept \"BS ISO 8601:2019\"\n accept \"BS IEC 60747-8:2000\"\n accept \"BS HD 60269-3\"\n accept \"DD CEN ISO/TS 12180-1:2007\"\n accept \"DD CLC/TS 50131-2-2:2004\"\n accept \"BS EN IEC 60601-1/FRAG1\"\n accept \"BS EN IEC 61535/AMD1/FRAG1\"\n accept \"BS 10125:2014+A1:2016\"\n accept \"BS EN 1005-1:2001+A1:2008\"\n accept \"BS 646:1958+A2:2013\"\n reject \"nonsense\"\n reject \"BS\"\n reject \"EN 1325\"\n reject \"ISO 9001:2015\"\n reject \"BS 2X 26:2001\"\n reject \"DISC PD 0005:1995\"\n reject \"BS A 103:2025\"\n reject \"BSI Flex 1886 v2.0:2024-09\"\n reject \"BS 7671 AMD2\"\n reject \"BS 1000[9]:1971\"\n reject \"BS 1580:Parts 1 and 2:1962\"\n reject \"BS CISPR 12:1997\"\n reject \"14/30300822 DC\"\n reject \"NA to BS EN 1996-1-2:2005\"\n reject \"BS 7722:2006 BOOK\"\n reject \"BS 31100:2021 ExComm\"\n reject \"BS 1425:Supplement No. 1:1966\"\n reject \"BS 185 Index:1962\"\n reject \"BS 2782-10:Method 1006:1978\"\n reject \"BS 1902-2.3:Addendum No. 1:1976\"\n example \"BS 10005:1995\" { publisher: \"BS\" number: \"10005\" year: \"1995\" }\n example \"BS 1016-107.2:1991\" { publisher: \"BS\" number: \"1016\" part: \"107.2\" year: \"1991\" }\n example \"BS 1344-A1:1960\" { publisher: \"BS\" number: \"1344\" part: \"A1\" year: \"1960\" }\n example \"PD 5730\" { publisher: \"PD\" number: \"5730\" }\n example \"PAS 003:1994\" { publisher: \"PAS\" number: \"003\" year: \"1994\" }\n example \"DD 136-2:1986\" { publisher: \"DD\" number: \"136\" part: \"2\" year: \"1986\" }\n example \"TS 1:1995\" { publisher: \"TS\" number: \"1\" year: \"1995\" }\n example \"AMD 11015\" { publisher: \"AMD\" number: \"11015\" }\n example \"AMD 6262\" { publisher: \"AMD\" number: \"6262\" }\n example \"BS EN 1073-2:2002\" { publisher: \"BS\" adopted: \"EN 1073-2:2002\" }\n example \"BS EN ISO 105-B06:2020\" { publisher: \"BS\" adopted: \"EN ISO 105-B06:2020\" }\n example \"BS EN IEC 61851-1:2019\" { publisher: \"BS\" adopted: \"EN IEC 61851-1:2019\" }\n example \"BS ISO 8601:2019\" { publisher: \"BS\" adopted: \"ISO 8601:2019\" }\n example \"BS IEC 60747-8:2000\" { publisher: \"BS\" adopted: \"IEC 60747-8:2000\" }\n example \"BS HD 60269-3\" { publisher: \"BS\" adopted: \"HD 60269-3\" }\n example \"DD CEN ISO/TS 12180-1:2007\" { publisher: \"DD\" adopted: \"CEN ISO/TS 12180-1:2007\" }\n example \"DD CLC/TS 50131-2-2:2004\" { publisher: \"DD\" adopted: \"CLC/TS 50131-2-2:2004\" }\n example \"BS EN IEC 60601-1/FRAG1\" { publisher: \"BS\" adopted: \"EN IEC 60601-1/FRAG1\" }\n example \"BS EN IEC 61535/AMD1/FRAG1\" { publisher: \"BS\" adopted: \"EN IEC 61535/AMD1/FRAG1\" }\n example \"BS 10125:2014+A1:2016\" { publisher: \"BS\" number: \"10125\" year: \"2014\" }\n example \"BS EN 1005-1:2001+A1:2008\" { publisher: \"BS\" adopted: \"EN 1005-1:2001\" }\n example \"BS 646:1958+A2:2013\" { publisher: \"BS\" number: \"646\" year: \"1958\" }\n }\n}\n","source_hash":"c86037497c6195c28d4f9677141aa67204d6ccbf08f985ac7470c17266d7414d","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:075b12e80dea253863642c9db4df5394dbcf26b06efe5109180b57defb9167fb","checksum":"sha256:c682fb603d44dc04eff72ac27ae952f76c64aca02962fbd125a8759b6136cffb","validated":{"lint_errors":0,"lint_warnings":0,"tests_total":64,"tests_failures":0,"self_test":true}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.
|
|
1
|
+
{"bindings":null,"version":"2.0.0","grammar":"PubidCalconnectPfs","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"CC"}},{"Str":{"pattern":"/"}},{"Entity":{"atom":8}},{"Entity":{"atom":6}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[4,5]}},{"Repetition":{"atom":3,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"series","atom":7}},{"Sequence":{"atoms":[1,2]}},{"Repetition":{"atom":9,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":24}},{"Entity":{"atom":14}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":13,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[16,17]}},{"Entity":{"atom":14}},{"Repetition":{"atom":19,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[18,20]}},{"Repetition":{"atom":21,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[15,22]}},{"Named":{"name":"number","atom":23}},{"Str":{"pattern":":"}},{"Entity":{"atom":29}},{"Entity":{"atom":14}},{"Repetition":{"atom":27,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"year","atom":28}},{"Str":{"pattern":"-"}},{"Entity":{"atom":34}},{"Entity":{"atom":14}},{"Repetition":{"atom":32,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"month","atom":33}},{"Str":{"pattern":"-"}},{"Entity":{"atom":39}},{"Entity":{"atom":14}},{"Repetition":{"atom":37,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"day","atom":38}},{"Sequence":{"atoms":[30,31,35,36]}},{"Repetition":{"atom":40,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[25,26,41]}},{"Repetition":{"atom":42,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,10,11,12,43]}}],"root":44},"bindings":[{"capture":"series","path":"series","type":"string","card":null,"preprocess":null},{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"year","path":"year","type":"string","card":null,"preprocess":null},{"capture":"month","path":"month","type":"string","card":null,"preprocess":null},{"capture":"day","path":"day","type":"string","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":[]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"CC 18011","expect":{}},{"entry":"identifier","kind":"accept","input":"CC 18011:2018","expect":{}},{"entry":"identifier","kind":"accept","input":"CC 11001:2024","expect":{}},{"entry":"identifier","kind":"accept","input":"CC/DIR 10006:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"CC/Adv 0707.1:2007","expect":{}},{"entry":"identifier","kind":"accept","input":"CC/A 0812-1:2008","expect":{}},{"entry":"identifier","kind":"accept","input":"CC/WD 51017:2024-07-23","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}},{"entry":"identifier","kind":"reject","input":"CC","expect":{}},{"entry":"identifier","kind":"reject","input":"CC/WD","expect":{}},{"entry":"identifier","kind":"reject","input":"CC 18011:","expect":{}},{"entry":"identifier","kind":"reject","input":"CC 18011:2024-","expect":{}},{"entry":"identifier","kind":"example","input":"CC 18011","expect":{"number":"18011"}},{"entry":"identifier","kind":"example","input":"CC 18011:2018","expect":{"number":"18011","year":"2018"}},{"entry":"identifier","kind":"example","input":"CC 11001:2024","expect":{"number":"11001","year":"2024"}},{"entry":"identifier","kind":"example","input":"CC/DIR 10006:2019","expect":{"series":"DIR","number":"10006","year":"2019"}},{"entry":"identifier","kind":"example","input":"CC/Adv 0707.1:2007","expect":{"series":"Adv","number":"0707.1","year":"2007"}},{"entry":"identifier","kind":"example","input":"CC/A 0812-1:2008","expect":{"series":"A","number":"0812-1","year":"2008"}},{"entry":"identifier","kind":"example","input":"CC/WD 51017:2024-07-23","expect":{"series":"WD","number":"51017","year":"2024","month":"07","day":"23"}}],"docs":{},"source":"# PFS-generated grammar — DO NOT EDIT BY HAND.\n# Source: definitions/calconnect.pfs (pfs:1) sha256:2e864f0185a1a2f18a392f2f401ad3c9d65d1f32a9ec3f3f04f7dfca9b2226c4\n# Compiler: pubid/grammar/pfs 2.0.0\n# Flavor key: calconnect_pfs (grammar PubidCalconnectPfs)\n# Regenerate: ruby scripts/pfs compile definitions/calconnect.pfs --as calconnect_pfs\n\ngrammar PubidCalconnectPfs version \"2.0.0\" edition 2 {\n\n # Grammar fragments: named lexical terms declared under `grammar:`.\n digit = %x30-39\n letter = %x41-5A / %x61-7A\n space = \" \"\n slash = \"/\"\n colon = \":\"\n dash = \"-\"\n\n # Fields: one capture rule per declared field; the whole pattern\n # is the capture.\n calconnect_series = (1*letter) as series\n calconnect_number = (1*digit [(\".\" / \"-\") 1*digit]) as number\n calconnect_year = (1*digit) as year\n calconnect_month = (1*digit) as month\n calconnect_day = (1*digit) as day\n\n # Identifier rule: the canonical template first, then the\n # declared alternates (parse-in spellings; they normalize to the\n # canonical render face).\n identifier = \"CC\" [\"/\" calconnect_series] \" \" calconnect_number [\":\" calconnect_year [\"-\" calconnect_month \"-\" calconnect_day]]\n entry identifier: identifier\n\n # Typed model bindings: every bound capture lands on the\n # consumer model's field of the same name.\n bindings identifier {\n series -> series (string)\n number -> number (string)\n year -> year (string)\n month -> month (string)\n day -> day (string)\n }\n\n # REQUIRED examples from the definition — accepts, rejects, and\n # the capture expectations the compiler replayed at compile time.\n test {\n accept \"CC 18011\"\n accept \"CC 18011:2018\"\n accept \"CC 11001:2024\"\n accept \"CC/DIR 10006:2019\"\n accept \"CC/Adv 0707.1:2007\"\n accept \"CC/A 0812-1:2008\"\n accept \"CC/WD 51017:2024-07-23\"\n reject \"nonsense\"\n reject \"CC\"\n reject \"CC/WD\"\n reject \"CC 18011:\"\n reject \"CC 18011:2024-\"\n example \"CC 18011\" { number: \"18011\" }\n example \"CC 18011:2018\" { number: \"18011\" year: \"2018\" }\n example \"CC 11001:2024\" { number: \"11001\" year: \"2024\" }\n example \"CC/DIR 10006:2019\" { series: \"DIR\" number: \"10006\" year: \"2019\" }\n example \"CC/Adv 0707.1:2007\" { series: \"Adv\" number: \"0707.1\" year: \"2007\" }\n example \"CC/A 0812-1:2008\" { series: \"A\" number: \"0812-1\" year: \"2008\" }\n example \"CC/WD 51017:2024-07-23\" { series: \"WD\" number: \"51017\" year: \"2024\" month: \"07\" day: \"23\" }\n }\n}\n","source_hash":"dbb47b4baa8c3061141dc8447b225d3223b2c2a31c1d551fa8ee2368234ea837","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:1fced8b2caea5381873789086e546c715efdce361bf7fac13eaa3ea168a3e7ff","checksum":"sha256:4dbb2a09409507e635cc7742f2bc01249226a46ec3fb9a3abd0829ffef6e7eb2","validated":{"lint_errors":0,"lint_warnings":0,"tests_total":19,"tests_failures":0,"self_test":true}}
|