pubid 2.0.40 → 2.0.41
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/parg/adobe.json +1 -1
- data/data/parg/aiee.json +1 -1
- data/data/parg/amca.json +1 -1
- data/data/parg/ansi.json +1 -1
- data/data/parg/api.json +1 -1
- data/data/parg/ashrae.json +1 -1
- data/data/parg/asme.json +1 -1
- data/data/parg/astm.json +1 -1
- data/data/parg/bipm.json +1 -1
- data/data/parg/bsi.json +1 -1
- data/data/parg/bsi_pfs.json +1 -1
- data/data/parg/calconnect.json +1 -1
- data/data/parg/calconnect_pfs.json +1 -1
- data/data/parg/ccsds.json +1 -1
- data/data/parg/cen_cenelec.json +1 -1
- data/data/parg/cen_pfs.json +1 -1
- data/data/parg/cie.json +1 -1
- data/data/parg/csa.json +1 -1
- data/data/parg/doi.json +1 -1
- data/data/parg/doi_pfs.json +1 -1
- data/data/parg/easc.json +1 -1
- data/data/parg/ecma.json +1 -1
- data/data/parg/etsi.json +1 -1
- data/data/parg/etsi_pfs.json +1 -1
- data/data/parg/evs.json +1 -1
- data/data/parg/gb.json +1 -1
- data/data/parg/gost.json +1 -1
- data/data/parg/iala.json +1 -1
- data/data/parg/iana.json +1 -1
- data/data/parg/idf.json +1 -1
- data/data/parg/iec.json +1 -1
- data/data/parg/ieee.json +1 -1
- data/data/parg/ietf.json +1 -1
- data/data/parg/iho.json +1 -1
- data/data/parg/ire.json +1 -1
- data/data/parg/isbn.json +1 -1
- data/data/parg/itu.json +1 -1
- data/data/parg/jcgm.json +1 -1
- data/data/parg/jis.json +1 -1
- data/data/parg/nesc.json +1 -1
- data/data/parg/nist.json +1 -1
- data/data/parg/oasis.json +1 -1
- data/data/parg/ogc.json +1 -1
- data/data/parg/oiml.json +1 -1
- data/data/parg/omg.json +1 -1
- data/data/parg/parg.json +1 -1
- data/data/parg/plateau.json +1 -1
- data/data/parg/sae.json +1 -1
- data/data/parg/tgpp.json +1 -1
- data/data/parg/un.json +1 -1
- data/data/parg/w3c.json +1 -1
- data/data/parg/xsf.json +1 -1
- data/lib/pubid/version.rb +1 -1
- metadata +1 -1
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:acb28ac064cf70b7dcaf8ec199cd535f95c201ca348746f9124ce7d080473585\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":"5a9bd671fb9193d1b1b5b8df1284fe1ecf5fdf40ea2514b5fc10d5c4da3473a3","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.3.126","edition":2,"semantics_hash":"sha256:ff4f7c71d1477155a9534c68abb01b36917ce6f7473818342999488a85af2eb5","checksum":"sha256:0d7c2d530133e507bcc1254029a9d35b3e439ce596ff3994c584def3642667c2"}
|
|
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:acb28ac064cf70b7dcaf8ec199cd535f95c201ca348746f9124ce7d080473585\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":"5a9bd671fb9193d1b1b5b8df1284fe1ecf5fdf40ea2514b5fc10d5c4da3473a3","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:ff4f7c71d1477155a9534c68abb01b36917ce6f7473818342999488a85af2eb5","checksum":"sha256:49113b4674e5a7bf6a07d413a1635d6343fe5af1697c9da7715dac3ff39de5ba","validated":{"lint_errors":0,"lint_warnings":0,"tests_total":61,"tests_failures":0,"self_test":true}}
|
data/data/parg/calconnect.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.1.0","grammar":"PubidCalconnect","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"CC"}},{"Entity":{"atom":2}},{"Str":{"pattern":"/"}},{"Named":{"name":"slash","atom":1}},{"Entity":{"atom":10}},{"Entity":{"atom":8}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[6,7]}},{"Repetition":{"atom":5,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"series","atom":9}},{"Sequence":{"atoms":[3,4]}},{"Repetition":{"atom":11,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":14}},{"Str":{"pattern":" "}},{"Entity":{"atom":27}},{"Entity":{"atom":17}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":16,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[19,20]}},{"Entity":{"atom":17}},{"Repetition":{"atom":22,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[21,23]}},{"Repetition":{"atom":24,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[18,25]}},{"Named":{"name":"number","atom":26}},{"Entity":{"atom":29}},{"Str":{"pattern":":"}},{"Named":{"name":"colon","atom":28}},{"Entity":{"atom":45}},{"Entity":{"atom":17}},{"Repetition":{"atom":32,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"year","atom":33}},{"Str":{"pattern":"-"}},{"Entity":{"atom":17}},{"Repetition":{"atom":36,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"month","atom":37}},{"Str":{"pattern":"-"}},{"Entity":{"atom":17}},{"Repetition":{"atom":40,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"day","atom":41}},{"Sequence":{"atoms":[35,38,39,42]}},{"Repetition":{"atom":43,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[34,44]}},{"Sequence":{"atoms":[30,31]}},{"Repetition":{"atom":46,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,12,13,15,47]}}],"root":48},"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 9101","expect":{}},{"entry":"identifier","kind":"accept","input":"CC/CD 9101","expect":{}},{"entry":"identifier","kind":"accept","input":"CC 9101:2024","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/calconnect/parser.rb:\n# CC[/<series>] <number>[.<sub>|-$sub>][:<date>]\n\ngrammar PubidCalconnect version \"0.1.0\" edition
|
|
1
|
+
{"bindings":null,"version":"0.1.0","grammar":"PubidCalconnect","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"CC"}},{"Entity":{"atom":2}},{"Str":{"pattern":"/"}},{"Named":{"name":"slash","atom":1}},{"Entity":{"atom":10}},{"Entity":{"atom":8}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[6,7]}},{"Repetition":{"atom":5,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"series","atom":9}},{"Sequence":{"atoms":[3,4]}},{"Repetition":{"atom":11,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":14}},{"Str":{"pattern":" "}},{"Entity":{"atom":27}},{"Entity":{"atom":17}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":16,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[19,20]}},{"Entity":{"atom":17}},{"Repetition":{"atom":22,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[21,23]}},{"Repetition":{"atom":24,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[18,25]}},{"Named":{"name":"number","atom":26}},{"Entity":{"atom":29}},{"Str":{"pattern":":"}},{"Named":{"name":"colon","atom":28}},{"Entity":{"atom":45}},{"Entity":{"atom":17}},{"Repetition":{"atom":32,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"year","atom":33}},{"Str":{"pattern":"-"}},{"Entity":{"atom":17}},{"Repetition":{"atom":36,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"month","atom":37}},{"Str":{"pattern":"-"}},{"Entity":{"atom":17}},{"Repetition":{"atom":40,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"day","atom":41}},{"Sequence":{"atoms":[35,38,39,42]}},{"Repetition":{"atom":43,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[34,44]}},{"Sequence":{"atoms":[30,31]}},{"Repetition":{"atom":46,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,12,13,15,47]}}],"root":48},"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 9101","expect":{}},{"entry":"identifier","kind":"accept","input":"CC/CD 9101","expect":{}},{"entry":"identifier","kind":"accept","input":"CC 9101:2024","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/calconnect/parser.rb:\n# CC[/<series>] <number>[.<sub>|-$sub>][:<date>]\n\ngrammar PubidCalconnect version \"0.1.0\" edition 2 {\n letter = %x41-5A / %x61-7A\n series = (1*letter) as series\n number = (1*digit [(\".\" / \"-\") 1*digit]) as number\n date = (1*digit) as year [(\"-\" (1*digit) as month \"-\" (1*digit) as day)]\n identifier = \"CC\" [slash series] space number [(colon date)]\n digit = %x30-39\n space = \" \"\n slash = \"/\"\n colon = \":\"\n entry identifier: identifier\n\n # Typed model bindings: every bound capture lands directly on the\n # attribute of the same name in the consumer's identifier model.\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 test {\n accept \"CC 9101\"\n accept \"CC/CD 9101\"\n accept \"CC 9101:2024\"\n reject \"nonsense\"\n }\n}\n","source_hash":"ea66374c95ee1b31d1d079c765af1f7915c9aa962338823fa26f7f25e5e75064","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:11dc27a014bc583152a50371029d7cddd0bfe8d579e0fb2d08a477bf135e5bce","checksum":"sha256:00c1ccbe398b154a29077c80bda7bbc21313e10386cb112b8320bbb85b0c82da","validated":{"lint_errors":0,"lint_warnings":0,"tests_total":4,"tests_failures":0,"self_test":true}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.1.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 0.1.0\n# Flavor key: calconnect_pfs (grammar PubidCalconnectPfs)\n# Regenerate: ruby scripts/pfs compile definitions/calconnect.pfs --as calconnect_pfs\n\ngrammar PubidCalconnectPfs version \"0.1.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":"35a33d659c86202186a5e6beb8c7df58af7bd6667dd55b6cb3cecb8855713b85","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.
|
|
1
|
+
{"bindings":null,"version":"0.1.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 0.1.0\n# Flavor key: calconnect_pfs (grammar PubidCalconnectPfs)\n# Regenerate: ruby scripts/pfs compile definitions/calconnect.pfs --as calconnect_pfs\n\ngrammar PubidCalconnectPfs version \"0.1.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":"35a33d659c86202186a5e6beb8c7df58af7bd6667dd55b6cb3cecb8855713b85","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:9fbceffd1828c207a9ec854699d0801fad9e52521a972e39dc1838fb80440dc8","checksum":"sha256:07bce11d07632174162412ef83a4c14a415a44d139722fadd721c8dcd85aab50","validated":{"lint_errors":0,"lint_warnings":0,"tests_total":19,"tests_failures":0,"self_test":true}}
|
data/data/parg/ccsds.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.1.0","grammar":"PubidCcsds","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"CCSDS "}},{"Entity":{"atom":8}},{"Entity":{"atom":6}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Alternative":{"atoms":[3,4,5]}},{"Repetition":{"atom":2,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"number","atom":7}},{"Entity":{"atom":14}},{"Str":{"pattern":"."}},{"Entity":{"atom":6}},{"Repetition":{"atom":11,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":12}},{"Sequence":{"atoms":[10,13]}},{"Repetition":{"atom":9,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":21}},{"Str":{"pattern":"-"}},{"Entity":{"atom":19}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Named":{"name":"type","atom":18}},{"Sequence":{"atoms":[17,20]}},{"Repetition":{"atom":16,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":38}},{"Str":{"pattern":"-"}},{"Entity":{"atom":28}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Re":{"pattern":"[.]"}},{"Alternative":{"atoms":[26,27]}},{"Repetition":{"atom":25,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":33}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[31,32]}},{"Repetition":{"atom":30,"min":0,"max":1,"tag":"Repetition"}},{"Repetition":{"atom":34,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[29,35]}},{"Named":{"name":"edition","atom":36}},{"Sequence":{"atoms":[24,37]}},{"Repetition":{"atom":23,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":44}},{"Str":{"pattern":"-"}},{"Entity":{"atom":19}},{"Named":{"name":"suffix","atom":42}},{"Sequence":{"atoms":[41,43]}},{"Repetition":{"atom":40,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":58}},{"Entity":{"atom":56}},{"Entity":{"atom":49}},{"Str":{"pattern":" "}},{"Str":{"pattern":"Cor."}},{"Entity":{"atom":49}},{"Entity":{"atom":53}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":52,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"cor_number","atom":54}},{"Sequence":{"atoms":[48,50,51,55]}},{"Repetition":{"atom":47,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"corrigenda","atom":57}},{"Entity":{"atom":81}},{"Entity":{"atom":49}},{"Entity":{"atom":62}},{"Str":{"pattern":"-"}},{"Named":{"name":"dash","atom":61}},{"Entity":{"atom":49}},{"Entity":{"atom":76}},{"Str":{"pattern":"French"}},{"Str":{"pattern":"Russian"}},{"Str":{"pattern":"English"}},{"Str":{"pattern":"German"}},{"Str":{"pattern":"Spanish"}},{"Str":{"pattern":"Italian"}},{"Str":{"pattern":"Portuguese"}},{"Str":{"pattern":"Chinese"}},{"Str":{"pattern":"Japanese"}},{"Alternative":{"atoms":[66,67,68,69,70,71,72,73,74]}},{"Named":{"name":"language","atom":75}},{"Str":{"pattern":" Translated"}},{"Repetition":{"atom":77,"min":0,"max":null,"tag":"Repetition"}},{"Repetition":{"atom":78,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[65,79]}},{"Sequence":{"atoms":[60,63,64,80]}},{"Repetition":{"atom":59,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,1,15,22,39,45,46,82]}}],"root":83},"bindings":[{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"part","path":"part","type":"string","card":null,"preprocess":null},{"capture":"type","path":"type","type":"string","card":null,"preprocess":null},{"capture":"edition","path":"edition","type":"string","card":null,"preprocess":null},{"capture":"suffix","path":"suffix","type":"string","card":null,"preprocess":null},{"capture":"cor_number","path":"corrigenda[].cor_number","type":"string","card":null,"preprocess":null},{"capture":"language","path":"language","type":"string","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":[]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"CCSDS 650.0-G-2","expect":{}},{"entry":"identifier","kind":"accept","input":"CCSDS 100.0-G-1","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/ccsds/parser.rb:\n# CCSDS <number>[.part][-type][-edition][-suffix]{ Cor. n}[ - <language>]\n\ngrammar PubidCcsds version \"0.1.0\" edition 2 {\n alnum_char = %x41-5A / %x61-7A / %x30-39\n upper = %x41-5A\n digit_dot_char = %x30-39 / %x2E\n number = (1*alnum_char) as number\n part = \".\" (1*alnum_char) as part\n type = \"-\" upper as type\n edition = \"-\" (1*digit_dot_char [*1letter]) as edition\n suffix = \"-\" upper as suffix\n corrigendum = space \"Cor.\" space (1*digit) as cor_number\n corrigenda = (*corrigendum) as corrigenda\n language_metadata = space dash space (language_word [*\" Translated\"])\n language_word = (\"French\" / \"Russian\" / \"English\" / \"German\" / \"Spanish\" / \"Italian\" / \"Portuguese\" / \"Chinese\" / \"Japanese\") as language\n identifier = \"CCSDS \" number [part] [type] [edition] [suffix] corrigenda [language_metadata]\n dash = \"-\"\n space = \" \"\n digit = %x30-39\n letter = %x41-5A / %x61-7A\n entry identifier: identifier\n\n bindings identifier {\n number -> number (string)\n part -> part (string)\n type -> type (string)\n edition -> edition (string)\n suffix -> suffix (string)\n cor_number -> corrigenda[].cor_number (string)\n language -> language (string)\n }\n\n\n test {\n accept \"CCSDS 650.0-G-2\"\n accept \"CCSDS 100.0-G-1\"\n reject \"nonsense\"\n }\n}\n","source_hash":"914dd6987532d5870d4adc7abc5c3cc2d078577f42db045b6895c50ae4499ff4","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.
|
|
1
|
+
{"bindings":null,"version":"0.1.0","grammar":"PubidCcsds","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"CCSDS "}},{"Entity":{"atom":8}},{"Entity":{"atom":6}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Alternative":{"atoms":[3,4,5]}},{"Repetition":{"atom":2,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"number","atom":7}},{"Entity":{"atom":14}},{"Str":{"pattern":"."}},{"Entity":{"atom":6}},{"Repetition":{"atom":11,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":12}},{"Sequence":{"atoms":[10,13]}},{"Repetition":{"atom":9,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":21}},{"Str":{"pattern":"-"}},{"Entity":{"atom":19}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Named":{"name":"type","atom":18}},{"Sequence":{"atoms":[17,20]}},{"Repetition":{"atom":16,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":38}},{"Str":{"pattern":"-"}},{"Entity":{"atom":28}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Re":{"pattern":"[.]"}},{"Alternative":{"atoms":[26,27]}},{"Repetition":{"atom":25,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":33}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[31,32]}},{"Repetition":{"atom":30,"min":0,"max":1,"tag":"Repetition"}},{"Repetition":{"atom":34,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[29,35]}},{"Named":{"name":"edition","atom":36}},{"Sequence":{"atoms":[24,37]}},{"Repetition":{"atom":23,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":44}},{"Str":{"pattern":"-"}},{"Entity":{"atom":19}},{"Named":{"name":"suffix","atom":42}},{"Sequence":{"atoms":[41,43]}},{"Repetition":{"atom":40,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":58}},{"Entity":{"atom":56}},{"Entity":{"atom":49}},{"Str":{"pattern":" "}},{"Str":{"pattern":"Cor."}},{"Entity":{"atom":49}},{"Entity":{"atom":53}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":52,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"cor_number","atom":54}},{"Sequence":{"atoms":[48,50,51,55]}},{"Repetition":{"atom":47,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"corrigenda","atom":57}},{"Entity":{"atom":81}},{"Entity":{"atom":49}},{"Entity":{"atom":62}},{"Str":{"pattern":"-"}},{"Named":{"name":"dash","atom":61}},{"Entity":{"atom":49}},{"Entity":{"atom":76}},{"Str":{"pattern":"French"}},{"Str":{"pattern":"Russian"}},{"Str":{"pattern":"English"}},{"Str":{"pattern":"German"}},{"Str":{"pattern":"Spanish"}},{"Str":{"pattern":"Italian"}},{"Str":{"pattern":"Portuguese"}},{"Str":{"pattern":"Chinese"}},{"Str":{"pattern":"Japanese"}},{"Alternative":{"atoms":[66,67,68,69,70,71,72,73,74]}},{"Named":{"name":"language","atom":75}},{"Str":{"pattern":" Translated"}},{"Repetition":{"atom":77,"min":0,"max":null,"tag":"Repetition"}},{"Repetition":{"atom":78,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[65,79]}},{"Sequence":{"atoms":[60,63,64,80]}},{"Repetition":{"atom":59,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,1,15,22,39,45,46,82]}}],"root":83},"bindings":[{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"part","path":"part","type":"string","card":null,"preprocess":null},{"capture":"type","path":"type","type":"string","card":null,"preprocess":null},{"capture":"edition","path":"edition","type":"string","card":null,"preprocess":null},{"capture":"suffix","path":"suffix","type":"string","card":null,"preprocess":null},{"capture":"cor_number","path":"corrigenda[].cor_number","type":"string","card":null,"preprocess":null},{"capture":"language","path":"language","type":"string","card":null,"preprocess":null}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":[]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"CCSDS 650.0-G-2","expect":{}},{"entry":"identifier","kind":"accept","input":"CCSDS 100.0-G-1","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/ccsds/parser.rb:\n# CCSDS <number>[.part][-type][-edition][-suffix]{ Cor. n}[ - <language>]\n\ngrammar PubidCcsds version \"0.1.0\" edition 2 {\n alnum_char = %x41-5A / %x61-7A / %x30-39\n upper = %x41-5A\n digit_dot_char = %x30-39 / %x2E\n number = (1*alnum_char) as number\n part = \".\" (1*alnum_char) as part\n type = \"-\" upper as type\n edition = \"-\" (1*digit_dot_char [*1letter]) as edition\n suffix = \"-\" upper as suffix\n corrigendum = space \"Cor.\" space (1*digit) as cor_number\n corrigenda = (*corrigendum) as corrigenda\n language_metadata = space dash space (language_word [*\" Translated\"])\n language_word = (\"French\" / \"Russian\" / \"English\" / \"German\" / \"Spanish\" / \"Italian\" / \"Portuguese\" / \"Chinese\" / \"Japanese\") as language\n identifier = \"CCSDS \" number [part] [type] [edition] [suffix] corrigenda [language_metadata]\n dash = \"-\"\n space = \" \"\n digit = %x30-39\n letter = %x41-5A / %x61-7A\n entry identifier: identifier\n\n bindings identifier {\n number -> number (string)\n part -> part (string)\n type -> type (string)\n edition -> edition (string)\n suffix -> suffix (string)\n cor_number -> corrigenda[].cor_number (string)\n language -> language (string)\n }\n\n\n test {\n accept \"CCSDS 650.0-G-2\"\n accept \"CCSDS 100.0-G-1\"\n reject \"nonsense\"\n }\n}\n","source_hash":"914dd6987532d5870d4adc7abc5c3cc2d078577f42db045b6895c50ae4499ff4","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:bb257a952704b46b416a29771c75a9bec906c0d6d52f5d50213855237bff7cd4","checksum":"sha256:136f05869ef00e20b4d1286ea3ec6a01838ff5b71e54b1ef69ef9deef97eefbe","validated":{"lint_errors":0,"lint_warnings":0,"tests_total":3,"tests_failures":0,"self_test":true}}
|
data/data/parg/cen_cenelec.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.2.0","grammar":"PubidCenCenelec","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":102}},{"Entity":{"atom":5}},{"Str":{"pattern":"FprEN"}},{"Str":{"pattern":"prEN"}},{"Alternative":{"atoms":[2,3]}},{"Named":{"name":"type_with_stage","atom":4}},{"Entity":{"atom":35}},{"Str":{"pattern":"CWA"}},{"Str":{"pattern":"HD"}},{"Str":{"pattern":"ES"}},{"Str":{"pattern":"CR"}},{"Str":{"pattern":"ENV"}},{"Alternative":{"atoms":[7,8,9,10,11]}},{"Named":{"name":"publisher","atom":12}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"CEN"}},{"Alternative":{"atoms":[14,15]}},{"Named":{"name":"publisher","atom":16}},{"Entity":{"atom":27}},{"Entity":{"atom":25}},{"Str":{"pattern":"/"}},{"Str":{"pattern":"CLC"}},{"Str":{"pattern":"ETSI"}},{"Alternative":{"atoms":[21,22]}},{"Named":{"name":"copublisher","atom":23}},{"Sequence":{"atoms":[20,24]}},{"Repetition":{"atom":19,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"copublishers","atom":26}},{"Repetition":{"atom":18,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[17,28]}},{"Str":{"pattern":"CLC"}},{"Named":{"name":"publisher","atom":30}},{"Entity":{"atom":27}},{"Repetition":{"atom":32,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[31,33]}},{"Alternative":{"atoms":[13,29,34]}},{"Alternative":{"atoms":[1,6]}},{"Str":{"pattern":" "}},{"Entity":{"atom":47}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":39,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":" "}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":42,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[41,43]}},{"Repetition":{"atom":44,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[40,45]}},{"Named":{"name":"number","atom":46}},{"Entity":{"atom":58}},{"Entity":{"atom":56}},{"Str":{"pattern":"-"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[51,52]}},{"Repetition":{"atom":53,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":54}},{"Sequence":{"atoms":[50,55]}},{"Repetition":{"atom":49,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"parts","atom":57}},{"Str":{"pattern":" "}},{"Str":{"pattern":"AMD"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":61,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"amendment_number","atom":62}},{"Str":{"pattern":" "}},{"Str":{"pattern":"FRAG"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":66,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"fragment_number","atom":67}},{"Sequence":{"atoms":[36,37,38,48,59,60,63,64,65,68]}},{"Entity":{"atom":5}},{"Entity":{"atom":35}},{"Alternative":{"atoms":[70,71]}},{"Str":{"pattern":" "}},{"Entity":{"atom":47}},{"Entity":{"atom":58}},{"Entity":{"atom":81}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":78,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":79}},{"Sequence":{"atoms":[77,80]}},{"Repetition":{"atom":76,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":"+"}},{"Str":{"pattern":"/"}},{"Alternative":{"atoms":[83,84]}},{"Str":{"pattern":"A"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":87,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"amendment_number","atom":88}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":91,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"amendment_year","atom":92}},{"Sequence":{"atoms":[90,93]}},{"Repetition":{"atom":94,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Str":{"pattern":"FRAG"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":98,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"fragment_number","atom":99}},{"Sequence":{"atoms":[72,73,74,75,82,85,86,89,95,96,97,100]}},{"Alternative":{"atoms":[69,101]}},{"Entity":{"atom":5}},{"Entity":{"atom":35}},{"Alternative":{"atoms":[103,104]}},{"Entity":{"atom":107}},{"Str":{"pattern":" "}},{"Entity":{"atom":191}},{"Str":{"pattern":"ISO"}},{"Str":{"pattern":"IEC"}},{"Str":{"pattern":"CISPR"}},{"Alternative":{"atoms":[109,110,111]}},{"Entity":{"atom":175}},{"Entity":{"atom":130}},{"Str":{"pattern":"+"}},{"Named":{"name":"amd_sep_plus","atom":115}},{"Str":{"pattern":"/"}},{"Named":{"name":"amd_sep_slash","atom":117}},{"Alternative":{"atoms":[116,118]}},{"Str":{"pattern":"A"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":121,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"amd_number","atom":122}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":125,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"amd_year","atom":126}},{"Sequence":{"atoms":[124,127]}},{"Repetition":{"atom":128,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[119,120,123,129]}},{"Entity":{"atom":173}},{"Str":{"pattern":"+"}},{"Named":{"name":"amd_sep_plus","atom":132}},{"Str":{"pattern":"/"}},{"Named":{"name":"amd_sep_slash","atom":134}},{"Alternative":{"atoms":[133,135]}},{"Str":{"pattern":"AC"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":139,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[138,140]}},{"Named":{"name":"cor_number","atom":141}},{"Repetition":{"atom":142,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":165}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":146,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":147}},{"Str":{"pattern":"-"}},{"Entity":{"atom":164}},{"Str":{"pattern":"01"}},{"Str":{"pattern":"02"}},{"Str":{"pattern":"03"}},{"Str":{"pattern":"04"}},{"Str":{"pattern":"05"}},{"Str":{"pattern":"06"}},{"Str":{"pattern":"07"}},{"Str":{"pattern":"08"}},{"Str":{"pattern":"09"}},{"Str":{"pattern":"10"}},{"Str":{"pattern":"11"}},{"Str":{"pattern":"12"}},{"Alternative":{"atoms":[151,152,153,154,155,156,157,158,159,160,161,162]}},{"Named":{"name":"month","atom":163}},{"Sequence":{"atoms":[145,148,149,150]}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":167,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":168}},{"Sequence":{"atoms":[166,169]}},{"Alternative":{"atoms":[144,170]}},{"Repetition":{"atom":171,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[136,137,143,172]}},{"Alternative":{"atoms":[114,131]}},{"Named":{"name":"supplement","atom":174}},{"Lookahead":{"atom":113,"positive":false}},{"Entity":{"atom":183}},{"Str":{"pattern":" "}},{"Str":{"pattern":"ED"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":180,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"edition","atom":181}},{"Sequence":{"atoms":[178,179,182]}},{"Lookahead":{"atom":177,"positive":false}},{"Re":{"pattern":"[\\x01-\\x09]"}},{"Re":{"pattern":"[\\x0b-\\u{10ffff}]"}},{"Alternative":{"atoms":[185,186]}},{"Sequence":{"atoms":[176,184,187]}},{"Repetition":{"atom":188,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[112,189]}},{"Named":{"name":"adopted_string","atom":190}},{"Sequence":{"atoms":[106,108]}},{"Repetition":{"atom":192,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":107}},{"Entity":{"atom":201}},{"Str":{"pattern":"Guide"}},{"Str":{"pattern":"GUIDE"}},{"Str":{"pattern":"TR"}},{"Str":{"pattern":"TS"}},{"Alternative":{"atoms":[196,197,198,199]}},{"Named":{"name":"type","atom":200}},{"Sequence":{"atoms":[194,195]}},{"Entity":{"atom":204}},{"Str":{"pattern":"/"}},{"Named":{"name":"slash","atom":203}},{"Entity":{"atom":201}},{"Sequence":{"atoms":[205,206]}},{"Alternative":{"atoms":[202,207]}},{"Repetition":{"atom":208,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":107}},{"Entity":{"atom":47}},{"Entity":{"atom":58}},{"Entity":{"atom":225}},{"Str":{"pattern":" "}},{"Str":{"pattern":"V"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":216,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":219,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":222,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[214,215,217,218,220,221,223]}},{"Named":{"name":"version","atom":224}},{"Repetition":{"atom":213,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":81}},{"Repetition":{"atom":227,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[210,211,212,226,228]}},{"Repetition":{"atom":229,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":234}},{"Entity":{"atom":175}},{"Repetition":{"atom":232,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplements","atom":233}},{"Entity":{"atom":183}},{"Repetition":{"atom":235,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[105,193,209,230,231,236]}},{"Alternative":{"atoms":[0,237]}}],"root":238},"bindings":[{"capture":"publisher","path":"publisher","type":"string","card":null,"preprocess":null},{"capture":"copublisher","path":"copublishers[].copublisher","type":"string","card":null,"preprocess":null},{"capture":"type_with_stage","path":"type_with_stage","type":"string","card":null,"preprocess":null},{"capture":"type","path":"type","type":"string","card":null,"preprocess":null},{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"version","path":"version","type":"string","card":null,"preprocess":null},{"capture":"part","path":"parts[].part","type":"string","card":null,"preprocess":null},{"capture":"year","path":"year","type":"string","card":null,"preprocess":null},{"capture":"adopted_string","path":"adopted_string","type":"string","card":null,"preprocess":null},{"capture":"edition","path":"edition","type":"string","card":null,"preprocess":null},{"capture":"amendment_number","path":"amendment_number","type":"string","card":null,"preprocess":null},{"capture":"amendment_year","path":"amendment_year","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 publisher: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule publisher: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule publisher: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule date: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule fragment_identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","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 18216:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN ISO 9001:2015","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC TR 17161:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 196-1:2016+A1","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC/ETSI/TR 101551:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326-2:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326-2 V2.2.1","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326 V2.2.1:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302:2026","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/cen_cenelec/parser.rb. Pre-parse normalization\n# (U+2011/AD dashes, comment stripping, CEN-CLC/GUIDE forms) stays\n# binder-side: the grammar sees normalized input.\n#\n# Edition 2: every reference inside a captured body is inlined to raw\n# terms (a rule reference materializes as a named node in the edition-2\n# tree, so only a raw capture binds a scalar span); references to rules\n# that themselves capture (copublisher, part, month_digits,\n# year_with_month, supplement) float their captures unchanged. The\n# repetition wrappers (copublishers, parts, supplements) keep the v1\n# tree shape and the bindings name the scalar leaves.\n\ngrammar PubidCenCenelec version \"0.2.0\" edition 2 {\n space = \" \"\n slash = \"/\"\n publisher = {\n (\"CWA\" / \"HD\" / \"ES\" / \"CR\" / \"ENV\") as publisher\n / ((\"EN\" / \"CEN\") as publisher [copublishers])\n / (\"CLC\" as publisher [copublishers])\n }\n copublishers = (1*copublisher) as copublishers\n copublisher = (\"/\" (\"CLC\" / \"ETSI\") as copublisher)\n stage_prefix = (\"FprEN\" / \"prEN\") as type_with_stage\n type = (\"Guide\" / \"GUIDE\" / \"TR\" / \"TS\") as type\n number = ((1*%x30-39) (*(\" \" (1*%x30-39)))) as number\n version = (\" \" \"V\" (1*%x30-39) \".\" (1*%x30-39) \".\" (1*%x30-39)) as version\n part = \"-\" (1*(%x30-39 / \"-\")) as part\n parts = (*part) as parts\n month_digits = {\n (\n \"01\" / \"02\" / \"03\" / \"04\" / \"05\" / \"06\"\n / \"07\" / \"08\" / \"09\" / \"10\" / \"11\" / \"12\"\n ) as month\n }\n year = \":\" (4*4%x30-39) as year\n year_with_month = \":\" (4*4%x30-39) as year \"-\" month_digits\n date = year_with_month / year\n amendment = {\n ((\"+\" as amd_sep_plus / \"/\" as amd_sep_slash) \"A\" (1*%x30-39) as amd_number\n [(\":\" (4*4%x30-39) as amd_year)])\n }\n corrigendum = {\n ((\"+\" as amd_sep_plus / \"/\" as amd_sep_slash) \"AC\"\n [(%x30-39 (*%x30-39)) as cor_number]\n [(year_with_month / (\":\" (4*4%x30-39) as year))])\n }\n supplement = (amendment / corrigendum) as supplement\n supplements = (*supplement) as supplements\n edition = \" \" \"ED\" (1*%x30-39) as edition\n adopted_string = {\n (\n (\"ISO\" / \"IEC\" / \"CISPR\")\n *((!(supplement) !(edition) (%x01-09 / %x0B-10FFFF)))\n ) as adopted_string\n }\n fragment_identifier = {\n (\n ( (stage_prefix / publisher) \" \" number parts \" \" \"AMD\"\n (1*%x30-39) as amendment_number\n \" \" \"FRAG\" (1*%x30-39) as fragment_number )\n /\n ( (stage_prefix / publisher) \" \" number parts [year] (\"+\" / \"/\") \"A\"\n (1*%x30-39) as amendment_number\n [(\":\" (4*4%x30-39) as amendment_year)]\n \" \" \"FRAG\" (1*%x30-39) as fragment_number )\n )\n }\n identifier = {\n fragment_identifier\n / (\n (stage_prefix / publisher)\n [(space adopted_string)]\n [(space type / slash type)]\n [(space number parts [version] [year])]\n supplements\n [edition]\n )\n }\n\n entry identifier: identifier\n\n test {\n accept \"EN 18216:2026\"\n accept \"EN ISO 9001:2015\"\n accept \"CEN/CLC TR 17161:2019\"\n accept \"EN 196-1:2016+A1\"\n accept \"CEN/CLC/ETSI/TR 101551:2026\"\n accept \"EN 302 326-2:2026\"\n accept \"EN 302 326-2 V2.2.1\"\n accept \"EN 302 326 V2.2.1:2026\"\n accept \"EN 302:2026\"\n reject \"nonsense\"\n }\n\n bindings identifier {\n # Shape-faithful to the v1 tree the builder reads: copublishers/parts\n # bind as one-level arrays (cast(:copublishers) maps member\n # [:copublisher], cast(:parts) reads member [:part]); the supplements\n # bind uncast as the [{supplement: {...}}] array extract_supplements and\n # build_standalone_supplement walk. The supplement-internal captures\n # (amd_sep_*, amd_number, amd_year, cor_number, the corrigendum year)\n # are reached only through that array — no flat bindings for them.\n publisher -> publisher (string)\n copublisher -> copublishers[].copublisher (string)\n type_with_stage -> type_with_stage (string)\n type -> type (string)\n number -> number (string)\n version -> version (string)\n part -> parts[].part (string)\n year -> year (string)\n adopted_string -> adopted_string (string)\n edition -> edition (string)\n amendment_number -> amendment_number (string)\n amendment_year -> amendment_year (string)\n fragment_number -> fragment_number (string)\n supplement -> supplements[].supplement (raw)\n }\n}\n","source_hash":"dfbbc53ab1cc3c16e9587310d098dc0d06e07f69e4cbce845432a403b9d96a6a","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.3.114","edition":2,"checksum":"sha256:ace0e594583f0be21680fa0dff0bf223602859854c074af4107760ab5f3c4e53"}
|
|
1
|
+
{"bindings":null,"version":"0.2.0","grammar":"PubidCenCenelec","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":102}},{"Entity":{"atom":5}},{"Str":{"pattern":"FprEN"}},{"Str":{"pattern":"prEN"}},{"Alternative":{"atoms":[2,3]}},{"Named":{"name":"type_with_stage","atom":4}},{"Entity":{"atom":35}},{"Str":{"pattern":"CWA"}},{"Str":{"pattern":"HD"}},{"Str":{"pattern":"ES"}},{"Str":{"pattern":"CR"}},{"Str":{"pattern":"ENV"}},{"Alternative":{"atoms":[7,8,9,10,11]}},{"Named":{"name":"publisher","atom":12}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"CEN"}},{"Alternative":{"atoms":[14,15]}},{"Named":{"name":"publisher","atom":16}},{"Entity":{"atom":27}},{"Entity":{"atom":25}},{"Str":{"pattern":"/"}},{"Str":{"pattern":"CLC"}},{"Str":{"pattern":"ETSI"}},{"Alternative":{"atoms":[21,22]}},{"Named":{"name":"copublisher","atom":23}},{"Sequence":{"atoms":[20,24]}},{"Repetition":{"atom":19,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"copublishers","atom":26}},{"Repetition":{"atom":18,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[17,28]}},{"Str":{"pattern":"CLC"}},{"Named":{"name":"publisher","atom":30}},{"Entity":{"atom":27}},{"Repetition":{"atom":32,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[31,33]}},{"Alternative":{"atoms":[13,29,34]}},{"Alternative":{"atoms":[1,6]}},{"Str":{"pattern":" "}},{"Entity":{"atom":47}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":39,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":" "}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":42,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[41,43]}},{"Repetition":{"atom":44,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[40,45]}},{"Named":{"name":"number","atom":46}},{"Entity":{"atom":58}},{"Entity":{"atom":56}},{"Str":{"pattern":"-"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Str":{"pattern":"-"}},{"Alternative":{"atoms":[51,52]}},{"Repetition":{"atom":53,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":54}},{"Sequence":{"atoms":[50,55]}},{"Repetition":{"atom":49,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"parts","atom":57}},{"Str":{"pattern":" "}},{"Str":{"pattern":"AMD"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":61,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"amendment_number","atom":62}},{"Str":{"pattern":" "}},{"Str":{"pattern":"FRAG"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":66,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"fragment_number","atom":67}},{"Sequence":{"atoms":[36,37,38,48,59,60,63,64,65,68]}},{"Entity":{"atom":5}},{"Entity":{"atom":35}},{"Alternative":{"atoms":[70,71]}},{"Str":{"pattern":" "}},{"Entity":{"atom":47}},{"Entity":{"atom":58}},{"Entity":{"atom":81}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":78,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":79}},{"Sequence":{"atoms":[77,80]}},{"Repetition":{"atom":76,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":"+"}},{"Str":{"pattern":"/"}},{"Alternative":{"atoms":[83,84]}},{"Str":{"pattern":"A"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":87,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"amendment_number","atom":88}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":91,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"amendment_year","atom":92}},{"Sequence":{"atoms":[90,93]}},{"Repetition":{"atom":94,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":" "}},{"Str":{"pattern":"FRAG"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":98,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"fragment_number","atom":99}},{"Sequence":{"atoms":[72,73,74,75,82,85,86,89,95,96,97,100]}},{"Alternative":{"atoms":[69,101]}},{"Entity":{"atom":5}},{"Entity":{"atom":35}},{"Alternative":{"atoms":[103,104]}},{"Entity":{"atom":107}},{"Str":{"pattern":" "}},{"Entity":{"atom":191}},{"Str":{"pattern":"ISO"}},{"Str":{"pattern":"IEC"}},{"Str":{"pattern":"CISPR"}},{"Alternative":{"atoms":[109,110,111]}},{"Entity":{"atom":175}},{"Entity":{"atom":130}},{"Str":{"pattern":"+"}},{"Named":{"name":"amd_sep_plus","atom":115}},{"Str":{"pattern":"/"}},{"Named":{"name":"amd_sep_slash","atom":117}},{"Alternative":{"atoms":[116,118]}},{"Str":{"pattern":"A"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":121,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"amd_number","atom":122}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":125,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"amd_year","atom":126}},{"Sequence":{"atoms":[124,127]}},{"Repetition":{"atom":128,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[119,120,123,129]}},{"Entity":{"atom":173}},{"Str":{"pattern":"+"}},{"Named":{"name":"amd_sep_plus","atom":132}},{"Str":{"pattern":"/"}},{"Named":{"name":"amd_sep_slash","atom":134}},{"Alternative":{"atoms":[133,135]}},{"Str":{"pattern":"AC"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":139,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[138,140]}},{"Named":{"name":"cor_number","atom":141}},{"Repetition":{"atom":142,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":165}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":146,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":147}},{"Str":{"pattern":"-"}},{"Entity":{"atom":164}},{"Str":{"pattern":"01"}},{"Str":{"pattern":"02"}},{"Str":{"pattern":"03"}},{"Str":{"pattern":"04"}},{"Str":{"pattern":"05"}},{"Str":{"pattern":"06"}},{"Str":{"pattern":"07"}},{"Str":{"pattern":"08"}},{"Str":{"pattern":"09"}},{"Str":{"pattern":"10"}},{"Str":{"pattern":"11"}},{"Str":{"pattern":"12"}},{"Alternative":{"atoms":[151,152,153,154,155,156,157,158,159,160,161,162]}},{"Named":{"name":"month","atom":163}},{"Sequence":{"atoms":[145,148,149,150]}},{"Str":{"pattern":":"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":167,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":168}},{"Sequence":{"atoms":[166,169]}},{"Alternative":{"atoms":[144,170]}},{"Repetition":{"atom":171,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[136,137,143,172]}},{"Alternative":{"atoms":[114,131]}},{"Named":{"name":"supplement","atom":174}},{"Lookahead":{"atom":113,"positive":false}},{"Entity":{"atom":183}},{"Str":{"pattern":" "}},{"Str":{"pattern":"ED"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":180,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"edition","atom":181}},{"Sequence":{"atoms":[178,179,182]}},{"Lookahead":{"atom":177,"positive":false}},{"Re":{"pattern":"[\\x01-\\x09]"}},{"Re":{"pattern":"[\\x0b-\\u{10ffff}]"}},{"Alternative":{"atoms":[185,186]}},{"Sequence":{"atoms":[176,184,187]}},{"Repetition":{"atom":188,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[112,189]}},{"Named":{"name":"adopted_string","atom":190}},{"Sequence":{"atoms":[106,108]}},{"Repetition":{"atom":192,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":107}},{"Entity":{"atom":201}},{"Str":{"pattern":"Guide"}},{"Str":{"pattern":"GUIDE"}},{"Str":{"pattern":"TR"}},{"Str":{"pattern":"TS"}},{"Alternative":{"atoms":[196,197,198,199]}},{"Named":{"name":"type","atom":200}},{"Sequence":{"atoms":[194,195]}},{"Entity":{"atom":204}},{"Str":{"pattern":"/"}},{"Named":{"name":"slash","atom":203}},{"Entity":{"atom":201}},{"Sequence":{"atoms":[205,206]}},{"Alternative":{"atoms":[202,207]}},{"Repetition":{"atom":208,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":107}},{"Entity":{"atom":47}},{"Entity":{"atom":58}},{"Entity":{"atom":225}},{"Str":{"pattern":" "}},{"Str":{"pattern":"V"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":216,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":219,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"."}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":222,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[214,215,217,218,220,221,223]}},{"Named":{"name":"version","atom":224}},{"Repetition":{"atom":213,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":81}},{"Repetition":{"atom":227,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[210,211,212,226,228]}},{"Repetition":{"atom":229,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":234}},{"Entity":{"atom":175}},{"Repetition":{"atom":232,"min":0,"max":null,"tag":"Repetition"}},{"Named":{"name":"supplements","atom":233}},{"Entity":{"atom":183}},{"Repetition":{"atom":235,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[105,193,209,230,231,236]}},{"Alternative":{"atoms":[0,237]}}],"root":238},"bindings":[{"capture":"publisher","path":"publisher","type":"string","card":null,"preprocess":null},{"capture":"copublisher","path":"copublishers[].copublisher","type":"string","card":null,"preprocess":null},{"capture":"type_with_stage","path":"type_with_stage","type":"string","card":null,"preprocess":null},{"capture":"type","path":"type","type":"string","card":null,"preprocess":null},{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"version","path":"version","type":"string","card":null,"preprocess":null},{"capture":"part","path":"parts[].part","type":"string","card":null,"preprocess":null},{"capture":"year","path":"year","type":"string","card":null,"preprocess":null},{"capture":"adopted_string","path":"adopted_string","type":"string","card":null,"preprocess":null},{"capture":"edition","path":"edition","type":"string","card":null,"preprocess":null},{"capture":"amendment_number","path":"amendment_number","type":"string","card":null,"preprocess":null},{"capture":"amendment_year","path":"amendment_year","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 publisher: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule publisher: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule publisher: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule date: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule fragment_identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","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 18216:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN ISO 9001:2015","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC TR 17161:2019","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 196-1:2016+A1","expect":{}},{"entry":"identifier","kind":"accept","input":"CEN/CLC/ETSI/TR 101551:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326-2:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326-2 V2.2.1","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302 326 V2.2.1:2026","expect":{}},{"entry":"identifier","kind":"accept","input":"EN 302:2026","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/cen_cenelec/parser.rb. Pre-parse normalization\n# (U+2011/AD dashes, comment stripping, CEN-CLC/GUIDE forms) stays\n# binder-side: the grammar sees normalized input.\n#\n# Edition 2: every reference inside a captured body is inlined to raw\n# terms (a rule reference materializes as a named node in the edition-2\n# tree, so only a raw capture binds a scalar span); references to rules\n# that themselves capture (copublisher, part, month_digits,\n# year_with_month, supplement) float their captures unchanged. The\n# repetition wrappers (copublishers, parts, supplements) keep the v1\n# tree shape and the bindings name the scalar leaves.\n\ngrammar PubidCenCenelec version \"0.2.0\" edition 2 {\n space = \" \"\n slash = \"/\"\n publisher = {\n (\"CWA\" / \"HD\" / \"ES\" / \"CR\" / \"ENV\") as publisher\n / ((\"EN\" / \"CEN\") as publisher [copublishers])\n / (\"CLC\" as publisher [copublishers])\n }\n copublishers = (1*copublisher) as copublishers\n copublisher = (\"/\" (\"CLC\" / \"ETSI\") as copublisher)\n stage_prefix = (\"FprEN\" / \"prEN\") as type_with_stage\n type = (\"Guide\" / \"GUIDE\" / \"TR\" / \"TS\") as type\n number = ((1*%x30-39) (*(\" \" (1*%x30-39)))) as number\n version = (\" \" \"V\" (1*%x30-39) \".\" (1*%x30-39) \".\" (1*%x30-39)) as version\n part = \"-\" (1*(%x30-39 / \"-\")) as part\n parts = (*part) as parts\n month_digits = {\n (\n \"01\" / \"02\" / \"03\" / \"04\" / \"05\" / \"06\"\n / \"07\" / \"08\" / \"09\" / \"10\" / \"11\" / \"12\"\n ) as month\n }\n year = \":\" (4*4%x30-39) as year\n year_with_month = \":\" (4*4%x30-39) as year \"-\" month_digits\n date = year_with_month / year\n amendment = {\n ((\"+\" as amd_sep_plus / \"/\" as amd_sep_slash) \"A\" (1*%x30-39) as amd_number\n [(\":\" (4*4%x30-39) as amd_year)])\n }\n corrigendum = {\n ((\"+\" as amd_sep_plus / \"/\" as amd_sep_slash) \"AC\"\n [(%x30-39 (*%x30-39)) as cor_number]\n [(year_with_month / (\":\" (4*4%x30-39) as year))])\n }\n supplement = (amendment / corrigendum) as supplement\n supplements = (*supplement) as supplements\n edition = \" \" \"ED\" (1*%x30-39) as edition\n adopted_string = {\n (\n (\"ISO\" / \"IEC\" / \"CISPR\")\n *((!(supplement) !(edition) (%x01-09 / %x0B-10FFFF)))\n ) as adopted_string\n }\n fragment_identifier = {\n (\n ( (stage_prefix / publisher) \" \" number parts \" \" \"AMD\"\n (1*%x30-39) as amendment_number\n \" \" \"FRAG\" (1*%x30-39) as fragment_number )\n /\n ( (stage_prefix / publisher) \" \" number parts [year] (\"+\" / \"/\") \"A\"\n (1*%x30-39) as amendment_number\n [(\":\" (4*4%x30-39) as amendment_year)]\n \" \" \"FRAG\" (1*%x30-39) as fragment_number )\n )\n }\n identifier = {\n fragment_identifier\n / (\n (stage_prefix / publisher)\n [(space adopted_string)]\n [(space type / slash type)]\n [(space number parts [version] [year])]\n supplements\n [edition]\n )\n }\n\n entry identifier: identifier\n\n test {\n accept \"EN 18216:2026\"\n accept \"EN ISO 9001:2015\"\n accept \"CEN/CLC TR 17161:2019\"\n accept \"EN 196-1:2016+A1\"\n accept \"CEN/CLC/ETSI/TR 101551:2026\"\n accept \"EN 302 326-2:2026\"\n accept \"EN 302 326-2 V2.2.1\"\n accept \"EN 302 326 V2.2.1:2026\"\n accept \"EN 302:2026\"\n reject \"nonsense\"\n }\n\n bindings identifier {\n # Shape-faithful to the v1 tree the builder reads: copublishers/parts\n # bind as one-level arrays (cast(:copublishers) maps member\n # [:copublisher], cast(:parts) reads member [:part]); the supplements\n # bind uncast as the [{supplement: {...}}] array extract_supplements and\n # build_standalone_supplement walk. The supplement-internal captures\n # (amd_sep_*, amd_number, amd_year, cor_number, the corrigendum year)\n # are reached only through that array — no flat bindings for them.\n publisher -> publisher (string)\n copublisher -> copublishers[].copublisher (string)\n type_with_stage -> type_with_stage (string)\n type -> type (string)\n number -> number (string)\n version -> version (string)\n part -> parts[].part (string)\n year -> year (string)\n adopted_string -> adopted_string (string)\n edition -> edition (string)\n amendment_number -> amendment_number (string)\n amendment_year -> amendment_year (string)\n fragment_number -> fragment_number (string)\n supplement -> supplements[].supplement (raw)\n }\n}\n","source_hash":"dfbbc53ab1cc3c16e9587310d098dc0d06e07f69e4cbce845432a403b9d96a6a","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:5d9e41c9397a7597223c55f0859356d9ca627136db659f1b1c33124b04b2db80","checksum":"sha256:1fa2d4512e433c4fd3ceb6057f3ba55abb7673374d385042c54e1719c2b12e59","validated":{"lint_errors":0,"lint_warnings":6,"tests_total":10,"tests_failures":0,"self_test":true}}
|