pubid 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/bipm/update_codes.yaml +14 -0
- data/data/parg/bipm.json +1 -1
- data/data/parg/bipm.parg +290 -0
- data/data/parg/iho.json +1 -1
- data/data/parg/iho.parg +358 -0
- data/data/parg/jis.json +1 -1
- data/data/parg/parg.json +1 -1
- data/data/parg/parg.parg +118 -0
- data/lib/pubid/bipm/CLAUDE.md +4 -0
- data/lib/pubid/bipm/builder.rb +26 -1
- data/lib/pubid/bipm/identifiers/committee_document.rb +13 -1
- data/lib/pubid/bipm/renderer.rb +18 -3
- data/lib/pubid/bipm/urn_generator.rb +14 -1
- data/lib/pubid/bipm/urn_parser.rb +14 -1
- data/lib/pubid/bipm.rb +10 -4
- data/lib/pubid/bsi/CLAUDE.md +4 -0
- data/lib/pubid/bsi/single_identifier.rb +10 -1
- data/lib/pubid/ieee/builder.rb +6 -1
- data/lib/pubid/ietf/CLAUDE.md +2 -0
- data/lib/pubid/ietf.rb +5 -2
- data/lib/pubid/iho/CLAUDE.md +157 -81
- data/lib/pubid/iho/builder.rb +61 -16
- data/lib/pubid/iho/identifier.rb +2 -2
- data/lib/pubid/iho/identifiers/base.rb +134 -37
- data/lib/pubid/iho/renderer.rb +44 -22
- data/lib/pubid/iho/urn_generator.rb +56 -19
- data/lib/pubid/iho/urn_parser.rb +211 -40
- data/lib/pubid/iso/CLAUDE.md +32 -0
- data/lib/pubid/iso/urn_parser.rb +63 -6
- data/lib/pubid/jis/CLAUDE.md +9 -4
- data/lib/pubid/parg/backend.rb +1 -1
- data/lib/pubid/parg/model.rb +7 -2
- data/lib/pubid/parg.rb +13 -0
- data/lib/pubid/tgpp/CLAUDE.md +2 -0
- data/lib/pubid/tgpp.rb +11 -0
- data/lib/pubid/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a55050f14ad3cf19fd2e3d3a00faf0d2258cf761d71515716cdf61a172ce0484
|
|
4
|
+
data.tar.gz: 9c150c6b494788ad7b3f158ed0bd9132d8ae970089e182d9f5cef7885d22a7de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 665bddc99ab7da91c7f67c045655b0b55ef86b500469efdca15a7215ec89479f1fa0c1046fbad88ea3683ed664a3c6d01d54a6fe4800d681ec1b758d73b5b01f
|
|
7
|
+
data.tar.gz: 6fada1851bb8adbbc936ca69167336f6ddd88dfcce72dbeeb9a73a035449547a8cd6324d5b1240ed3aaa71ddadceb9dff89d5efe22e9f62df0a775055f4110f0
|
data/data/bipm/update_codes.yaml
CHANGED
|
@@ -7,3 +7,17 @@
|
|
|
7
7
|
# the docnumber and docidentifier spellings map onto the bare "CIPM 2005-06" form.
|
|
8
8
|
"CIPM/2005-06(REV)": CIPM 2005-06
|
|
9
9
|
"CIPM 2005-06(REV)": CIPM 2005-06
|
|
10
|
+
|
|
11
|
+
# The SI Brochure cited by its title: the brochure IS "The International
|
|
12
|
+
# System of Units", and external references cite it in quotes (pubid#644).
|
|
13
|
+
# Map the quoted-title spelling onto the parseable "BIPM SI Brochure" section
|
|
14
|
+
# form — a partial reference with no edition, so it wildcards every edition
|
|
15
|
+
# under the matching primitives, exactly like "SI Brochure Part 1". A
|
|
16
|
+
# normalizing parse like the CIPM MRA ones above: never a byte-exact fixture
|
|
17
|
+
# (see spec/pubid/bipm/loose_consumer_forms_spec.rb).
|
|
18
|
+
#
|
|
19
|
+
# The French title is deliberately NOT mapped: it names the F-language record
|
|
20
|
+
# specifically, and mapping it would silently drop language information the
|
|
21
|
+
# user typed (the loose-forms rule). English is language-neutral, so it stays.
|
|
22
|
+
/^BIPM "The International System of Units"$/: BIPM SI Brochure
|
|
23
|
+
/^"The International System of Units"$/: SI Brochure
|
data/data/parg/bipm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"bindings":null,"version":"0.1.0","grammar":"PubidBipm","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":30}},{"Str":{"pattern":"Metrologia"}},{"Entity":{"atom":3}},{"Str":{"pattern":" "}},{"Entity":{"atom":5}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":4,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"volume","atom":6}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Entity":{"atom":13}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[11,12]}},{"Alternative":{"atoms":[9,10]}},{"Repetition":{"atom":14,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"issue","atom":15}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Entity":{"atom":13}},{"Alternative":{"atoms":[18,19]}},{"Repetition":{"atom":20,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"article","atom":21}},{"Sequence":{"atoms":[17,22]}},{"Repetition":{"atom":23,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[8,16,24]}},{"Repetition":{"atom":25,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[2,7,26]}},{"Repetition":{"atom":27,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[1,28]}},{"Named":{"name":"metrologia","atom":29}},{"Entity":{"atom":79}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Alternative":{"atoms":[32,33]}},{"Entity":{"atom":3}},{"Str":{"pattern":"sur le SI"}},{"Entity":{"atom":3}},{"Sequence":{"atoms":[36,37]}},{"Repetition":{"atom":38,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":45}},{"Entity":{"atom":5}},{"Repetition":{"atom":41,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"e"}},{"Sequence":{"atoms":[42,43]}},{"Named":{"name":"edition","atom":44}},{"Entity":{"atom":3}},{"Entity":{"atom":55}},{"Str":{"pattern":"v"}},{"Entity":{"atom":5}},{"Entity":{"atom":51}},{"Str":{"pattern":"."}},{"Alternative":{"atoms":[49,50]}},{"Repetition":{"atom":52,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[48,53]}},{"Named":{"name":"version","atom":54}},{"Entity":{"atom":3}},{"Str":{"pattern":"("}},{"Entity":{"atom":68}},{"Entity":{"atom":5}},{"Repetition":{"atom":59,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":62}},{"Str":{"pattern":"/"}},{"Entity":{"atom":5}},{"Repetition":{"atom":63,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[61,64]}},{"Repetition":{"atom":65,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[60,66]}},{"Named":{"name":"years","atom":67}},{"Str":{"pattern":", "}},{"Entity":{"atom":76}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"FR"}},{"Re":{"pattern":"[E]"}},{"Re":{"pattern":"[F]"}},{"Alternative":{"atoms":[71,72,73,74]}},{"Named":{"name":"language","atom":75}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[34,35,39,40,46,47,56,57,58,69,70,77]}},{"Named":{"name":"si_brochure","atom":78}},{"Entity":{"atom":96}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Alternative":{"atoms":[81,82]}},{"Entity":{"atom":3}},{"Entity":{"atom":94}},{"Str":{"pattern":"Appendix"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":88,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[86,87,89]}},{"Str":{"pattern":"Concise"}},{"Str":{"pattern":"FAQ"}},{"Alternative":{"atoms":[90,91,92]}},{"Named":{"name":"variant","atom":93}},{"Sequence":{"atoms":[83,84,85]}},{"Named":{"name":"si_brochure_variant","atom":95}},{"Entity":{"atom":110}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Alternative":{"atoms":[98,99]}},{"Entity":{"atom":3}},{"Str":{"pattern":"Part"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":104,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":105}},{"Sequence":{"atoms":[101,102,103,106]}},{"Repetition":{"atom":107,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[100,108]}},{"Named":{"name":"si_brochure_section","atom":109}},{"Entity":{"atom":168}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":136}},{"Str":{"pattern":"SI MEP"}},{"Entity":{"atom":3}},{"Entity":{"atom":122}},{"Entity":{"atom":5}},{"Entity":{"atom":13}},{"Alternative":{"atoms":[118,119]}},{"Repetition":{"atom":120,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"mep_code","atom":121}},{"Sequence":{"atoms":[115,116,117]}},{"Str":{"pattern":"Rapport"}},{"Entity":{"atom":3}},{"Entity":{"atom":134}},{"Str":{"pattern":"BIPM-"}},{"Entity":{"atom":5}},{"Repetition":{"atom":128,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":62}},{"Entity":{"atom":5}},{"Repetition":{"atom":131,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[127,129,130,132]}},{"Named":{"name":"report_code","atom":133}},{"Sequence":{"atoms":[124,125,126]}},{"Alternative":{"atoms":[123,135]}},{"Entity":{"atom":3}},{"Entity":{"atom":164}},{"Str":{"pattern":"Appendix"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":141,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"appendix","atom":142}},{"Entity":{"atom":3}},{"Str":{"pattern":"Annex"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":147,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"annex","atom":148}},{"Sequence":{"atoms":[144,145,146,149]}},{"Repetition":{"atom":150,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Str":{"pattern":"Part"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":155,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":51}},{"Entity":{"atom":5}},{"Repetition":{"atom":158,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[157,159]}},{"Repetition":{"atom":160,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[156,161]}},{"Named":{"name":"part","atom":162}},{"Sequence":{"atoms":[139,140,143,151,152,153,154,163]}},{"Sequence":{"atoms":[112,113,114,137,138]}},{"Entity":{"atom":136}},{"Alternative":{"atoms":[165,166]}},{"Named":{"name":"mep","atom":167}},{"Entity":{"atom":208}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":202}},{"Entity":{"atom":189}},{"Str":{"pattern":"CCAUV"}},{"Str":{"pattern":"CCDS"}},{"Str":{"pattern":"CCEM"}},{"Str":{"pattern":"CCPR"}},{"Str":{"pattern":"CCQM"}},{"Str":{"pattern":"CCRI"}},{"Str":{"pattern":"CCTF"}},{"Str":{"pattern":"CGPM"}},{"Str":{"pattern":"CIPM"}},{"Str":{"pattern":"JCRB"}},{"Str":{"pattern":"CCL"}},{"Str":{"pattern":"CCM"}},{"Str":{"pattern":"CCT"}},{"Str":{"pattern":"CCU"}},{"Alternative":{"atoms":[174,175,176,177,178,179,180,181,182,183,184,185,186,187]}},{"Named":{"name":"group","atom":188}},{"Str":{"pattern":"-GD-"}},{"Entity":{"atom":195}},{"Str":{"pattern":"MeP"}},{"Str":{"pattern":"RSI"}},{"Alternative":{"atoms":[192,193]}},{"Named":{"name":"guide_kind","atom":194}},{"Entity":{"atom":197}},{"Str":{"pattern":"-"}},{"Named":{"name":"dash","atom":196}},{"Entity":{"atom":5}},{"Repetition":{"atom":199,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"number","atom":200}},{"Sequence":{"atoms":[173,190,191,198,201]}},{"Entity":{"atom":3}},{"Entity":{"atom":164}},{"Sequence":{"atoms":[170,171,172,203,204]}},{"Entity":{"atom":202}},{"Alternative":{"atoms":[205,206]}},{"Named":{"name":"guide","atom":207}},{"Entity":{"atom":251}},{"Entity":{"atom":218}},{"Str":{"pattern":"Recommandation"}},{"Str":{"pattern":"Déclaration"}},{"Str":{"pattern":"Résolution"}},{"Str":{"pattern":"Statement"}},{"Str":{"pattern":"Décision"}},{"Str":{"pattern":"Action"}},{"Alternative":{"atoms":[211,212,213,214,215,216]}},{"Named":{"name":"type_word","atom":217}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Entity":{"atom":5}},{"Repetition":{"atom":221,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":197}},{"Entity":{"atom":5}},{"Repetition":{"atom":224,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[223,225]}},{"Repetition":{"atom":226,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[222,227]}},{"Named":{"name":"number","atom":228}},{"Sequence":{"atoms":[219,220]}},{"Repetition":{"atom":230,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":236}},{"Str":{"pattern":"de la"}},{"Str":{"pattern":"du"}},{"Alternative":{"atoms":[234,235]}},{"Entity":{"atom":3}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":247}},{"Str":{"pattern":"("}},{"Entity":{"atom":245}},{"Entity":{"atom":5}},{"Repetition":{"atom":243,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":244}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[241,242,246]}},{"Sequence":{"atoms":[239,240]}},{"Repetition":{"atom":248,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[210,231,232,233,237,238,249]}},{"Named":{"name":"committee_long_fr","atom":250}},{"Entity":{"atom":395}},{"Entity":{"atom":289}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Entity":{"atom":262}},{"Str":{"pattern":"st"}},{"Str":{"pattern":"nd"}},{"Str":{"pattern":"rd"}},{"Str":{"pattern":"th"}},{"Alternative":{"atoms":[258,259,260,261]}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":274}},{"Str":{"pattern":"("}},{"Entity":{"atom":245}},{"Str":{"pattern":", "}},{"Entity":{"atom":76}},{"Sequence":{"atoms":[269,270]}},{"Repetition":{"atom":271,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[267,268,272,273]}},{"Sequence":{"atoms":[265,266]}},{"Repetition":{"atom":275,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[254,255,256,257,263,264,276]}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Entity":{"atom":3}},{"Entity":{"atom":274}},{"Sequence":{"atoms":[283,284]}},{"Repetition":{"atom":285,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[278,279,280,281,282,286]}},{"Alternative":{"atoms":[277,287]}},{"Named":{"name":"meeting_en","atom":288}},{"Entity":{"atom":327}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Str":{"pattern":"<sup>e</sup>"}},{"Entity":{"atom":3}},{"Str":{"pattern":"réunion"}},{"Entity":{"atom":3}},{"Entity":{"atom":274}},{"Sequence":{"atoms":[297,298]}},{"Repetition":{"atom":299,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[291,292,293,294,295,296,300]}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Str":{"pattern":"e"}},{"Entity":{"atom":3}},{"Entity":{"atom":310}},{"Str":{"pattern":"Réunion"}},{"Str":{"pattern":"réunion"}},{"Alternative":{"atoms":[308,309]}},{"Entity":{"atom":3}},{"Entity":{"atom":274}},{"Sequence":{"atoms":[311,312]}},{"Repetition":{"atom":313,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[302,303,304,305,306,307,314]}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":310}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Entity":{"atom":3}},{"Entity":{"atom":274}},{"Sequence":{"atoms":[321,322]}},{"Repetition":{"atom":323,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[316,317,318,319,320,324]}},{"Alternative":{"atoms":[301,315,325]}},{"Named":{"name":"meeting_fr","atom":326}},{"Entity":{"atom":348}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":338}},{"Str":{"pattern":"DECL"}},{"Str":{"pattern":"DECN"}},{"Str":{"pattern":"ACT"}},{"Str":{"pattern":"REC"}},{"Str":{"pattern":"RES"}},{"Alternative":{"atoms":[332,333,334,335,336]}},{"Named":{"name":"type_word","atom":337}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Sequence":{"atoms":[339,340]}},{"Repetition":{"atom":341,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":274}},{"Sequence":{"atoms":[343,344]}},{"Repetition":{"atom":345,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[329,330,331,342,346]}},{"Named":{"name":"committee_short","atom":347}},{"Entity":{"atom":370}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":360}},{"Str":{"pattern":"Recommendation"}},{"Str":{"pattern":"Declaration"}},{"Str":{"pattern":"Resolution"}},{"Str":{"pattern":"Statement"}},{"Str":{"pattern":"Decision"}},{"Str":{"pattern":"Action"}},{"Alternative":{"atoms":[353,354,355,356,357,358]}},{"Named":{"name":"type_word","atom":359}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Sequence":{"atoms":[361,362]}},{"Repetition":{"atom":363,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":247}},{"Sequence":{"atoms":[365,366]}},{"Repetition":{"atom":367,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[350,351,352,364,368]}},{"Named":{"name":"committee_long_en","atom":369}},{"Entity":{"atom":384}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":218}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Sequence":{"atoms":[375,376]}},{"Repetition":{"atom":377,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":247}},{"Sequence":{"atoms":[379,380]}},{"Repetition":{"atom":381,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[372,373,374,378,382]}},{"Named":{"name":"committee_long_fr","atom":383}},{"Entity":{"atom":394}},{"Entity":{"atom":189}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Entity":{"atom":3}},{"Entity":{"atom":274}},{"Sequence":{"atoms":[389,390]}},{"Repetition":{"atom":391,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[386,387,388,392]}},{"Named":{"name":"committee_bare","atom":393}},{"Alternative":{"atoms":[253,290,328,349,371,385]}},{"Alternative":{"atoms":[0,31,80,97,111,169,209,252]}}],"root":396},"bindings":[{"capture":"committee_short","path":"committee_short","type":"raw","card":null,"preprocess":null},{"capture":"committee_long_en","path":"committee_long_en","type":"raw","card":null,"preprocess":null},{"capture":"committee_long_fr","path":"committee_long_fr","type":"raw","card":null,"preprocess":null},{"capture":"committee_bare","path":"committee_bare","type":"raw","card":null,"preprocess":null},{"capture":"meeting_en","path":"meeting_en","type":"raw","card":null,"preprocess":null},{"capture":"meeting_fr","path":"meeting_fr","type":"raw","card":null,"preprocess":null},{"capture":"metrologia","path":"metrologia","type":"raw","card":null,"preprocess":null},{"capture":"si_brochure","path":"si_brochure","type":"raw","card":null,"preprocess":null},{"capture":"si_brochure_variant","path":"si_brochure_variant","type":"raw","card":null,"preprocess":null},{"capture":"si_brochure_section","path":"si_brochure_section","type":"raw","card":null,"preprocess":null},{"capture":"mep","path":"mep","type":"raw","card":null,"preprocess":null},{"capture":"guide","path":"guide","type":"raw","card":null,"preprocess":null},{"capture":"group","path":"group","type":"string","card":null,"preprocess":null},{"capture":"type_word","path":"type_word","type":"string","card":null,"preprocess":null},{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"year","path":"year","type":"string","card":null,"preprocess":null},{"capture":"language","path":"language","type":"string","card":null,"preprocess":null},{"capture":"volume","path":"volume","type":"string","card":null,"preprocess":null},{"capture":"issue","path":"issue","type":"string","card":null,"preprocess":null},{"capture":"article","path":"article","type":"string","card":null,"preprocess":null},{"capture":"edition","path":"edition","type":"string","card":null,"preprocess":null},{"capture":"version","path":"version","type":"string","card":null,"preprocess":null},{"capture":"years","path":"years","type":"string","card":null,"preprocess":null},{"capture":"variant","path":"variant","type":"string","card":null,"preprocess":null},{"capture":"part","path":"part","type":"string","card":null,"preprocess":null},{"capture":"appendix","path":"appendix","type":"string","card":null,"preprocess":null},{"capture":"annex","path":"annex","type":"string","card":null,"preprocess":null},{"capture":"mep_code","path":"mep_code","type":"string","card":null,"preprocess":null},{"capture":"report_code","path":"report_code","type":"string","card":null,"preprocess":null},{"capture":"guide_kind","path":"guide_kind","type":"string","card":null,"preprocess":null}]}},"preprocess":{},"tables":{"bipm_groups":{"file":"bipm_groups.yaml","rows":[{"name":"CCAUV"},{"name":"CCDS"},{"name":"CCRI"},{"name":"CCPR"},{"name":"CCEM"},{"name":"CCQM"},{"name":"CCTF"},{"name":"JCRB"},{"name":"CGPM"},{"name":"CIPM"},{"name":"CCM"},{"name":"CCU"},{"name":"CCL"},{"name":"CCT"}]},"bipm_type_names_fr":{"file":"bipm_type_names_fr.yaml","rows":[{"name":"Recommandation"},{"name":"Déclaration"},{"name":"Résolution"},{"name":"Statement"},{"name":"Décision"},{"name":"Action"}]},"bipm_type_codes":{"file":"bipm_type_codes.yaml","rows":[{"name":"DECL"},{"name":"DECN"},{"name":"ACT"},{"name":"RES"},{"name":"REC"}]},"bipm_type_names_en":{"file":"bipm_type_names_en.yaml","rows":[{"name":"Recommendation"},{"name":"Declaration"},{"name":"Resolution"},{"name":"Statement"},{"name":"Decision"},{"name":"Action"}]}},"lint":{"order_warnings":["rule connective: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 3 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 5 and 6 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 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 2 and 7 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 3 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 3 and 7 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)","rule identifier: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 4 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 5 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 5 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 6 and 8 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"SI Brochure 9e v3.0 (2019, EN)","expect":{}},{"entry":"identifier","kind":"accept","input":"SI MEP 10","expect":{}},{"entry":"identifier","kind":"accept","input":"CGPM 26th Meeting (2018)","expect":{}},{"entry":"identifier","kind":"accept","input":"Metrologia 24 3","expect":{}},{"entry":"identifier","kind":"accept","input":"CGPM 12","expect":{}},{"entry":"identifier","kind":"accept","input":"CCTF REC 2","expect":{}},{"entry":"identifier","kind":"accept","input":"BIPM SI Brochure Appendix 2","expect":{}},{"entry":"identifier","kind":"accept","input":"SI Brochure Part 1","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/bipm/parser.rb — BIPM identifiers: committee forms\n# (short/long EN/FR, meetings incl. French <sup>e</sup>), Metrologia,\n# the SI Brochure family, MEP/Guide reports. Groups and type names come\n# from gem-extracted tables (bipm_*.yaml), longest-first.\n#\n# Edition-2 conversion. The builder dispatches on the branch-wrapper\n# keys (committee_short, committee_long_en, committee_long_fr,\n# committee_bare, meeting_en, meeting_fr, metrologia, si_brochure,\n# si_brochure_variant, si_brochure_section, mep, guide), so every\n# wrapper is kept as a v1-shaped capture whose value is the inner-leaf\n# hash (or the bare scalar for the journal-level Metrologia record) and\n# binds uncast with the (raw) type; the leaves additionally bind flat.\n# Pure-raw rule bodies are inlined at capture sites (digits, alnum) so\n# every capture subtree carries only its own named leaves.\n\ngrammar PubidBipm version \"0.1.0\" edition 2 {\n digit = %x30-39\n dot = \".\"\n letter = %x41-5A / %x61-7A\n space = \" \"\n dash = \"-\"\n slash = \"/\"\n colon = \":\"\n lparen = \"(\"\n rparen = \")\"\n\n number = (1*digit *(dash 1*digit)) as number\n year = (4digit) as year\n lang = (\"EN\" / \"FR\" / %x45 / %x46) as language\n year_paren = \"(\" year [(\", \" lang)] \")\"\n year_paren_nolang = \"(\" year \")\"\n group = alt from_table \"bipm_groups\" column \"name\" as group\n type_abbrev = alt from_table \"bipm_type_codes\" column \"name\" as type_word\n type_name_en = alt from_table \"bipm_type_names_en\" column \"name\" as type_word\n type_name_fr = alt from_table \"bipm_type_names_fr\" column \"name\" as type_word\n connective = \"de la\" / \"du\"\n ordinal = \"st\" / \"nd\" / \"rd\" / \"th\"\n meeting_word_fr = \"Réunion\" / \"réunion\"\n\n committee_short = {\n (\n (\n group\n space\n type_abbrev\n [(space number)]\n [(space year_paren)]\n ) as committee_short\n )\n }\n committee_long_en = {\n (\n (\n group\n space\n type_name_en\n [(space number)]\n [(space year_paren_nolang)]\n ) as committee_long_en\n )\n }\n committee_long_fr = {\n (\n (\n type_name_fr\n [(space number)]\n space\n connective\n space\n group\n [(space year_paren_nolang)]\n ) as committee_long_fr\n )\n }\n committee_group_fr = {\n (\n (\n group\n space\n type_name_fr\n [(space number)]\n [(space year_paren_nolang)]\n ) as committee_long_fr\n )\n }\n committee_bare = ((group space number [(space year_paren)]) as committee_bare)\n\n meeting_en = {\n (\n (\n (group space number ordinal space \"Meeting\" [(space year_paren)])\n / (group space \"Meeting\" space number [(space year_paren)])\n ) as meeting_en\n )\n }\n meeting_fr = {\n (\n (\n (group space number \"<sup>e</sup>\" space \"réunion\" [(space year_paren)])\n / (group space number \"e\" space meeting_word_fr [(space year_paren)])\n / (group space meeting_word_fr space number [(space year_paren)])\n ) as meeting_fr\n )\n }\n\n metrologia = {\n (\n \"Metrologia\"\n [\n (\n space (1*digit) as volume\n [\n (\n space (1*(digit / letter)) as issue\n [\n (space (1*(digit / letter)) as article)\n ]\n )\n ]\n )\n ]\n ) as metrologia\n }\n\n edition = ((1*digit) \"e\") as edition\n version = (\"v\" 1*(digit / dot)) as version\n years = ((1*digit) [(slash (1*digit))]) as years\n si_brochure = {\n (\n (\"BIPM SI Brochure\" / \"SI Brochure\")\n space\n [\"sur le SI\" space]\n edition\n space\n version\n space\n \"(\" years \", \" lang \")\"\n ) as si_brochure\n }\n brochure_variant = ((\"Appendix\" space (1*digit)) / \"Concise\" / \"FAQ\") as variant\n si_brochure_variant = {\n (\n (\"BIPM SI Brochure\" / \"SI Brochure\")\n space\n brochure_variant\n ) as si_brochure_variant\n }\n si_brochure_section = {\n (\n (\"BIPM SI Brochure\" / \"SI Brochure\")\n [(space \"Part\" space (1*digit) as part)]\n ) as si_brochure_section\n }\n\n appendix_part = {\n \"Appendix\"\n space\n (1*digit) as appendix\n [(space \"Annex\" space (1*digit) as annex)]\n space\n \"Part\"\n space\n (((1*digit) [(dot (1*digit))]) as part)\n }\n mep_code = (1*(digit / letter)) as mep_code\n report_code = (\"BIPM-\" (1*digit) slash (1*digit)) as report_code\n mep_body = ((\"SI MEP\" space mep_code) / (\"Rapport\" space report_code))\n mep = ((\"BIPM\" space mep_body space appendix_part) / mep_body) as mep\n guide_kind = (\"MeP\" / \"RSI\") as guide_kind\n guide_body = group \"-GD-\" guide_kind dash (1*digit) as number\n guide = ((\"BIPM\" space guide_body space appendix_part) / guide_body) as guide\n\n group_leading = {\n meeting_en\n / meeting_fr\n / committee_short\n / committee_long_en\n / committee_group_fr\n / committee_bare\n }\n identifier = {\n metrologia\n / si_brochure\n / si_brochure_variant\n / si_brochure_section\n / mep\n / guide\n / committee_long_fr\n / group_leading\n }\n\n entry identifier: identifier\n\n bindings identifier {\n committee_short -> committee_short (raw)\n committee_long_en -> committee_long_en (raw)\n committee_long_fr -> committee_long_fr (raw)\n committee_bare -> committee_bare (raw)\n meeting_en -> meeting_en (raw)\n meeting_fr -> meeting_fr (raw)\n metrologia -> metrologia (raw)\n si_brochure -> si_brochure (raw)\n si_brochure_variant -> si_brochure_variant (raw)\n si_brochure_section -> si_brochure_section (raw)\n mep -> mep (raw)\n guide -> guide (raw)\n group -> group (string)\n type_word -> type_word (string)\n number -> number (string)\n year -> year (string)\n language -> language (string)\n volume -> volume (string)\n issue -> issue (string)\n article -> article (string)\n edition -> edition (string)\n version -> version (string)\n years -> years (string)\n variant -> variant (string)\n part -> part (string)\n appendix -> appendix (string)\n annex -> annex (string)\n mep_code -> mep_code (string)\n report_code -> report_code (string)\n guide_kind -> guide_kind (string)\n }\n\n test {\n accept \"SI Brochure 9e v3.0 (2019, EN)\"\n accept \"SI MEP 10\"\n accept \"CGPM 26th Meeting (2018)\"\n accept \"Metrologia 24 3\"\n accept \"CGPM 12\"\n accept \"CCTF REC 2\"\n accept \"BIPM SI Brochure Appendix 2\"\n accept \"SI Brochure Part 1\"\n reject \"nonsense\"\n }\n}\n","source_hash":"1c8cca3eb636d11774ae374e3157cbbd93d56f7d6e5ff9fbb5092a7cf3b6155f","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.3.114","edition":2,"checksum":"sha256:7ffed4923575262d39e6101e2fbfafb2f8586ebd7747c82dfbf3a43f4f1ba891"}
|
|
1
|
+
{"bindings":null,"version":"0.1.0","grammar":"PubidBipm","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Entity":{"atom":30}},{"Str":{"pattern":"Metrologia"}},{"Entity":{"atom":3}},{"Str":{"pattern":" "}},{"Entity":{"atom":5}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":4,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"volume","atom":6}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Entity":{"atom":13}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[11,12]}},{"Alternative":{"atoms":[9,10]}},{"Repetition":{"atom":14,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"issue","atom":15}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Entity":{"atom":13}},{"Alternative":{"atoms":[18,19]}},{"Repetition":{"atom":20,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"article","atom":21}},{"Sequence":{"atoms":[17,22]}},{"Repetition":{"atom":23,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[8,16,24]}},{"Repetition":{"atom":25,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[2,7,26]}},{"Repetition":{"atom":27,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[1,28]}},{"Named":{"name":"metrologia","atom":29}},{"Entity":{"atom":84}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Str":{"pattern":"Brochure sur le SI"}},{"Alternative":{"atoms":[32,33,34]}},{"Entity":{"atom":3}},{"Str":{"pattern":"sur le SI"}},{"Entity":{"atom":3}},{"Sequence":{"atoms":[37,38]}},{"Repetition":{"atom":39,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":46}},{"Entity":{"atom":5}},{"Repetition":{"atom":42,"min":1,"max":null,"tag":"Repetition"}},{"Str":{"pattern":"e"}},{"Sequence":{"atoms":[43,44]}},{"Named":{"name":"edition","atom":45}},{"Entity":{"atom":3}},{"Entity":{"atom":56}},{"Str":{"pattern":"v"}},{"Entity":{"atom":5}},{"Entity":{"atom":52}},{"Str":{"pattern":"."}},{"Alternative":{"atoms":[50,51]}},{"Repetition":{"atom":53,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[49,54]}},{"Named":{"name":"version","atom":55}},{"Sequence":{"atoms":[47,48]}},{"Repetition":{"atom":57,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Str":{"pattern":"("}},{"Entity":{"atom":71}},{"Entity":{"atom":5}},{"Repetition":{"atom":62,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":65}},{"Str":{"pattern":"/"}},{"Entity":{"atom":5}},{"Repetition":{"atom":66,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[64,67]}},{"Repetition":{"atom":68,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[63,69]}},{"Named":{"name":"years","atom":70}},{"Str":{"pattern":", "}},{"Entity":{"atom":79}},{"Str":{"pattern":"EN"}},{"Str":{"pattern":"FR"}},{"Re":{"pattern":"[E]"}},{"Re":{"pattern":"[F]"}},{"Alternative":{"atoms":[74,75,76,77]}},{"Named":{"name":"language","atom":78}},{"Sequence":{"atoms":[72,73]}},{"Repetition":{"atom":80,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[35,36,40,41,58,59,60,61,81,82]}},{"Named":{"name":"si_brochure","atom":83}},{"Entity":{"atom":101}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Alternative":{"atoms":[86,87]}},{"Entity":{"atom":3}},{"Entity":{"atom":99}},{"Str":{"pattern":"Appendix"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":93,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[91,92,94]}},{"Str":{"pattern":"Concise"}},{"Str":{"pattern":"FAQ"}},{"Alternative":{"atoms":[95,96,97]}},{"Named":{"name":"variant","atom":98}},{"Sequence":{"atoms":[88,89,90]}},{"Named":{"name":"si_brochure_variant","atom":100}},{"Entity":{"atom":115}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Alternative":{"atoms":[103,104]}},{"Entity":{"atom":3}},{"Str":{"pattern":"Part"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":109,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":110}},{"Sequence":{"atoms":[106,107,108,111]}},{"Repetition":{"atom":112,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[105,113]}},{"Named":{"name":"si_brochure_section","atom":114}},{"Entity":{"atom":147}},{"Str":{"pattern":"SI Brochure"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":119,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":126}},{"Str":{"pattern":"st"}},{"Str":{"pattern":"nd"}},{"Str":{"pattern":"rd"}},{"Str":{"pattern":"th"}},{"Alternative":{"atoms":[122,123,124,125]}},{"Sequence":{"atoms":[120,121]}},{"Named":{"name":"ordinal_edition","atom":127}},{"Entity":{"atom":3}},{"Str":{"pattern":"edition"}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Str":{"pattern":"("}},{"Entity":{"atom":137}},{"Entity":{"atom":5}},{"Repetition":{"atom":135,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":136}},{"Str":{"pattern":", "}},{"Entity":{"atom":79}},{"Sequence":{"atoms":[138,139]}},{"Repetition":{"atom":140,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[133,134,141,142]}},{"Sequence":{"atoms":[131,132]}},{"Repetition":{"atom":144,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[117,118,128,129,130,145]}},{"Named":{"name":"si_brochure_ordinal_edition","atom":146}},{"Entity":{"atom":205}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":173}},{"Str":{"pattern":"SI MEP"}},{"Entity":{"atom":3}},{"Entity":{"atom":159}},{"Entity":{"atom":5}},{"Entity":{"atom":13}},{"Alternative":{"atoms":[155,156]}},{"Repetition":{"atom":157,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"mep_code","atom":158}},{"Sequence":{"atoms":[152,153,154]}},{"Str":{"pattern":"Rapport"}},{"Entity":{"atom":3}},{"Entity":{"atom":171}},{"Str":{"pattern":"BIPM-"}},{"Entity":{"atom":5}},{"Repetition":{"atom":165,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":65}},{"Entity":{"atom":5}},{"Repetition":{"atom":168,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[164,166,167,169]}},{"Named":{"name":"report_code","atom":170}},{"Sequence":{"atoms":[161,162,163]}},{"Alternative":{"atoms":[160,172]}},{"Entity":{"atom":3}},{"Entity":{"atom":201}},{"Str":{"pattern":"Appendix"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":178,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"appendix","atom":179}},{"Entity":{"atom":3}},{"Str":{"pattern":"Annex"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":184,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"annex","atom":185}},{"Sequence":{"atoms":[181,182,183,186]}},{"Repetition":{"atom":187,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Str":{"pattern":"Part"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":192,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":52}},{"Entity":{"atom":5}},{"Repetition":{"atom":195,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[194,196]}},{"Repetition":{"atom":197,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[193,198]}},{"Named":{"name":"part","atom":199}},{"Sequence":{"atoms":[176,177,180,188,189,190,191,200]}},{"Sequence":{"atoms":[149,150,151,174,175]}},{"Entity":{"atom":173}},{"Alternative":{"atoms":[202,203]}},{"Named":{"name":"mep","atom":204}},{"Entity":{"atom":244}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":238}},{"Entity":{"atom":226}},{"Str":{"pattern":"CCAUV"}},{"Str":{"pattern":"CCDS"}},{"Str":{"pattern":"CCEM"}},{"Str":{"pattern":"CCPR"}},{"Str":{"pattern":"CCQM"}},{"Str":{"pattern":"CCRI"}},{"Str":{"pattern":"CCTF"}},{"Str":{"pattern":"CGPM"}},{"Str":{"pattern":"CIPM"}},{"Str":{"pattern":"JCRB"}},{"Str":{"pattern":"CCL"}},{"Str":{"pattern":"CCM"}},{"Str":{"pattern":"CCT"}},{"Str":{"pattern":"CCU"}},{"Alternative":{"atoms":[211,212,213,214,215,216,217,218,219,220,221,222,223,224]}},{"Named":{"name":"group","atom":225}},{"Str":{"pattern":"-GD-"}},{"Entity":{"atom":232}},{"Str":{"pattern":"MeP"}},{"Str":{"pattern":"RSI"}},{"Alternative":{"atoms":[229,230]}},{"Named":{"name":"guide_kind","atom":231}},{"Entity":{"atom":234}},{"Str":{"pattern":"-"}},{"Entity":{"atom":5}},{"Repetition":{"atom":235,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"number","atom":236}},{"Sequence":{"atoms":[210,227,228,233,237]}},{"Entity":{"atom":3}},{"Entity":{"atom":201}},{"Sequence":{"atoms":[207,208,209,239,240]}},{"Entity":{"atom":238}},{"Alternative":{"atoms":[241,242]}},{"Named":{"name":"guide","atom":243}},{"Entity":{"atom":295}},{"Entity":{"atom":254}},{"Str":{"pattern":"Recommandation"}},{"Str":{"pattern":"Déclaration"}},{"Str":{"pattern":"Résolution"}},{"Str":{"pattern":"Statement"}},{"Str":{"pattern":"Décision"}},{"Str":{"pattern":"Action"}},{"Alternative":{"atoms":[247,248,249,250,251,252]}},{"Named":{"name":"type_word","atom":253}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":5}},{"Repetition":{"atom":257,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":234}},{"Entity":{"atom":5}},{"Repetition":{"atom":260,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[259,261]}},{"Repetition":{"atom":262,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[258,263]}},{"Named":{"name":"number","atom":264}},{"Sequence":{"atoms":[255,256]}},{"Repetition":{"atom":266,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":272}},{"Str":{"pattern":"de la"}},{"Str":{"pattern":"du"}},{"Alternative":{"atoms":[270,271]}},{"Entity":{"atom":3}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":280}},{"Str":{"pattern":"("}},{"Entity":{"atom":137}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[277,278,279]}},{"Sequence":{"atoms":[275,276]}},{"Repetition":{"atom":281,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[246,267,268,269,273,274,282]}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":226}},{"Entity":{"atom":65}},{"Entity":{"atom":265}},{"Entity":{"atom":3}},{"Entity":{"atom":280}},{"Sequence":{"atoms":[289,290]}},{"Repetition":{"atom":291,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[284,285,286,287,288,292]}},{"Alternative":{"atoms":[283,293]}},{"Named":{"name":"committee_long_fr","atom":294}},{"Entity":{"atom":316}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":306}},{"Str":{"pattern":"DECL"}},{"Str":{"pattern":"DECN"}},{"Str":{"pattern":"ACT"}},{"Str":{"pattern":"REC"}},{"Str":{"pattern":"RES"}},{"Alternative":{"atoms":[300,301,302,303,304]}},{"Named":{"name":"type_word","atom":305}},{"Entity":{"atom":3}},{"Entity":{"atom":226}},{"Entity":{"atom":65}},{"Entity":{"atom":265}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[311,312]}},{"Repetition":{"atom":313,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[297,298,299,307,308,309,310,314]}},{"Named":{"name":"committee_prefixed","atom":315}},{"Entity":{"atom":478}},{"Entity":{"atom":366}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":126}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[325,326]}},{"Repetition":{"atom":327,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[319,320,321,322,323,324,328]}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[335,336]}},{"Repetition":{"atom":337,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[330,331,332,333,334,338]}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Str":{"pattern":"--"}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":126}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[348,349]}},{"Repetition":{"atom":350,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[340,341,342,343,344,345,346,347,351]}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Str":{"pattern":"--"}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[360,361]}},{"Repetition":{"atom":362,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[353,354,355,356,357,358,359,363]}},{"Alternative":{"atoms":[329,339,352,364]}},{"Named":{"name":"meeting_en","atom":365}},{"Entity":{"atom":404}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Str":{"pattern":"<sup>e</sup>"}},{"Entity":{"atom":3}},{"Str":{"pattern":"réunion"}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[374,375]}},{"Repetition":{"atom":376,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[368,369,370,371,372,373,377]}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Str":{"pattern":"e"}},{"Entity":{"atom":3}},{"Entity":{"atom":387}},{"Str":{"pattern":"Réunion"}},{"Str":{"pattern":"réunion"}},{"Alternative":{"atoms":[385,386]}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[388,389]}},{"Repetition":{"atom":390,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[379,380,381,382,383,384,391]}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":387}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[398,399]}},{"Repetition":{"atom":400,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[393,394,395,396,397,401]}},{"Alternative":{"atoms":[378,392,402]}},{"Named":{"name":"meeting_fr","atom":403}},{"Entity":{"atom":431}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":306}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":3}},{"Str":{"pattern":"A"}},{"Entity":{"atom":5}},{"Repetition":{"atom":413,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"appendix","atom":414}},{"Entity":{"atom":52}},{"Entity":{"atom":5}},{"Repetition":{"atom":417,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"annex","atom":418}},{"Sequence":{"atoms":[416,419]}},{"Repetition":{"atom":420,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[411,412,415,421]}},{"Repetition":{"atom":422,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[409,410,423]}},{"Repetition":{"atom":424,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[426,427]}},{"Repetition":{"atom":428,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[406,407,408,425,429]}},{"Named":{"name":"committee_short","atom":430}},{"Entity":{"atom":453}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":443}},{"Str":{"pattern":"Recommendation"}},{"Str":{"pattern":"Declaration"}},{"Str":{"pattern":"Resolution"}},{"Str":{"pattern":"Statement"}},{"Str":{"pattern":"Decision"}},{"Str":{"pattern":"Action"}},{"Alternative":{"atoms":[436,437,438,439,440,441]}},{"Named":{"name":"type_word","atom":442}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Sequence":{"atoms":[444,445]}},{"Repetition":{"atom":446,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":280}},{"Sequence":{"atoms":[448,449]}},{"Repetition":{"atom":450,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[433,434,435,447,451]}},{"Named":{"name":"committee_long_en","atom":452}},{"Entity":{"atom":467}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Sequence":{"atoms":[458,459]}},{"Repetition":{"atom":460,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":280}},{"Sequence":{"atoms":[462,463]}},{"Repetition":{"atom":464,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[455,456,457,461,465]}},{"Named":{"name":"committee_long_fr","atom":466}},{"Entity":{"atom":477}},{"Entity":{"atom":226}},{"Entity":{"atom":3}},{"Entity":{"atom":265}},{"Entity":{"atom":3}},{"Entity":{"atom":143}},{"Sequence":{"atoms":[472,473]}},{"Repetition":{"atom":474,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[469,470,471,475]}},{"Named":{"name":"committee_bare","atom":476}},{"Alternative":{"atoms":[318,367,405,432,454,468]}},{"Alternative":{"atoms":[0,31,85,102,116,148,206,245,296,317]}}],"root":479},"bindings":[{"capture":"committee_short","path":"committee_short","type":"raw","card":null,"preprocess":null},{"capture":"committee_prefixed","path":"committee_prefixed","type":"raw","card":null,"preprocess":null},{"capture":"committee_long_en","path":"committee_long_en","type":"raw","card":null,"preprocess":null},{"capture":"committee_long_fr","path":"committee_long_fr","type":"raw","card":null,"preprocess":null},{"capture":"committee_bare","path":"committee_bare","type":"raw","card":null,"preprocess":null},{"capture":"meeting_en","path":"meeting_en","type":"raw","card":null,"preprocess":null},{"capture":"meeting_fr","path":"meeting_fr","type":"raw","card":null,"preprocess":null},{"capture":"metrologia","path":"metrologia","type":"raw","card":null,"preprocess":null},{"capture":"si_brochure","path":"si_brochure","type":"raw","card":null,"preprocess":null},{"capture":"si_brochure_ordinal_edition","path":"si_brochure_ordinal_edition","type":"raw","card":null,"preprocess":null},{"capture":"si_brochure_variant","path":"si_brochure_variant","type":"raw","card":null,"preprocess":null},{"capture":"si_brochure_section","path":"si_brochure_section","type":"raw","card":null,"preprocess":null},{"capture":"mep","path":"mep","type":"raw","card":null,"preprocess":null},{"capture":"guide","path":"guide","type":"raw","card":null,"preprocess":null},{"capture":"group","path":"group","type":"string","card":null,"preprocess":null},{"capture":"type_word","path":"type_word","type":"string","card":null,"preprocess":null},{"capture":"number","path":"number","type":"string","card":null,"preprocess":null},{"capture":"year","path":"year","type":"string","card":null,"preprocess":null},{"capture":"language","path":"language","type":"string","card":null,"preprocess":null},{"capture":"volume","path":"volume","type":"string","card":null,"preprocess":null},{"capture":"issue","path":"issue","type":"string","card":null,"preprocess":null},{"capture":"article","path":"article","type":"string","card":null,"preprocess":null},{"capture":"edition","path":"edition","type":"string","card":null,"preprocess":null},{"capture":"version","path":"version","type":"string","card":null,"preprocess":null},{"capture":"years","path":"years","type":"string","card":null,"preprocess":null},{"capture":"variant","path":"variant","type":"string","card":null,"preprocess":null},{"capture":"part","path":"part","type":"string","card":null,"preprocess":null},{"capture":"appendix","path":"appendix","type":"string","card":null,"preprocess":null},{"capture":"annex","path":"annex","type":"string","card":null,"preprocess":null},{"capture":"mep_code","path":"mep_code","type":"string","card":null,"preprocess":null},{"capture":"report_code","path":"report_code","type":"string","card":null,"preprocess":null},{"capture":"guide_kind","path":"guide_kind","type":"string","card":null,"preprocess":null},{"capture":"ordinal_edition","path":"ordinal_edition","type":"string","card":null,"preprocess":null}]}},"preprocess":{},"tables":{"bipm_groups":{"file":"bipm_groups.yaml","rows":[{"name":"CCAUV"},{"name":"CCDS"},{"name":"CCRI"},{"name":"CCPR"},{"name":"CCEM"},{"name":"CCQM"},{"name":"CCTF"},{"name":"JCRB"},{"name":"CGPM"},{"name":"CIPM"},{"name":"CCM"},{"name":"CCU"},{"name":"CCL"},{"name":"CCT"}]},"bipm_type_names_fr":{"file":"bipm_type_names_fr.yaml","rows":[{"name":"Recommandation"},{"name":"Déclaration"},{"name":"Résolution"},{"name":"Statement"},{"name":"Décision"},{"name":"Action"}]},"bipm_type_codes":{"file":"bipm_type_codes.yaml","rows":[{"name":"DECL"},{"name":"DECN"},{"name":"ACT"},{"name":"RES"},{"name":"REC"}]},"bipm_type_names_en":{"file":"bipm_type_names_en.yaml","rows":[{"name":"Recommendation"},{"name":"Declaration"},{"name":"Resolution"},{"name":"Statement"},{"name":"Decision"},{"name":"Action"}]}},"lint":{"order_warnings":["rule connective: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 1 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 3 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 3 and 4 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 3 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 3 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 4 and 5 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule group_leading: branches 5 and 6 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 2 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 2 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 2 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 2 and 9 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 3 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 3 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 3 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 3 and 9 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)","rule identifier: branches 4 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 4 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 4 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 4 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 5 and 6 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 5 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 6 and 7 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 6 and 8 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 6 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 7 and 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 7 and 10 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"SI Brochure 9e v3.0 (2019, EN)","expect":{}},{"entry":"identifier","kind":"accept","input":"SI MEP 10","expect":{}},{"entry":"identifier","kind":"accept","input":"CGPM 26th Meeting (2018)","expect":{}},{"entry":"identifier","kind":"accept","input":"Metrologia 24 3","expect":{}},{"entry":"identifier","kind":"accept","input":"CGPM 12","expect":{}},{"entry":"identifier","kind":"accept","input":"CCTF REC 2","expect":{}},{"entry":"identifier","kind":"accept","input":"BIPM SI Brochure Appendix 2","expect":{}},{"entry":"identifier","kind":"accept","input":"SI Brochure Part 1","expect":{}},{"entry":"identifier","kind":"accept","input":"CGPM -- Meeting 1 (1889)","expect":{}},{"entry":"identifier","kind":"accept","input":"BIPM DECN CIPM/101-1 (2012, EN)","expect":{}},{"entry":"identifier","kind":"accept","input":"BIPM DECN CIPM/101-1 (2012, FR)","expect":{}},{"entry":"identifier","kind":"accept","input":"Décision CIPM/111-10 (2022)","expect":{}},{"entry":"identifier","kind":"accept","input":"Recommandation JCRB/43-1 (2021)","expect":{}},{"entry":"identifier","kind":"accept","input":"CIPM DECN 111-10-2 (2022, F)","expect":{}},{"entry":"identifier","kind":"accept","input":"CIPM DECN 112 A3 (2022, F)","expect":{}},{"entry":"identifier","kind":"accept","input":"CIPM DECN 112 A3.5 (2022, F)","expect":{}},{"entry":"identifier","kind":"accept","input":"SI Brochure 9e v3.01 (2019/2024)","expect":{}},{"entry":"identifier","kind":"accept","input":"SI Brochure 9e (2019, E)","expect":{}},{"entry":"identifier","kind":"accept","input":"Brochure sur le SI 9e v3.01 (2019/2024, F)","expect":{}},{"entry":"identifier","kind":"accept","input":"SI Brochure 9th edition (2019)","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/bipm/parser.rb — BIPM identifiers: committee forms\n# (short/long EN/FR, meetings incl. French <sup>e</sup>), Metrologia,\n# the SI Brochure family, MEP/Guide reports. Groups and type names come\n# from gem-extracted tables (bipm_*.yaml), longest-first.\n#\n# Edition-2 conversion. The builder dispatches on the branch-wrapper\n# keys (committee_short, committee_long_en, committee_long_fr,\n# committee_bare, meeting_en, meeting_fr, metrologia, si_brochure,\n# si_brochure_variant, si_brochure_section, mep, guide), so every\n# wrapper is kept as a v1-shaped capture whose value is the inner-leaf\n# hash (or the bare scalar for the journal-level Metrologia record) and\n# binds uncast with the (raw) type; the leaves additionally bind flat.\n# Pure-raw rule bodies are inlined at capture sites (digits, alnum) so\n# every capture subtree carries only its own named leaves.\n\ngrammar PubidBipm version \"0.1.0\" edition 2 {\n digit = %x30-39\n dot = \".\"\n letter = %x41-5A / %x61-7A\n space = \" \"\n dash = \"-\"\n slash = \"/\"\n colon = \":\"\n lparen = \"(\"\n rparen = \")\"\n\n number = (1*digit *(dash 1*digit)) as number\n year = (4digit) as year\n lang = (\"EN\" / \"FR\" / %x45 / %x46) as language\n year_paren = \"(\" year [(\", \" lang)] \")\"\n year_paren_nolang = \"(\" year \")\"\n group = alt from_table \"bipm_groups\" column \"name\" as group\n type_abbrev = alt from_table \"bipm_type_codes\" column \"name\" as type_word\n type_name_en = alt from_table \"bipm_type_names_en\" column \"name\" as type_word\n type_name_fr = alt from_table \"bipm_type_names_fr\" column \"name\" as type_word\n connective = \"de la\" / \"du\"\n ordinal = \"st\" / \"nd\" / \"rd\" / \"th\"\n meeting_word_fr = \"Réunion\" / \"réunion\"\n\n committee_short = {\n (\n (\n group\n space\n type_abbrev\n [(space number [(space \"A\" (1*digit) as appendix [dot (1*digit) as annex])])]\n [(space year_paren)]\n ) as committee_short\n )\n }\n # The publisher-prefixed decision form the corpus cites\n # (\"BIPM DECN CIPM/101-1 (2012, EN)\"): a literal BIPM publisher lead, the\n # outcome type, then the body-qualified resource-specific-id \"{body}/{id}\".\n # It names the same document as the unprefixed \"<body> <TYPE> <id>\" form, so\n # the builder dispatches it through the same CommitteeDocument path.\n committee_prefixed = {\n (\n (\n \"BIPM\"\n space\n type_abbrev\n space\n group\n slash\n number\n [(space year_paren)]\n ) as committee_prefixed\n )\n }\n committee_long_en = {\n (\n (\n group\n space\n type_name_en\n [(space number)]\n [(space year_paren_nolang)]\n ) as committee_long_en\n )\n }\n committee_long_fr = {\n (\n (\n (type_name_fr [(space number)] space connective space group [(space year_paren_nolang)])\n / (type_name_fr space group slash number [(space year_paren_nolang)])\n ) as committee_long_fr\n )\n }\n committee_group_fr = {\n (\n (\n group\n space\n type_name_fr\n [(space number)]\n [(space year_paren_nolang)]\n ) as committee_long_fr\n )\n }\n committee_bare = ((group space number [(space year_paren)]) as committee_bare)\n\n meeting_en = {\n (\n (\n (group space number ordinal space \"Meeting\" [(space year_paren)])\n / (group space \"Meeting\" space number [(space year_paren)])\n / (group space \"--\" space number ordinal space \"Meeting\" [(space year_paren)])\n / (group space \"--\" space \"Meeting\" space number [(space year_paren)])\n ) as meeting_en\n )\n }\n meeting_fr = {\n (\n (\n (group space number \"<sup>e</sup>\" space \"réunion\" [(space year_paren)])\n / (group space number \"e\" space meeting_word_fr [(space year_paren)])\n / (group space meeting_word_fr space number [(space year_paren)])\n ) as meeting_fr\n )\n }\n\n metrologia = {\n (\n \"Metrologia\"\n [\n (\n space (1*digit) as volume\n [\n (\n space (1*(digit / letter)) as issue\n [\n (space (1*(digit / letter)) as article)\n ]\n )\n ]\n )\n ]\n ) as metrologia\n }\n\n edition = ((1*digit) \"e\") as edition\n version = (\"v\" 1*(digit / dot)) as version\n years = ((1*digit) [(slash (1*digit))]) as years\n si_brochure = {\n (\n (\n (\"BIPM SI Brochure\" / \"SI Brochure\" / \"Brochure sur le SI\")\n space\n [\"sur le SI\" space]\n edition\n [space version]\n space\n \"(\" years [(\", \" lang)] \")\"\n ) as si_brochure\n )\n }\n # The guide's language-independent form drops the language code and the\n # version is optional (\"SI Brochure 9e (2019, E)\"); the guide's French\n # publication identifier leads with \"Brochure sur le SI\" instead of the\n # English brochure name. All render in the canonical \"BIPM SI Brochure …\"\n # spelling. The corpus-cited ordinal-edition spelling normalizes the\n # English \"9th edition\" onto the canonical \"9e\" edition value.\n si_brochure_ordinal_edition = {\n (\n (\n \"SI Brochure\"\n space\n ((1*digit) ordinal) as ordinal_edition\n space\n \"edition\"\n [(space year_paren)]\n ) as si_brochure_ordinal_edition\n )\n }\n brochure_variant = ((\"Appendix\" space (1*digit)) / \"Concise\" / \"FAQ\") as variant\n si_brochure_variant = {\n (\n (\"BIPM SI Brochure\" / \"SI Brochure\")\n space\n brochure_variant\n ) as si_brochure_variant\n }\n si_brochure_section = {\n (\n (\"BIPM SI Brochure\" / \"SI Brochure\")\n [(space \"Part\" space (1*digit) as part)]\n ) as si_brochure_section\n }\n\n appendix_part = {\n \"Appendix\"\n space\n (1*digit) as appendix\n [(space \"Annex\" space (1*digit) as annex)]\n space\n \"Part\"\n space\n (((1*digit) [(dot (1*digit))]) as part)\n }\n mep_code = (1*(digit / letter)) as mep_code\n report_code = (\"BIPM-\" (1*digit) slash (1*digit)) as report_code\n mep_body = ((\"SI MEP\" space mep_code) / (\"Rapport\" space report_code))\n mep = ((\"BIPM\" space mep_body space appendix_part) / mep_body) as mep\n guide_kind = (\"MeP\" / \"RSI\") as guide_kind\n guide_body = group \"-GD-\" guide_kind dash (1*digit) as number\n guide = ((\"BIPM\" space guide_body space appendix_part) / guide_body) as guide\n\n group_leading = {\n meeting_en\n / meeting_fr\n / committee_short\n / committee_long_en\n / committee_group_fr\n / committee_bare\n }\n identifier = {\n metrologia\n / si_brochure\n / si_brochure_variant\n / si_brochure_section\n / si_brochure_ordinal_edition\n / mep\n / guide\n / committee_long_fr\n / committee_prefixed\n / group_leading\n }\n\n entry identifier: identifier\n\n bindings identifier {\n committee_short -> committee_short (raw)\n committee_prefixed -> committee_prefixed (raw)\n committee_long_en -> committee_long_en (raw)\n committee_long_fr -> committee_long_fr (raw)\n committee_bare -> committee_bare (raw)\n meeting_en -> meeting_en (raw)\n meeting_fr -> meeting_fr (raw)\n metrologia -> metrologia (raw)\n si_brochure -> si_brochure (raw)\n si_brochure_ordinal_edition -> si_brochure_ordinal_edition (raw)\n si_brochure_variant -> si_brochure_variant (raw)\n si_brochure_section -> si_brochure_section (raw)\n mep -> mep (raw)\n guide -> guide (raw)\n group -> group (string)\n type_word -> type_word (string)\n number -> number (string)\n year -> year (string)\n language -> language (string)\n volume -> volume (string)\n issue -> issue (string)\n article -> article (string)\n edition -> edition (string)\n version -> version (string)\n years -> years (string)\n variant -> variant (string)\n part -> part (string)\n appendix -> appendix (string)\n annex -> annex (string)\n mep_code -> mep_code (string)\n report_code -> report_code (string)\n guide_kind -> guide_kind (string)\n ordinal_edition -> ordinal_edition (string)\n }\n\n test {\n accept \"SI Brochure 9e v3.0 (2019, EN)\"\n accept \"SI MEP 10\"\n accept \"CGPM 26th Meeting (2018)\"\n accept \"Metrologia 24 3\"\n accept \"CGPM 12\"\n accept \"CCTF REC 2\"\n accept \"BIPM SI Brochure Appendix 2\"\n accept \"SI Brochure Part 1\"\n accept \"CGPM -- Meeting 1 (1889)\"\n accept \"BIPM DECN CIPM/101-1 (2012, EN)\"\n accept \"BIPM DECN CIPM/101-1 (2012, FR)\"\n accept \"Décision CIPM/111-10 (2022)\"\n accept \"Recommandation JCRB/43-1 (2021)\"\n accept \"CIPM DECN 111-10-2 (2022, F)\"\n accept \"CIPM DECN 112 A3 (2022, F)\"\n accept \"CIPM DECN 112 A3.5 (2022, F)\"\n accept \"SI Brochure 9e v3.01 (2019/2024)\"\n accept \"SI Brochure 9e (2019, E)\"\n accept \"Brochure sur le SI 9e v3.01 (2019/2024, F)\"\n accept \"SI Brochure 9th edition (2019)\"\n reject \"nonsense\"\n }\n}\n","source_hash":"dfac00d992c8c6c0837554c97a9e6d476ee56105afddaa7c941f3386864d3af9","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.3.126","edition":2,"semantics_hash":"sha256:c2aac10d52235493f171181d334fa85b81a40813ba17abe101a038ae5aef643f","checksum":"sha256:7b8da36d5f3e19f6554fb64ec2763e799f8cf03bde3274e5aec3d83462d65375"}
|
data/data/parg/bipm.parg
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
# Port of lib/pubid/bipm/parser.rb — BIPM identifiers: committee forms
|
|
2
|
+
# (short/long EN/FR, meetings incl. French <sup>e</sup>), Metrologia,
|
|
3
|
+
# the SI Brochure family, MEP/Guide reports. Groups and type names come
|
|
4
|
+
# from gem-extracted tables (bipm_*.yaml), longest-first.
|
|
5
|
+
#
|
|
6
|
+
# Edition-2 conversion. The builder dispatches on the branch-wrapper
|
|
7
|
+
# keys (committee_short, committee_long_en, committee_long_fr,
|
|
8
|
+
# committee_bare, meeting_en, meeting_fr, metrologia, si_brochure,
|
|
9
|
+
# si_brochure_variant, si_brochure_section, mep, guide), so every
|
|
10
|
+
# wrapper is kept as a v1-shaped capture whose value is the inner-leaf
|
|
11
|
+
# hash (or the bare scalar for the journal-level Metrologia record) and
|
|
12
|
+
# binds uncast with the (raw) type; the leaves additionally bind flat.
|
|
13
|
+
# Pure-raw rule bodies are inlined at capture sites (digits, alnum) so
|
|
14
|
+
# every capture subtree carries only its own named leaves.
|
|
15
|
+
|
|
16
|
+
grammar PubidBipm version "0.1.0" edition 2 {
|
|
17
|
+
digit = %x30-39
|
|
18
|
+
dot = "."
|
|
19
|
+
letter = %x41-5A / %x61-7A
|
|
20
|
+
space = " "
|
|
21
|
+
dash = "-"
|
|
22
|
+
slash = "/"
|
|
23
|
+
colon = ":"
|
|
24
|
+
lparen = "("
|
|
25
|
+
rparen = ")"
|
|
26
|
+
|
|
27
|
+
number = (1*digit *(dash 1*digit)) as number
|
|
28
|
+
year = (4digit) as year
|
|
29
|
+
lang = ("EN" / "FR" / %x45 / %x46) as language
|
|
30
|
+
year_paren = "(" year [(", " lang)] ")"
|
|
31
|
+
year_paren_nolang = "(" year ")"
|
|
32
|
+
group = alt from_table "bipm_groups" column "name" as group
|
|
33
|
+
type_abbrev = alt from_table "bipm_type_codes" column "name" as type_word
|
|
34
|
+
type_name_en = alt from_table "bipm_type_names_en" column "name" as type_word
|
|
35
|
+
type_name_fr = alt from_table "bipm_type_names_fr" column "name" as type_word
|
|
36
|
+
connective = "de la" / "du"
|
|
37
|
+
ordinal = "st" / "nd" / "rd" / "th"
|
|
38
|
+
meeting_word_fr = "Réunion" / "réunion"
|
|
39
|
+
|
|
40
|
+
committee_short = {
|
|
41
|
+
(
|
|
42
|
+
(
|
|
43
|
+
group
|
|
44
|
+
space
|
|
45
|
+
type_abbrev
|
|
46
|
+
[(space number [(space "A" (1*digit) as appendix [dot (1*digit) as annex])])]
|
|
47
|
+
[(space year_paren)]
|
|
48
|
+
) as committee_short
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
# The publisher-prefixed decision form the corpus cites
|
|
52
|
+
# ("BIPM DECN CIPM/101-1 (2012, EN)"): a literal BIPM publisher lead, the
|
|
53
|
+
# outcome type, then the body-qualified resource-specific-id "{body}/{id}".
|
|
54
|
+
# It names the same document as the unprefixed "<body> <TYPE> <id>" form, so
|
|
55
|
+
# the builder dispatches it through the same CommitteeDocument path.
|
|
56
|
+
committee_prefixed = {
|
|
57
|
+
(
|
|
58
|
+
(
|
|
59
|
+
"BIPM"
|
|
60
|
+
space
|
|
61
|
+
type_abbrev
|
|
62
|
+
space
|
|
63
|
+
group
|
|
64
|
+
slash
|
|
65
|
+
number
|
|
66
|
+
[(space year_paren)]
|
|
67
|
+
) as committee_prefixed
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
committee_long_en = {
|
|
71
|
+
(
|
|
72
|
+
(
|
|
73
|
+
group
|
|
74
|
+
space
|
|
75
|
+
type_name_en
|
|
76
|
+
[(space number)]
|
|
77
|
+
[(space year_paren_nolang)]
|
|
78
|
+
) as committee_long_en
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
committee_long_fr = {
|
|
82
|
+
(
|
|
83
|
+
(
|
|
84
|
+
(type_name_fr [(space number)] space connective space group [(space year_paren_nolang)])
|
|
85
|
+
/ (type_name_fr space group slash number [(space year_paren_nolang)])
|
|
86
|
+
) as committee_long_fr
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
committee_group_fr = {
|
|
90
|
+
(
|
|
91
|
+
(
|
|
92
|
+
group
|
|
93
|
+
space
|
|
94
|
+
type_name_fr
|
|
95
|
+
[(space number)]
|
|
96
|
+
[(space year_paren_nolang)]
|
|
97
|
+
) as committee_long_fr
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
committee_bare = ((group space number [(space year_paren)]) as committee_bare)
|
|
101
|
+
|
|
102
|
+
meeting_en = {
|
|
103
|
+
(
|
|
104
|
+
(
|
|
105
|
+
(group space number ordinal space "Meeting" [(space year_paren)])
|
|
106
|
+
/ (group space "Meeting" space number [(space year_paren)])
|
|
107
|
+
/ (group space "--" space number ordinal space "Meeting" [(space year_paren)])
|
|
108
|
+
/ (group space "--" space "Meeting" space number [(space year_paren)])
|
|
109
|
+
) as meeting_en
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
meeting_fr = {
|
|
113
|
+
(
|
|
114
|
+
(
|
|
115
|
+
(group space number "<sup>e</sup>" space "réunion" [(space year_paren)])
|
|
116
|
+
/ (group space number "e" space meeting_word_fr [(space year_paren)])
|
|
117
|
+
/ (group space meeting_word_fr space number [(space year_paren)])
|
|
118
|
+
) as meeting_fr
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
metrologia = {
|
|
123
|
+
(
|
|
124
|
+
"Metrologia"
|
|
125
|
+
[
|
|
126
|
+
(
|
|
127
|
+
space (1*digit) as volume
|
|
128
|
+
[
|
|
129
|
+
(
|
|
130
|
+
space (1*(digit / letter)) as issue
|
|
131
|
+
[
|
|
132
|
+
(space (1*(digit / letter)) as article)
|
|
133
|
+
]
|
|
134
|
+
)
|
|
135
|
+
]
|
|
136
|
+
)
|
|
137
|
+
]
|
|
138
|
+
) as metrologia
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
edition = ((1*digit) "e") as edition
|
|
142
|
+
version = ("v" 1*(digit / dot)) as version
|
|
143
|
+
years = ((1*digit) [(slash (1*digit))]) as years
|
|
144
|
+
si_brochure = {
|
|
145
|
+
(
|
|
146
|
+
(
|
|
147
|
+
("BIPM SI Brochure" / "SI Brochure" / "Brochure sur le SI")
|
|
148
|
+
space
|
|
149
|
+
["sur le SI" space]
|
|
150
|
+
edition
|
|
151
|
+
[space version]
|
|
152
|
+
space
|
|
153
|
+
"(" years [(", " lang)] ")"
|
|
154
|
+
) as si_brochure
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
# The guide's language-independent form drops the language code and the
|
|
158
|
+
# version is optional ("SI Brochure 9e (2019, E)"); the guide's French
|
|
159
|
+
# publication identifier leads with "Brochure sur le SI" instead of the
|
|
160
|
+
# English brochure name. All render in the canonical "BIPM SI Brochure …"
|
|
161
|
+
# spelling. The corpus-cited ordinal-edition spelling normalizes the
|
|
162
|
+
# English "9th edition" onto the canonical "9e" edition value.
|
|
163
|
+
si_brochure_ordinal_edition = {
|
|
164
|
+
(
|
|
165
|
+
(
|
|
166
|
+
"SI Brochure"
|
|
167
|
+
space
|
|
168
|
+
((1*digit) ordinal) as ordinal_edition
|
|
169
|
+
space
|
|
170
|
+
"edition"
|
|
171
|
+
[(space year_paren)]
|
|
172
|
+
) as si_brochure_ordinal_edition
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
brochure_variant = (("Appendix" space (1*digit)) / "Concise" / "FAQ") as variant
|
|
176
|
+
si_brochure_variant = {
|
|
177
|
+
(
|
|
178
|
+
("BIPM SI Brochure" / "SI Brochure")
|
|
179
|
+
space
|
|
180
|
+
brochure_variant
|
|
181
|
+
) as si_brochure_variant
|
|
182
|
+
}
|
|
183
|
+
si_brochure_section = {
|
|
184
|
+
(
|
|
185
|
+
("BIPM SI Brochure" / "SI Brochure")
|
|
186
|
+
[(space "Part" space (1*digit) as part)]
|
|
187
|
+
) as si_brochure_section
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
appendix_part = {
|
|
191
|
+
"Appendix"
|
|
192
|
+
space
|
|
193
|
+
(1*digit) as appendix
|
|
194
|
+
[(space "Annex" space (1*digit) as annex)]
|
|
195
|
+
space
|
|
196
|
+
"Part"
|
|
197
|
+
space
|
|
198
|
+
(((1*digit) [(dot (1*digit))]) as part)
|
|
199
|
+
}
|
|
200
|
+
mep_code = (1*(digit / letter)) as mep_code
|
|
201
|
+
report_code = ("BIPM-" (1*digit) slash (1*digit)) as report_code
|
|
202
|
+
mep_body = (("SI MEP" space mep_code) / ("Rapport" space report_code))
|
|
203
|
+
mep = (("BIPM" space mep_body space appendix_part) / mep_body) as mep
|
|
204
|
+
guide_kind = ("MeP" / "RSI") as guide_kind
|
|
205
|
+
guide_body = group "-GD-" guide_kind dash (1*digit) as number
|
|
206
|
+
guide = (("BIPM" space guide_body space appendix_part) / guide_body) as guide
|
|
207
|
+
|
|
208
|
+
group_leading = {
|
|
209
|
+
meeting_en
|
|
210
|
+
/ meeting_fr
|
|
211
|
+
/ committee_short
|
|
212
|
+
/ committee_long_en
|
|
213
|
+
/ committee_group_fr
|
|
214
|
+
/ committee_bare
|
|
215
|
+
}
|
|
216
|
+
identifier = {
|
|
217
|
+
metrologia
|
|
218
|
+
/ si_brochure
|
|
219
|
+
/ si_brochure_variant
|
|
220
|
+
/ si_brochure_section
|
|
221
|
+
/ si_brochure_ordinal_edition
|
|
222
|
+
/ mep
|
|
223
|
+
/ guide
|
|
224
|
+
/ committee_long_fr
|
|
225
|
+
/ committee_prefixed
|
|
226
|
+
/ group_leading
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
entry identifier: identifier
|
|
230
|
+
|
|
231
|
+
bindings identifier {
|
|
232
|
+
committee_short -> committee_short (raw)
|
|
233
|
+
committee_prefixed -> committee_prefixed (raw)
|
|
234
|
+
committee_long_en -> committee_long_en (raw)
|
|
235
|
+
committee_long_fr -> committee_long_fr (raw)
|
|
236
|
+
committee_bare -> committee_bare (raw)
|
|
237
|
+
meeting_en -> meeting_en (raw)
|
|
238
|
+
meeting_fr -> meeting_fr (raw)
|
|
239
|
+
metrologia -> metrologia (raw)
|
|
240
|
+
si_brochure -> si_brochure (raw)
|
|
241
|
+
si_brochure_ordinal_edition -> si_brochure_ordinal_edition (raw)
|
|
242
|
+
si_brochure_variant -> si_brochure_variant (raw)
|
|
243
|
+
si_brochure_section -> si_brochure_section (raw)
|
|
244
|
+
mep -> mep (raw)
|
|
245
|
+
guide -> guide (raw)
|
|
246
|
+
group -> group (string)
|
|
247
|
+
type_word -> type_word (string)
|
|
248
|
+
number -> number (string)
|
|
249
|
+
year -> year (string)
|
|
250
|
+
language -> language (string)
|
|
251
|
+
volume -> volume (string)
|
|
252
|
+
issue -> issue (string)
|
|
253
|
+
article -> article (string)
|
|
254
|
+
edition -> edition (string)
|
|
255
|
+
version -> version (string)
|
|
256
|
+
years -> years (string)
|
|
257
|
+
variant -> variant (string)
|
|
258
|
+
part -> part (string)
|
|
259
|
+
appendix -> appendix (string)
|
|
260
|
+
annex -> annex (string)
|
|
261
|
+
mep_code -> mep_code (string)
|
|
262
|
+
report_code -> report_code (string)
|
|
263
|
+
guide_kind -> guide_kind (string)
|
|
264
|
+
ordinal_edition -> ordinal_edition (string)
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
test {
|
|
268
|
+
accept "SI Brochure 9e v3.0 (2019, EN)"
|
|
269
|
+
accept "SI MEP 10"
|
|
270
|
+
accept "CGPM 26th Meeting (2018)"
|
|
271
|
+
accept "Metrologia 24 3"
|
|
272
|
+
accept "CGPM 12"
|
|
273
|
+
accept "CCTF REC 2"
|
|
274
|
+
accept "BIPM SI Brochure Appendix 2"
|
|
275
|
+
accept "SI Brochure Part 1"
|
|
276
|
+
accept "CGPM -- Meeting 1 (1889)"
|
|
277
|
+
accept "BIPM DECN CIPM/101-1 (2012, EN)"
|
|
278
|
+
accept "BIPM DECN CIPM/101-1 (2012, FR)"
|
|
279
|
+
accept "Décision CIPM/111-10 (2022)"
|
|
280
|
+
accept "Recommandation JCRB/43-1 (2021)"
|
|
281
|
+
accept "CIPM DECN 111-10-2 (2022, F)"
|
|
282
|
+
accept "CIPM DECN 112 A3 (2022, F)"
|
|
283
|
+
accept "CIPM DECN 112 A3.5 (2022, F)"
|
|
284
|
+
accept "SI Brochure 9e v3.01 (2019/2024)"
|
|
285
|
+
accept "SI Brochure 9e (2019, E)"
|
|
286
|
+
accept "Brochure sur le SI 9e v3.01 (2019/2024, F)"
|
|
287
|
+
accept "SI Brochure 9th edition (2019)"
|
|
288
|
+
reject "nonsense"
|
|
289
|
+
}
|
|
290
|
+
}
|