@pubid/pubid 0.1.55 → 0.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flavors/iso/model.d.ts +1 -0
- package/dist/flavors/iso/model.js +16 -1
- package/package.json +1 -1
- package/vendor/parg/adobe.json +1 -1
- package/vendor/parg/aiee.json +1 -1
- package/vendor/parg/amca.json +1 -1
- package/vendor/parg/ansi.json +1 -1
- package/vendor/parg/api.json +1 -1
- package/vendor/parg/ashrae.json +1 -1
- package/vendor/parg/asme.json +1 -1
- package/vendor/parg/astm.json +1 -1
- package/vendor/parg/bipm.json +1 -1
- package/vendor/parg/bsi.json +1 -1
- package/vendor/parg/bsi_pfs.json +1 -0
- package/vendor/parg/calconnect.json +1 -1
- package/vendor/parg/calconnect_pfs.json +1 -1
- package/vendor/parg/ccsds.json +1 -1
- package/vendor/parg/cen_cenelec.json +1 -1
- package/vendor/parg/cen_pfs.json +1 -1
- package/vendor/parg/cie.json +1 -1
- package/vendor/parg/csa.json +1 -1
- package/vendor/parg/csv.json +1 -0
- package/vendor/parg/doi.json +1 -1
- package/vendor/parg/doi_pfs.json +1 -1
- package/vendor/parg/easc.json +1 -1
- package/vendor/parg/ecma.json +1 -1
- package/vendor/parg/etsi.json +1 -1
- package/vendor/parg/etsi_pfs.json +1 -1
- package/vendor/parg/evs.json +1 -1
- package/vendor/parg/gb.json +1 -1
- package/vendor/parg/gost.json +1 -1
- package/vendor/parg/iala.json +1 -1
- package/vendor/parg/iana.json +1 -1
- package/vendor/parg/idf.json +1 -1
- package/vendor/parg/iec.json +1 -1
- package/vendor/parg/ieee.json +1 -1
- package/vendor/parg/ietf.json +1 -1
- package/vendor/parg/iho.json +1 -1
- package/vendor/parg/ini.json +1 -0
- package/vendor/parg/ire.json +1 -1
- package/vendor/parg/isbn.json +1 -1
- package/vendor/parg/iso.json +1 -1
- package/vendor/parg/itu.json +1 -1
- package/vendor/parg/jcgm.json +1 -1
- package/vendor/parg/jis.json +1 -1
- package/vendor/parg/json.json +1 -0
- package/vendor/parg/nesc.json +1 -1
- package/vendor/parg/nist.json +1 -1
- package/vendor/parg/oasis.json +1 -1
- package/vendor/parg/ogc.json +1 -1
- package/vendor/parg/oiml.json +1 -1
- package/vendor/parg/omg.json +1 -1
- package/vendor/parg/parg.json +1 -1
- package/vendor/parg/plateau.json +1 -1
- package/vendor/parg/sae.json +1 -1
- package/vendor/parg/tgpp.json +1 -1
- package/vendor/parg/un.json +1 -1
- package/vendor/parg/w3c.json +1 -1
- package/vendor/parg/xsf.json +1 -1
package/vendor/parg/iala.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.1.0","grammar":"PubidIala","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":102}},{"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]"}},{"Named":{"name":"annex_letter","atom":53}},{"Entity":{"atom":57}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Lookahead":{"atom":56,"positive":false}},{"Sequence":{"atoms":[52,55,58]}},{"Repetition":{"atom":59,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":76}},{"Entity":{"atom":47}},{"Str":{"pattern":"Ed"}},{"Entity":{"atom":47}},{"Entity":{"atom":74}},{"Entity":{"atom":20}},{"Repetition":{"atom":66,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":25}},{"Entity":{"atom":20}},{"Repetition":{"atom":69,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[68,70]}},{"Repetition":{"atom":71,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[67,72]}},{"Named":{"name":"edition_value","atom":73}},{"Sequence":{"atoms":[62,63,64,65]}},{"Named":{"name":"edition","atom":75}},{"Entity":{"atom":83}},{"Entity":{"atom":79}},{"Str":{"pattern":":"}},{"Str":{"pattern":"ed"}},{"Entity":{"atom":74}},{"Sequence":{"atoms":[78,80,81]}},{"Named":{"name":"edition","atom":82}},{"Alternative":{"atoms":[61,77]}},{"Repetition":{"atom":84,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":100}},{"Entity":{"atom":47}},{"Repetition":{"atom":87,"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":[90,91,92,93,94,95]}},{"Named":{"name":"language","atom":96}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[88,89,97,98]}},{"Named":{"name":"language_group","atom":99}},{"Repetition":{"atom":86,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[45,46,51,60,85,101]}},{"Entity":{"atom":117}},{"Entity":{"atom":3}},{"Entity":{"atom":110}},{"Entity":{"atom":16}},{"Entity":{"atom":32}},{"Entity":{"atom":42}},{"Repetition":{"atom":108,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[106,107,109]}},{"Entity":{"atom":76}},{"Entity":{"atom":83}},{"Alternative":{"atoms":[111,112]}},{"Repetition":{"atom":113,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":100}},{"Repetition":{"atom":115,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[104,105,114,116]}},{"Alternative":{"atoms":[0,103]}}],"root":118},"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":"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}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"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":"reject","input":"nonsense","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"}}],"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# 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\ngrammar PubidIala version \"0.1.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 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 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 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 identifier = {\n annex_identifier\n / plain_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 edition_value -> edition_value (string)\n language -> language (string)\n annex_marker -> annex_marker (string)\n annex_letter -> annex_letter (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 reject \"nonsense\"\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 }\n}\n","source_hash":"876c56b59effe0fff6067618955aa411a9d5287848c677b093aacc830562d000","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.3.121","edition":2,"semantics_hash":"sha256:bfeb1b06d5a84459e59ff6642e7013c2e95b6ccdc9eb6b6da4d6f0bda7ca85a2","checksum":"sha256:3d26aad445f026fc9a75f25221ac1a9ad70543a3f0de051fd3496c320bc55955"}
|
|
1
|
+
{"bindings":null,"version":"0.1.0","grammar":"PubidIala","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":102}},{"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]"}},{"Named":{"name":"annex_letter","atom":53}},{"Entity":{"atom":57}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Lookahead":{"atom":56,"positive":false}},{"Sequence":{"atoms":[52,55,58]}},{"Repetition":{"atom":59,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":76}},{"Entity":{"atom":47}},{"Str":{"pattern":"Ed"}},{"Entity":{"atom":47}},{"Entity":{"atom":74}},{"Entity":{"atom":20}},{"Repetition":{"atom":66,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":25}},{"Entity":{"atom":20}},{"Repetition":{"atom":69,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[68,70]}},{"Repetition":{"atom":71,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[67,72]}},{"Named":{"name":"edition_value","atom":73}},{"Sequence":{"atoms":[62,63,64,65]}},{"Named":{"name":"edition","atom":75}},{"Entity":{"atom":83}},{"Entity":{"atom":79}},{"Str":{"pattern":":"}},{"Str":{"pattern":"ed"}},{"Entity":{"atom":74}},{"Sequence":{"atoms":[78,80,81]}},{"Named":{"name":"edition","atom":82}},{"Alternative":{"atoms":[61,77]}},{"Repetition":{"atom":84,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":100}},{"Entity":{"atom":47}},{"Repetition":{"atom":87,"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":[90,91,92,93,94,95]}},{"Named":{"name":"language","atom":96}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[88,89,97,98]}},{"Named":{"name":"language_group","atom":99}},{"Repetition":{"atom":86,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[45,46,51,60,85,101]}},{"Entity":{"atom":117}},{"Entity":{"atom":3}},{"Entity":{"atom":110}},{"Entity":{"atom":16}},{"Entity":{"atom":32}},{"Entity":{"atom":42}},{"Repetition":{"atom":108,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[106,107,109]}},{"Entity":{"atom":76}},{"Entity":{"atom":83}},{"Alternative":{"atoms":[111,112]}},{"Repetition":{"atom":113,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":100}},{"Repetition":{"atom":115,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[104,105,114,116]}},{"Alternative":{"atoms":[0,103]}}],"root":118},"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":"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}]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule identifier: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"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":"reject","input":"nonsense","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"}}],"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# 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\ngrammar PubidIala version \"0.1.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 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 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 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 identifier = {\n annex_identifier\n / plain_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 edition_value -> edition_value (string)\n language -> language (string)\n annex_marker -> annex_marker (string)\n annex_letter -> annex_letter (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 reject \"nonsense\"\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 }\n}\n","source_hash":"876c56b59effe0fff6067618955aa411a9d5287848c677b093aacc830562d000","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.5.1.0","edition":2,"semantics_hash":"sha256:bfeb1b06d5a84459e59ff6642e7013c2e95b6ccdc9eb6b6da4d6f0bda7ca85a2","checksum":"sha256:90ef4e159318190b7269b51bbacb6e94145fb0b5f2e336c6821318d539bac76a","validated":{"lint_errors":0,"lint_warnings":1,"tests_total":15,"tests_failures":0,"self_test":true}}
|
package/vendor/parg/iana.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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.
|
|
1
|
+
{"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}}
|
package/vendor/parg/idf.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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.3.121","edition":2,"semantics_hash":"sha256:fa1a6066f425a30ee799654dc7f02556a0fdd5e62434919dbd680903ff835dee","checksum":"sha256:ac9176b444f808ba9ccdca26d4974adb2ce556e4438926fd4f564a55139c29a7"}
|
|
1
|
+
{"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}}
|