@pubid/pubid 0.1.73 → 0.1.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/flavors/api/worker.d.ts +3 -0
- package/dist/flavors/api/worker.js +23 -0
- package/dist/flavors/ashrae/worker.d.ts +3 -0
- package/dist/flavors/ashrae/worker.js +23 -0
- package/dist/flavors/asme/worker.d.ts +3 -0
- package/dist/flavors/asme/worker.js +23 -0
- package/dist/flavors/astm/worker.d.ts +3 -0
- package/dist/flavors/astm/worker.js +23 -0
- package/dist/flavors/calconnect/worker.d.ts +3 -0
- package/dist/flavors/calconnect/worker.js +23 -0
- package/dist/flavors/cie/worker.d.ts +3 -0
- package/dist/flavors/cie/worker.js +23 -0
- package/dist/flavors/easc/worker.d.ts +3 -0
- package/dist/flavors/easc/worker.js +23 -0
- package/dist/flavors/ecma/worker.d.ts +3 -0
- package/dist/flavors/ecma/worker.js +23 -0
- package/dist/flavors/etsi/worker.d.ts +3 -0
- package/dist/flavors/etsi/worker.js +23 -0
- package/dist/flavors/gb/worker.d.ts +3 -0
- package/dist/flavors/gb/worker.js +23 -0
- package/dist/flavors/iala/worker.d.ts +3 -0
- package/dist/flavors/iala/worker.js +23 -0
- package/dist/flavors/iana/worker.d.ts +3 -0
- package/dist/flavors/iana/worker.js +23 -0
- package/dist/flavors/idf/worker.d.ts +3 -0
- package/dist/flavors/idf/worker.js +23 -0
- package/dist/flavors/ietf/worker.d.ts +3 -0
- package/dist/flavors/ietf/worker.js +23 -0
- package/dist/flavors/iho/worker.d.ts +3 -0
- package/dist/flavors/iho/worker.js +23 -0
- package/dist/flavors/jcgm/worker.d.ts +3 -0
- package/dist/flavors/jcgm/worker.js +23 -0
- package/dist/flavors/oasis/worker.d.ts +3 -0
- package/dist/flavors/oasis/worker.js +23 -0
- package/dist/flavors/ogc/worker.d.ts +3 -0
- package/dist/flavors/ogc/worker.js +23 -0
- package/dist/flavors/omg/worker.d.ts +3 -0
- package/dist/flavors/omg/worker.js +23 -0
- package/dist/flavors/plateau/worker.d.ts +3 -0
- package/dist/flavors/plateau/worker.js +23 -0
- package/dist/flavors/sae/worker.d.ts +3 -0
- package/dist/flavors/sae/worker.js +23 -0
- package/dist/flavors/tgpp/worker.d.ts +3 -0
- package/dist/flavors/tgpp/worker.js +23 -0
- package/dist/flavors/w3c/worker.d.ts +3 -0
- package/dist/flavors/w3c/worker.js +23 -0
- package/dist/flavors/xsf/worker.d.ts +3 -0
- package/dist/flavors/xsf/worker.js +23 -0
- package/dist/parg/artifacts/api.d.ts +2 -0
- package/dist/parg/artifacts/api.js +5 -0
- package/dist/parg/artifacts/ashrae.d.ts +2 -0
- package/dist/parg/artifacts/ashrae.js +5 -0
- package/dist/parg/artifacts/asme.d.ts +2 -0
- package/dist/parg/artifacts/asme.js +5 -0
- package/dist/parg/artifacts/astm.d.ts +2 -0
- package/dist/parg/artifacts/astm.js +5 -0
- package/dist/parg/artifacts/calconnect.d.ts +2 -0
- package/dist/parg/artifacts/calconnect.js +5 -0
- package/dist/parg/artifacts/cie.d.ts +2 -0
- package/dist/parg/artifacts/cie.js +5 -0
- package/dist/parg/artifacts/easc.d.ts +2 -0
- package/dist/parg/artifacts/easc.js +5 -0
- package/dist/parg/artifacts/ecma.d.ts +2 -0
- package/dist/parg/artifacts/ecma.js +5 -0
- package/dist/parg/artifacts/etsi.d.ts +2 -0
- package/dist/parg/artifacts/etsi.js +5 -0
- package/dist/parg/artifacts/gb.d.ts +2 -0
- package/dist/parg/artifacts/gb.js +5 -0
- package/dist/parg/artifacts/iala.d.ts +2 -0
- package/dist/parg/artifacts/iala.js +5 -0
- package/dist/parg/artifacts/iana.d.ts +2 -0
- package/dist/parg/artifacts/iana.js +5 -0
- package/dist/parg/artifacts/idf.d.ts +2 -0
- package/dist/parg/artifacts/idf.js +5 -0
- package/dist/parg/artifacts/ietf.d.ts +2 -0
- package/dist/parg/artifacts/ietf.js +5 -0
- package/dist/parg/artifacts/iho.d.ts +2 -0
- package/dist/parg/artifacts/iho.js +5 -0
- package/dist/parg/artifacts/jcgm.d.ts +2 -0
- package/dist/parg/artifacts/jcgm.js +5 -0
- package/dist/parg/artifacts/oasis.d.ts +2 -0
- package/dist/parg/artifacts/oasis.js +5 -0
- package/dist/parg/artifacts/ogc.d.ts +2 -0
- package/dist/parg/artifacts/ogc.js +5 -0
- package/dist/parg/artifacts/omg.d.ts +2 -0
- package/dist/parg/artifacts/omg.js +5 -0
- package/dist/parg/artifacts/plateau.d.ts +2 -0
- package/dist/parg/artifacts/plateau.js +5 -0
- package/dist/parg/artifacts/sae.d.ts +2 -0
- package/dist/parg/artifacts/sae.js +5 -0
- package/dist/parg/artifacts/tgpp.d.ts +2 -0
- package/dist/parg/artifacts/tgpp.js +5 -0
- package/dist/parg/artifacts/w3c.d.ts +2 -0
- package/dist/parg/artifacts/w3c.js +5 -0
- package/dist/parg/artifacts/xsf.d.ts +2 -0
- package/dist/parg/artifacts/xsf.js +5 -0
- package/dist/parg/worker-engine.d.ts +12 -0
- package/dist/parg/worker-engine.js +32 -0
- package/dist/parg/worker.d.ts +3 -5
- package/dist/parg/worker.js +3 -9
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//! GENERATED FILE — do not edit. The checksummed PARG artifact for
|
|
2
|
+
//! the ecma grammar, bundled as a module string so the worker
|
|
3
|
+
//! entries can construct the runtime without node:fs
|
|
4
|
+
//! (pubid/pubid-ts#232). Regenerate with `npm run artifact:emit`.
|
|
5
|
+
export default "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidEcma\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Str\":{\"pattern\":\"ECMA\"}},{\"Entity\":{\"atom\":7}},{\"Str\":{\"pattern\":\" TR/\"}},{\"Entity\":{\"atom\":4}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":3,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"tr_number\",\"atom\":5}},{\"Sequence\":{\"atoms\":[2,6]}},{\"Entity\":{\"atom\":13}},{\"Str\":{\"pattern\":\" MEM/\"}},{\"Entity\":{\"atom\":4}},{\"Repetition\":{\"atom\":10,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"mem_number\",\"atom\":11}},{\"Sequence\":{\"atoms\":[9,12]}},{\"Entity\":{\"atom\":27}},{\"Str\":{\"pattern\":\"-\"}},{\"Str\":{\"pattern\":\" \"}},{\"Alternative\":{\"atoms\":[15,16]}},{\"Entity\":{\"atom\":4}},{\"Repetition\":{\"atom\":18,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"number\",\"atom\":19}},{\"Str\":{\"pattern\":\"-\"}},{\"Entity\":{\"atom\":4}},{\"Repetition\":{\"atom\":22,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"part\",\"atom\":23}},{\"Sequence\":{\"atoms\":[21,24]}},{\"Repetition\":{\"atom\":25,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[17,20,26]}},{\"Alternative\":{\"atoms\":[1,8,14]}},{\"Entity\":{\"atom\":41}},{\"Str\":{\"pattern\":\" ed\"}},{\"Entity\":{\"atom\":4}},{\"Repetition\":{\"atom\":31,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":34}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":4}},{\"Repetition\":{\"atom\":35,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[33,36]}},{\"Repetition\":{\"atom\":37,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[32,38]}},{\"Named\":{\"name\":\"edition\",\"atom\":39}},{\"Sequence\":{\"atoms\":[30,40]}},{\"Repetition\":{\"atom\":29,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":48}},{\"Str\":{\"pattern\":\" vol\"}},{\"Entity\":{\"atom\":4}},{\"Repetition\":{\"atom\":45,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"volume\",\"atom\":46}},{\"Sequence\":{\"atoms\":[44,47]}},{\"Repetition\":{\"atom\":43,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[0,28,42,49]}}],\"root\":50},\"bindings\":[{\"capture\":\"tr_number\",\"path\":\"tr_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"mem_number\",\"path\":\"mem_number\",\"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\":\"edition\",\"path\":\"edition\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"volume\",\"path\":\"volume\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"ECMA-262\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"ECMA TR/104\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"ECMA-262 ed3\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/ecma/parser.rb: ECMA-NNN[-part], ECMA TR/NNN,\\n# ECMA MEM/NNN, each with optional \\\" edX[.Y]\\\" and \\\" volN\\\". The TR/MEM\\n# vs standard alternation relies on the disjoint first character after\\n# the prefix (T/M are not digits), as in the source.\\n\\ngrammar PubidEcma version \\\"0.1.0\\\" edition 2 {\\n tr = \\\" TR/\\\" (1*digit) as tr_number\\n mem = \\\" MEM/\\\" (1*digit) as mem_number\\n standard = (\\\"-\\\" / \\\" \\\") (1*digit) as number [(\\\"-\\\" (1*digit) as part)]\\n edition_number = 1*digit *(dot 1*digit)\\n edition = \\\" ed\\\" (1*digit *(dot 1*digit)) as edition\\n volume = \\\" vol\\\" (1*digit) as volume\\n identifier = \\\"ECMA\\\" (tr / mem / standard) [edition] [volume]\\n digit = %x30-39\\n dot = \\\".\\\"\\n entry identifier: identifier\\n\\n bindings identifier {\\n tr_number -> tr_number (string)\\n mem_number -> mem_number (string)\\n number -> number (string)\\n part -> part (string)\\n edition -> edition (string)\\n volume -> volume (string)\\n }\\n\\n\\n test {\\n accept \\\"ECMA-262\\\"\\n accept \\\"ECMA TR/104\\\"\\n accept \\\"ECMA-262 ed3\\\"\\n reject \\\"nonsense\\\"\\n }\\n}\\n\",\"source_hash\":\"1cfa0626a6a2c339b2f7fae3eb80aabb1c19700525fd246dc04c880ab4212d59\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:3b58c3e0daba2eb5f1668becbbe4246b4892714580f488a45d4efcccd74d614a\",\"checksum\":\"sha256:576b72a138d0b0fa998212cdd5a0ec022fe512ea7fff685aa5810ada3aa08adf\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":4,\"tests_failures\":0,\"self_test\":true}}";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidEtsi\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Str\":{\"pattern\":\"ETSI \"}},{\"Entity\":{\"atom\":18}},{\"Str\":{\"pattern\":\"I-ETS\"}},{\"Str\":{\"pattern\":\"TCRTR\"}},{\"Str\":{\"pattern\":\"GTS\"}},{\"Str\":{\"pattern\":\"ETR\"}},{\"Str\":{\"pattern\":\"ETS\"}},{\"Str\":{\"pattern\":\"TBR\"}},{\"Str\":{\"pattern\":\"NET\"}},{\"Str\":{\"pattern\":\"EN\"}},{\"Str\":{\"pattern\":\"ES\"}},{\"Str\":{\"pattern\":\"EG\"}},{\"Str\":{\"pattern\":\"TS\"}},{\"Str\":{\"pattern\":\"GR\"}},{\"Str\":{\"pattern\":\"GS\"}},{\"Str\":{\"pattern\":\"SR\"}},{\"Str\":{\"pattern\":\"TR\"}},{\"Alternative\":{\"atoms\":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}},{\"Named\":{\"name\":\"type\",\"atom\":17}},{\"Entity\":{\"atom\":20}},{\"Str\":{\"pattern\":\" \"}},{\"Entity\":{\"atom\":57}},{\"Str\":{\"pattern\":\"GSM\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":25}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":24,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":28}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":29,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[22,23,26,27,30]}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":32,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":28}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":35,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[33,34,36]}},{\"Entity\":{\"atom\":42}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Alternative\":{\"atoms\":[39,40,41]}},{\"Repetition\":{\"atom\":38,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":45}},{\"Str\":{\"pattern\":\"-\"}},{\"Entity\":{\"atom\":42}},{\"Repetition\":{\"atom\":46,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[44,47]}},{\"Repetition\":{\"atom\":48,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":51,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[43,49,50,52]}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":54,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Alternative\":{\"atoms\":[31,37,53,55]}},{\"Named\":{\"name\":\"number\",\"atom\":56}},{\"Entity\":{\"atom\":63}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":60,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"minor\",\"atom\":61}},{\"Sequence\":{\"atoms\":[59,62]}},{\"Repetition\":{\"atom\":58,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":73}},{\"Entity\":{\"atom\":71}},{\"Entity\":{\"atom\":45}},{\"Entity\":{\"atom\":42}},{\"Repetition\":{\"atom\":68,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"part\",\"atom\":69}},{\"Sequence\":{\"atoms\":[67,70]}},{\"Repetition\":{\"atom\":66,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"parts\",\"atom\":72}},{\"Repetition\":{\"atom\":65,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":85}},{\"Entity\":{\"atom\":84}},{\"Str\":{\"pattern\":\"/A\"}},{\"Str\":{\"pattern\":\"/C\"}},{\"Alternative\":{\"atoms\":[77,78]}},{\"Named\":{\"name\":\"supplement_kind\",\"atom\":79}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":81,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"supplement_number\",\"atom\":82}},{\"Sequence\":{\"atoms\":[80,83]}},{\"Repetition\":{\"atom\":76,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Repetition\":{\"atom\":75,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":104}},{\"Entity\":{\"atom\":97}},{\"Str\":{\"pattern\":\"V\"}},{\"Entity\":{\"atom\":94}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[.]\"}},{\"Alternative\":{\"atoms\":[92,93]}},{\"Repetition\":{\"atom\":91,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"version\",\"atom\":95}},{\"Sequence\":{\"atoms\":[90,96]}},{\"Entity\":{\"atom\":103}},{\"Str\":{\"pattern\":\"ed.\"}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":100,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"edition\",\"atom\":101}},{\"Sequence\":{\"atoms\":[99,102]}},{\"Alternative\":{\"atoms\":[89,98]}},{\"Sequence\":{\"atoms\":[87,88]}},{\"Repetition\":{\"atom\":105,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":118}},{\"Str\":{\"pattern\":\"(\"}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":110,\"min\":4,\"max\":4,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"year\",\"atom\":111}},{\"Entity\":{\"atom\":45}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":114,\"min\":2,\"max\":2,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"month\",\"atom\":115}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[109,112,113,116,117]}},{\"Sequence\":{\"atoms\":[107,108]}},{\"Repetition\":{\"atom\":119,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[0,1,19,21,64,74,86,106,120]}}],\"root\":121},\"bindings\":[{\"capture\":\"type\",\"path\":\"type\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"number\",\"path\":\"number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"minor\",\"path\":\"minor\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"part\",\"path\":\"parts[].part\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"version\",\"path\":\"version\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"edition\",\"path\":\"edition\",\"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\":\"supplement_kind\",\"path\":\"supplements[].supplement_kind\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"supplement_number\",\"path\":\"supplements[].supplement_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"ETSI EN 300 175\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"ETSI TR 101 999\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/etsi/parser.rb: ETSI <one of 15 types> <number>\\n# [minor][-parts][/A..|/C..][ V<version> | ed.N] [(YYYY-MM)].\\n\\ngrammar PubidEtsi version \\\"0.1.0\\\" edition 2 {\\n type = (\\\"I-ETS\\\" / \\\"TCRTR\\\" / \\\"GTS\\\" / \\\"ETR\\\" / \\\"ETS\\\" / \\\"TBR\\\" / \\\"NET\\\" / \\\"EN\\\" / \\\"ES\\\" / \\\"EG\\\" / \\\"TS\\\" / \\\"GR\\\" / \\\"GS\\\" / \\\"SR\\\" / \\\"TR\\\") as type\\n # The monorepo's number is a single flat string (\\\"300 058\\\", \\\"298\\\") \u2014\\n # the inner pieces are structural only, never surfaced as captures.\\n gsm_with_space_number = \\\"GSM\\\" space 1*digit dot 1*digit\\n dotted_number = 1*digit dot 1*digit\\n complex_number = 1*alnum_char [(dash 1*alnum_char)] space 1*digit\\n simple_number = 1*digit\\n number = ((\\\"GSM\\\" space 1*digit dot 1*digit) / (1*digit dot 1*digit) / (1*alnum_char [(dash 1*alnum_char)] space 1*digit) / (1*digit)) as number\\n minor = space (1*digit) as minor\\n part = dash (1*alnum_char) as part\\n parts = (*part) as parts\\n version = \\\"V\\\" (1*version_char) as version\\n edition = \\\"ed.\\\" (1*digit) as edition\\n version_or_edition = version / edition\\n date_part = \\\"(\\\" (4digit) as year dash (2digit) as month \\\")\\\"\\n single_supplement = ((\\\"/A\\\" / \\\"/C\\\") as supplement_kind (1*digit) as supplement_number)\\n supplements = 1*single_supplement\\n identifier = \\\"ETSI \\\" type space number [minor] [parts] [supplements] [(space version_or_edition)] [(space date_part)]\\n alnum_char = %x41-5A / %x61-7A / %x30-39\\n version_char = %x30-39 / %x2E\\n digit = %x30-39\\n dash = \\\"-\\\"\\n dot = \\\".\\\"\\n space = \\\" \\\"\\n entry identifier: identifier\\n\\n # Typed model bindings: repeated parts collect under parts[].part and\\n # the supplements pair kind with number by occurrence index.\\n bindings identifier {\\n type -> type (string)\\n number -> number (string)\\n minor -> minor (string)\\n part -> parts[].part (string)\\n version -> version (string)\\n edition -> edition (string)\\n year -> year (string)\\n month -> month (string)\\n supplement_kind -> supplements[].supplement_kind (string)\\n supplement_number -> supplements[].supplement_number (string)\\n }\\n\\n \\n test {\\n accept \\\"ETSI EN 300 175\\\"\\n accept \\\"ETSI TR 101 999\\\"\\n reject \\\"nonsense\\\"\\n }\\n}\\n\",\"source_hash\":\"fcd65f026fe04cb23ccdd6420b18ad5548bc05206afa3cf6e4d2e7e0757e6a1b\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:e85bacb7677aeef000d06f85b6dec0b27e1ac4aef512eb74ff60a4c7cbcf645a\",\"checksum\":\"sha256:cb07917fb13ef63421aa60a090d3d4a461149e346db0fd88f2400bac9f9c316f\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":3,\"tests_failures\":0,\"self_test\":true}}";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//! GENERATED FILE — do not edit. The checksummed PARG artifact for
|
|
2
|
+
//! the etsi grammar, bundled as a module string so the worker
|
|
3
|
+
//! entries can construct the runtime without node:fs
|
|
4
|
+
//! (pubid/pubid-ts#232). Regenerate with `npm run artifact:emit`.
|
|
5
|
+
export default "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidEtsi\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Str\":{\"pattern\":\"ETSI \"}},{\"Entity\":{\"atom\":18}},{\"Str\":{\"pattern\":\"I-ETS\"}},{\"Str\":{\"pattern\":\"TCRTR\"}},{\"Str\":{\"pattern\":\"GTS\"}},{\"Str\":{\"pattern\":\"ETR\"}},{\"Str\":{\"pattern\":\"ETS\"}},{\"Str\":{\"pattern\":\"TBR\"}},{\"Str\":{\"pattern\":\"NET\"}},{\"Str\":{\"pattern\":\"EN\"}},{\"Str\":{\"pattern\":\"ES\"}},{\"Str\":{\"pattern\":\"EG\"}},{\"Str\":{\"pattern\":\"TS\"}},{\"Str\":{\"pattern\":\"GR\"}},{\"Str\":{\"pattern\":\"GS\"}},{\"Str\":{\"pattern\":\"SR\"}},{\"Str\":{\"pattern\":\"TR\"}},{\"Alternative\":{\"atoms\":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}},{\"Named\":{\"name\":\"type\",\"atom\":17}},{\"Entity\":{\"atom\":20}},{\"Str\":{\"pattern\":\" \"}},{\"Entity\":{\"atom\":57}},{\"Str\":{\"pattern\":\"GSM\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":25}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":24,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":28}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":29,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[22,23,26,27,30]}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":32,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":28}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":35,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[33,34,36]}},{\"Entity\":{\"atom\":42}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Alternative\":{\"atoms\":[39,40,41]}},{\"Repetition\":{\"atom\":38,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":45}},{\"Str\":{\"pattern\":\"-\"}},{\"Entity\":{\"atom\":42}},{\"Repetition\":{\"atom\":46,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[44,47]}},{\"Repetition\":{\"atom\":48,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":51,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[43,49,50,52]}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":54,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Alternative\":{\"atoms\":[31,37,53,55]}},{\"Named\":{\"name\":\"number\",\"atom\":56}},{\"Entity\":{\"atom\":63}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":60,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"minor\",\"atom\":61}},{\"Sequence\":{\"atoms\":[59,62]}},{\"Repetition\":{\"atom\":58,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":73}},{\"Entity\":{\"atom\":71}},{\"Entity\":{\"atom\":45}},{\"Entity\":{\"atom\":42}},{\"Repetition\":{\"atom\":68,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"part\",\"atom\":69}},{\"Sequence\":{\"atoms\":[67,70]}},{\"Repetition\":{\"atom\":66,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"parts\",\"atom\":72}},{\"Repetition\":{\"atom\":65,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":85}},{\"Entity\":{\"atom\":84}},{\"Str\":{\"pattern\":\"/A\"}},{\"Str\":{\"pattern\":\"/C\"}},{\"Alternative\":{\"atoms\":[77,78]}},{\"Named\":{\"name\":\"supplement_kind\",\"atom\":79}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":81,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"supplement_number\",\"atom\":82}},{\"Sequence\":{\"atoms\":[80,83]}},{\"Repetition\":{\"atom\":76,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Repetition\":{\"atom\":75,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":104}},{\"Entity\":{\"atom\":97}},{\"Str\":{\"pattern\":\"V\"}},{\"Entity\":{\"atom\":94}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[.]\"}},{\"Alternative\":{\"atoms\":[92,93]}},{\"Repetition\":{\"atom\":91,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"version\",\"atom\":95}},{\"Sequence\":{\"atoms\":[90,96]}},{\"Entity\":{\"atom\":103}},{\"Str\":{\"pattern\":\"ed.\"}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":100,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"edition\",\"atom\":101}},{\"Sequence\":{\"atoms\":[99,102]}},{\"Alternative\":{\"atoms\":[89,98]}},{\"Sequence\":{\"atoms\":[87,88]}},{\"Repetition\":{\"atom\":105,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":118}},{\"Str\":{\"pattern\":\"(\"}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":110,\"min\":4,\"max\":4,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"year\",\"atom\":111}},{\"Entity\":{\"atom\":45}},{\"Entity\":{\"atom\":25}},{\"Repetition\":{\"atom\":114,\"min\":2,\"max\":2,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"month\",\"atom\":115}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[109,112,113,116,117]}},{\"Sequence\":{\"atoms\":[107,108]}},{\"Repetition\":{\"atom\":119,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[0,1,19,21,64,74,86,106,120]}}],\"root\":121},\"bindings\":[{\"capture\":\"type\",\"path\":\"type\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"number\",\"path\":\"number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"minor\",\"path\":\"minor\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"part\",\"path\":\"parts[].part\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"version\",\"path\":\"version\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"edition\",\"path\":\"edition\",\"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\":\"supplement_kind\",\"path\":\"supplements[].supplement_kind\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"supplement_number\",\"path\":\"supplements[].supplement_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"ETSI EN 300 175\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"ETSI TR 101 999\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/etsi/parser.rb: ETSI <one of 15 types> <number>\\n# [minor][-parts][/A..|/C..][ V<version> | ed.N] [(YYYY-MM)].\\n\\ngrammar PubidEtsi version \\\"0.1.0\\\" edition 2 {\\n type = (\\\"I-ETS\\\" / \\\"TCRTR\\\" / \\\"GTS\\\" / \\\"ETR\\\" / \\\"ETS\\\" / \\\"TBR\\\" / \\\"NET\\\" / \\\"EN\\\" / \\\"ES\\\" / \\\"EG\\\" / \\\"TS\\\" / \\\"GR\\\" / \\\"GS\\\" / \\\"SR\\\" / \\\"TR\\\") as type\\n # The monorepo's number is a single flat string (\\\"300 058\\\", \\\"298\\\") —\\n # the inner pieces are structural only, never surfaced as captures.\\n gsm_with_space_number = \\\"GSM\\\" space 1*digit dot 1*digit\\n dotted_number = 1*digit dot 1*digit\\n complex_number = 1*alnum_char [(dash 1*alnum_char)] space 1*digit\\n simple_number = 1*digit\\n number = ((\\\"GSM\\\" space 1*digit dot 1*digit) / (1*digit dot 1*digit) / (1*alnum_char [(dash 1*alnum_char)] space 1*digit) / (1*digit)) as number\\n minor = space (1*digit) as minor\\n part = dash (1*alnum_char) as part\\n parts = (*part) as parts\\n version = \\\"V\\\" (1*version_char) as version\\n edition = \\\"ed.\\\" (1*digit) as edition\\n version_or_edition = version / edition\\n date_part = \\\"(\\\" (4digit) as year dash (2digit) as month \\\")\\\"\\n single_supplement = ((\\\"/A\\\" / \\\"/C\\\") as supplement_kind (1*digit) as supplement_number)\\n supplements = 1*single_supplement\\n identifier = \\\"ETSI \\\" type space number [minor] [parts] [supplements] [(space version_or_edition)] [(space date_part)]\\n alnum_char = %x41-5A / %x61-7A / %x30-39\\n version_char = %x30-39 / %x2E\\n digit = %x30-39\\n dash = \\\"-\\\"\\n dot = \\\".\\\"\\n space = \\\" \\\"\\n entry identifier: identifier\\n\\n # Typed model bindings: repeated parts collect under parts[].part and\\n # the supplements pair kind with number by occurrence index.\\n bindings identifier {\\n type -> type (string)\\n number -> number (string)\\n minor -> minor (string)\\n part -> parts[].part (string)\\n version -> version (string)\\n edition -> edition (string)\\n year -> year (string)\\n month -> month (string)\\n supplement_kind -> supplements[].supplement_kind (string)\\n supplement_number -> supplements[].supplement_number (string)\\n }\\n\\n \\n test {\\n accept \\\"ETSI EN 300 175\\\"\\n accept \\\"ETSI TR 101 999\\\"\\n reject \\\"nonsense\\\"\\n }\\n}\\n\",\"source_hash\":\"fcd65f026fe04cb23ccdd6420b18ad5548bc05206afa3cf6e4d2e7e0757e6a1b\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:e85bacb7677aeef000d06f85b6dec0b27e1ac4aef512eb74ff60a4c7cbcf645a\",\"checksum\":\"sha256:cb07917fb13ef63421aa60a090d3d4a461149e346db0fd88f2400bac9f9c316f\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":3,\"tests_failures\":0,\"self_test\":true}}";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidGb\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":23}},{\"Str\":{\"pattern\":\"T/\"}},{\"Entity\":{\"atom\":5}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Alternative\":{\"atoms\":[3,4]}},{\"Repetition\":{\"atom\":2,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[1,6]}},{\"Str\":{\"pattern\":\"GBn\"}},{\"Str\":{\"pattern\":\"/T\"}},{\"Str\":{\"pattern\":\"/Z\"}},{\"Alternative\":{\"atoms\":[9,10]}},{\"Repetition\":{\"atom\":11,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[8,12]}},{\"Entity\":{\"atom\":15}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Repetition\":{\"atom\":14,\"min\":1,\"max\":3,\"tag\":\"Repetition\"}},{\"Str\":{\"pattern\":\"/T\"}},{\"Str\":{\"pattern\":\"/Z\"}},{\"Alternative\":{\"atoms\":[17,18]}},{\"Repetition\":{\"atom\":19,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[16,20]}},{\"Alternative\":{\"atoms\":[7,13,21]}},{\"Named\":{\"name\":\"publisher_code\",\"atom\":22}},{\"Entity\":{\"atom\":25}},{\"Str\":{\"pattern\":\" \"}},{\"Entity\":{\"atom\":27}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":26,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"number\",\"atom\":28}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":27}},{\"Repetition\":{\"atom\":31,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"part\",\"atom\":32}},{\"Sequence\":{\"atoms\":[30,33]}},{\"Repetition\":{\"atom\":34,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":39}},{\"Str\":{\"pattern\":\"-\"}},{\"Str\":{\"pattern\":\"\u2014\"}},{\"Alternative\":{\"atoms\":[37,38]}},{\"Named\":{\"name\":\"dash\",\"atom\":36}},{\"Entity\":{\"atom\":27}},{\"Repetition\":{\"atom\":41,\"min\":4,\"max\":4,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"year\",\"atom\":42}},{\"Sequence\":{\"atoms\":[40,43]}},{\"Repetition\":{\"atom\":44,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" (\"}},{\"Entity\":{\"atom\":48}},{\"Str\":{\"pattern\":\"all parts\"}},{\"Named\":{\"name\":\"all_parts_text\",\"atom\":47}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[46,49,50]}},{\"Repetition\":{\"atom\":51,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[0,24,29,35,45,52]}}],\"root\":53},\"bindings\":[{\"capture\":\"publisher_code\",\"path\":\"publisher_code\",\"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}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"GB/T 19001-2016\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"GB 4943\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/gb/parser.rb \u2014 Chinese standard identifiers.\\n# publisher_code order is load-bearing: the social-group form, then the\\n# confidential GBn series (lowercase n is part of the code), then the\\n# general 1-3-letter code. The year separator is ASCII dash or the\\n# Chinese typographic em-dash.\\n\\ngrammar PubidGb version \\\"0.1.0\\\" edition 2 {\\n publisher_code = ((\\\"T/\\\" 1*upper_digit) / (\\\"GBn\\\" [\\\"/T\\\" / \\\"/Z\\\"]) / (1*3upper [\\\"/T\\\" / \\\"/Z\\\"])) as publisher_code\\n identifier = publisher_code space (1*digit) as number [(\\\".\\\" (1*digit) as part)] [(dash (4digit) as year)] [(\\\" (\\\" all_parts_text \\\")\\\")]\\n all_parts_text = \\\"all parts\\\"\\n upper = %x41-5A\\n upper_digit = %x41-5A / %x30-39\\n dash = \\\"-\\\" / \\\"\u2014\\\"\\n space = \\\" \\\"\\n digit = %x30-39\\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_code -> publisher_code (string)\\n number -> number (string)\\n part -> part (string)\\n year -> year (string)\\n }\\n\\n\\n test {\\n accept \\\"GB/T 19001-2016\\\"\\n accept \\\"GB 4943\\\"\\n reject \\\"nonsense\\\"\\n }\\n}\\n\",\"source_hash\":\"00d08eb59a1c1f6c71209c61abd5d00b41b49ff73d387fcc5674068f679f9d1a\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:4f5f8a04041ec8a04f9e16834f79563d3fdd0afdc35102786f46d8f0bf4b493a\",\"checksum\":\"sha256:2b424ed8b686bdb369e0fefc9685c5e2b248d4486c281b1f96fe387cd3175ce2\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":3,\"tests_failures\":0,\"self_test\":true}}";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//! GENERATED FILE — do not edit. The checksummed PARG artifact for
|
|
2
|
+
//! the gb grammar, bundled as a module string so the worker
|
|
3
|
+
//! entries can construct the runtime without node:fs
|
|
4
|
+
//! (pubid/pubid-ts#232). Regenerate with `npm run artifact:emit`.
|
|
5
|
+
export default "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidGb\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":23}},{\"Str\":{\"pattern\":\"T/\"}},{\"Entity\":{\"atom\":5}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Alternative\":{\"atoms\":[3,4]}},{\"Repetition\":{\"atom\":2,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[1,6]}},{\"Str\":{\"pattern\":\"GBn\"}},{\"Str\":{\"pattern\":\"/T\"}},{\"Str\":{\"pattern\":\"/Z\"}},{\"Alternative\":{\"atoms\":[9,10]}},{\"Repetition\":{\"atom\":11,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[8,12]}},{\"Entity\":{\"atom\":15}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Repetition\":{\"atom\":14,\"min\":1,\"max\":3,\"tag\":\"Repetition\"}},{\"Str\":{\"pattern\":\"/T\"}},{\"Str\":{\"pattern\":\"/Z\"}},{\"Alternative\":{\"atoms\":[17,18]}},{\"Repetition\":{\"atom\":19,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[16,20]}},{\"Alternative\":{\"atoms\":[7,13,21]}},{\"Named\":{\"name\":\"publisher_code\",\"atom\":22}},{\"Entity\":{\"atom\":25}},{\"Str\":{\"pattern\":\" \"}},{\"Entity\":{\"atom\":27}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":26,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"number\",\"atom\":28}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":27}},{\"Repetition\":{\"atom\":31,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"part\",\"atom\":32}},{\"Sequence\":{\"atoms\":[30,33]}},{\"Repetition\":{\"atom\":34,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":39}},{\"Str\":{\"pattern\":\"-\"}},{\"Str\":{\"pattern\":\"—\"}},{\"Alternative\":{\"atoms\":[37,38]}},{\"Named\":{\"name\":\"dash\",\"atom\":36}},{\"Entity\":{\"atom\":27}},{\"Repetition\":{\"atom\":41,\"min\":4,\"max\":4,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"year\",\"atom\":42}},{\"Sequence\":{\"atoms\":[40,43]}},{\"Repetition\":{\"atom\":44,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" (\"}},{\"Entity\":{\"atom\":48}},{\"Str\":{\"pattern\":\"all parts\"}},{\"Named\":{\"name\":\"all_parts_text\",\"atom\":47}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[46,49,50]}},{\"Repetition\":{\"atom\":51,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[0,24,29,35,45,52]}}],\"root\":53},\"bindings\":[{\"capture\":\"publisher_code\",\"path\":\"publisher_code\",\"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}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"GB/T 19001-2016\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"GB 4943\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/gb/parser.rb — Chinese standard identifiers.\\n# publisher_code order is load-bearing: the social-group form, then the\\n# confidential GBn series (lowercase n is part of the code), then the\\n# general 1-3-letter code. The year separator is ASCII dash or the\\n# Chinese typographic em-dash.\\n\\ngrammar PubidGb version \\\"0.1.0\\\" edition 2 {\\n publisher_code = ((\\\"T/\\\" 1*upper_digit) / (\\\"GBn\\\" [\\\"/T\\\" / \\\"/Z\\\"]) / (1*3upper [\\\"/T\\\" / \\\"/Z\\\"])) as publisher_code\\n identifier = publisher_code space (1*digit) as number [(\\\".\\\" (1*digit) as part)] [(dash (4digit) as year)] [(\\\" (\\\" all_parts_text \\\")\\\")]\\n all_parts_text = \\\"all parts\\\"\\n upper = %x41-5A\\n upper_digit = %x41-5A / %x30-39\\n dash = \\\"-\\\" / \\\"—\\\"\\n space = \\\" \\\"\\n digit = %x30-39\\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_code -> publisher_code (string)\\n number -> number (string)\\n part -> part (string)\\n year -> year (string)\\n }\\n\\n\\n test {\\n accept \\\"GB/T 19001-2016\\\"\\n accept \\\"GB 4943\\\"\\n reject \\\"nonsense\\\"\\n }\\n}\\n\",\"source_hash\":\"00d08eb59a1c1f6c71209c61abd5d00b41b49ff73d387fcc5674068f679f9d1a\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:4f5f8a04041ec8a04f9e16834f79563d3fdd0afdc35102786f46d8f0bf4b493a\",\"checksum\":\"sha256:2b424ed8b686bdb369e0fefc9685c5e2b248d4486c281b1f96fe387cd3175ce2\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":3,\"tests_failures\":0,\"self_test\":true}}";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "{\"bindings\":null,\"version\":\"0.2.0\",\"grammar\":\"PubidIala\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":105}},{\"Entity\":{\"atom\":3}},{\"Str\":{\"pattern\":\"IALA \"}},{\"Repetition\":{\"atom\":2,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":16}},{\"Str\":{\"pattern\":\"GA\"}},{\"Str\":{\"pattern\":\"S\"}},{\"Str\":{\"pattern\":\"R\"}},{\"Str\":{\"pattern\":\"G\"}},{\"Str\":{\"pattern\":\"M\"}},{\"Str\":{\"pattern\":\"C\"}},{\"Str\":{\"pattern\":\"A\"}},{\"Str\":{\"pattern\":\"L\"}},{\"Str\":{\"pattern\":\"X\"}},{\"Str\":{\"pattern\":\"P\"}},{\"Alternative\":{\"atoms\":[5,6,7,8,9,10,11,12,13,14]}},{\"Named\":{\"name\":\"type_letter\",\"atom\":15}},{\"Entity\":{\"atom\":32}},{\"Entity\":{\"atom\":22}},{\"Entity\":{\"atom\":20}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":19,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"doc_number\",\"atom\":21}},{\"Entity\":{\"atom\":29}},{\"Entity\":{\"atom\":25}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":26,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"dotted_segment\",\"atom\":27}},{\"Sequence\":{\"atoms\":[24,28]}},{\"Repetition\":{\"atom\":23,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"doc_number_dots\",\"atom\":30}},{\"Sequence\":{\"atoms\":[18,31]}},{\"Entity\":{\"atom\":42}},{\"Entity\":{\"atom\":40}},{\"Entity\":{\"atom\":36}},{\"Str\":{\"pattern\":\"-\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":37,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"subpart_number\",\"atom\":38}},{\"Sequence\":{\"atoms\":[35,39]}},{\"Repetition\":{\"atom\":34,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"subpart\",\"atom\":41}},{\"Repetition\":{\"atom\":33,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[1,4,17,43]}},{\"Named\":{\"name\":\"base\",\"atom\":44}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\" \"}},{\"Str\":{\"pattern\":\"Annex\"}},{\"Str\":{\"pattern\":\"ANNEX\"}},{\"Alternative\":{\"atoms\":[48,49]}},{\"Named\":{\"name\":\"annex_marker\",\"atom\":50}},{\"Entity\":{\"atom\":47}},{\"Entity\":{\"atom\":54}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":55,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[53,56]}},{\"Named\":{\"name\":\"annex_letter\",\"atom\":57}},{\"Entity\":{\"atom\":60}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Lookahead\":{\"atom\":59,\"positive\":false}},{\"Sequence\":{\"atoms\":[52,58,61]}},{\"Repetition\":{\"atom\":62,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\"Ed\"}},{\"Entity\":{\"atom\":47}},{\"Entity\":{\"atom\":77}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":69,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":25}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":72,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[71,73]}},{\"Repetition\":{\"atom\":74,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[70,75]}},{\"Named\":{\"name\":\"edition_value\",\"atom\":76}},{\"Sequence\":{\"atoms\":[65,66,67,68]}},{\"Named\":{\"name\":\"edition\",\"atom\":78}},{\"Entity\":{\"atom\":86}},{\"Entity\":{\"atom\":82}},{\"Str\":{\"pattern\":\":\"}},{\"Str\":{\"pattern\":\"ed\"}},{\"Entity\":{\"atom\":77}},{\"Sequence\":{\"atoms\":[81,83,84]}},{\"Named\":{\"name\":\"edition\",\"atom\":85}},{\"Alternative\":{\"atoms\":[64,80]}},{\"Repetition\":{\"atom\":87,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Entity\":{\"atom\":47}},{\"Repetition\":{\"atom\":90,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"(\"}},{\"Str\":{\"pattern\":\"E\"}},{\"Str\":{\"pattern\":\"F\"}},{\"Str\":{\"pattern\":\"S\"}},{\"Str\":{\"pattern\":\"C\"}},{\"Str\":{\"pattern\":\"A\"}},{\"Str\":{\"pattern\":\"R\"}},{\"Alternative\":{\"atoms\":[93,94,95,96,97,98]}},{\"Named\":{\"name\":\"language\",\"atom\":99}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[91,92,100,101]}},{\"Named\":{\"name\":\"language_group\",\"atom\":102}},{\"Repetition\":{\"atom\":89,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[45,46,51,63,88,104]}},{\"Entity\":{\"atom\":120}},{\"Entity\":{\"atom\":3}},{\"Entity\":{\"atom\":113}},{\"Entity\":{\"atom\":16}},{\"Entity\":{\"atom\":32}},{\"Entity\":{\"atom\":42}},{\"Repetition\":{\"atom\":111,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[109,110,112]}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":86}},{\"Alternative\":{\"atoms\":[114,115]}},{\"Repetition\":{\"atom\":116,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":118,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[107,108,117,119]}},{\"Entity\":{\"atom\":168}},{\"Entity\":{\"atom\":3}},{\"Entity\":{\"atom\":137}},{\"Str\":{\"pattern\":\"S\"}},{\"Str\":{\"pattern\":\"s\"}},{\"Alternative\":{\"atoms\":[124,125]}},{\"Entity\":{\"atom\":36}},{\"Entity\":{\"atom\":136}},{\"Str\":{\"pattern\":\"200\"}},{\"Lookahead\":{\"atom\":129,\"positive\":false}},{\"Str\":{\"pattern\":\"2\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":20}},{\"Sequence\":{\"atoms\":[131,132,133]}},{\"Sequence\":{\"atoms\":[130,134]}},{\"Named\":{\"name\":\"s100_number\",\"atom\":135}},{\"Sequence\":{\"atoms\":[126,127,128]}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\"Annex\"}},{\"Str\":{\"pattern\":\"ANNEX\"}},{\"Alternative\":{\"atoms\":[139,140]}},{\"Named\":{\"name\":\"annex_marker\",\"atom\":141}},{\"Entity\":{\"atom\":47}},{\"Entity\":{\"atom\":54}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":145,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[144,146]}},{\"Named\":{\"name\":\"annex_letter\",\"atom\":147}},{\"Entity\":{\"atom\":60}},{\"Lookahead\":{\"atom\":149,\"positive\":false}},{\"Sequence\":{\"atoms\":[143,148,150]}},{\"Repetition\":{\"atom\":151,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":86}},{\"Entity\":{\"atom\":163}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\"Ed\"}},{\"Entity\":{\"atom\":47}},{\"Sequence\":{\"atoms\":[157,158]}},{\"Repetition\":{\"atom\":159,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":77}},{\"Sequence\":{\"atoms\":[156,160,161]}},{\"Named\":{\"name\":\"edition\",\"atom\":162}},{\"Alternative\":{\"atoms\":[153,154,155]}},{\"Repetition\":{\"atom\":164,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":166,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[122,123,138,142,152,165,167]}},{\"Entity\":{\"atom\":179}},{\"Entity\":{\"atom\":3}},{\"Entity\":{\"atom\":137}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":86}},{\"Entity\":{\"atom\":163}},{\"Alternative\":{\"atoms\":[172,173,174]}},{\"Repetition\":{\"atom\":175,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":177,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[170,171,176,178]}},{\"Entity\":{\"atom\":209}},{\"Str\":{\"pattern\":\"IALA \"}},{\"Entity\":{\"atom\":204}},{\"Entity\":{\"atom\":192}},{\"Entity\":{\"atom\":60}},{\"Repetition\":{\"atom\":184,\"min\":0,\"max\":2,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":186,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":60}},{\"Entity\":{\"atom\":20}},{\"Alternative\":{\"atoms\":[188,189]}},{\"Lookahead\":{\"atom\":190,\"positive\":false}},{\"Sequence\":{\"atoms\":[185,187,191]}},{\"Lookahead\":{\"atom\":183,\"positive\":false}},{\"Entity\":{\"atom\":198}},{\"Entity\":{\"atom\":60}},{\"Entity\":{\"atom\":20}},{\"Alternative\":{\"atoms\":[195,196]}},{\"Repetition\":{\"atom\":197,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":36}},{\"Entity\":{\"atom\":198}},{\"Sequence\":{\"atoms\":[199,200]}},{\"Repetition\":{\"atom\":201,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[193,194,202]}},{\"Named\":{\"name\":\"slug\",\"atom\":203}},{\"Entity\":{\"atom\":79}},{\"Repetition\":{\"atom\":205,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":207,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[181,182,206,208]}},{\"Alternative\":{\"atoms\":[0,106,121,169,180]}}],\"root\":210},\"bindings\":[{\"capture\":\"type_letter\",\"path\":\"type_letter\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"doc_number\",\"path\":\"doc_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"dotted_segment\",\"path\":\"doc_number_dots[].dotted_segment\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"subpart_number\",\"path\":\"subpart[].subpart_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"s100_number\",\"path\":\"s100_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"edition_value\",\"path\":\"edition_value\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"language\",\"path\":\"language\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"annex_marker\",\"path\":\"annex_marker\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"annex_letter\",\"path\":\"annex_letter\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"slug\",\"path\":\"slug\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[\"rule identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 1 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 2 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\"]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"G1040\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"GA1040\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S1070 Ed 2.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"R1016:ed2.0(F)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"C0103-1 Ed 3.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA L2.1.11 Ed 2\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA G1128 Annex A Ed 1.6\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA G1045 Annex Ed 1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA A12-01 (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA arctic-seminar-report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA 13th-vts-symposium-report (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA iala-style-guide Ed 1.0 (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"S-201 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 Ed 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201:ed2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA s-201 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 ANNEX B2\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 Annex A 1.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-230 1.0.0 (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"arctic-seminar-report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA Arctic-Seminar-Report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA -arctic-seminar-report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic seminar report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic-\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic--report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA s1070\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA c0103-1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA 1070 Ed 2.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"S-411 1.2.1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-411 1.2.1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-200 1.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-30 2.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-2011 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-201 Ed\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"G1040\",\"expect\":{\"type_letter\":\"G\",\"doc_number\":\"1040\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"GA01.01\",\"expect\":{\"type_letter\":\"GA\",\"doc_number\":\"01\",\"doc_number_dots\":[{\"dotted_segment\":\"01\"}]}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"C0103-1\",\"expect\":{\"type_letter\":\"C\",\"doc_number\":\"0103\",\"subpart\":[{\"subpart_number\":\"1\"}]}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA S1070 Ed 2.0\",\"expect\":{\"type_letter\":\"S\",\"doc_number\":\"1070\",\"edition_value\":\"2.0\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA G1128 Annex A Ed 1.6\",\"expect\":{\"type_letter\":\"G\",\"doc_number\":\"1128\",\"annex_marker\":\"Annex\",\"annex_letter\":\"A\",\"edition_value\":\"1.6\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA arctic-seminar-report (E)\",\"expect\":{\"slug\":\"arctic-seminar-report\",\"language\":\"E\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA S-201 2.0.0\",\"expect\":{\"s100_number\":\"201\",\"edition_value\":\"2.0.0\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA S-201 ANNEX B2\",\"expect\":{\"s100_number\":\"201\",\"annex_marker\":\"ANNEX\",\"annex_letter\":\"B2\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA iala-world-wide-radio-navigation-plan Ed 2\",\"expect\":{\"slug\":\"iala-world-wide-radio-navigation-plan\",\"edition_value\":\"2\"}}],\"docs\":{},\"source\":\"# Port of lib/pubid/iala/parser.rb: [IALA ]<type><number>[.dots][-subs]\\n# [ Ed X.Y | :edX.Y] [(L)], plus the Annex-to-base form. The annex\\n# letter guard (!lower) keeps \\\"Ed 1\\\" from mis-capturing.\\n#\\n# The S-100-family product specifications (the IHO-granted S-201..S-299\\n# range, iala.int/technical/data-modelling/iala-s-200-development-status):\\n# the hyphenated lexical form \\\"S-201\\\" with the S-100 dotted x.y.z\\n# edition on the BARE face (\\\"IALA S-201 2.0.0\\\", the site's own citation\\n# form); \\\"Ed 2.0.0\\\" and the compact \\\":ed2.0.0\\\" parse as normalizing\\n# aliases. The hundreds digit is fixed to 2 by the grant, so WMO's and\\n# IHO's own S-series (\\\"S-411 1.2.1\\\") never parse here. The alternative\\n# sits above slug_identifier so the lower-case spelling (\\\"IALA s-201\\\")\\n# binds the typed form instead of the codeless slug. The S-100 annex\\n# wrapper takes the sub-numbered annex letters the package attests\\n# (\\\"Annex A\\\", \\\"ANNEX B2\\\", \\\"Annex D1\\\"), which widens the shared annex\\n# letter rule to an optional digit for the legacy series as well.\\n#\\n# Edition-2 conversion with typed model bindings. Deviations from the\\n# v1 tree:\\n# - the dotted continuation and the dash subpart repeat capture-bearing\\n# rule refs (the itu `parts` shape): a repetition over a capture-less\\n# unit harvested as a bare span binds differently per engine, so the\\n# bindings read the inner captures through the array paths\\n# `doc_number_dots[].dotted_segment` and `subpart[].subpart_number`.\\n# The dotted segment gains its own capture (`dotted_segment`); the\\n# subpart keeps its `subpart_number` capture, hoisted out of the\\n# inline repetition into a rule ref of its own.\\n# - the annex base composite stays unbound. Every capture inside it\\n# (type_letter, doc_number, \u2026) is the only occurrence of its name on\\n# the annex path, so the binding harvest hoists it to the top level:\\n# the builder reads one flat map for the plain and the annex form\\n# alike and dispatches on :annex_marker. edition_value and language\\n# hoist out of their edition/language_group composites the same way.\\n#\\n# The codeless (slug) form: iala.int lists some publications (reports\\n# and proceedings, the style guide, history books, radio plans) with no\\n# code, and relaton gives them the product-URL slug as docid, e.g.\\n# \\\"IALA arctic-seminar-report (E)\\\". slug_identifier is the last\\n# alternative, so every typed code keeps priority; a typed code starts\\n# upper-case and a slug lower-case or with a digit, so the two never\\n# overlap. The \\\"IALA \\\" prefix is mandatory here (it is optional for a\\n# typed code): without it any lower-case word would parse. The slug has\\n# no space, so it never takes the trailing \\\" Ed <edition>\\\" or \\\" (<L>)\\\".\\n# A slug is two or more hyphen-joined [a-z0-9] runs (every corpus slug\\n# is), and its first run must not look like a code (0-2 letters and\\n# digits: \\\"s1070\\\", \\\"ga01\\\", \\\"1070\\\"), so a lower-case or letterless typo\\n# of a typed code (\\\"IALA s1070\\\", \\\"IALA c0103-1\\\", \\\"IALA 1070 Ed 2.0\\\")\\n# still fails instead of parsing as a codeless publication.\\n\\ngrammar PubidIala version \\\"0.2.0\\\" edition 2 {\\n type_letter = (\\\"GA\\\" / \\\"S\\\" / \\\"R\\\" / \\\"G\\\" / \\\"M\\\" / \\\"C\\\" / \\\"A\\\" / \\\"L\\\" / \\\"X\\\" / \\\"P\\\") as type_letter\\n doc_number = (1*digit) as doc_number\\n dotted_number = dot (1*digit) as dotted_segment\\n number_with_dots = doc_number (*dotted_number) as doc_number_dots\\n subpart_number = dash (1*digit) as subpart_number\\n subpart = (1*subpart_number) as subpart\\n code = type_letter number_with_dots [subpart]\\n s100_number = (!\\\"200\\\" (\\\"2\\\" digit digit)) as s100_number\\n s100_code = ((\\\"S\\\" / \\\"s\\\") dash s100_number)\\n edition_value = (1*digit *(dot 1*digit)) as edition_value\\n edition_human = (space \\\"Ed\\\" space edition_value) as edition\\n edition_compact = (colon \\\"ed\\\" edition_value) as edition\\n s100_edition = (space [\\\"Ed\\\" space] edition_value) as edition\\n language_group = ([space] \\\"(\\\" (\\\"E\\\" / \\\"F\\\" / \\\"S\\\" / \\\"C\\\" / \\\"A\\\" / \\\"R\\\") as language \\\")\\\") as language_group\\n annex_identifier = {\\n ((publisher type_letter number_with_dots [subpart]) as base)\\n space\\n (\\\"Annex\\\" / \\\"ANNEX\\\") as annex_marker\\n [ (space (upper [digit]) as annex_letter !lower) ]\\n [edition_human / edition_compact]\\n [language_group]\\n }\\n plain_identifier = {\\n publisher code [edition_human / edition_compact] [language_group]\\n }\\n s100_annex_identifier = {\\n publisher s100_code\\n space\\n (\\\"Annex\\\" / \\\"ANNEX\\\") as annex_marker\\n [ (space (upper [digit]) as annex_letter !lower) ]\\n [edition_human / edition_compact / s100_edition]\\n [language_group]\\n }\\n s100_identifier = {\\n publisher s100_code\\n [edition_human / edition_compact / s100_edition]\\n [language_group]\\n }\\n slug_segment = 1*(lower / digit)\\n slug_code_like = *2lower 1*digit !(lower / digit)\\n slug = (!slug_code_like slug_segment 1*(dash slug_segment)) as slug\\n slug_identifier = {\\n \\\"IALA \\\" slug [edition_human] [language_group]\\n }\\n identifier = {\\n annex_identifier\\n / plain_identifier\\n / s100_annex_identifier\\n / s100_identifier\\n / slug_identifier\\n }\\n publisher = [\\\"IALA \\\"]\\n upper = %x41-5A\\n lower = %x61-7A\\n digit = %x30-39\\n dash = \\\"-\\\"\\n colon = \\\":\\\"\\n dot = \\\".\\\"\\n space = \\\" \\\"\\n entry identifier: identifier\\n\\n bindings identifier {\\n type_letter -> type_letter (string)\\n doc_number -> doc_number (string)\\n dotted_segment -> doc_number_dots[].dotted_segment (string)\\n subpart_number -> subpart[].subpart_number (string)\\n s100_number -> s100_number (string)\\n edition_value -> edition_value (string)\\n language -> language (string)\\n annex_marker -> annex_marker (string)\\n annex_letter -> annex_letter (string)\\n slug -> slug (string)\\n }\\n\\n test {\\n accept \\\"G1040\\\"\\n accept \\\"GA1040\\\"\\n accept \\\"IALA S1070 Ed 2.0\\\"\\n accept \\\"R1016:ed2.0(F)\\\"\\n accept \\\"C0103-1 Ed 3.0\\\"\\n accept \\\"IALA L2.1.11 Ed 2\\\"\\n accept \\\"IALA G1128 Annex A Ed 1.6\\\"\\n accept \\\"IALA G1045 Annex Ed 1\\\"\\n accept \\\"IALA A12-01 (E)\\\"\\n accept \\\"IALA arctic-seminar-report\\\"\\n accept \\\"IALA 13th-vts-symposium-report (E)\\\"\\n accept \\\"IALA iala-style-guide Ed 1.0 (E)\\\"\\n accept \\\"S-201 2.0.0\\\"\\n accept \\\"IALA S-201 2.0.0\\\"\\n accept \\\"IALA S-201 Ed 2.0.0\\\"\\n accept \\\"IALA S-201:ed2.0.0\\\"\\n accept \\\"IALA S-201\\\"\\n accept \\\"IALA s-201 2.0.0\\\"\\n accept \\\"IALA S-201 ANNEX B2\\\"\\n accept \\\"IALA S-201 Annex A 1.0.0\\\"\\n accept \\\"IALA S-230 1.0.0 (E)\\\"\\n reject \\\"nonsense\\\"\\n reject \\\"arctic-seminar-report\\\"\\n reject \\\"IALA Arctic-Seminar-Report\\\"\\n reject \\\"IALA -arctic-seminar-report\\\"\\n reject \\\"IALA arctic seminar report\\\"\\n reject \\\"IALA arctic\\\"\\n reject \\\"IALA arctic-\\\"\\n reject \\\"IALA arctic--report\\\"\\n reject \\\"IALA s1070\\\"\\n reject \\\"IALA c0103-1\\\"\\n reject \\\"IALA 1070 Ed 2.0\\\"\\n reject \\\"S-411 1.2.1\\\"\\n reject \\\"IALA S-411 1.2.1\\\"\\n reject \\\"IALA S-200 1.0.0\\\"\\n reject \\\"IALA S-30 2.0\\\"\\n reject \\\"IALA S-2011 2.0.0\\\"\\n reject \\\"IALA S-201 Ed\\\"\\n example \\\"G1040\\\" { type_letter: \\\"G\\\", doc_number: \\\"1040\\\" }\\n example \\\"GA01.01\\\" {\\n type_letter: \\\"GA\\\",\\n doc_number: \\\"01\\\",\\n doc_number_dots: [ { dotted_segment: \\\"01\\\" } ],\\n }\\n example \\\"C0103-1\\\" {\\n type_letter: \\\"C\\\",\\n doc_number: \\\"0103\\\",\\n subpart: [ { subpart_number: \\\"1\\\" } ],\\n }\\n example \\\"IALA S1070 Ed 2.0\\\" {\\n type_letter: \\\"S\\\",\\n doc_number: \\\"1070\\\",\\n edition_value: \\\"2.0\\\",\\n }\\n example \\\"IALA G1128 Annex A Ed 1.6\\\" {\\n type_letter: \\\"G\\\",\\n doc_number: \\\"1128\\\",\\n annex_marker: \\\"Annex\\\",\\n annex_letter: \\\"A\\\",\\n edition_value: \\\"1.6\\\",\\n }\\n example \\\"IALA arctic-seminar-report (E)\\\" {\\n slug: \\\"arctic-seminar-report\\\",\\n language: \\\"E\\\",\\n }\\n example \\\"IALA S-201 2.0.0\\\" {\\n s100_number: \\\"201\\\",\\n edition_value: \\\"2.0.0\\\",\\n }\\n example \\\"IALA S-201 ANNEX B2\\\" {\\n s100_number: \\\"201\\\",\\n annex_marker: \\\"ANNEX\\\",\\n annex_letter: \\\"B2\\\",\\n }\\n example \\\"IALA iala-world-wide-radio-navigation-plan Ed 2\\\" {\\n slug: \\\"iala-world-wide-radio-navigation-plan\\\",\\n edition_value: \\\"2\\\",\\n }\\n }\\n}\\n\",\"source_hash\":\"4bc93bf63b1692f346ce1cb273eff7adc50fc36a2d9c9904cda4e5457dacbae1\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:f21ad5b10665dcb1c4cc0d266e9b20359baab33900b2422a87c9ab0ace3c80eb\",\"checksum\":\"sha256:c6e3329aa3e2bba2504bededcc333568c5672898e614099111dc72e5747b5d80\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":10,\"tests_total\":47,\"tests_failures\":0,\"self_test\":true}}";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//! GENERATED FILE — do not edit. The checksummed PARG artifact for
|
|
2
|
+
//! the iala grammar, bundled as a module string so the worker
|
|
3
|
+
//! entries can construct the runtime without node:fs
|
|
4
|
+
//! (pubid/pubid-ts#232). Regenerate with `npm run artifact:emit`.
|
|
5
|
+
export default "{\"bindings\":null,\"version\":\"0.2.0\",\"grammar\":\"PubidIala\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":105}},{\"Entity\":{\"atom\":3}},{\"Str\":{\"pattern\":\"IALA \"}},{\"Repetition\":{\"atom\":2,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":16}},{\"Str\":{\"pattern\":\"GA\"}},{\"Str\":{\"pattern\":\"S\"}},{\"Str\":{\"pattern\":\"R\"}},{\"Str\":{\"pattern\":\"G\"}},{\"Str\":{\"pattern\":\"M\"}},{\"Str\":{\"pattern\":\"C\"}},{\"Str\":{\"pattern\":\"A\"}},{\"Str\":{\"pattern\":\"L\"}},{\"Str\":{\"pattern\":\"X\"}},{\"Str\":{\"pattern\":\"P\"}},{\"Alternative\":{\"atoms\":[5,6,7,8,9,10,11,12,13,14]}},{\"Named\":{\"name\":\"type_letter\",\"atom\":15}},{\"Entity\":{\"atom\":32}},{\"Entity\":{\"atom\":22}},{\"Entity\":{\"atom\":20}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":19,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"doc_number\",\"atom\":21}},{\"Entity\":{\"atom\":29}},{\"Entity\":{\"atom\":25}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":26,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"dotted_segment\",\"atom\":27}},{\"Sequence\":{\"atoms\":[24,28]}},{\"Repetition\":{\"atom\":23,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"doc_number_dots\",\"atom\":30}},{\"Sequence\":{\"atoms\":[18,31]}},{\"Entity\":{\"atom\":42}},{\"Entity\":{\"atom\":40}},{\"Entity\":{\"atom\":36}},{\"Str\":{\"pattern\":\"-\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":37,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"subpart_number\",\"atom\":38}},{\"Sequence\":{\"atoms\":[35,39]}},{\"Repetition\":{\"atom\":34,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"subpart\",\"atom\":41}},{\"Repetition\":{\"atom\":33,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[1,4,17,43]}},{\"Named\":{\"name\":\"base\",\"atom\":44}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\" \"}},{\"Str\":{\"pattern\":\"Annex\"}},{\"Str\":{\"pattern\":\"ANNEX\"}},{\"Alternative\":{\"atoms\":[48,49]}},{\"Named\":{\"name\":\"annex_marker\",\"atom\":50}},{\"Entity\":{\"atom\":47}},{\"Entity\":{\"atom\":54}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":55,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[53,56]}},{\"Named\":{\"name\":\"annex_letter\",\"atom\":57}},{\"Entity\":{\"atom\":60}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Lookahead\":{\"atom\":59,\"positive\":false}},{\"Sequence\":{\"atoms\":[52,58,61]}},{\"Repetition\":{\"atom\":62,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\"Ed\"}},{\"Entity\":{\"atom\":47}},{\"Entity\":{\"atom\":77}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":69,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":25}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":72,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[71,73]}},{\"Repetition\":{\"atom\":74,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[70,75]}},{\"Named\":{\"name\":\"edition_value\",\"atom\":76}},{\"Sequence\":{\"atoms\":[65,66,67,68]}},{\"Named\":{\"name\":\"edition\",\"atom\":78}},{\"Entity\":{\"atom\":86}},{\"Entity\":{\"atom\":82}},{\"Str\":{\"pattern\":\":\"}},{\"Str\":{\"pattern\":\"ed\"}},{\"Entity\":{\"atom\":77}},{\"Sequence\":{\"atoms\":[81,83,84]}},{\"Named\":{\"name\":\"edition\",\"atom\":85}},{\"Alternative\":{\"atoms\":[64,80]}},{\"Repetition\":{\"atom\":87,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Entity\":{\"atom\":47}},{\"Repetition\":{\"atom\":90,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"(\"}},{\"Str\":{\"pattern\":\"E\"}},{\"Str\":{\"pattern\":\"F\"}},{\"Str\":{\"pattern\":\"S\"}},{\"Str\":{\"pattern\":\"C\"}},{\"Str\":{\"pattern\":\"A\"}},{\"Str\":{\"pattern\":\"R\"}},{\"Alternative\":{\"atoms\":[93,94,95,96,97,98]}},{\"Named\":{\"name\":\"language\",\"atom\":99}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[91,92,100,101]}},{\"Named\":{\"name\":\"language_group\",\"atom\":102}},{\"Repetition\":{\"atom\":89,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[45,46,51,63,88,104]}},{\"Entity\":{\"atom\":120}},{\"Entity\":{\"atom\":3}},{\"Entity\":{\"atom\":113}},{\"Entity\":{\"atom\":16}},{\"Entity\":{\"atom\":32}},{\"Entity\":{\"atom\":42}},{\"Repetition\":{\"atom\":111,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[109,110,112]}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":86}},{\"Alternative\":{\"atoms\":[114,115]}},{\"Repetition\":{\"atom\":116,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":118,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[107,108,117,119]}},{\"Entity\":{\"atom\":168}},{\"Entity\":{\"atom\":3}},{\"Entity\":{\"atom\":137}},{\"Str\":{\"pattern\":\"S\"}},{\"Str\":{\"pattern\":\"s\"}},{\"Alternative\":{\"atoms\":[124,125]}},{\"Entity\":{\"atom\":36}},{\"Entity\":{\"atom\":136}},{\"Str\":{\"pattern\":\"200\"}},{\"Lookahead\":{\"atom\":129,\"positive\":false}},{\"Str\":{\"pattern\":\"2\"}},{\"Entity\":{\"atom\":20}},{\"Entity\":{\"atom\":20}},{\"Sequence\":{\"atoms\":[131,132,133]}},{\"Sequence\":{\"atoms\":[130,134]}},{\"Named\":{\"name\":\"s100_number\",\"atom\":135}},{\"Sequence\":{\"atoms\":[126,127,128]}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\"Annex\"}},{\"Str\":{\"pattern\":\"ANNEX\"}},{\"Alternative\":{\"atoms\":[139,140]}},{\"Named\":{\"name\":\"annex_marker\",\"atom\":141}},{\"Entity\":{\"atom\":47}},{\"Entity\":{\"atom\":54}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":145,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[144,146]}},{\"Named\":{\"name\":\"annex_letter\",\"atom\":147}},{\"Entity\":{\"atom\":60}},{\"Lookahead\":{\"atom\":149,\"positive\":false}},{\"Sequence\":{\"atoms\":[143,148,150]}},{\"Repetition\":{\"atom\":151,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":86}},{\"Entity\":{\"atom\":163}},{\"Entity\":{\"atom\":47}},{\"Str\":{\"pattern\":\"Ed\"}},{\"Entity\":{\"atom\":47}},{\"Sequence\":{\"atoms\":[157,158]}},{\"Repetition\":{\"atom\":159,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":77}},{\"Sequence\":{\"atoms\":[156,160,161]}},{\"Named\":{\"name\":\"edition\",\"atom\":162}},{\"Alternative\":{\"atoms\":[153,154,155]}},{\"Repetition\":{\"atom\":164,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":166,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[122,123,138,142,152,165,167]}},{\"Entity\":{\"atom\":179}},{\"Entity\":{\"atom\":3}},{\"Entity\":{\"atom\":137}},{\"Entity\":{\"atom\":79}},{\"Entity\":{\"atom\":86}},{\"Entity\":{\"atom\":163}},{\"Alternative\":{\"atoms\":[172,173,174]}},{\"Repetition\":{\"atom\":175,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":177,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[170,171,176,178]}},{\"Entity\":{\"atom\":209}},{\"Str\":{\"pattern\":\"IALA \"}},{\"Entity\":{\"atom\":204}},{\"Entity\":{\"atom\":192}},{\"Entity\":{\"atom\":60}},{\"Repetition\":{\"atom\":184,\"min\":0,\"max\":2,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":20}},{\"Repetition\":{\"atom\":186,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":60}},{\"Entity\":{\"atom\":20}},{\"Alternative\":{\"atoms\":[188,189]}},{\"Lookahead\":{\"atom\":190,\"positive\":false}},{\"Sequence\":{\"atoms\":[185,187,191]}},{\"Lookahead\":{\"atom\":183,\"positive\":false}},{\"Entity\":{\"atom\":198}},{\"Entity\":{\"atom\":60}},{\"Entity\":{\"atom\":20}},{\"Alternative\":{\"atoms\":[195,196]}},{\"Repetition\":{\"atom\":197,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":36}},{\"Entity\":{\"atom\":198}},{\"Sequence\":{\"atoms\":[199,200]}},{\"Repetition\":{\"atom\":201,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[193,194,202]}},{\"Named\":{\"name\":\"slug\",\"atom\":203}},{\"Entity\":{\"atom\":79}},{\"Repetition\":{\"atom\":205,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":103}},{\"Repetition\":{\"atom\":207,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[181,182,206,208]}},{\"Alternative\":{\"atoms\":[0,106,121,169,180]}}],\"root\":210},\"bindings\":[{\"capture\":\"type_letter\",\"path\":\"type_letter\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"doc_number\",\"path\":\"doc_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"dotted_segment\",\"path\":\"doc_number_dots[].dotted_segment\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"subpart_number\",\"path\":\"subpart[].subpart_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"s100_number\",\"path\":\"s100_number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"edition_value\",\"path\":\"edition_value\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"language\",\"path\":\"language\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"annex_marker\",\"path\":\"annex_marker\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"annex_letter\",\"path\":\"annex_letter\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"slug\",\"path\":\"slug\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[\"rule identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 1 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 2 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\",\"rule identifier: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)\"]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"G1040\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"GA1040\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S1070 Ed 2.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"R1016:ed2.0(F)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"C0103-1 Ed 3.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA L2.1.11 Ed 2\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA G1128 Annex A Ed 1.6\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA G1045 Annex Ed 1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA A12-01 (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA arctic-seminar-report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA 13th-vts-symposium-report (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA iala-style-guide Ed 1.0 (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"S-201 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 Ed 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201:ed2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA s-201 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 ANNEX B2\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-201 Annex A 1.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IALA S-230 1.0.0 (E)\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"arctic-seminar-report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA Arctic-Seminar-Report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA -arctic-seminar-report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic seminar report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic-\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA arctic--report\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA s1070\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA c0103-1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA 1070 Ed 2.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"S-411 1.2.1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-411 1.2.1\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-200 1.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-30 2.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-2011 2.0.0\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"IALA S-201 Ed\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"G1040\",\"expect\":{\"type_letter\":\"G\",\"doc_number\":\"1040\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"GA01.01\",\"expect\":{\"type_letter\":\"GA\",\"doc_number\":\"01\",\"doc_number_dots\":[{\"dotted_segment\":\"01\"}]}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"C0103-1\",\"expect\":{\"type_letter\":\"C\",\"doc_number\":\"0103\",\"subpart\":[{\"subpart_number\":\"1\"}]}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA S1070 Ed 2.0\",\"expect\":{\"type_letter\":\"S\",\"doc_number\":\"1070\",\"edition_value\":\"2.0\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA G1128 Annex A Ed 1.6\",\"expect\":{\"type_letter\":\"G\",\"doc_number\":\"1128\",\"annex_marker\":\"Annex\",\"annex_letter\":\"A\",\"edition_value\":\"1.6\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA arctic-seminar-report (E)\",\"expect\":{\"slug\":\"arctic-seminar-report\",\"language\":\"E\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA S-201 2.0.0\",\"expect\":{\"s100_number\":\"201\",\"edition_value\":\"2.0.0\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA S-201 ANNEX B2\",\"expect\":{\"s100_number\":\"201\",\"annex_marker\":\"ANNEX\",\"annex_letter\":\"B2\"}},{\"entry\":\"identifier\",\"kind\":\"example\",\"input\":\"IALA iala-world-wide-radio-navigation-plan Ed 2\",\"expect\":{\"slug\":\"iala-world-wide-radio-navigation-plan\",\"edition_value\":\"2\"}}],\"docs\":{},\"source\":\"# Port of lib/pubid/iala/parser.rb: [IALA ]<type><number>[.dots][-subs]\\n# [ Ed X.Y | :edX.Y] [(L)], plus the Annex-to-base form. The annex\\n# letter guard (!lower) keeps \\\"Ed 1\\\" from mis-capturing.\\n#\\n# The S-100-family product specifications (the IHO-granted S-201..S-299\\n# range, iala.int/technical/data-modelling/iala-s-200-development-status):\\n# the hyphenated lexical form \\\"S-201\\\" with the S-100 dotted x.y.z\\n# edition on the BARE face (\\\"IALA S-201 2.0.0\\\", the site's own citation\\n# form); \\\"Ed 2.0.0\\\" and the compact \\\":ed2.0.0\\\" parse as normalizing\\n# aliases. The hundreds digit is fixed to 2 by the grant, so WMO's and\\n# IHO's own S-series (\\\"S-411 1.2.1\\\") never parse here. The alternative\\n# sits above slug_identifier so the lower-case spelling (\\\"IALA s-201\\\")\\n# binds the typed form instead of the codeless slug. The S-100 annex\\n# wrapper takes the sub-numbered annex letters the package attests\\n# (\\\"Annex A\\\", \\\"ANNEX B2\\\", \\\"Annex D1\\\"), which widens the shared annex\\n# letter rule to an optional digit for the legacy series as well.\\n#\\n# Edition-2 conversion with typed model bindings. Deviations from the\\n# v1 tree:\\n# - the dotted continuation and the dash subpart repeat capture-bearing\\n# rule refs (the itu `parts` shape): a repetition over a capture-less\\n# unit harvested as a bare span binds differently per engine, so the\\n# bindings read the inner captures through the array paths\\n# `doc_number_dots[].dotted_segment` and `subpart[].subpart_number`.\\n# The dotted segment gains its own capture (`dotted_segment`); the\\n# subpart keeps its `subpart_number` capture, hoisted out of the\\n# inline repetition into a rule ref of its own.\\n# - the annex base composite stays unbound. Every capture inside it\\n# (type_letter, doc_number, …) is the only occurrence of its name on\\n# the annex path, so the binding harvest hoists it to the top level:\\n# the builder reads one flat map for the plain and the annex form\\n# alike and dispatches on :annex_marker. edition_value and language\\n# hoist out of their edition/language_group composites the same way.\\n#\\n# The codeless (slug) form: iala.int lists some publications (reports\\n# and proceedings, the style guide, history books, radio plans) with no\\n# code, and relaton gives them the product-URL slug as docid, e.g.\\n# \\\"IALA arctic-seminar-report (E)\\\". slug_identifier is the last\\n# alternative, so every typed code keeps priority; a typed code starts\\n# upper-case and a slug lower-case or with a digit, so the two never\\n# overlap. The \\\"IALA \\\" prefix is mandatory here (it is optional for a\\n# typed code): without it any lower-case word would parse. The slug has\\n# no space, so it never takes the trailing \\\" Ed <edition>\\\" or \\\" (<L>)\\\".\\n# A slug is two or more hyphen-joined [a-z0-9] runs (every corpus slug\\n# is), and its first run must not look like a code (0-2 letters and\\n# digits: \\\"s1070\\\", \\\"ga01\\\", \\\"1070\\\"), so a lower-case or letterless typo\\n# of a typed code (\\\"IALA s1070\\\", \\\"IALA c0103-1\\\", \\\"IALA 1070 Ed 2.0\\\")\\n# still fails instead of parsing as a codeless publication.\\n\\ngrammar PubidIala version \\\"0.2.0\\\" edition 2 {\\n type_letter = (\\\"GA\\\" / \\\"S\\\" / \\\"R\\\" / \\\"G\\\" / \\\"M\\\" / \\\"C\\\" / \\\"A\\\" / \\\"L\\\" / \\\"X\\\" / \\\"P\\\") as type_letter\\n doc_number = (1*digit) as doc_number\\n dotted_number = dot (1*digit) as dotted_segment\\n number_with_dots = doc_number (*dotted_number) as doc_number_dots\\n subpart_number = dash (1*digit) as subpart_number\\n subpart = (1*subpart_number) as subpart\\n code = type_letter number_with_dots [subpart]\\n s100_number = (!\\\"200\\\" (\\\"2\\\" digit digit)) as s100_number\\n s100_code = ((\\\"S\\\" / \\\"s\\\") dash s100_number)\\n edition_value = (1*digit *(dot 1*digit)) as edition_value\\n edition_human = (space \\\"Ed\\\" space edition_value) as edition\\n edition_compact = (colon \\\"ed\\\" edition_value) as edition\\n s100_edition = (space [\\\"Ed\\\" space] edition_value) as edition\\n language_group = ([space] \\\"(\\\" (\\\"E\\\" / \\\"F\\\" / \\\"S\\\" / \\\"C\\\" / \\\"A\\\" / \\\"R\\\") as language \\\")\\\") as language_group\\n annex_identifier = {\\n ((publisher type_letter number_with_dots [subpart]) as base)\\n space\\n (\\\"Annex\\\" / \\\"ANNEX\\\") as annex_marker\\n [ (space (upper [digit]) as annex_letter !lower) ]\\n [edition_human / edition_compact]\\n [language_group]\\n }\\n plain_identifier = {\\n publisher code [edition_human / edition_compact] [language_group]\\n }\\n s100_annex_identifier = {\\n publisher s100_code\\n space\\n (\\\"Annex\\\" / \\\"ANNEX\\\") as annex_marker\\n [ (space (upper [digit]) as annex_letter !lower) ]\\n [edition_human / edition_compact / s100_edition]\\n [language_group]\\n }\\n s100_identifier = {\\n publisher s100_code\\n [edition_human / edition_compact / s100_edition]\\n [language_group]\\n }\\n slug_segment = 1*(lower / digit)\\n slug_code_like = *2lower 1*digit !(lower / digit)\\n slug = (!slug_code_like slug_segment 1*(dash slug_segment)) as slug\\n slug_identifier = {\\n \\\"IALA \\\" slug [edition_human] [language_group]\\n }\\n identifier = {\\n annex_identifier\\n / plain_identifier\\n / s100_annex_identifier\\n / s100_identifier\\n / slug_identifier\\n }\\n publisher = [\\\"IALA \\\"]\\n upper = %x41-5A\\n lower = %x61-7A\\n digit = %x30-39\\n dash = \\\"-\\\"\\n colon = \\\":\\\"\\n dot = \\\".\\\"\\n space = \\\" \\\"\\n entry identifier: identifier\\n\\n bindings identifier {\\n type_letter -> type_letter (string)\\n doc_number -> doc_number (string)\\n dotted_segment -> doc_number_dots[].dotted_segment (string)\\n subpart_number -> subpart[].subpart_number (string)\\n s100_number -> s100_number (string)\\n edition_value -> edition_value (string)\\n language -> language (string)\\n annex_marker -> annex_marker (string)\\n annex_letter -> annex_letter (string)\\n slug -> slug (string)\\n }\\n\\n test {\\n accept \\\"G1040\\\"\\n accept \\\"GA1040\\\"\\n accept \\\"IALA S1070 Ed 2.0\\\"\\n accept \\\"R1016:ed2.0(F)\\\"\\n accept \\\"C0103-1 Ed 3.0\\\"\\n accept \\\"IALA L2.1.11 Ed 2\\\"\\n accept \\\"IALA G1128 Annex A Ed 1.6\\\"\\n accept \\\"IALA G1045 Annex Ed 1\\\"\\n accept \\\"IALA A12-01 (E)\\\"\\n accept \\\"IALA arctic-seminar-report\\\"\\n accept \\\"IALA 13th-vts-symposium-report (E)\\\"\\n accept \\\"IALA iala-style-guide Ed 1.0 (E)\\\"\\n accept \\\"S-201 2.0.0\\\"\\n accept \\\"IALA S-201 2.0.0\\\"\\n accept \\\"IALA S-201 Ed 2.0.0\\\"\\n accept \\\"IALA S-201:ed2.0.0\\\"\\n accept \\\"IALA S-201\\\"\\n accept \\\"IALA s-201 2.0.0\\\"\\n accept \\\"IALA S-201 ANNEX B2\\\"\\n accept \\\"IALA S-201 Annex A 1.0.0\\\"\\n accept \\\"IALA S-230 1.0.0 (E)\\\"\\n reject \\\"nonsense\\\"\\n reject \\\"arctic-seminar-report\\\"\\n reject \\\"IALA Arctic-Seminar-Report\\\"\\n reject \\\"IALA -arctic-seminar-report\\\"\\n reject \\\"IALA arctic seminar report\\\"\\n reject \\\"IALA arctic\\\"\\n reject \\\"IALA arctic-\\\"\\n reject \\\"IALA arctic--report\\\"\\n reject \\\"IALA s1070\\\"\\n reject \\\"IALA c0103-1\\\"\\n reject \\\"IALA 1070 Ed 2.0\\\"\\n reject \\\"S-411 1.2.1\\\"\\n reject \\\"IALA S-411 1.2.1\\\"\\n reject \\\"IALA S-200 1.0.0\\\"\\n reject \\\"IALA S-30 2.0\\\"\\n reject \\\"IALA S-2011 2.0.0\\\"\\n reject \\\"IALA S-201 Ed\\\"\\n example \\\"G1040\\\" { type_letter: \\\"G\\\", doc_number: \\\"1040\\\" }\\n example \\\"GA01.01\\\" {\\n type_letter: \\\"GA\\\",\\n doc_number: \\\"01\\\",\\n doc_number_dots: [ { dotted_segment: \\\"01\\\" } ],\\n }\\n example \\\"C0103-1\\\" {\\n type_letter: \\\"C\\\",\\n doc_number: \\\"0103\\\",\\n subpart: [ { subpart_number: \\\"1\\\" } ],\\n }\\n example \\\"IALA S1070 Ed 2.0\\\" {\\n type_letter: \\\"S\\\",\\n doc_number: \\\"1070\\\",\\n edition_value: \\\"2.0\\\",\\n }\\n example \\\"IALA G1128 Annex A Ed 1.6\\\" {\\n type_letter: \\\"G\\\",\\n doc_number: \\\"1128\\\",\\n annex_marker: \\\"Annex\\\",\\n annex_letter: \\\"A\\\",\\n edition_value: \\\"1.6\\\",\\n }\\n example \\\"IALA arctic-seminar-report (E)\\\" {\\n slug: \\\"arctic-seminar-report\\\",\\n language: \\\"E\\\",\\n }\\n example \\\"IALA S-201 2.0.0\\\" {\\n s100_number: \\\"201\\\",\\n edition_value: \\\"2.0.0\\\",\\n }\\n example \\\"IALA S-201 ANNEX B2\\\" {\\n s100_number: \\\"201\\\",\\n annex_marker: \\\"ANNEX\\\",\\n annex_letter: \\\"B2\\\",\\n }\\n example \\\"IALA iala-world-wide-radio-navigation-plan Ed 2\\\" {\\n slug: \\\"iala-world-wide-radio-navigation-plan\\\",\\n edition_value: \\\"2\\\",\\n }\\n }\\n}\\n\",\"source_hash\":\"4bc93bf63b1692f346ce1cb273eff7adc50fc36a2d9c9904cda4e5457dacbae1\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:f21ad5b10665dcb1c4cc0d266e9b20359baab33900b2422a87c9ab0ace3c80eb\",\"checksum\":\"sha256:c6e3329aa3e2bba2504bededcc333568c5672898e614099111dc72e5747b5d80\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":10,\"tests_total\":47,\"tests_failures\":0,\"self_test\":true}}";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidIana\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Str\":{\"pattern\":\"IANA \"}},{\"Repetition\":{\"atom\":0,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":9}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[.]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Re\":{\"pattern\":\"[\\\\-]\"}},{\"Alternative\":{\"atoms\":[3,4,5,6,7,8]}},{\"Repetition\":{\"atom\":2,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"registry\",\"atom\":10}},{\"Entity\":{\"atom\":13}},{\"Str\":{\"pattern\":\"/\"}},{\"Named\":{\"name\":\"slash\",\"atom\":12}},{\"Entity\":{\"atom\":9}},{\"Repetition\":{\"atom\":15,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"sub_registry\",\"atom\":16}},{\"Sequence\":{\"atoms\":[14,17]}},{\"Repetition\":{\"atom\":18,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[1,11,19]}}],\"root\":20},\"bindings\":[{\"capture\":\"registry\",\"path\":\"registry\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"sub_registry\",\"path\":\"sub_registry\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IANA media-types\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"media-types/application\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"no sense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/iana/parser.rb: \\\"IANA <slug>[/<sub-slug>]\\\", the\\n# optional prefix consumed and discarded.\\n\\ngrammar PubidIana version \\\"0.1.0\\\" edition 2 {\\n slug_char = %x30-39 / %x41-5A / %x61-7A / %x2E / %x5F / %x2D\\n slug = 1*slug_char\\n identifier = [\\\"IANA \\\"] 1*slug_char as registry [slash 1*slug_char as sub_registry]\\n slash = \\\"/\\\"\\n entry identifier: identifier\\n\\n bindings identifier {\\n registry -> registry (string)\\n sub_registry -> sub_registry (string)\\n }\\n\\n\\n test {\\n accept \\\"IANA media-types\\\"\\n accept \\\"media-types/application\\\"\\n reject \\\"no sense\\\"\\n }\\n}\\n\",\"source_hash\":\"c2633424d33a30d370e12141700d25ef4124f5dc49a565da404dbf7da0bffb21\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:04d3164f0169a2311391424ff0c2b3a5b311b8f19ff4f7e7805bb4abfe4a837a\",\"checksum\":\"sha256:268333737149dff1481d9dc3ec9a87071c567567e64f31e43bb62bd527ce63b8\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":3,\"tests_failures\":0,\"self_test\":true}}";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//! GENERATED FILE — do not edit. The checksummed PARG artifact for
|
|
2
|
+
//! the iana grammar, bundled as a module string so the worker
|
|
3
|
+
//! entries can construct the runtime without node:fs
|
|
4
|
+
//! (pubid/pubid-ts#232). Regenerate with `npm run artifact:emit`.
|
|
5
|
+
export default "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidIana\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Str\":{\"pattern\":\"IANA \"}},{\"Repetition\":{\"atom\":0,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":9}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[.]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Re\":{\"pattern\":\"[\\\\-]\"}},{\"Alternative\":{\"atoms\":[3,4,5,6,7,8]}},{\"Repetition\":{\"atom\":2,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"registry\",\"atom\":10}},{\"Entity\":{\"atom\":13}},{\"Str\":{\"pattern\":\"/\"}},{\"Named\":{\"name\":\"slash\",\"atom\":12}},{\"Entity\":{\"atom\":9}},{\"Repetition\":{\"atom\":15,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"sub_registry\",\"atom\":16}},{\"Sequence\":{\"atoms\":[14,17]}},{\"Repetition\":{\"atom\":18,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[1,11,19]}}],\"root\":20},\"bindings\":[{\"capture\":\"registry\",\"path\":\"registry\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"sub_registry\",\"path\":\"sub_registry\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"IANA media-types\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"media-types/application\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"no sense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/iana/parser.rb: \\\"IANA <slug>[/<sub-slug>]\\\", the\\n# optional prefix consumed and discarded.\\n\\ngrammar PubidIana version \\\"0.1.0\\\" edition 2 {\\n slug_char = %x30-39 / %x41-5A / %x61-7A / %x2E / %x5F / %x2D\\n slug = 1*slug_char\\n identifier = [\\\"IANA \\\"] 1*slug_char as registry [slash 1*slug_char as sub_registry]\\n slash = \\\"/\\\"\\n entry identifier: identifier\\n\\n bindings identifier {\\n registry -> registry (string)\\n sub_registry -> sub_registry (string)\\n }\\n\\n\\n test {\\n accept \\\"IANA media-types\\\"\\n accept \\\"media-types/application\\\"\\n reject \\\"no sense\\\"\\n }\\n}\\n\",\"source_hash\":\"c2633424d33a30d370e12141700d25ef4124f5dc49a565da404dbf7da0bffb21\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:04d3164f0169a2311391424ff0c2b3a5b311b8f19ff4f7e7805bb4abfe4a837a\",\"checksum\":\"sha256:268333737149dff1481d9dc3ec9a87071c567567e64f31e43bb62bd527ce63b8\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":3,\"tests_failures\":0,\"self_test\":true}}";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidIdf\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":226}},{\"Entity\":{\"atom\":191}},{\"Entity\":{\"atom\":116}},{\"Entity\":{\"atom\":5}},{\"Str\":{\"pattern\":\"IDF\"}},{\"Named\":{\"name\":\"publisher\",\"atom\":4}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":6,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"/\"}},{\"Repetition\":{\"atom\":8,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":46}},{\"Str\":{\"pattern\":\"AWI RM\"}},{\"Str\":{\"pattern\":\"PRF RM\"}},{\"Str\":{\"pattern\":\"PWI RM\"}},{\"Str\":{\"pattern\":\"CD RM\"}},{\"Str\":{\"pattern\":\"NP RM\"}},{\"Str\":{\"pattern\":\"WD RM\"}},{\"Str\":{\"pattern\":\"FDIS\"}},{\"Str\":{\"pattern\":\"FDRM\"}},{\"Str\":{\"pattern\":\"NWIP\"}},{\"Str\":{\"pattern\":\"PDRM\"}},{\"Str\":{\"pattern\":\"WDAR\"}},{\"Str\":{\"pattern\":\"AMD\"}},{\"Str\":{\"pattern\":\"AWI\"}},{\"Str\":{\"pattern\":\"COR\"}},{\"Str\":{\"pattern\":\"DIS\"}},{\"Str\":{\"pattern\":\"DRM\"}},{\"Str\":{\"pattern\":\"FCD\"}},{\"Str\":{\"pattern\":\"FPD\"}},{\"Str\":{\"pattern\":\"Fpr\"}},{\"Str\":{\"pattern\":\"PRF\"}},{\"Str\":{\"pattern\":\"PWI\"}},{\"Str\":{\"pattern\":\"WDA\"}},{\"Str\":{\"pattern\":\"WDR\"}},{\"Str\":{\"pattern\":\"CD\"}},{\"Str\":{\"pattern\":\"NP\"}},{\"Str\":{\"pattern\":\"RM\"}},{\"Str\":{\"pattern\":\"WD\"}},{\"Alternative\":{\"atoms\":[11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]}},{\"Named\":{\"name\":\"base_type_with_stage\",\"atom\":38}},{\"Entity\":{\"atom\":41}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Named\":{\"name\":\"base_stage_iteration\",\"atom\":40}},{\"Str\":{\"pattern\":\" \"}},{\"Sequence\":{\"atoms\":[42,43]}},{\"Repetition\":{\"atom\":44,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[39,45]}},{\"Repetition\":{\"atom\":10,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":48,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":115}},{\"Entity\":{\"atom\":83}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[52,53,54,55]}},{\"Repetition\":{\"atom\":56,\"min\":1,\"max\":5,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Str\":{\"pattern\":\"-\"}},{\"Str\":{\"pattern\":\"\u2011\"}},{\"Str\":{\"pattern\":\"\u2010\"}},{\"Alternative\":{\"atoms\":[59,60,61]}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":63,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[65,66,67,68]}},{\"Repetition\":{\"atom\":69,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[72,73,74,75]}},{\"Repetition\":{\"atom\":76,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[71,77]}},{\"Repetition\":{\"atom\":78,\"min\":0,\"max\":1,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[58,64,70,79]}},{\"Repetition\":{\"atom\":80,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[57,81]}},{\"Named\":{\"name\":\"base_number_with_part\",\"atom\":82}},{\"Entity\":{\"atom\":88}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":41}},{\"Named\":{\"name\":\"base_stage_iteration\",\"atom\":86}},{\"Sequence\":{\"atoms\":[85,87]}},{\"Repetition\":{\"atom\":84,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":90,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\":\"}},{\"Entity\":{\"atom\":112}},{\"Str\":{\"pattern\":\"19\"}},{\"Str\":{\"pattern\":\"20\"}},{\"Alternative\":{\"atoms\":[94,95]}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":97,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":41}},{\"Lookahead\":{\"atom\":99,\"positive\":false}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":102,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[101,103]}},{\"Repetition\":{\"atom\":104,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":107,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[106,108]}},{\"Repetition\":{\"atom\":109,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[96,98,100,105,110]}},{\"Named\":{\"name\":\"base_date\",\"atom\":111}},{\"Sequence\":{\"atoms\":[92,93]}},{\"Repetition\":{\"atom\":113,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[51,89,91,114]}},{\"Sequence\":{\"atoms\":[3,7,9,47,49,50]}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":117,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"/\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":120,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":126}},{\"Str\":{\"pattern\":\"AMD\"}},{\"Str\":{\"pattern\":\"COR\"}},{\"Alternative\":{\"atoms\":[123,124]}},{\"Named\":{\"name\":\"type_with_stage\",\"atom\":125}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":127,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":190}},{\"Entity\":{\"atom\":158}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[131,132,133,134]}},{\"Repetition\":{\"atom\":135,\"min\":1,\"max\":5,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":138,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[140,141,142,143]}},{\"Repetition\":{\"atom\":144,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[147,148,149,150]}},{\"Repetition\":{\"atom\":151,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[146,152]}},{\"Repetition\":{\"atom\":153,\"min\":0,\"max\":1,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[137,139,145,154]}},{\"Repetition\":{\"atom\":155,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[136,156]}},{\"Named\":{\"name\":\"number_with_part\",\"atom\":157}},{\"Entity\":{\"atom\":163}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":41}},{\"Named\":{\"name\":\"stage_iteration\",\"atom\":161}},{\"Sequence\":{\"atoms\":[160,162]}},{\"Repetition\":{\"atom\":159,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":165,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\":\"}},{\"Entity\":{\"atom\":187}},{\"Str\":{\"pattern\":\"19\"}},{\"Str\":{\"pattern\":\"20\"}},{\"Alternative\":{\"atoms\":[169,170]}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":172,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":41}},{\"Lookahead\":{\"atom\":174,\"positive\":false}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":177,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[176,178]}},{\"Repetition\":{\"atom\":179,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":182,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[181,183]}},{\"Repetition\":{\"atom\":184,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[171,173,175,180,185]}},{\"Named\":{\"name\":\"date\",\"atom\":186}},{\"Sequence\":{\"atoms\":[167,168]}},{\"Repetition\":{\"atom\":188,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[130,164,166,189]}},{\"Sequence\":{\"atoms\":[2,118,119,121,122,128,129]}},{\"Entity\":{\"atom\":225}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":193,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":219}},{\"Str\":{\"pattern\":\"(\"}},{\"Entity\":{\"atom\":198}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Repetition\":{\"atom\":197,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Str\":{\"pattern\":\",\"}},{\"Repetition\":{\"atom\":200,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[199,201]}},{\"Entity\":{\"atom\":210}},{\"Re\":{\"pattern\":\"[E]\"}},{\"Re\":{\"pattern\":\"[F]\"}},{\"Re\":{\"pattern\":\"[A]\"}},{\"Re\":{\"pattern\":\"[R]\"}},{\"Re\":{\"pattern\":\"[D]\"}},{\"Re\":{\"pattern\":\"[S]\"}},{\"Alternative\":{\"atoms\":[204,205,206,207,208,209]}},{\"Entity\":{\"atom\":212}},{\"Str\":{\"pattern\":\"/\"}},{\"Repetition\":{\"atom\":211,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[203,213]}},{\"Alternative\":{\"atoms\":[202,214]}},{\"Repetition\":{\"atom\":215,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"languages\",\"atom\":216}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[196,217,218]}},{\"Repetition\":{\"atom\":195,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":223}},{\"Str\":{\"pattern\":\"(all parts)\"}},{\"Named\":{\"name\":\"all_parts\",\"atom\":222}},{\"Repetition\":{\"atom\":221,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[194,220,224]}},{\"Sequence\":{\"atoms\":[1,192]}},{\"Entity\":{\"atom\":286}},{\"Entity\":{\"atom\":284}},{\"Entity\":{\"atom\":5}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":230,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"/\"}},{\"Repetition\":{\"atom\":232,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":269}},{\"Str\":{\"pattern\":\"AWI RM\"}},{\"Str\":{\"pattern\":\"PRF RM\"}},{\"Str\":{\"pattern\":\"PWI RM\"}},{\"Str\":{\"pattern\":\"CD RM\"}},{\"Str\":{\"pattern\":\"NP RM\"}},{\"Str\":{\"pattern\":\"WD RM\"}},{\"Str\":{\"pattern\":\"FDIS\"}},{\"Str\":{\"pattern\":\"FDRM\"}},{\"Str\":{\"pattern\":\"NWIP\"}},{\"Str\":{\"pattern\":\"PDRM\"}},{\"Str\":{\"pattern\":\"WDAR\"}},{\"Str\":{\"pattern\":\"AMD\"}},{\"Str\":{\"pattern\":\"AWI\"}},{\"Str\":{\"pattern\":\"COR\"}},{\"Str\":{\"pattern\":\"DIS\"}},{\"Str\":{\"pattern\":\"DRM\"}},{\"Str\":{\"pattern\":\"FCD\"}},{\"Str\":{\"pattern\":\"FPD\"}},{\"Str\":{\"pattern\":\"Fpr\"}},{\"Str\":{\"pattern\":\"PRF\"}},{\"Str\":{\"pattern\":\"PWI\"}},{\"Str\":{\"pattern\":\"WDA\"}},{\"Str\":{\"pattern\":\"WDR\"}},{\"Str\":{\"pattern\":\"CD\"}},{\"Str\":{\"pattern\":\"NP\"}},{\"Str\":{\"pattern\":\"RM\"}},{\"Str\":{\"pattern\":\"WD\"}},{\"Alternative\":{\"atoms\":[235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261]}},{\"Named\":{\"name\":\"type_with_stage\",\"atom\":262}},{\"Entity\":{\"atom\":41}},{\"Named\":{\"name\":\"stage_iteration\",\"atom\":264}},{\"Str\":{\"pattern\":\" \"}},{\"Sequence\":{\"atoms\":[265,266]}},{\"Repetition\":{\"atom\":267,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[263,268]}},{\"Repetition\":{\"atom\":234,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":271,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":283}},{\"Entity\":{\"atom\":158}},{\"Entity\":{\"atom\":163}},{\"Repetition\":{\"atom\":275,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":277,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\":\"}},{\"Entity\":{\"atom\":187}},{\"Sequence\":{\"atoms\":[279,280]}},{\"Repetition\":{\"atom\":281,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[274,276,278,282]}},{\"Sequence\":{\"atoms\":[229,231,233,270,272,273]}},{\"Entity\":{\"atom\":225}},{\"Sequence\":{\"atoms\":[228,285]}},{\"Alternative\":{\"atoms\":[0,227]}}],\"root\":287},\"bindings\":[{\"capture\":\"publisher\",\"path\":\"publisher\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"number_with_part\",\"path\":\"number_with_part\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_number_with_part\",\"path\":\"base_number_with_part\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"date\",\"path\":\"date\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_date\",\"path\":\"base_date\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"stage_iteration\",\"path\":\"stage_iteration\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_stage_iteration\",\"path\":\"base_stage_iteration\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"type_with_stage\",\"path\":\"type_with_stage\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_type_with_stage\",\"path\":\"base_type_with_stage\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"all_parts\",\"path\":\"all_parts\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"languages\",\"path\":\"languages\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{\"idf_typed_stages\":{\"file\":\"idf_typed_stages.yaml\",\"rows\":[{\"abbr\":\"PWI RM\"},{\"abbr\":\"NP RM\"},{\"abbr\":\"AWI RM\"},{\"abbr\":\"WD RM\"},{\"abbr\":\"CD RM\"},{\"abbr\":\"PDRM\"},{\"abbr\":\"DRM\"},{\"abbr\":\"FDRM\"},{\"abbr\":\"PRF RM\"},{\"abbr\":\"RM\"},{\"abbr\":\"AMD\"},{\"abbr\":\"COR\"},{\"abbr\":\"PWI\"},{\"abbr\":\"NP\"},{\"abbr\":\"NWIP\"},{\"abbr\":\"AWI\"},{\"abbr\":\"WD\"},{\"abbr\":\"CD\"},{\"abbr\":\"FCD\"},{\"abbr\":\"DIS\"},{\"abbr\":\"FPD\"},{\"abbr\":\"FDIS\"},{\"abbr\":\"PRF\"},{\"abbr\":\"Fpr\"},{\"abbr\":\"WDR\"},{\"abbr\":\"WDA\"},{\"abbr\":\"WDAR\"}]},\"idf_typed_stages_supplements\":{\"file\":\"idf_typed_stages_supplements.yaml\",\"rows\":[{\"abbr\":\"AMD\"},{\"abbr\":\"COR\"}]}},\"lint\":{\"order_warnings\":[\"rule dash: branches 2 and 3 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\":[],\"docs\":{},\"source\":\"# Port of lib/pubid/idf/parser.rb: IDF identifiers and their\\n# supplements. The ISO joint form (ISO 5537|IDF 26) inlines these rules\\n# as idf_* in iso.pg.\\n#\\n# Edition-2 notes: number_with_part inlines the number and\\n# part_and_subpart bodies fully to raw terms at the capture site (a\\n# capture wrapping rule refs expands to element hashes, while the\\n# inlined body binds as one scalar string). The supplement base wrapper\\n# capture drops (the bindings cannot nest); within a supplement the base\\n# portion captures under base_* names so the supplement layer keeps the\\n# canonical number_with_part/date/type_with_stage captures \u2014 the values\\n# the builder read at top level \u2014 mirroring the csa part_* per-position\\n# convention.\\n\\ngrammar PubidIdf version \\\"0.1.0\\\" edition 2 {\\n digit = %x30-39\\n word_char = %x30-39 / %x41-5A / %x61-7A / %x5F\\n dash = \\\"-\\\" / \\\"\u2011\\\" / \\\"\u2010\\\"\\n dot = \\\".\\\"\\n slash = \\\"/\\\"\\n space = \\\" \\\"\\n colon = \\\":\\\"\\n letter = %x41-5A / %x61-7A\\n lower = %x61-7A\\n century = \\\"19\\\" / \\\"20\\\"\\n year_digits = century 2*digit !digit\\n month_digits = 2*digit\\n day_digits = 2*digit\\n publisher = \\\"IDF\\\" as publisher\\n number_with_part = {\\n (\\n 1*5(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n [\\n dash [\\\" \\\"]\\n 1*(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n *1( dash 1*(%x30-39 / %x41-5A / %x61-7A / %x5F) )\\n ]\\n ) as number_with_part\\n }\\n date = {\\n (\\n (\\\"19\\\" / \\\"20\\\") 2*digit !digit\\n [(dash 2*digit)]\\n [(dash 2*digit)]\\n ) as date\\n }\\n stage_iteration = \\\".\\\" digit as stage_iteration\\n second_part = number_with_part [stage_iteration] [\\\" \\\"] [( \\\":\\\" date )]\\n all_parts = \\\"(all parts)\\\" as all_parts\\n language = \\\"(\\\" ( *( 1*lower [\\\",\\\"] / ( one_of_efards [slash] ) ) ) as languages \\\")\\\"\\n one_of_efards = %x45 / %x46 / %x41 / %x52 / %x44 / %x53\\n third_part = [\\\" \\\"] [language] [all_parts]\\n identifier_publisher_no_third = {\\n publisher [\\\" \\\"] [\\\"/\\\"] [type_with_stage] [\\\" \\\"] second_part\\n }\\n identifier_publisher = identifier_publisher_no_third third_part\\n type_with_stage = {\\n (\\n alt from_table \\\"idf_typed_stages\\\" column \\\"abbr\\\"\\n ) as type_with_stage\\n [digit as stage_iteration \\\" \\\"]\\n }\\n # Supplement side: the supplement layer keeps the canonical\\n # type_with_stage/number_with_part/date captures (what the builder\\n # read at top level); its base portion captures under base_* names so\\n # the two layers never collapse onto each other.\\n supplement_type_with_stage = {\\n (\\n alt from_table \\\"idf_typed_stages_supplements\\\" column \\\"abbr\\\"\\n ) as type_with_stage\\n }\\n base_number_with_part = {\\n (\\n 1*5(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n [\\n dash [\\\" \\\"]\\n 1*(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n *1( dash 1*(%x30-39 / %x41-5A / %x61-7A / %x5F) )\\n ]\\n ) as base_number_with_part\\n }\\n base_date = {\\n (\\n (\\\"19\\\" / \\\"20\\\") 2*digit !digit\\n [(dash 2*digit)]\\n [(dash 2*digit)]\\n ) as base_date\\n }\\n base_stage_iteration = \\\".\\\" digit as base_stage_iteration\\n base_second_part = base_number_with_part [base_stage_iteration] [\\\" \\\"] [( \\\":\\\" base_date )]\\n base_type_with_stage = {\\n (\\n alt from_table \\\"idf_typed_stages\\\" column \\\"abbr\\\"\\n ) as base_type_with_stage\\n [digit as base_stage_iteration \\\" \\\"]\\n }\\n supplement_base_no_third = {\\n publisher [\\\" \\\"] [\\\"/\\\"] [base_type_with_stage] [\\\" \\\"] base_second_part\\n }\\n supplement_second_part = number_with_part [stage_iteration] [\\\" \\\"] [( \\\":\\\" date )]\\n supplement_identifier_no_third = {\\n supplement_base_no_third [\\\" \\\"] \\\"/\\\" [\\\" \\\"] supplement_type_with_stage [\\\" \\\"] supplement_second_part\\n }\\n supplement_identifier = supplement_identifier_no_third third_part\\n identifier = supplement_identifier / identifier_publisher\\n\\n entry identifier: identifier\\n\\n bindings identifier {\\n publisher -> publisher (string)\\n number_with_part -> number_with_part (string)\\n base_number_with_part -> base_number_with_part (string)\\n date -> date (string)\\n base_date -> base_date (string)\\n stage_iteration -> stage_iteration (string)\\n base_stage_iteration -> base_stage_iteration (string)\\n type_with_stage -> type_with_stage (string)\\n base_type_with_stage -> base_type_with_stage (string)\\n all_parts -> all_parts (string)\\n languages -> languages (string)\\n }\\n}\\n\",\"source_hash\":\"adf15539b2c63baa49e70c4ffe48fdbe92a797d5eccb8f47832055a8b16daf16\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:fa1a6066f425a30ee799654dc7f02556a0fdd5e62434919dbd680903ff835dee\",\"checksum\":\"sha256:00767c50faa662c5ee3b152856dfaabae1f420338ca0459888fbc4ec9d7c9cf9\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":2,\"tests_total\":0,\"tests_failures\":0,\"self_test\":true}}";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//! GENERATED FILE — do not edit. The checksummed PARG artifact for
|
|
2
|
+
//! the idf grammar, bundled as a module string so the worker
|
|
3
|
+
//! entries can construct the runtime without node:fs
|
|
4
|
+
//! (pubid/pubid-ts#232). Regenerate with `npm run artifact:emit`.
|
|
5
|
+
export default "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidIdf\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":226}},{\"Entity\":{\"atom\":191}},{\"Entity\":{\"atom\":116}},{\"Entity\":{\"atom\":5}},{\"Str\":{\"pattern\":\"IDF\"}},{\"Named\":{\"name\":\"publisher\",\"atom\":4}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":6,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"/\"}},{\"Repetition\":{\"atom\":8,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":46}},{\"Str\":{\"pattern\":\"AWI RM\"}},{\"Str\":{\"pattern\":\"PRF RM\"}},{\"Str\":{\"pattern\":\"PWI RM\"}},{\"Str\":{\"pattern\":\"CD RM\"}},{\"Str\":{\"pattern\":\"NP RM\"}},{\"Str\":{\"pattern\":\"WD RM\"}},{\"Str\":{\"pattern\":\"FDIS\"}},{\"Str\":{\"pattern\":\"FDRM\"}},{\"Str\":{\"pattern\":\"NWIP\"}},{\"Str\":{\"pattern\":\"PDRM\"}},{\"Str\":{\"pattern\":\"WDAR\"}},{\"Str\":{\"pattern\":\"AMD\"}},{\"Str\":{\"pattern\":\"AWI\"}},{\"Str\":{\"pattern\":\"COR\"}},{\"Str\":{\"pattern\":\"DIS\"}},{\"Str\":{\"pattern\":\"DRM\"}},{\"Str\":{\"pattern\":\"FCD\"}},{\"Str\":{\"pattern\":\"FPD\"}},{\"Str\":{\"pattern\":\"Fpr\"}},{\"Str\":{\"pattern\":\"PRF\"}},{\"Str\":{\"pattern\":\"PWI\"}},{\"Str\":{\"pattern\":\"WDA\"}},{\"Str\":{\"pattern\":\"WDR\"}},{\"Str\":{\"pattern\":\"CD\"}},{\"Str\":{\"pattern\":\"NP\"}},{\"Str\":{\"pattern\":\"RM\"}},{\"Str\":{\"pattern\":\"WD\"}},{\"Alternative\":{\"atoms\":[11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]}},{\"Named\":{\"name\":\"base_type_with_stage\",\"atom\":38}},{\"Entity\":{\"atom\":41}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Named\":{\"name\":\"base_stage_iteration\",\"atom\":40}},{\"Str\":{\"pattern\":\" \"}},{\"Sequence\":{\"atoms\":[42,43]}},{\"Repetition\":{\"atom\":44,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[39,45]}},{\"Repetition\":{\"atom\":10,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":48,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":115}},{\"Entity\":{\"atom\":83}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[52,53,54,55]}},{\"Repetition\":{\"atom\":56,\"min\":1,\"max\":5,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Str\":{\"pattern\":\"-\"}},{\"Str\":{\"pattern\":\"‑\"}},{\"Str\":{\"pattern\":\"‐\"}},{\"Alternative\":{\"atoms\":[59,60,61]}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":63,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[65,66,67,68]}},{\"Repetition\":{\"atom\":69,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[72,73,74,75]}},{\"Repetition\":{\"atom\":76,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[71,77]}},{\"Repetition\":{\"atom\":78,\"min\":0,\"max\":1,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[58,64,70,79]}},{\"Repetition\":{\"atom\":80,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[57,81]}},{\"Named\":{\"name\":\"base_number_with_part\",\"atom\":82}},{\"Entity\":{\"atom\":88}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":41}},{\"Named\":{\"name\":\"base_stage_iteration\",\"atom\":86}},{\"Sequence\":{\"atoms\":[85,87]}},{\"Repetition\":{\"atom\":84,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":90,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\":\"}},{\"Entity\":{\"atom\":112}},{\"Str\":{\"pattern\":\"19\"}},{\"Str\":{\"pattern\":\"20\"}},{\"Alternative\":{\"atoms\":[94,95]}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":97,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":41}},{\"Lookahead\":{\"atom\":99,\"positive\":false}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":102,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[101,103]}},{\"Repetition\":{\"atom\":104,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":107,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[106,108]}},{\"Repetition\":{\"atom\":109,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[96,98,100,105,110]}},{\"Named\":{\"name\":\"base_date\",\"atom\":111}},{\"Sequence\":{\"atoms\":[92,93]}},{\"Repetition\":{\"atom\":113,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[51,89,91,114]}},{\"Sequence\":{\"atoms\":[3,7,9,47,49,50]}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":117,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"/\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":120,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":126}},{\"Str\":{\"pattern\":\"AMD\"}},{\"Str\":{\"pattern\":\"COR\"}},{\"Alternative\":{\"atoms\":[123,124]}},{\"Named\":{\"name\":\"type_with_stage\",\"atom\":125}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":127,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":190}},{\"Entity\":{\"atom\":158}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[131,132,133,134]}},{\"Repetition\":{\"atom\":135,\"min\":1,\"max\":5,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":138,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[140,141,142,143]}},{\"Repetition\":{\"atom\":144,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":62}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Alternative\":{\"atoms\":[147,148,149,150]}},{\"Repetition\":{\"atom\":151,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[146,152]}},{\"Repetition\":{\"atom\":153,\"min\":0,\"max\":1,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[137,139,145,154]}},{\"Repetition\":{\"atom\":155,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[136,156]}},{\"Named\":{\"name\":\"number_with_part\",\"atom\":157}},{\"Entity\":{\"atom\":163}},{\"Str\":{\"pattern\":\".\"}},{\"Entity\":{\"atom\":41}},{\"Named\":{\"name\":\"stage_iteration\",\"atom\":161}},{\"Sequence\":{\"atoms\":[160,162]}},{\"Repetition\":{\"atom\":159,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":165,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\":\"}},{\"Entity\":{\"atom\":187}},{\"Str\":{\"pattern\":\"19\"}},{\"Str\":{\"pattern\":\"20\"}},{\"Alternative\":{\"atoms\":[169,170]}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":172,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Entity\":{\"atom\":41}},{\"Lookahead\":{\"atom\":174,\"positive\":false}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":177,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[176,178]}},{\"Repetition\":{\"atom\":179,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":62}},{\"Entity\":{\"atom\":41}},{\"Repetition\":{\"atom\":182,\"min\":2,\"max\":null,\"tag\":\"Repetition\"}},{\"Sequence\":{\"atoms\":[181,183]}},{\"Repetition\":{\"atom\":184,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[171,173,175,180,185]}},{\"Named\":{\"name\":\"date\",\"atom\":186}},{\"Sequence\":{\"atoms\":[167,168]}},{\"Repetition\":{\"atom\":188,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[130,164,166,189]}},{\"Sequence\":{\"atoms\":[2,118,119,121,122,128,129]}},{\"Entity\":{\"atom\":225}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":193,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":219}},{\"Str\":{\"pattern\":\"(\"}},{\"Entity\":{\"atom\":198}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Repetition\":{\"atom\":197,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Str\":{\"pattern\":\",\"}},{\"Repetition\":{\"atom\":200,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[199,201]}},{\"Entity\":{\"atom\":210}},{\"Re\":{\"pattern\":\"[E]\"}},{\"Re\":{\"pattern\":\"[F]\"}},{\"Re\":{\"pattern\":\"[A]\"}},{\"Re\":{\"pattern\":\"[R]\"}},{\"Re\":{\"pattern\":\"[D]\"}},{\"Re\":{\"pattern\":\"[S]\"}},{\"Alternative\":{\"atoms\":[204,205,206,207,208,209]}},{\"Entity\":{\"atom\":212}},{\"Str\":{\"pattern\":\"/\"}},{\"Repetition\":{\"atom\":211,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[203,213]}},{\"Alternative\":{\"atoms\":[202,214]}},{\"Repetition\":{\"atom\":215,\"min\":0,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"languages\",\"atom\":216}},{\"Str\":{\"pattern\":\")\"}},{\"Sequence\":{\"atoms\":[196,217,218]}},{\"Repetition\":{\"atom\":195,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":223}},{\"Str\":{\"pattern\":\"(all parts)\"}},{\"Named\":{\"name\":\"all_parts\",\"atom\":222}},{\"Repetition\":{\"atom\":221,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[194,220,224]}},{\"Sequence\":{\"atoms\":[1,192]}},{\"Entity\":{\"atom\":286}},{\"Entity\":{\"atom\":284}},{\"Entity\":{\"atom\":5}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":230,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\"/\"}},{\"Repetition\":{\"atom\":232,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":269}},{\"Str\":{\"pattern\":\"AWI RM\"}},{\"Str\":{\"pattern\":\"PRF RM\"}},{\"Str\":{\"pattern\":\"PWI RM\"}},{\"Str\":{\"pattern\":\"CD RM\"}},{\"Str\":{\"pattern\":\"NP RM\"}},{\"Str\":{\"pattern\":\"WD RM\"}},{\"Str\":{\"pattern\":\"FDIS\"}},{\"Str\":{\"pattern\":\"FDRM\"}},{\"Str\":{\"pattern\":\"NWIP\"}},{\"Str\":{\"pattern\":\"PDRM\"}},{\"Str\":{\"pattern\":\"WDAR\"}},{\"Str\":{\"pattern\":\"AMD\"}},{\"Str\":{\"pattern\":\"AWI\"}},{\"Str\":{\"pattern\":\"COR\"}},{\"Str\":{\"pattern\":\"DIS\"}},{\"Str\":{\"pattern\":\"DRM\"}},{\"Str\":{\"pattern\":\"FCD\"}},{\"Str\":{\"pattern\":\"FPD\"}},{\"Str\":{\"pattern\":\"Fpr\"}},{\"Str\":{\"pattern\":\"PRF\"}},{\"Str\":{\"pattern\":\"PWI\"}},{\"Str\":{\"pattern\":\"WDA\"}},{\"Str\":{\"pattern\":\"WDR\"}},{\"Str\":{\"pattern\":\"CD\"}},{\"Str\":{\"pattern\":\"NP\"}},{\"Str\":{\"pattern\":\"RM\"}},{\"Str\":{\"pattern\":\"WD\"}},{\"Alternative\":{\"atoms\":[235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261]}},{\"Named\":{\"name\":\"type_with_stage\",\"atom\":262}},{\"Entity\":{\"atom\":41}},{\"Named\":{\"name\":\"stage_iteration\",\"atom\":264}},{\"Str\":{\"pattern\":\" \"}},{\"Sequence\":{\"atoms\":[265,266]}},{\"Repetition\":{\"atom\":267,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[263,268]}},{\"Repetition\":{\"atom\":234,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":271,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":283}},{\"Entity\":{\"atom\":158}},{\"Entity\":{\"atom\":163}},{\"Repetition\":{\"atom\":275,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":277,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Str\":{\"pattern\":\":\"}},{\"Entity\":{\"atom\":187}},{\"Sequence\":{\"atoms\":[279,280]}},{\"Repetition\":{\"atom\":281,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Sequence\":{\"atoms\":[274,276,278,282]}},{\"Sequence\":{\"atoms\":[229,231,233,270,272,273]}},{\"Entity\":{\"atom\":225}},{\"Sequence\":{\"atoms\":[228,285]}},{\"Alternative\":{\"atoms\":[0,227]}}],\"root\":287},\"bindings\":[{\"capture\":\"publisher\",\"path\":\"publisher\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"number_with_part\",\"path\":\"number_with_part\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_number_with_part\",\"path\":\"base_number_with_part\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"date\",\"path\":\"date\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_date\",\"path\":\"base_date\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"stage_iteration\",\"path\":\"stage_iteration\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_stage_iteration\",\"path\":\"base_stage_iteration\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"type_with_stage\",\"path\":\"type_with_stage\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"base_type_with_stage\",\"path\":\"base_type_with_stage\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"all_parts\",\"path\":\"all_parts\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"languages\",\"path\":\"languages\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{\"idf_typed_stages\":{\"file\":\"idf_typed_stages.yaml\",\"rows\":[{\"abbr\":\"PWI RM\"},{\"abbr\":\"NP RM\"},{\"abbr\":\"AWI RM\"},{\"abbr\":\"WD RM\"},{\"abbr\":\"CD RM\"},{\"abbr\":\"PDRM\"},{\"abbr\":\"DRM\"},{\"abbr\":\"FDRM\"},{\"abbr\":\"PRF RM\"},{\"abbr\":\"RM\"},{\"abbr\":\"AMD\"},{\"abbr\":\"COR\"},{\"abbr\":\"PWI\"},{\"abbr\":\"NP\"},{\"abbr\":\"NWIP\"},{\"abbr\":\"AWI\"},{\"abbr\":\"WD\"},{\"abbr\":\"CD\"},{\"abbr\":\"FCD\"},{\"abbr\":\"DIS\"},{\"abbr\":\"FPD\"},{\"abbr\":\"FDIS\"},{\"abbr\":\"PRF\"},{\"abbr\":\"Fpr\"},{\"abbr\":\"WDR\"},{\"abbr\":\"WDA\"},{\"abbr\":\"WDAR\"}]},\"idf_typed_stages_supplements\":{\"file\":\"idf_typed_stages_supplements.yaml\",\"rows\":[{\"abbr\":\"AMD\"},{\"abbr\":\"COR\"}]}},\"lint\":{\"order_warnings\":[\"rule dash: branches 2 and 3 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\":[],\"docs\":{},\"source\":\"# Port of lib/pubid/idf/parser.rb: IDF identifiers and their\\n# supplements. The ISO joint form (ISO 5537|IDF 26) inlines these rules\\n# as idf_* in iso.pg.\\n#\\n# Edition-2 notes: number_with_part inlines the number and\\n# part_and_subpart bodies fully to raw terms at the capture site (a\\n# capture wrapping rule refs expands to element hashes, while the\\n# inlined body binds as one scalar string). The supplement base wrapper\\n# capture drops (the bindings cannot nest); within a supplement the base\\n# portion captures under base_* names so the supplement layer keeps the\\n# canonical number_with_part/date/type_with_stage captures — the values\\n# the builder read at top level — mirroring the csa part_* per-position\\n# convention.\\n\\ngrammar PubidIdf version \\\"0.1.0\\\" edition 2 {\\n digit = %x30-39\\n word_char = %x30-39 / %x41-5A / %x61-7A / %x5F\\n dash = \\\"-\\\" / \\\"‑\\\" / \\\"‐\\\"\\n dot = \\\".\\\"\\n slash = \\\"/\\\"\\n space = \\\" \\\"\\n colon = \\\":\\\"\\n letter = %x41-5A / %x61-7A\\n lower = %x61-7A\\n century = \\\"19\\\" / \\\"20\\\"\\n year_digits = century 2*digit !digit\\n month_digits = 2*digit\\n day_digits = 2*digit\\n publisher = \\\"IDF\\\" as publisher\\n number_with_part = {\\n (\\n 1*5(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n [\\n dash [\\\" \\\"]\\n 1*(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n *1( dash 1*(%x30-39 / %x41-5A / %x61-7A / %x5F) )\\n ]\\n ) as number_with_part\\n }\\n date = {\\n (\\n (\\\"19\\\" / \\\"20\\\") 2*digit !digit\\n [(dash 2*digit)]\\n [(dash 2*digit)]\\n ) as date\\n }\\n stage_iteration = \\\".\\\" digit as stage_iteration\\n second_part = number_with_part [stage_iteration] [\\\" \\\"] [( \\\":\\\" date )]\\n all_parts = \\\"(all parts)\\\" as all_parts\\n language = \\\"(\\\" ( *( 1*lower [\\\",\\\"] / ( one_of_efards [slash] ) ) ) as languages \\\")\\\"\\n one_of_efards = %x45 / %x46 / %x41 / %x52 / %x44 / %x53\\n third_part = [\\\" \\\"] [language] [all_parts]\\n identifier_publisher_no_third = {\\n publisher [\\\" \\\"] [\\\"/\\\"] [type_with_stage] [\\\" \\\"] second_part\\n }\\n identifier_publisher = identifier_publisher_no_third third_part\\n type_with_stage = {\\n (\\n alt from_table \\\"idf_typed_stages\\\" column \\\"abbr\\\"\\n ) as type_with_stage\\n [digit as stage_iteration \\\" \\\"]\\n }\\n # Supplement side: the supplement layer keeps the canonical\\n # type_with_stage/number_with_part/date captures (what the builder\\n # read at top level); its base portion captures under base_* names so\\n # the two layers never collapse onto each other.\\n supplement_type_with_stage = {\\n (\\n alt from_table \\\"idf_typed_stages_supplements\\\" column \\\"abbr\\\"\\n ) as type_with_stage\\n }\\n base_number_with_part = {\\n (\\n 1*5(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n [\\n dash [\\\" \\\"]\\n 1*(%x30-39 / %x41-5A / %x61-7A / %x5F)\\n *1( dash 1*(%x30-39 / %x41-5A / %x61-7A / %x5F) )\\n ]\\n ) as base_number_with_part\\n }\\n base_date = {\\n (\\n (\\\"19\\\" / \\\"20\\\") 2*digit !digit\\n [(dash 2*digit)]\\n [(dash 2*digit)]\\n ) as base_date\\n }\\n base_stage_iteration = \\\".\\\" digit as base_stage_iteration\\n base_second_part = base_number_with_part [base_stage_iteration] [\\\" \\\"] [( \\\":\\\" base_date )]\\n base_type_with_stage = {\\n (\\n alt from_table \\\"idf_typed_stages\\\" column \\\"abbr\\\"\\n ) as base_type_with_stage\\n [digit as base_stage_iteration \\\" \\\"]\\n }\\n supplement_base_no_third = {\\n publisher [\\\" \\\"] [\\\"/\\\"] [base_type_with_stage] [\\\" \\\"] base_second_part\\n }\\n supplement_second_part = number_with_part [stage_iteration] [\\\" \\\"] [( \\\":\\\" date )]\\n supplement_identifier_no_third = {\\n supplement_base_no_third [\\\" \\\"] \\\"/\\\" [\\\" \\\"] supplement_type_with_stage [\\\" \\\"] supplement_second_part\\n }\\n supplement_identifier = supplement_identifier_no_third third_part\\n identifier = supplement_identifier / identifier_publisher\\n\\n entry identifier: identifier\\n\\n bindings identifier {\\n publisher -> publisher (string)\\n number_with_part -> number_with_part (string)\\n base_number_with_part -> base_number_with_part (string)\\n date -> date (string)\\n base_date -> base_date (string)\\n stage_iteration -> stage_iteration (string)\\n base_stage_iteration -> base_stage_iteration (string)\\n type_with_stage -> type_with_stage (string)\\n base_type_with_stage -> base_type_with_stage (string)\\n all_parts -> all_parts (string)\\n languages -> languages (string)\\n }\\n}\\n\",\"source_hash\":\"adf15539b2c63baa49e70c4ffe48fdbe92a797d5eccb8f47832055a8b16daf16\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:fa1a6066f425a30ee799654dc7f02556a0fdd5e62434919dbd680903ff835dee\",\"checksum\":\"sha256:00767c50faa662c5ee3b152856dfaabae1f420338ca0459888fbc4ec9d7c9cf9\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":2,\"tests_total\":0,\"tests_failures\":0,\"self_test\":true}}";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidIetf\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":9}},{\"Str\":{\"pattern\":\"RFC\"}},{\"Entity\":{\"atom\":3}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":2,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":6}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":5,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"number\",\"atom\":7}},{\"Sequence\":{\"atoms\":[1,4,8]}},{\"Entity\":{\"atom\":21}},{\"Str\":{\"pattern\":\"BCP\"}},{\"Str\":{\"pattern\":\"STD\"}},{\"Str\":{\"pattern\":\"FYI\"}},{\"Alternative\":{\"atoms\":[11,12,13]}},{\"Named\":{\"name\":\"series\",\"atom\":14}},{\"Entity\":{\"atom\":3}},{\"Repetition\":{\"atom\":16,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":6}},{\"Repetition\":{\"atom\":18,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"number\",\"atom\":19}},{\"Sequence\":{\"atoms\":[15,17,20]}},{\"Entity\":{\"atom\":35}},{\"Str\":{\"pattern\":\"draft-\"}},{\"Entity\":{\"atom\":32}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[+]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Re\":{\"pattern\":\"[.]\"}},{\"Re\":{\"pattern\":\"[\\\\-]\"}},{\"Alternative\":{\"atoms\":[25,26,27,28,29,30,31]}},{\"Repetition\":{\"atom\":24,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"draft_rest\",\"atom\":33}},{\"Sequence\":{\"atoms\":[23,34]}},{\"Alternative\":{\"atoms\":[0,10,22]}}],\"root\":36},\"bindings\":[{\"capture\":\"number\",\"path\":\"number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"series\",\"path\":\"series\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"draft_rest\",\"path\":\"draft_rest\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"RFC 2616\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"RFC2616\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"BCP 14\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"draft-ietf-httpbis-messaging-19\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/ietf/parser.rb: three families keyed on the leading\\n# token \u2014 RFC, sub-series (BCP/STD/FYI, padded forms allowed), and\\n# Internet-Drafts (the wide draft tail is safe: the alternation is\\n# leading-token keyed).\\n\\ngrammar PubidIetf version \\\"0.1.0\\\" edition 2 {\\n rfc = \\\"RFC\\\" [space] (1*digit) as number\\n subseries = (\\\"BCP\\\" / \\\"STD\\\" / \\\"FYI\\\") as series [space] (1*digit) as number\\n draft_rest_char = %x30-39 / %x41-5A / %x61-7A / %x2B / %x5F / %x2E / %x2D\\n draft = \\\"draft-\\\" (1*draft_rest_char) as draft_rest\\n identifier = rfc / subseries / draft\\n digit = %x30-39\\n space = \\\" \\\"\\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 number -> number (string)\\n series -> series (string)\\n draft_rest -> draft_rest (string)\\n }\\n\\n\\n test {\\n accept \\\"RFC 2616\\\"\\n accept \\\"RFC2616\\\"\\n accept \\\"BCP 14\\\"\\n accept \\\"draft-ietf-httpbis-messaging-19\\\"\\n reject \\\"nonsense\\\"\\n }\\n}\\n\",\"source_hash\":\"787ab890250efb10ee4e20e0e5835d5894f903080f4871d354ac5298ce9d2064\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:8dcee4ddf2711be873ea976a89dfc45a953f938a188c351de900266c2c325b1e\",\"checksum\":\"sha256:37114edbe3e4034ce34871153ef21b0255be2a16a82e162ffb6ab6710aa5bef2\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":5,\"tests_failures\":0,\"self_test\":true}}";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//! GENERATED FILE — do not edit. The checksummed PARG artifact for
|
|
2
|
+
//! the ietf grammar, bundled as a module string so the worker
|
|
3
|
+
//! entries can construct the runtime without node:fs
|
|
4
|
+
//! (pubid/pubid-ts#232). Regenerate with `npm run artifact:emit`.
|
|
5
|
+
export default "{\"bindings\":null,\"version\":\"0.1.0\",\"grammar\":\"PubidIetf\",\"shape\":\"parsanol-tree/v2\",\"binding_version\":1,\"entries\":{\"identifier\":{\"root\":\"identifier\",\"grammar\":{\"atoms\":[{\"Entity\":{\"atom\":9}},{\"Str\":{\"pattern\":\"RFC\"}},{\"Entity\":{\"atom\":3}},{\"Str\":{\"pattern\":\" \"}},{\"Repetition\":{\"atom\":2,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":6}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Repetition\":{\"atom\":5,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"number\",\"atom\":7}},{\"Sequence\":{\"atoms\":[1,4,8]}},{\"Entity\":{\"atom\":21}},{\"Str\":{\"pattern\":\"BCP\"}},{\"Str\":{\"pattern\":\"STD\"}},{\"Str\":{\"pattern\":\"FYI\"}},{\"Alternative\":{\"atoms\":[11,12,13]}},{\"Named\":{\"name\":\"series\",\"atom\":14}},{\"Entity\":{\"atom\":3}},{\"Repetition\":{\"atom\":16,\"min\":0,\"max\":1,\"tag\":\"Maybe\"}},{\"Entity\":{\"atom\":6}},{\"Repetition\":{\"atom\":18,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"number\",\"atom\":19}},{\"Sequence\":{\"atoms\":[15,17,20]}},{\"Entity\":{\"atom\":35}},{\"Str\":{\"pattern\":\"draft-\"}},{\"Entity\":{\"atom\":32}},{\"Re\":{\"pattern\":\"[\\\\x30-\\\\x39]\"}},{\"Re\":{\"pattern\":\"[\\\\x41-\\\\x5a]\"}},{\"Re\":{\"pattern\":\"[\\\\x61-\\\\x7a]\"}},{\"Re\":{\"pattern\":\"[+]\"}},{\"Re\":{\"pattern\":\"[_]\"}},{\"Re\":{\"pattern\":\"[.]\"}},{\"Re\":{\"pattern\":\"[\\\\-]\"}},{\"Alternative\":{\"atoms\":[25,26,27,28,29,30,31]}},{\"Repetition\":{\"atom\":24,\"min\":1,\"max\":null,\"tag\":\"Repetition\"}},{\"Named\":{\"name\":\"draft_rest\",\"atom\":33}},{\"Sequence\":{\"atoms\":[23,34]}},{\"Alternative\":{\"atoms\":[0,10,22]}}],\"root\":36},\"bindings\":[{\"capture\":\"number\",\"path\":\"number\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"series\",\"path\":\"series\",\"type\":\"string\",\"card\":null,\"preprocess\":null},{\"capture\":\"draft_rest\",\"path\":\"draft_rest\",\"type\":\"string\",\"card\":null,\"preprocess\":null}]}},\"preprocess\":{},\"tables\":{},\"lint\":{\"order_warnings\":[]},\"default_entry\":\"identifier\",\"render\":{},\"derive\":{},\"tests\":[{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"RFC 2616\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"RFC2616\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"BCP 14\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"accept\",\"input\":\"draft-ietf-httpbis-messaging-19\",\"expect\":{}},{\"entry\":\"identifier\",\"kind\":\"reject\",\"input\":\"nonsense\",\"expect\":{}}],\"docs\":{},\"source\":\"# Port of lib/pubid/ietf/parser.rb: three families keyed on the leading\\n# token — RFC, sub-series (BCP/STD/FYI, padded forms allowed), and\\n# Internet-Drafts (the wide draft tail is safe: the alternation is\\n# leading-token keyed).\\n\\ngrammar PubidIetf version \\\"0.1.0\\\" edition 2 {\\n rfc = \\\"RFC\\\" [space] (1*digit) as number\\n subseries = (\\\"BCP\\\" / \\\"STD\\\" / \\\"FYI\\\") as series [space] (1*digit) as number\\n draft_rest_char = %x30-39 / %x41-5A / %x61-7A / %x2B / %x5F / %x2E / %x2D\\n draft = \\\"draft-\\\" (1*draft_rest_char) as draft_rest\\n identifier = rfc / subseries / draft\\n digit = %x30-39\\n space = \\\" \\\"\\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 number -> number (string)\\n series -> series (string)\\n draft_rest -> draft_rest (string)\\n }\\n\\n\\n test {\\n accept \\\"RFC 2616\\\"\\n accept \\\"RFC2616\\\"\\n accept \\\"BCP 14\\\"\\n accept \\\"draft-ietf-httpbis-messaging-19\\\"\\n reject \\\"nonsense\\\"\\n }\\n}\\n\",\"source_hash\":\"787ab890250efb10ee4e20e0e5835d5894f903080f4871d354ac5298ce9d2064\",\"unicode_tables\":\"onigmo (Ruby 3.4.8)\",\"compiler_version\":\"1.5.1.0\",\"edition\":2,\"semantics_hash\":\"sha256:8dcee4ddf2711be873ea976a89dfc45a953f938a188c351de900266c2c325b1e\",\"checksum\":\"sha256:37114edbe3e4034ce34871153ef21b0255be2a16a82e162ffb6ab6710aa5bef2\",\"validated\":{\"lint_errors\":0,\"lint_warnings\":0,\"tests_total\":5,\"tests_failures\":0,\"self_test\":true}}";
|