pubid 2.0.56 → 2.0.57
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/data/iec/stage-codes.md +13 -0
- data/data/parg/bsi_pfs.json +1 -1
- data/data/parg/calconnect_pfs.json +1 -1
- data/data/parg/cen_pfs.json +1 -1
- data/data/parg/doi_pfs.json +1 -1
- data/data/parg/etsi_pfs.json +1 -1
- data/lib/pubid/bsi_pfs/builder.rb +16 -2
- data/lib/pubid/bsi_pfs/identifiers/standalone_amendment.rb +31 -0
- data/lib/pubid/bsi_pfs/identifiers.rb +1 -0
- data/lib/pubid/bsi_pfs/pubid_urn_schema.rb +1 -0
- data/lib/pubid/bsi_pfs/renderer.rb +7 -5
- data/lib/pubid/bsi_pfs/urn.adoc +15 -6
- data/lib/pubid/bsi_pfs.rb +2 -2
- data/lib/pubid/calconnect_pfs.rb +1 -1
- data/lib/pubid/cen_pfs/builder.rb +4 -0
- data/lib/pubid/cen_pfs/identifier.rb +12 -8
- data/lib/pubid/cen_pfs/identifiers/adopted_european_norm.rb +4 -6
- data/lib/pubid/cen_pfs/identifiers/european_prestandard.rb +4 -6
- data/lib/pubid/cen_pfs.rb +1 -1
- data/lib/pubid/doi_pfs.rb +1 -1
- data/lib/pubid/etsi_pfs.rb +1 -1
- data/lib/pubid/iala/urn.adoc +1 -0
- data/lib/pubid/iec/CLAUDE.md +4 -0
- data/lib/pubid/iec/identifier.rb +55 -0
- data/lib/pubid/iec/identifiers/consolidated_identifier.rb +35 -0
- data/lib/pubid/iec/identifiers/international_standard.rb +7 -1
- data/lib/pubid/iec/identifiers/technical_report.rb +5 -1
- data/lib/pubid/iec/identifiers/technical_specification.rb +5 -1
- data/lib/pubid/iec/identifiers/vap_identifier.rb +28 -0
- data/lib/pubid/iec/supplement_identifier.rb +19 -0
- data/lib/pubid/iec/urn.adoc +18 -1
- data/lib/pubid/iho/urn.adoc +1 -0
- data/lib/pubid/version.rb +1 -1
- data/lib/tasks/pfs.rake +112 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 558f262353454480dfbf561632061d7b88383589bc5ca314d09a40459593066f
|
|
4
|
+
data.tar.gz: aaa4c1699cc4768547cbdc6524d08bcf1866726ea74f97f5e51fab770a2a993b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d48f25527fc51fbb3c07c18c08535f220a791627312cd1159b9ea46d9486b274e0e243f2f7ea8d1d136f5bbff04e3cec51f1933d40d367dfaab835b42151ae9
|
|
7
|
+
data.tar.gz: 5248700bd44e6bebc2021a6a19b4040799f983347ea976dbe29cd62e0857bc46abfac6ceb0dab51daadd448f73172290088f177eb4cb4eaed1549ac23a2403eb
|
data/data/iec/stage-codes.md
CHANGED
|
@@ -160,3 +160,16 @@ stage RFDIS/50.00 — a snapshot of the project's plan, not a code rename.
|
|
|
160
160
|
translation/preparation families (`TDTR`/`TDTS`/`PRVDTR`/`PRVDTS`/
|
|
161
161
|
`PRVDPAS`, …) stay PROJECT_STAGES — queryable, deliberately
|
|
162
162
|
unparseable. Locked by `spec/pubid/iec/stage_point_codes_spec.rb`.
|
|
163
|
+
- **CD slot alignment (pubid#787, applied):** the IS/TR/TS committee-draft
|
|
164
|
+
rows lead their harmonized lists with this table's own CD code, 30.20
|
|
165
|
+
("Draft circulated as CD") — the official `urn:iec:std:` stage slot
|
|
166
|
+
(which reads `harmonized_stages.first`) had carried the unsourced 30.00,
|
|
167
|
+
a code in no row of the table, while the pubid-ts#187 parity round found
|
|
168
|
+
the mirror emitting this table's 30.20. The rest of the 30.xx ladder
|
|
169
|
+
stays in the list behind the lead (the folded range honor form is
|
|
170
|
+
unchanged), so `ACD`/`CDM`/`PCC`/`SPLIT`/`MERGED` ride the same row as
|
|
171
|
+
before. The draft-supplement faces (`DCOR`/`DISH`/`FDAM`…, no rows in
|
|
172
|
+
this table) keep the slot EMPTY, which is what the testsuite ledger
|
|
173
|
+
attests for their identities (`urn:iec:std:iec:60038-1::::::cor:1:`,
|
|
174
|
+
`…::::::ish:1:`) — the slot reads the root document, not the supplement
|
|
175
|
+
layer. Locked by `spec/pubid/iec/urn_stage_edition_spec.rb`.
|
data/data/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}}
|
data/data/parg/cen_pfs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.1.0","grammar":"PubidCenPfs","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":4}},{"Str":{"pattern":"FprEN"}},{"Str":{"pattern":"prEN"}},{"Alternative":{"atoms":[1,2]}},{"Named":{"name":"stage","atom":3}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":7,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":" "}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":10,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[9,11]}},{"Repetition":{"atom":12,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[8,13]}},{"Named":{"name":"number","atom":14}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[18,19]}},{"Repetition":{"atom":20,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":21}},{"Sequence":{"atoms":[16,17]}},{"Repetition":{"atom":23,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":37}},{"Str":{"pattern":" "}},{"Str":{"pattern":"V"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":28,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":31,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":34,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[26,27,29,30,32,33,35]}},{"Named":{"name":"version","atom":36}},{"Repetition":{"atom":25,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Entity":{"atom":42}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":41,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":43}},{"Sequence":{"atoms":[39,40]}},{"Repetition":{"atom":45,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,5,6,24,38,46]}},{"Entity":{"atom":58}},{"Str":{"pattern":"CWA"}},{"Str":{"pattern":"HD"}},{"Str":{"pattern":"ES"}},{"Str":{"pattern":"CR"}},{"Str":{"pattern":"ENV"}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"CEN"}},{"Str":{"pattern":"CLC"}},{"Alternative":{"atoms":[49,50,51,52,53,54,55,56]}},{"Named":{"name":"publisher","atom":57}},{"Entity":{"atom":68}},{"Str":{"pattern":"/"}},{"Entity":{"atom":65}},{"Str":{"pattern":"CLC"}},{"Str":{"pattern":"ETSI"}},{"Alternative":{"atoms":[62,63]}},{"Named":{"name":"copublisher","atom":64}},{"Sequence":{"atoms":[60,61]}},{"Repetition":{"atom":66,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"copublishers","atom":67}},{"Repetition":{"atom":59,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":73}},{"Str":{"pattern":"Guide"}},{"Named":{"name":"guide","atom":72}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Sequence":{"atoms":[76,77]}},{"Repetition":{"atom":78,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Sequence":{"atoms":[80,81]}},{"Repetition":{"atom":82,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[48,69,70,71,74,75,79,83]}},{"Entity":{"atom":58}},{"Entity":{"atom":68}},{"Repetition":{"atom":86,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":148}},{"Str":{"pattern":"ISO"}},{"Str":{"pattern":"IEC"}},{"Str":{"pattern":"CISPR"}},{"Alternative":{"atoms":[90,91,92]}},{"Entity":{"atom":138}},{"Entity":{"atom":122}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":96}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":98}},{"Alternative":{"atoms":[97,99]}},{"Str":{"pattern":"AC"}},{"Named":{"name":"supplement_kind","atom":101}},{"Entity":{"atom":106}},{"Entity":{"atom":42}},{"Repetition":{"atom":104,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplement_number","atom":105}},{"Repetition":{"atom":103,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":112}},{"Entity":{"atom":42}},{"Repetition":{"atom":110,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"supplements_year","atom":111}},{"Sequence":{"atoms":[108,109]}},{"Repetition":{"atom":113,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":"-"}},{"Entity":{"atom":119}},{"Entity":{"atom":42}},{"Repetition":{"atom":117,"min":2,"max":2,"tag":"Repetition"}},{"Named":{"name":"supplements_month","atom":118}},{"Sequence":{"atoms":[115,116]}},{"Repetition":{"atom":120,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[100,102,107,114,121]}},{"Entity":{"atom":136}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":124}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":126}},{"Alternative":{"atoms":[125,127]}},{"Str":{"pattern":"A"}},{"Named":{"name":"supplement_kind","atom":129}},{"Entity":{"atom":106}},{"Str":{"pattern":":"}},{"Entity":{"atom":112}},{"Sequence":{"atoms":[132,133]}},{"Repetition":{"atom":134,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[128,130,131,135]}},{"Alternative":{"atoms":[95,123]}},{"Named":{"name":"supplement","atom":137}},{"Lookahead":{"atom":94,"positive":false}},{"Str":{"pattern":" FRAG"}},{"Lookahead":{"atom":140,"positive":false}},{"Re":{"pattern":"[\\x01-\\x09]"}},{"Re":{"pattern":"[\\x0b-\\u{10ffff}]"}},{"Alternative":{"atoms":[142,143]}},{"Sequence":{"atoms":[139,141,144]}},{"Repetition":{"atom":145,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[93,146]}},{"Named":{"name":"adopted","atom":147}},{"Sequence":{"atoms":[85,87,88,89]}},{"Entity":{"atom":58}},{"Entity":{"atom":68}},{"Repetition":{"atom":151,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":"/"}},{"Entity":{"atom":158}},{"Str":{"pattern":"TR"}},{"Str":{"pattern":"TS"}},{"Alternative":{"atoms":[155,156]}},{"Named":{"name":"type","atom":157}},{"Sequence":{"atoms":[153,154]}},{"Repetition":{"atom":159,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Sequence":{"atoms":[163,164]}},{"Repetition":{"atom":165,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":37}},{"Repetition":{"atom":167,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Sequence":{"atoms":[169,170]}},{"Repetition":{"atom":171,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[150,152,160,161,162,166,168,172]}},{"Alternative":{"atoms":[47,84,149,173]}},{"Entity":{"atom":178}},{"Entity":{"atom":138}},{"Repetition":{"atom":176,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplements","atom":177}},{"Str":{"pattern":" FRAG"}},{"Entity":{"atom":183}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":181,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"fragment_number","atom":182}},{"Sequence":{"atoms":[179,180]}},{"Repetition":{"atom":184,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[175,185]}},{"Repetition":{"atom":186,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[174,187]}},{"Entity":{"atom":58}},{"Entity":{"atom":68}},{"Repetition":{"atom":190,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":158}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Sequence":{"atoms":[196,197]}},{"Repetition":{"atom":198,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":37}},{"Repetition":{"atom":200,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Sequence":{"atoms":[202,203]}},{"Repetition":{"atom":204,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":178}},{"Str":{"pattern":" FRAG"}},{"Entity":{"atom":183}},{"Sequence":{"atoms":[207,208]}},{"Repetition":{"atom":209,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[206,210]}},{"Repetition":{"atom":211,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[189,191,192,193,194,195,199,201,205,212]}},{"Alternative":{"atoms":[188,213]}}],"root":214},"bindings":[{"capture":"publisher","path":"publisher","type":"string","card":null,"preprocess":null},{"capture":"copublisher","path":"copublisher","type":"string","card":null,"preprocess":null},{"capture":"copublisher","path":"copublishers[].copublisher","type":"string","card":null,"preprocess":null},{"capture":"stage","path":"stage","type":"string","card":null,"preprocess":null},{"capture":"type","path":"type","type":"string","card":null,"preprocess":null},{"capture":"guide","path":"guide","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":"version","path":"version","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":"fragment_number","path":"fragment_number","type":"string","card":null,"preprocess":null},{"capture":"supplement","path":"supplements[].supplement","type":"raw","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"EN 1325","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 12464-1:2011","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326-2 V2.2.1:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"prEN 12464-1:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"FprEN 50600-2-4","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/TR 12101-5:2005","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC/ETSI/TR 101551:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"CLC/TS 50701:2021","expect":{}},{"entry":"identifier","kind":"accept","input":"CR 10313:2000","expect":{}},{"entry":"identifier","kind":"accept","input":"CWA 14050-21:2000","expect":{}},{"entry":"identifier","kind":"accept","input":"ES 59008-6-1:1999","expect":{}},{"entry":"identifier","kind":"accept","input":"ENV 1613:1995","expect":{}},{"entry":"identifier","kind":"accept","input":"HD 1215-2:1988","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN Guide 414:2017","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC Guide 25:2023","expect":{}},{"entry":"identifier","kind":"accept","input":"EN ISO 12100:2010","expect":{}},{"entry":"identifier","kind":"accept","input":"HD IEC 60364-8-81","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 13250:2000/A1:2005","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 60335-1:2012/A1","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 13254:2000/AC:2003","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 61375-2-3:2015/AC:2016-11","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 285:2015+A1","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 285:2015+A1:2021","expect":{}},{"entry":"identifier","kind":"accept","input":"EN ISO 10077-1:2006+AC:2009+AC2:2009","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 60038/A1 FRAG2","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}},{"entry":"identifier","kind":"reject","input":"ETSI EN 300 175","expect":{}},{"entry":"identifier","kind":"reject","input":"CEN/XX 100","expect":{}},{"entry":"identifier","kind":"reject","input":"HD 1215-2:198","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 300 175 V","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 1325 EXTRA","expect":{}},{"entry":"identifier","kind":"reject","input":"EN A1","expect":{}},{"entry":"identifier","kind":"reject","input":"ISO 12100:2010","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 1325:20000","expect":{}},{"entry":"identifier","kind":"reject","input":"EN /TR 100","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 13250:2000/A1:","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 13250:2000/ACX:2003","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 285:2015+A1:","expect":{}},{"entry":"identifier","kind":"reject","input":"FRAG2","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 13250:2000 FRAG2","expect":{}},{"entry":"identifier","kind":"example","input":"EN 1325","expect":{"publisher":"EN","number":"1325"}},{"entry":"identifier","kind":"example","input":"EN 12464-1:2011","expect":{"publisher":"EN","number":"12464","part":"1","year":"2011"}},{"entry":"identifier","kind":"example","input":"EN 302 326-2 V2.2.1:2026","expect":{"publisher":"EN","number":"302 326","part":"2","version":" V2.2.1","year":"2026"}},{"entry":"identifier","kind":"example","input":"prEN 12464-1:2019","expect":{"stage":"prEN","number":"12464","part":"1","year":"2019"}},{"entry":"identifier","kind":"example","input":"FprEN 50600-2-4","expect":{"stage":"FprEN","number":"50600","part":"2-4"}},{"entry":"identifier","kind":"example","input":"CEN/TR 12101-5:2005","expect":{"publisher":"CEN","type":"TR","number":"12101","part":"5","year":"2005"}},{"entry":"identifier","kind":"example","input":"CEN/CLC/ETSI/TR 101551:2026","expect":{"publisher":"CEN","copublisher":"CLC","type":"TR","number":"101551","year":"2026"}},{"entry":"identifier","kind":"example","input":"CLC/TS 50701:2021","expect":{"publisher":"CLC","type":"TS","number":"50701","year":"2021"}},{"entry":"identifier","kind":"example","input":"CR 10313:2000","expect":{"publisher":"CR","number":"10313","year":"2000"}},{"entry":"identifier","kind":"example","input":"CWA 14050-21:2000","expect":{"publisher":"CWA","number":"14050","part":"21","year":"2000"}},{"entry":"identifier","kind":"example","input":"ES 59008-6-1:1999","expect":{"publisher":"ES","number":"59008","part":"6-1","year":"1999"}},{"entry":"identifier","kind":"example","input":"ENV 1613:1995","expect":{"publisher":"ENV","number":"1613","year":"1995"}},{"entry":"identifier","kind":"example","input":"HD 1215-2:1988","expect":{"publisher":"HD","number":"1215","part":"2","year":"1988"}},{"entry":"identifier","kind":"example","input":"CEN Guide 414:2017","expect":{"publisher":"CEN","guide":"Guide","number":"414","year":"2017"}},{"entry":"identifier","kind":"example","input":"CEN/CLC Guide 25:2023","expect":{"publisher":"CEN","copublisher":"CLC","guide":"Guide","number":"25","year":"2023"}},{"entry":"identifier","kind":"example","input":"EN ISO 12100:2010","expect":{"publisher":"EN","adopted":"ISO 12100:2010"}},{"entry":"identifier","kind":"example","input":"HD IEC 60364-8-81","expect":{"publisher":"HD","adopted":"IEC 60364-8-81"}},{"entry":"identifier","kind":"example","input":"EN 13250:2000/A1:2005","expect":{"publisher":"EN","number":"13250","year":"2000"}},{"entry":"identifier","kind":"example","input":"EN 60335-1:2012/A1","expect":{"publisher":"EN","number":"60335","part":"1","year":"2012"}},{"entry":"identifier","kind":"example","input":"EN 13254:2000/AC:2003","expect":{"publisher":"EN","number":"13254","year":"2000"}},{"entry":"identifier","kind":"example","input":"EN 61375-2-3:2015/AC:2016-11","expect":{"publisher":"EN","number":"61375","part":"2-3","year":"2015"}},{"entry":"identifier","kind":"example","input":"EN 285:2015+A1","expect":{"publisher":"EN","number":"285","year":"2015"}},{"entry":"identifier","kind":"example","input":"EN 285:2015+A1:2021","expect":{"publisher":"EN","number":"285","year":"2015"}},{"entry":"identifier","kind":"example","input":"EN ISO 10077-1:2006+AC:2009+AC2:2009","expect":{"publisher":"EN","adopted":"ISO 10077-1:2006"}},{"entry":"identifier","kind":"example","input":"EN 60038/A1 FRAG2","expect":{"publisher":"EN","number":"60038","fragment_number":"2"}}],"docs":{},"source":"# PFS-generated grammar — DO NOT EDIT BY HAND.\n# Source: definitions/cen.pfs (pfs:1) sha256:b8f2c00e392dbc03c1fddedad141afa7c930c5430738721b7df0ac69a371d028\n# Compiler: pubid/grammar/pfs 0.1.0\n# Flavor key: cen_pfs (grammar PubidCenPfs)\n# Regenerate: ruby scripts/pfs compile definitions/cen.pfs --as cen_pfs\n\ngrammar PubidCenPfs version \"0.1.0\" edition 2 {\n\n # Grammar fragments: named lexical terms declared under `grammar:`.\n digit = %x30-39\n\n # Fields: one capture rule per declared field; the whole pattern\n # is the capture.\n cen_cenelec_publisher = ((\"CWA\" / \"HD\" / \"ES\" / \"CR\" / \"ENV\" / \"EN\" / \"CEN\" / \"CLC\")) as publisher\n cen_cenelec_copublisher = ((\"CLC\" / \"ETSI\")) as copublisher\n cen_cenelec_copublishers = (*( \"/\" cen_cenelec_copublisher )) as copublishers\n cen_cenelec_stage = ((\"FprEN\" / \"prEN\")) as stage\n cen_cenelec_type = ((\"TR\" / \"TS\")) as type\n cen_cenelec_guide = (\"Guide\") as guide\n cen_cenelec_number = (((1*%x30-39) (*(\" \" (1*%x30-39))))) as number\n cen_cenelec_part = (1*(%x30-39 / \"-\")) as part\n cen_cenelec_version = (\" \" \"V\" (1*%x30-39) \".\" (1*%x30-39) \".\" (1*%x30-39)) as version\n cen_cenelec_year = (4digit) as year\n cen_cenelec_adopted = ((((\"ISO\" / \"IEC\" / \"CISPR\")) *((!(cen_cenelec_supplement) !(\" FRAG\") (%x01-09 / %x0B-10FFFF))))) as adopted\n cen_cenelec_fragment_number = (1*%x30-39) as fragment_number\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 cen_cenelec_supplement_number = (1*digit) as supplement_number\n cen_cenelec_supplements_year = (4digit) as supplements_year\n cen_cenelec_supplements_month = (2digit) as supplements_month\n cen_cenelec_supplement_corrigendum = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"AC\" as supplement_kind [cen_cenelec_supplement_number] [\":\" cen_cenelec_supplements_year] [\"-\" cen_cenelec_supplements_month]\n }\n cen_cenelec_supplement_amendment = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"A\" as supplement_kind cen_cenelec_supplement_number [\":\" cen_cenelec_supplements_year]\n }\n cen_cenelec_supplement = ( cen_cenelec_supplement_corrigendum / cen_cenelec_supplement_amendment ) as supplement\n cen_cenelec_supplements = (1*cen_cenelec_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 = {\n ( cen_cenelec_stage \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [cen_cenelec_version] [\":\" cen_cenelec_year] / cen_cenelec_publisher [cen_cenelec_copublishers] \" \" cen_cenelec_guide \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [\":\" cen_cenelec_year] / cen_cenelec_publisher [cen_cenelec_copublishers] \" \" cen_cenelec_adopted / cen_cenelec_publisher [cen_cenelec_copublishers] [\"/\" cen_cenelec_type] \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [cen_cenelec_version] [\":\" cen_cenelec_year] ) [cen_cenelec_supplements [\" FRAG\" cen_cenelec_fragment_number]]\n / cen_cenelec_publisher [cen_cenelec_copublishers] \" \" cen_cenelec_type \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [cen_cenelec_version] [\":\" cen_cenelec_year] [cen_cenelec_supplements [\" FRAG\" cen_cenelec_fragment_number]]\n }\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 copublisher -> copublisher (string)\n copublisher -> copublishers[].copublisher (string)\n stage -> stage (string)\n type -> type (string)\n guide -> guide (string)\n number -> number (string)\n part -> part (string)\n version -> version (string)\n year -> year (string)\n adopted -> adopted (string)\n fragment_number -> fragment_number (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 \"EN 1325\"\n accept \"EN 12464-1:2011\"\n accept \"EN 302 326-2 V2.2.1:2026\"\n accept \"prEN 12464-1:2019\"\n accept \"FprEN 50600-2-4\"\n accept \"CEN/TR 12101-5:2005\"\n accept \"CEN/CLC/ETSI/TR 101551:2026\"\n accept \"CLC/TS 50701:2021\"\n accept \"CR 10313:2000\"\n accept \"CWA 14050-21:2000\"\n accept \"ES 59008-6-1:1999\"\n accept \"ENV 1613:1995\"\n accept \"HD 1215-2:1988\"\n accept \"CEN Guide 414:2017\"\n accept \"CEN/CLC Guide 25:2023\"\n accept \"EN ISO 12100:2010\"\n accept \"HD IEC 60364-8-81\"\n accept \"EN 13250:2000/A1:2005\"\n accept \"EN 60335-1:2012/A1\"\n accept \"EN 13254:2000/AC:2003\"\n accept \"EN 61375-2-3:2015/AC:2016-11\"\n accept \"EN 285:2015+A1\"\n accept \"EN 285:2015+A1:2021\"\n accept \"EN ISO 10077-1:2006+AC:2009+AC2:2009\"\n accept \"EN 60038/A1 FRAG2\"\n reject \"nonsense\"\n reject \"ETSI EN 300 175\"\n reject \"CEN/XX 100\"\n reject \"HD 1215-2:198\"\n reject \"EN 300 175 V\"\n reject \"EN 1325 EXTRA\"\n reject \"EN A1\"\n reject \"ISO 12100:2010\"\n reject \"EN 1325:20000\"\n reject \"EN /TR 100\"\n reject \"EN 13250:2000/A1:\"\n reject \"EN 13250:2000/ACX:2003\"\n reject \"EN 285:2015+A1:\"\n reject \"FRAG2\"\n reject \"EN 13250:2000 FRAG2\"\n example \"EN 1325\" { publisher: \"EN\" number: \"1325\" }\n example \"EN 12464-1:2011\" { publisher: \"EN\" number: \"12464\" part: \"1\" year: \"2011\" }\n example \"EN 302 326-2 V2.2.1:2026\" { publisher: \"EN\" number: \"302 326\" part: \"2\" version: \" V2.2.1\" year: \"2026\" }\n example \"prEN 12464-1:2019\" { stage: \"prEN\" number: \"12464\" part: \"1\" year: \"2019\" }\n example \"FprEN 50600-2-4\" { stage: \"FprEN\" number: \"50600\" part: \"2-4\" }\n example \"CEN/TR 12101-5:2005\" { publisher: \"CEN\" type: \"TR\" number: \"12101\" part: \"5\" year: \"2005\" }\n example \"CEN/CLC/ETSI/TR 101551:2026\" { publisher: \"CEN\" copublisher: \"CLC\" type: \"TR\" number: \"101551\" year: \"2026\" }\n example \"CLC/TS 50701:2021\" { publisher: \"CLC\" type: \"TS\" number: \"50701\" year: \"2021\" }\n example \"CR 10313:2000\" { publisher: \"CR\" number: \"10313\" year: \"2000\" }\n example \"CWA 14050-21:2000\" { publisher: \"CWA\" number: \"14050\" part: \"21\" year: \"2000\" }\n example \"ES 59008-6-1:1999\" { publisher: \"ES\" number: \"59008\" part: \"6-1\" year: \"1999\" }\n example \"ENV 1613:1995\" { publisher: \"ENV\" number: \"1613\" year: \"1995\" }\n example \"HD 1215-2:1988\" { publisher: \"HD\" number: \"1215\" part: \"2\" year: \"1988\" }\n example \"CEN Guide 414:2017\" { publisher: \"CEN\" guide: \"Guide\" number: \"414\" year: \"2017\" }\n example \"CEN/CLC Guide 25:2023\" { publisher: \"CEN\" copublisher: \"CLC\" guide: \"Guide\" number: \"25\" year: \"2023\" }\n example \"EN ISO 12100:2010\" { publisher: \"EN\" adopted: \"ISO 12100:2010\" }\n example \"HD IEC 60364-8-81\" { publisher: \"HD\" adopted: \"IEC 60364-8-81\" }\n example \"EN 13250:2000/A1:2005\" { publisher: \"EN\" number: \"13250\" year: \"2000\" }\n example \"EN 60335-1:2012/A1\" { publisher: \"EN\" number: \"60335\" part: \"1\" year: \"2012\" }\n example \"EN 13254:2000/AC:2003\" { publisher: \"EN\" number: \"13254\" year: \"2000\" }\n example \"EN 61375-2-3:2015/AC:2016-11\" { publisher: \"EN\" number: \"61375\" part: \"2-3\" year: \"2015\" }\n example \"EN 285:2015+A1\" { publisher: \"EN\" number: \"285\" year: \"2015\" }\n example \"EN 285:2015+A1:2021\" { publisher: \"EN\" number: \"285\" year: \"2015\" }\n example \"EN ISO 10077-1:2006+AC:2009+AC2:2009\" { publisher: \"EN\" adopted: \"ISO 10077-1:2006\" }\n example \"EN 60038/A1 FRAG2\" { publisher: \"EN\" number: \"60038\" fragment_number: \"2\" }\n }\n}\n","source_hash":"af689f6d48bd5f2966cfe4fe6fee924e8af80fe2075cd1b5438b9e8dea1552f5","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:cd693464a12fefe5a83dd7621f635ca4f4432d520ef093fb7cc6f0f4e1d89142","checksum":"sha256:00e296160d5559b93f9a67bc0b4c60e9424f8d4dfa4fdb2a1f81d0164200626b","validated":{"lint_errors":0,"lint_warnings":1,"tests_total":65,"tests_failures":0,"self_test":true}}
|
|
1
|
+
{"bindings":null,"version":"2.0.0","grammar":"PubidCenPfs","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":4}},{"Str":{"pattern":"FprEN"}},{"Str":{"pattern":"prEN"}},{"Alternative":{"atoms":[1,2]}},{"Named":{"name":"stage","atom":3}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":7,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":" "}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":10,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[9,11]}},{"Repetition":{"atom":12,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[8,13]}},{"Named":{"name":"number","atom":14}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[18,19]}},{"Repetition":{"atom":20,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":21}},{"Sequence":{"atoms":[16,17]}},{"Repetition":{"atom":23,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":37}},{"Str":{"pattern":" "}},{"Str":{"pattern":"V"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":28,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":31,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":34,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[26,27,29,30,32,33,35]}},{"Named":{"name":"version","atom":36}},{"Repetition":{"atom":25,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Entity":{"atom":42}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":41,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":43}},{"Sequence":{"atoms":[39,40]}},{"Repetition":{"atom":45,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,5,6,24,38,46]}},{"Entity":{"atom":58}},{"Str":{"pattern":"CWA"}},{"Str":{"pattern":"HD"}},{"Str":{"pattern":"ES"}},{"Str":{"pattern":"CR"}},{"Str":{"pattern":"ENV"}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"CEN"}},{"Str":{"pattern":"CLC"}},{"Alternative":{"atoms":[49,50,51,52,53,54,55,56]}},{"Named":{"name":"publisher","atom":57}},{"Entity":{"atom":68}},{"Str":{"pattern":"/"}},{"Entity":{"atom":65}},{"Str":{"pattern":"CLC"}},{"Str":{"pattern":"ETSI"}},{"Alternative":{"atoms":[62,63]}},{"Named":{"name":"copublisher","atom":64}},{"Sequence":{"atoms":[60,61]}},{"Repetition":{"atom":66,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"copublishers","atom":67}},{"Repetition":{"atom":59,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":73}},{"Str":{"pattern":"Guide"}},{"Named":{"name":"guide","atom":72}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Sequence":{"atoms":[76,77]}},{"Repetition":{"atom":78,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Sequence":{"atoms":[80,81]}},{"Repetition":{"atom":82,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[48,69,70,71,74,75,79,83]}},{"Entity":{"atom":58}},{"Entity":{"atom":68}},{"Repetition":{"atom":86,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":148}},{"Str":{"pattern":"ISO"}},{"Str":{"pattern":"IEC"}},{"Str":{"pattern":"CISPR"}},{"Alternative":{"atoms":[90,91,92]}},{"Entity":{"atom":138}},{"Entity":{"atom":122}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":96}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":98}},{"Alternative":{"atoms":[97,99]}},{"Str":{"pattern":"AC"}},{"Named":{"name":"supplement_kind","atom":101}},{"Entity":{"atom":106}},{"Entity":{"atom":42}},{"Repetition":{"atom":104,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplement_number","atom":105}},{"Repetition":{"atom":103,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":112}},{"Entity":{"atom":42}},{"Repetition":{"atom":110,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"supplements_year","atom":111}},{"Sequence":{"atoms":[108,109]}},{"Repetition":{"atom":113,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":"-"}},{"Entity":{"atom":119}},{"Entity":{"atom":42}},{"Repetition":{"atom":117,"min":2,"max":2,"tag":"Repetition"}},{"Named":{"name":"supplements_month","atom":118}},{"Sequence":{"atoms":[115,116]}},{"Repetition":{"atom":120,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[100,102,107,114,121]}},{"Entity":{"atom":136}},{"Str":{"pattern":"/"}},{"Named":{"name":"supplements_slash","atom":124}},{"Str":{"pattern":"+"}},{"Named":{"name":"supplements_plus","atom":126}},{"Alternative":{"atoms":[125,127]}},{"Str":{"pattern":"A"}},{"Named":{"name":"supplement_kind","atom":129}},{"Entity":{"atom":106}},{"Str":{"pattern":":"}},{"Entity":{"atom":112}},{"Sequence":{"atoms":[132,133]}},{"Repetition":{"atom":134,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[128,130,131,135]}},{"Alternative":{"atoms":[95,123]}},{"Named":{"name":"supplement","atom":137}},{"Lookahead":{"atom":94,"positive":false}},{"Str":{"pattern":" FRAG"}},{"Lookahead":{"atom":140,"positive":false}},{"Re":{"pattern":"[\\x01-\\x09]"}},{"Re":{"pattern":"[\\x0b-\\u{10ffff}]"}},{"Alternative":{"atoms":[142,143]}},{"Sequence":{"atoms":[139,141,144]}},{"Repetition":{"atom":145,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[93,146]}},{"Named":{"name":"adopted","atom":147}},{"Sequence":{"atoms":[85,87,88,89]}},{"Entity":{"atom":58}},{"Entity":{"atom":68}},{"Repetition":{"atom":151,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":"/"}},{"Entity":{"atom":158}},{"Str":{"pattern":"TR"}},{"Str":{"pattern":"TS"}},{"Alternative":{"atoms":[155,156]}},{"Named":{"name":"type","atom":157}},{"Sequence":{"atoms":[153,154]}},{"Repetition":{"atom":159,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Sequence":{"atoms":[163,164]}},{"Repetition":{"atom":165,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":37}},{"Repetition":{"atom":167,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Sequence":{"atoms":[169,170]}},{"Repetition":{"atom":171,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[150,152,160,161,162,166,168,172]}},{"Alternative":{"atoms":[47,84,149,173]}},{"Entity":{"atom":178}},{"Entity":{"atom":138}},{"Repetition":{"atom":176,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplements","atom":177}},{"Str":{"pattern":" FRAG"}},{"Entity":{"atom":183}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":181,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"fragment_number","atom":182}},{"Sequence":{"atoms":[179,180]}},{"Repetition":{"atom":184,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[175,185]}},{"Repetition":{"atom":186,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[174,187]}},{"Entity":{"atom":58}},{"Entity":{"atom":68}},{"Repetition":{"atom":190,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Entity":{"atom":158}},{"Str":{"pattern":" "}},{"Entity":{"atom":15}},{"Str":{"pattern":"-"}},{"Entity":{"atom":22}},{"Sequence":{"atoms":[196,197]}},{"Repetition":{"atom":198,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":37}},{"Repetition":{"atom":200,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":":"}},{"Entity":{"atom":44}},{"Sequence":{"atoms":[202,203]}},{"Repetition":{"atom":204,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":178}},{"Str":{"pattern":" FRAG"}},{"Entity":{"atom":183}},{"Sequence":{"atoms":[207,208]}},{"Repetition":{"atom":209,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[206,210]}},{"Repetition":{"atom":211,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[189,191,192,193,194,195,199,201,205,212]}},{"Alternative":{"atoms":[188,213]}}],"root":214},"bindings":[{"capture":"publisher","path":"publisher","type":"string","card":null,"preprocess":null},{"capture":"copublisher","path":"copublisher","type":"string","card":null,"preprocess":null},{"capture":"copublisher","path":"copublishers[].copublisher","type":"string","card":null,"preprocess":null},{"capture":"stage","path":"stage","type":"string","card":null,"preprocess":null},{"capture":"type","path":"type","type":"string","card":null,"preprocess":null},{"capture":"guide","path":"guide","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":"version","path":"version","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":"fragment_number","path":"fragment_number","type":"string","card":null,"preprocess":null},{"capture":"supplement","path":"supplements[].supplement","type":"raw","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"EN 1325","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 12464-1:2011","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326-2 V2.2.1:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"prEN 12464-1:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"FprEN 50600-2-4","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/TR 12101-5:2005","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC/ETSI/TR 101551:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"CLC/TS 50701:2021","expect":{}},{"entry":"identifier","kind":"accept","input":"CR 10313:2000","expect":{}},{"entry":"identifier","kind":"accept","input":"CWA 14050-21:2000","expect":{}},{"entry":"identifier","kind":"accept","input":"ES 59008-6-1:1999","expect":{}},{"entry":"identifier","kind":"accept","input":"ENV 1613:1995","expect":{}},{"entry":"identifier","kind":"accept","input":"HD 1215-2:1988","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN Guide 414:2017","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC Guide 25:2023","expect":{}},{"entry":"identifier","kind":"accept","input":"EN ISO 12100:2010","expect":{}},{"entry":"identifier","kind":"accept","input":"HD IEC 60364-8-81","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 13250:2000/A1:2005","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 60335-1:2012/A1","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 13254:2000/AC:2003","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 61375-2-3:2015/AC:2016-11","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 285:2015+A1","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 285:2015+A1:2021","expect":{}},{"entry":"identifier","kind":"accept","input":"EN ISO 10077-1:2006+AC:2009+AC2:2009","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 60038/A1 FRAG2","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}},{"entry":"identifier","kind":"reject","input":"ETSI EN 300 175","expect":{}},{"entry":"identifier","kind":"reject","input":"CEN/XX 100","expect":{}},{"entry":"identifier","kind":"reject","input":"HD 1215-2:198","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 300 175 V","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 1325 EXTRA","expect":{}},{"entry":"identifier","kind":"reject","input":"EN A1","expect":{}},{"entry":"identifier","kind":"reject","input":"ISO 12100:2010","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 1325:20000","expect":{}},{"entry":"identifier","kind":"reject","input":"EN /TR 100","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 13250:2000/A1:","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 13250:2000/ACX:2003","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 285:2015+A1:","expect":{}},{"entry":"identifier","kind":"reject","input":"FRAG2","expect":{}},{"entry":"identifier","kind":"reject","input":"EN 13250:2000 FRAG2","expect":{}},{"entry":"identifier","kind":"example","input":"EN 1325","expect":{"publisher":"EN","number":"1325"}},{"entry":"identifier","kind":"example","input":"EN 12464-1:2011","expect":{"publisher":"EN","number":"12464","part":"1","year":"2011"}},{"entry":"identifier","kind":"example","input":"EN 302 326-2 V2.2.1:2026","expect":{"publisher":"EN","number":"302 326","part":"2","version":" V2.2.1","year":"2026"}},{"entry":"identifier","kind":"example","input":"prEN 12464-1:2019","expect":{"stage":"prEN","number":"12464","part":"1","year":"2019"}},{"entry":"identifier","kind":"example","input":"FprEN 50600-2-4","expect":{"stage":"FprEN","number":"50600","part":"2-4"}},{"entry":"identifier","kind":"example","input":"CEN/TR 12101-5:2005","expect":{"publisher":"CEN","type":"TR","number":"12101","part":"5","year":"2005"}},{"entry":"identifier","kind":"example","input":"CEN/CLC/ETSI/TR 101551:2026","expect":{"publisher":"CEN","copublisher":"CLC","type":"TR","number":"101551","year":"2026"}},{"entry":"identifier","kind":"example","input":"CLC/TS 50701:2021","expect":{"publisher":"CLC","type":"TS","number":"50701","year":"2021"}},{"entry":"identifier","kind":"example","input":"CR 10313:2000","expect":{"publisher":"CR","number":"10313","year":"2000"}},{"entry":"identifier","kind":"example","input":"CWA 14050-21:2000","expect":{"publisher":"CWA","number":"14050","part":"21","year":"2000"}},{"entry":"identifier","kind":"example","input":"ES 59008-6-1:1999","expect":{"publisher":"ES","number":"59008","part":"6-1","year":"1999"}},{"entry":"identifier","kind":"example","input":"ENV 1613:1995","expect":{"publisher":"ENV","number":"1613","year":"1995"}},{"entry":"identifier","kind":"example","input":"HD 1215-2:1988","expect":{"publisher":"HD","number":"1215","part":"2","year":"1988"}},{"entry":"identifier","kind":"example","input":"CEN Guide 414:2017","expect":{"publisher":"CEN","guide":"Guide","number":"414","year":"2017"}},{"entry":"identifier","kind":"example","input":"CEN/CLC Guide 25:2023","expect":{"publisher":"CEN","copublisher":"CLC","guide":"Guide","number":"25","year":"2023"}},{"entry":"identifier","kind":"example","input":"EN ISO 12100:2010","expect":{"publisher":"EN","adopted":"ISO 12100:2010"}},{"entry":"identifier","kind":"example","input":"HD IEC 60364-8-81","expect":{"publisher":"HD","adopted":"IEC 60364-8-81"}},{"entry":"identifier","kind":"example","input":"EN 13250:2000/A1:2005","expect":{"publisher":"EN","number":"13250","year":"2000"}},{"entry":"identifier","kind":"example","input":"EN 60335-1:2012/A1","expect":{"publisher":"EN","number":"60335","part":"1","year":"2012"}},{"entry":"identifier","kind":"example","input":"EN 13254:2000/AC:2003","expect":{"publisher":"EN","number":"13254","year":"2000"}},{"entry":"identifier","kind":"example","input":"EN 61375-2-3:2015/AC:2016-11","expect":{"publisher":"EN","number":"61375","part":"2-3","year":"2015"}},{"entry":"identifier","kind":"example","input":"EN 285:2015+A1","expect":{"publisher":"EN","number":"285","year":"2015"}},{"entry":"identifier","kind":"example","input":"EN 285:2015+A1:2021","expect":{"publisher":"EN","number":"285","year":"2015"}},{"entry":"identifier","kind":"example","input":"EN ISO 10077-1:2006+AC:2009+AC2:2009","expect":{"publisher":"EN","adopted":"ISO 10077-1:2006"}},{"entry":"identifier","kind":"example","input":"EN 60038/A1 FRAG2","expect":{"publisher":"EN","number":"60038","fragment_number":"2"}}],"docs":{},"source":"# PFS-generated grammar — DO NOT EDIT BY HAND.\n# Source: definitions/cen.pfs (pfs:1) sha256:b8f2c00e392dbc03c1fddedad141afa7c930c5430738721b7df0ac69a371d028\n# Compiler: pubid/grammar/pfs 2.0.0\n# Flavor key: cen_pfs (grammar PubidCenPfs)\n# Regenerate: ruby scripts/pfs compile definitions/cen.pfs --as cen_pfs\n\ngrammar PubidCenPfs version \"2.0.0\" edition 2 {\n\n # Grammar fragments: named lexical terms declared under `grammar:`.\n digit = %x30-39\n\n # Fields: one capture rule per declared field; the whole pattern\n # is the capture.\n cen_cenelec_publisher = ((\"CWA\" / \"HD\" / \"ES\" / \"CR\" / \"ENV\" / \"EN\" / \"CEN\" / \"CLC\")) as publisher\n cen_cenelec_copublisher = ((\"CLC\" / \"ETSI\")) as copublisher\n cen_cenelec_copublishers = (*( \"/\" cen_cenelec_copublisher )) as copublishers\n cen_cenelec_stage = ((\"FprEN\" / \"prEN\")) as stage\n cen_cenelec_type = ((\"TR\" / \"TS\")) as type\n cen_cenelec_guide = (\"Guide\") as guide\n cen_cenelec_number = (((1*%x30-39) (*(\" \" (1*%x30-39))))) as number\n cen_cenelec_part = (1*(%x30-39 / \"-\")) as part\n cen_cenelec_version = (\" \" \"V\" (1*%x30-39) \".\" (1*%x30-39) \".\" (1*%x30-39)) as version\n cen_cenelec_year = (4digit) as year\n cen_cenelec_adopted = ((((\"ISO\" / \"IEC\" / \"CISPR\")) *((!(cen_cenelec_supplement) !(\" FRAG\") (%x01-09 / %x0B-10FFFF))))) as adopted\n cen_cenelec_fragment_number = (1*%x30-39) as fragment_number\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 cen_cenelec_supplement_number = (1*digit) as supplement_number\n cen_cenelec_supplements_year = (4digit) as supplements_year\n cen_cenelec_supplements_month = (2digit) as supplements_month\n cen_cenelec_supplement_corrigendum = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"AC\" as supplement_kind [cen_cenelec_supplement_number] [\":\" cen_cenelec_supplements_year] [\"-\" cen_cenelec_supplements_month]\n }\n cen_cenelec_supplement_amendment = {\n (\"/\" as supplements_slash / \"+\" as supplements_plus)\n \"A\" as supplement_kind cen_cenelec_supplement_number [\":\" cen_cenelec_supplements_year]\n }\n cen_cenelec_supplement = ( cen_cenelec_supplement_corrigendum / cen_cenelec_supplement_amendment ) as supplement\n cen_cenelec_supplements = (1*cen_cenelec_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 = {\n ( cen_cenelec_stage \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [cen_cenelec_version] [\":\" cen_cenelec_year] / cen_cenelec_publisher [cen_cenelec_copublishers] \" \" cen_cenelec_guide \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [\":\" cen_cenelec_year] / cen_cenelec_publisher [cen_cenelec_copublishers] \" \" cen_cenelec_adopted / cen_cenelec_publisher [cen_cenelec_copublishers] [\"/\" cen_cenelec_type] \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [cen_cenelec_version] [\":\" cen_cenelec_year] ) [cen_cenelec_supplements [\" FRAG\" cen_cenelec_fragment_number]]\n / cen_cenelec_publisher [cen_cenelec_copublishers] \" \" cen_cenelec_type \" \" cen_cenelec_number [\"-\" cen_cenelec_part] [cen_cenelec_version] [\":\" cen_cenelec_year] [cen_cenelec_supplements [\" FRAG\" cen_cenelec_fragment_number]]\n }\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 copublisher -> copublisher (string)\n copublisher -> copublishers[].copublisher (string)\n stage -> stage (string)\n type -> type (string)\n guide -> guide (string)\n number -> number (string)\n part -> part (string)\n version -> version (string)\n year -> year (string)\n adopted -> adopted (string)\n fragment_number -> fragment_number (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 \"EN 1325\"\n accept \"EN 12464-1:2011\"\n accept \"EN 302 326-2 V2.2.1:2026\"\n accept \"prEN 12464-1:2019\"\n accept \"FprEN 50600-2-4\"\n accept \"CEN/TR 12101-5:2005\"\n accept \"CEN/CLC/ETSI/TR 101551:2026\"\n accept \"CLC/TS 50701:2021\"\n accept \"CR 10313:2000\"\n accept \"CWA 14050-21:2000\"\n accept \"ES 59008-6-1:1999\"\n accept \"ENV 1613:1995\"\n accept \"HD 1215-2:1988\"\n accept \"CEN Guide 414:2017\"\n accept \"CEN/CLC Guide 25:2023\"\n accept \"EN ISO 12100:2010\"\n accept \"HD IEC 60364-8-81\"\n accept \"EN 13250:2000/A1:2005\"\n accept \"EN 60335-1:2012/A1\"\n accept \"EN 13254:2000/AC:2003\"\n accept \"EN 61375-2-3:2015/AC:2016-11\"\n accept \"EN 285:2015+A1\"\n accept \"EN 285:2015+A1:2021\"\n accept \"EN ISO 10077-1:2006+AC:2009+AC2:2009\"\n accept \"EN 60038/A1 FRAG2\"\n reject \"nonsense\"\n reject \"ETSI EN 300 175\"\n reject \"CEN/XX 100\"\n reject \"HD 1215-2:198\"\n reject \"EN 300 175 V\"\n reject \"EN 1325 EXTRA\"\n reject \"EN A1\"\n reject \"ISO 12100:2010\"\n reject \"EN 1325:20000\"\n reject \"EN /TR 100\"\n reject \"EN 13250:2000/A1:\"\n reject \"EN 13250:2000/ACX:2003\"\n reject \"EN 285:2015+A1:\"\n reject \"FRAG2\"\n reject \"EN 13250:2000 FRAG2\"\n example \"EN 1325\" { publisher: \"EN\" number: \"1325\" }\n example \"EN 12464-1:2011\" { publisher: \"EN\" number: \"12464\" part: \"1\" year: \"2011\" }\n example \"EN 302 326-2 V2.2.1:2026\" { publisher: \"EN\" number: \"302 326\" part: \"2\" version: \" V2.2.1\" year: \"2026\" }\n example \"prEN 12464-1:2019\" { stage: \"prEN\" number: \"12464\" part: \"1\" year: \"2019\" }\n example \"FprEN 50600-2-4\" { stage: \"FprEN\" number: \"50600\" part: \"2-4\" }\n example \"CEN/TR 12101-5:2005\" { publisher: \"CEN\" type: \"TR\" number: \"12101\" part: \"5\" year: \"2005\" }\n example \"CEN/CLC/ETSI/TR 101551:2026\" { publisher: \"CEN\" copublisher: \"CLC\" type: \"TR\" number: \"101551\" year: \"2026\" }\n example \"CLC/TS 50701:2021\" { publisher: \"CLC\" type: \"TS\" number: \"50701\" year: \"2021\" }\n example \"CR 10313:2000\" { publisher: \"CR\" number: \"10313\" year: \"2000\" }\n example \"CWA 14050-21:2000\" { publisher: \"CWA\" number: \"14050\" part: \"21\" year: \"2000\" }\n example \"ES 59008-6-1:1999\" { publisher: \"ES\" number: \"59008\" part: \"6-1\" year: \"1999\" }\n example \"ENV 1613:1995\" { publisher: \"ENV\" number: \"1613\" year: \"1995\" }\n example \"HD 1215-2:1988\" { publisher: \"HD\" number: \"1215\" part: \"2\" year: \"1988\" }\n example \"CEN Guide 414:2017\" { publisher: \"CEN\" guide: \"Guide\" number: \"414\" year: \"2017\" }\n example \"CEN/CLC Guide 25:2023\" { publisher: \"CEN\" copublisher: \"CLC\" guide: \"Guide\" number: \"25\" year: \"2023\" }\n example \"EN ISO 12100:2010\" { publisher: \"EN\" adopted: \"ISO 12100:2010\" }\n example \"HD IEC 60364-8-81\" { publisher: \"HD\" adopted: \"IEC 60364-8-81\" }\n example \"EN 13250:2000/A1:2005\" { publisher: \"EN\" number: \"13250\" year: \"2000\" }\n example \"EN 60335-1:2012/A1\" { publisher: \"EN\" number: \"60335\" part: \"1\" year: \"2012\" }\n example \"EN 13254:2000/AC:2003\" { publisher: \"EN\" number: \"13254\" year: \"2000\" }\n example \"EN 61375-2-3:2015/AC:2016-11\" { publisher: \"EN\" number: \"61375\" part: \"2-3\" year: \"2015\" }\n example \"EN 285:2015+A1\" { publisher: \"EN\" number: \"285\" year: \"2015\" }\n example \"EN 285:2015+A1:2021\" { publisher: \"EN\" number: \"285\" year: \"2015\" }\n example \"EN ISO 10077-1:2006+AC:2009+AC2:2009\" { publisher: \"EN\" adopted: \"ISO 10077-1:2006\" }\n example \"EN 60038/A1 FRAG2\" { publisher: \"EN\" number: \"60038\" fragment_number: \"2\" }\n }\n}\n","source_hash":"2c212f50e0ad2b868c0a786a76fee78ef19c998491b677ac3951bfb53a2036dc","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:aeab449b4334b75129593127df2bf572f0437793a8950bee912dafe2fac7e73e","checksum":"sha256:39d58964a0f4f5441d14d7c605e70b9b05d9281fb19645a404de40a701de2658","validated":{"lint_errors":0,"lint_warnings":1,"tests_total":65,"tests_failures":0,"self_test":true}}
|
data/data/parg/doi_pfs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.
|
|
1
|
+
{"bindings":null,"version":"2.0.0","grammar":"PubidDoiPfs","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"doi:"}},{"Entity":{"atom":8}},{"Str":{"pattern":"10"}},{"Str":{"pattern":"."}},{"Entity":{"atom":5}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":4,"min":2,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[2,3,6]}},{"Named":{"name":"prefix","atom":7}},{"Str":{"pattern":"/"}},{"Entity":{"atom":23}},{"Entity":{"atom":21}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Re":{"pattern":"[.]"}},{"Re":{"pattern":"[_]"}},{"Re":{"pattern":"[\\-]"}},{"Re":{"pattern":"[/]"}},{"Re":{"pattern":"[(]"}},{"Re":{"pattern":"[)]"}},{"Alternative":{"atoms":[12,13,14,15,16,17,18,19,20]}},{"Repetition":{"atom":11,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"suffix","atom":22}},{"Sequence":{"atoms":[0,1,9,10]}},{"Entity":{"atom":33}},{"Str":{"pattern":"https://"}},{"Str":{"pattern":"http://"}},{"Alternative":{"atoms":[26,27]}},{"Repetition":{"atom":28,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":"doi.org"}},{"Repetition":{"atom":30,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[29,31]}},{"Repetition":{"atom":32,"min":0,"max":1,"tag":"Maybe"}},{"Named":{"name":"url_prefix","atom":25}},{"Repetition":{"atom":34,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":41}},{"Str":{"pattern":"doi:"}},{"Str":{"pattern":"DOI:"}},{"Str":{"pattern":"Doi:"}},{"Alternative":{"atoms":[37,38,39]}},{"Repetition":{"atom":40,"min":0,"max":1,"tag":"Maybe"}},{"Named":{"name":"scheme_prefix","atom":36}},{"Repetition":{"atom":42,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":45}},{"Str":{"pattern":"/"}},{"Named":{"name":"slash","atom":44}},{"Repetition":{"atom":46,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":8}},{"Str":{"pattern":"/"}},{"Entity":{"atom":23}},{"Sequence":{"atoms":[35,43,47,48,49,50]}},{"Alternative":{"atoms":[24,51]}}],"root":52},"bindings":[{"capture":"prefix","path":"prefix","type":"string","card":null,"preprocess":null},{"capture":"suffix","path":"suffix","type":"string","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"doi:10.1000/182","expect":{}},{"entry":"identifier","kind":"accept","input":"10.1006/jmbi.1998.2354","expect":{}},{"entry":"identifier","kind":"accept","input":"DOI:10.6028/NIST.2022-04-15.001","expect":{}},{"entry":"identifier","kind":"accept","input":"https://doi.org/10.1000/182","expect":{}},{"entry":"identifier","kind":"reject","input":"doi:","expect":{}},{"entry":"identifier","kind":"reject","input":"doi:10","expect":{}},{"entry":"identifier","kind":"reject","input":"doi:10.X/abc","expect":{}},{"entry":"identifier","kind":"reject","input":"doi:10.1000/","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}},{"entry":"identifier","kind":"example","input":"doi:10.1000/182","expect":{"prefix":"10.1000","suffix":"182"}},{"entry":"identifier","kind":"example","input":"10.1006/jmbi.1998.2354","expect":{"prefix":"10.1006","suffix":"jmbi.1998.2354"}},{"entry":"identifier","kind":"example","input":"DOI:10.6028/NIST.2022-04-15.001","expect":{"prefix":"10.6028","suffix":"NIST.2022-04-15.001"}},{"entry":"identifier","kind":"example","input":"https://doi.org/10.1000/182","expect":{"prefix":"10.1000","suffix":"182"}}],"docs":{},"source":"# PFS-generated grammar — DO NOT EDIT BY HAND.\n# Source: definitions/doi.pfs (pfs:1) sha256:60abc3c403c61019d727ee44d9a72591c1549672451e6609a72d36189cae6340\n# Compiler: pubid/grammar/pfs 2.0.0\n# Flavor key: doi_pfs (grammar PubidDoiPfs)\n# Regenerate: ruby scripts/pfs compile definitions/doi.pfs --as doi_pfs\n\ngrammar PubidDoiPfs version \"2.0.0\" edition 2 {\n\n # Grammar fragments: named lexical terms declared under `grammar:`.\n digit = %x30-39\n suffix_char = %x30-39 / %x41-5A / %x61-7A / %x2E / %x5F / %x2D / %x2F / %x28 / %x29\n slash = \"/\"\n url_prefix = [[\"https://\" / \"http://\"] [\"doi.org\"]]\n scheme_prefix = [\"doi:\" / \"DOI:\" / \"Doi:\"]\n\n # Fields: one capture rule per declared field; the whole pattern\n # is the capture.\n doi_prefix = (\"10\" \".\" 2*digit) as prefix\n doi_suffix = (1*suffix_char) as suffix\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 = {\n \"doi:\" doi_prefix \"/\" doi_suffix\n / [url_prefix] [scheme_prefix] [slash] doi_prefix \"/\" doi_suffix\n }\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 prefix -> prefix (string)\n suffix -> suffix (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 \"doi:10.1000/182\"\n accept \"10.1006/jmbi.1998.2354\"\n accept \"DOI:10.6028/NIST.2022-04-15.001\"\n accept \"https://doi.org/10.1000/182\"\n reject \"doi:\"\n reject \"doi:10\"\n reject \"doi:10.X/abc\"\n reject \"doi:10.1000/\"\n reject \"nonsense\"\n example \"doi:10.1000/182\" { prefix: \"10.1000\" suffix: \"182\" }\n example \"10.1006/jmbi.1998.2354\" { prefix: \"10.1006\" suffix: \"jmbi.1998.2354\" }\n example \"DOI:10.6028/NIST.2022-04-15.001\" { prefix: \"10.6028\" suffix: \"NIST.2022-04-15.001\" }\n example \"https://doi.org/10.1000/182\" { prefix: \"10.1000\" suffix: \"182\" }\n }\n}\n","source_hash":"002efc8af3d391939538ebfd250c5b25f7391b1d0577bc811799e6293492685c","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:b4a82b925a3778da170e6bd10695c3a67ae681ce257b91e5c35f888f6eac1c9c","checksum":"sha256:bb9bd3d965c4dc8a131a0bc9f78b5375a75c389c59679512972579b83f5101fa","validated":{"lint_errors":0,"lint_warnings":1,"tests_total":13,"tests_failures":0,"self_test":true}}
|