@pubid/pubid 0.1.36 → 0.1.37
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/artifact/corpus.json.gz +0 -0
- package/dist/flavors/bipm/index.js +132 -28
- package/package.json +2 -2
- package/vendor/parg/bipm.json +1 -1
package/artifact/corpus.json.gz
CHANGED
|
Binary file
|
|
@@ -130,15 +130,30 @@ function buildRules() {
|
|
|
130
130
|
.or(str("SI Brochure"))
|
|
131
131
|
.or(str("Brochure sur le SI"))
|
|
132
132
|
.then(space, str("sur le SI").then(space).maybe(), rules["edition"],
|
|
133
|
-
// The version and the
|
|
134
|
-
// language-independent form
|
|
135
|
-
|
|
133
|
+
// The version and the trailing parenthetical are optional (the
|
|
134
|
+
// guide's language-independent form "SI Brochure 9e (2019, E)";
|
|
135
|
+
// the year-less editions "BIPM SI Brochure 9e" and "… (E)" must
|
|
136
|
+
// re-parse as canonically rendered, pubid#694 ruling R1).
|
|
137
|
+
space.then(rules["version"]).maybe(), space
|
|
138
|
+
.then(str("(")
|
|
139
|
+
.then(rules["years"], str(", ").then(lang()).maybe(), str(")"))
|
|
140
|
+
.or(str("(").then(lang(), str(")"))))
|
|
141
|
+
.maybe())
|
|
136
142
|
.as("si_brochure"));
|
|
137
143
|
// The corpus-cited ordinal-edition spelling ("SI Brochure 9th edition
|
|
138
144
|
// (2019)") normalizes the English ordinal onto the canonical "9e".
|
|
139
145
|
rule("si_brochure_ordinal_edition", () => str("SI Brochure")
|
|
140
146
|
.then(space, digits.then(ordinal()).as("ordinal_edition"), space, str("edition"), space.then(rules["year_paren"]).maybe())
|
|
141
147
|
.as("si_brochure_ordinal_edition"));
|
|
148
|
+
// The unmerged si-brochure-id proposal's bare-number edition spellings
|
|
149
|
+
// ("SI Brochure 9", "SI Brochure 9 (E)", "SI Brochure 9 (2024) (F)"):
|
|
150
|
+
// the edition carries no trailing "e", and the year and the language
|
|
151
|
+
// may each sit in their own parentheses (pubid#694 ruling R1). A
|
|
152
|
+
// parse-in alias of the canonical "9e" edition — the builder appends
|
|
153
|
+
// the "e" the proposal drops.
|
|
154
|
+
rule("si_brochure_bare_edition", () => str("SI Brochure")
|
|
155
|
+
.then(space, digits.as("bare_edition"), space.then(str("("), rules["years"], str(")")).maybe(), space.then(str("("), lang(), str(")")).maybe())
|
|
156
|
+
.as("si_brochure_bare_edition"));
|
|
142
157
|
rule("brochure_variant", () => str("Appendix")
|
|
143
158
|
.then(space, digits)
|
|
144
159
|
.or(str("Concise"), str("FAQ"))
|
|
@@ -167,7 +182,7 @@ function buildRules() {
|
|
|
167
182
|
.or(guideBody())
|
|
168
183
|
.as("guide"));
|
|
169
184
|
rule("group_leading", () => rules["meeting_en"].or(rules["meeting_fr"], rules["committee_short"], rules["committee_long_en"], rules["committee_group_fr"], rules["committee_bare"]));
|
|
170
|
-
rule("identifier", () => rules["metrologia"].or(rules["si_brochure"], rules["si_brochure_variant"], rules["si_brochure_section"], rules["si_brochure_ordinal_edition"], rules["mep"], rules["guide"], rules["committee_long_fr"], rules["committee_prefixed"], rules["group_leading"]));
|
|
185
|
+
rule("identifier", () => rules["metrologia"].or(rules["si_brochure"], rules["si_brochure_variant"], rules["si_brochure_section"], rules["si_brochure_ordinal_edition"], rules["si_brochure_bare_edition"], rules["mep"], rules["guide"], rules["committee_long_fr"], rules["committee_prefixed"], rules["group_leading"]));
|
|
171
186
|
rule("root", () => rules["identifier"]);
|
|
172
187
|
return rules;
|
|
173
188
|
}
|
|
@@ -246,22 +261,29 @@ class BipmUrnGenerator extends BaseUrnGenerator {
|
|
|
246
261
|
generate() {
|
|
247
262
|
const id = this.identifier;
|
|
248
263
|
if (id instanceof BipmCommitteeDocument) {
|
|
264
|
+
// The guide-of-record faces (pubid#694, ruling R2): the v1 version
|
|
265
|
+
// segment leads every family and the type segment spells the English
|
|
266
|
+
// type name lowercased ("decision"), never the REC/RES/DECN code.
|
|
267
|
+
// type_code is nil for the bare MRA form -> empty type segment.
|
|
268
|
+
const typeSegment = id.type_code === undefined
|
|
269
|
+
? ""
|
|
270
|
+
: (TYPE_NAME_EN[id.type_code] ?? id.type_code).toLowerCase();
|
|
249
271
|
const parts = [
|
|
250
|
-
"urn", "bipm", id.group?.toLowerCase() ?? "",
|
|
251
|
-
|
|
272
|
+
"urn", "bipm", "v1", id.group?.toLowerCase() ?? "",
|
|
273
|
+
typeSegment, committeeNumberSegment(id),
|
|
252
274
|
];
|
|
253
275
|
if (id.year !== undefined)
|
|
254
276
|
parts.push(String(id.year));
|
|
255
277
|
return parts.join(":");
|
|
256
278
|
}
|
|
257
279
|
if (id instanceof BipmMeeting) {
|
|
258
|
-
const parts = ["urn", "bipm", id.group?.toLowerCase() ?? "", "meeting", id.number ?? ""];
|
|
280
|
+
const parts = ["urn", "bipm", "v1", id.group?.toLowerCase() ?? "", "meeting", id.number ?? ""];
|
|
259
281
|
if (id.year !== undefined)
|
|
260
282
|
parts.push(String(id.year));
|
|
261
283
|
return parts.join(":");
|
|
262
284
|
}
|
|
263
285
|
if (id instanceof BipmMetrologiaArticle) {
|
|
264
|
-
const parts = ["urn", "bipm", "metrologia", String(id.volume())];
|
|
286
|
+
const parts = ["urn", "bipm", "v1", "metrologia", String(id.volume())];
|
|
265
287
|
if (id.issue !== undefined)
|
|
266
288
|
parts.push(id.issue);
|
|
267
289
|
if (id.article !== undefined)
|
|
@@ -269,9 +291,14 @@ class BipmUrnGenerator extends BaseUrnGenerator {
|
|
|
269
291
|
return parts.join(":");
|
|
270
292
|
}
|
|
271
293
|
if (id instanceof BipmSiBrochure) {
|
|
294
|
+
// The guide's edition-number carries no "e" ("9e" emits "9"); the
|
|
295
|
+
// version drops its "v"; the year is the latest of the years range;
|
|
296
|
+
// the language segment is dropped entirely.
|
|
272
297
|
return [
|
|
273
|
-
"urn", "bipm", "
|
|
274
|
-
id.edition ?? ""
|
|
298
|
+
"urn", "bipm", "v1", "bipm", "si-brochure",
|
|
299
|
+
(id.edition ?? "").replace(/e$/i, ""),
|
|
300
|
+
(id.version ?? "").replace(/^v/i, ""),
|
|
301
|
+
(id.years ?? "").split("/").pop() ?? "",
|
|
275
302
|
].join(":");
|
|
276
303
|
}
|
|
277
304
|
throw new ParseFailed(`Cannot build URN for BIPM identifier: ${id.constructor.polymorphicName}`, 0);
|
|
@@ -284,6 +311,14 @@ class BipmCommitteeDocument extends BipmIdentifier {
|
|
|
284
311
|
if (this.form === "long") {
|
|
285
312
|
if (this.language === "F") {
|
|
286
313
|
const name = TYPE_NAME_FR[this.type_code ?? ""] ?? "";
|
|
314
|
+
// The guide's body-prefixed French pattern ("Décision CIPM/111-10
|
|
315
|
+
// (2022)") is the canonical long face (pubid#694, ruling R3): the
|
|
316
|
+
// group qualifies the resource-specific id with a slash. A
|
|
317
|
+
// number-less document keeps the connective spelling the guide's
|
|
318
|
+
// general French pattern uses ("Statement de la CGPM (1889)").
|
|
319
|
+
if (this.number !== undefined) {
|
|
320
|
+
return `${name} ${this.group}/${this.number}${this.yearSegment()}`;
|
|
321
|
+
}
|
|
287
322
|
return `${name}${this.numberSegment()} ${frenchConnective(this.group ?? "")} ${this.group}${this.yearSegment()}`;
|
|
288
323
|
}
|
|
289
324
|
const name = TYPE_NAME_EN[this.type_code ?? ""] ?? "";
|
|
@@ -343,10 +378,18 @@ class BipmSiBrochure extends BipmIdentifier {
|
|
|
343
378
|
const part = this.part === undefined ? "" : ` Part ${this.part}`;
|
|
344
379
|
return `BIPM SI Brochure${part}`;
|
|
345
380
|
}
|
|
381
|
+
// The parens carry the year, the language or both, and stay off
|
|
382
|
+
// entirely when the reference names neither ("SI Brochure 9e", the
|
|
383
|
+
// bare edition without a year — pubid#694's renderer fix).
|
|
346
384
|
const phrase = this.language === "F" ? "sur le SI " : "";
|
|
347
385
|
const lang = this.language === undefined ? "" : `, ${this.language}`;
|
|
348
386
|
const version = this.version === undefined ? "" : ` ${this.version}`;
|
|
349
|
-
|
|
387
|
+
const tail = this.years !== undefined ? `${this.years}${lang}` : (this.language ?? "");
|
|
388
|
+
let result = `BIPM SI Brochure ${phrase}${this.edition}${version}`;
|
|
389
|
+
if (this.years !== undefined || this.language !== undefined) {
|
|
390
|
+
result += ` (${tail})`;
|
|
391
|
+
}
|
|
392
|
+
return result;
|
|
350
393
|
}
|
|
351
394
|
}
|
|
352
395
|
registerType(BipmSiBrochure);
|
|
@@ -446,6 +489,23 @@ class BipmBuilder {
|
|
|
446
489
|
language: normalizeLanguage(s(n["language"])),
|
|
447
490
|
});
|
|
448
491
|
}
|
|
492
|
+
if (tree["si_brochure_bare_edition"] !== undefined) {
|
|
493
|
+
// The proposal drops the trailing "e"; the builder appends it back
|
|
494
|
+
// so the bare-number spellings are parse-in aliases of the canonical
|
|
495
|
+
// "9e" edition (pubid#694 ruling R1). The year and the language sit
|
|
496
|
+
// in separate parentheses; an absent year stays undefined (a partial
|
|
497
|
+
// reference, like "SI Brochure 9th edition" without a year).
|
|
498
|
+
const n = node("si_brochure_bare_edition");
|
|
499
|
+
const edition = `${s(n["bare_edition"])}e`;
|
|
500
|
+
const year = s(n["year"]);
|
|
501
|
+
const language = normalizeLanguage(s(n["language"]));
|
|
502
|
+
return new BipmSiBrochure({
|
|
503
|
+
number: edition,
|
|
504
|
+
edition,
|
|
505
|
+
...(year !== undefined ? { years: year } : {}),
|
|
506
|
+
...(language !== undefined ? { language } : {}),
|
|
507
|
+
});
|
|
508
|
+
}
|
|
449
509
|
if (tree["mep"] !== undefined) {
|
|
450
510
|
const n = node("mep");
|
|
451
511
|
const mepCode = s(n["mep_code"]);
|
|
@@ -500,40 +560,84 @@ export function bipmGrammarImplementation() {
|
|
|
500
560
|
// Inverse of BipmUrnGenerator (lib/pubid/bipm/urn_parser.rb): rebuild
|
|
501
561
|
// the identifier DIRECTLY from the URN fields — the printed forms carry
|
|
502
562
|
// surface detail (meeting ordinals, French wording) the URN omits.
|
|
563
|
+
//
|
|
564
|
+
// Two URN generations parse (pubid#694): the canonical face leads with
|
|
565
|
+
// the guide's `v1` version segment; the pre-adoption face this flavor
|
|
566
|
+
// emitted for years stays parseable as a documented parse-in alias of
|
|
567
|
+
// the same identity. The EMITTER is the new shape; an alias never
|
|
568
|
+
// renders back as itself, it rebuilds the identifier whose toUrn is
|
|
569
|
+
// the v1 face.
|
|
503
570
|
parseUrn(urn) {
|
|
504
571
|
const body = urn.replace(/^urn:bipm:/, "");
|
|
505
572
|
// Keep trailing empty segments (gem splits with -1).
|
|
506
573
|
const parts = body.split(":");
|
|
507
574
|
const presence = (v) => v === undefined || v === "" ? undefined : v;
|
|
508
|
-
|
|
575
|
+
const canonical = parts[0] === "v1";
|
|
576
|
+
const p = canonical ? parts.slice(1) : parts;
|
|
577
|
+
if (p[0] === "metrologia") {
|
|
509
578
|
return new BipmMetrologiaArticle({
|
|
510
|
-
number: presence(
|
|
511
|
-
issue:
|
|
512
|
-
article:
|
|
579
|
+
number: presence(p[1]),
|
|
580
|
+
issue: p[2],
|
|
581
|
+
article: p[3],
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
if (canonical && p[0] === "bipm") {
|
|
585
|
+
// `bipm:si-brochure:<edition-number>:<version-number>:<year>` —
|
|
586
|
+
// the guide strips the "e" off the edition and the "v" off the
|
|
587
|
+
// version and drops the language segment, so they are restored
|
|
588
|
+
// here; the year stores back verbatim (idempotent emission).
|
|
589
|
+
const edition = presence(p[2]);
|
|
590
|
+
const version = presence(p[3]);
|
|
591
|
+
return new BipmSiBrochure({
|
|
592
|
+
number: edition ? `${edition}e` : undefined,
|
|
593
|
+
edition: edition ? `${edition}e` : undefined,
|
|
594
|
+
version: version ? `v${version}` : undefined,
|
|
595
|
+
years: presence(p[4]),
|
|
513
596
|
});
|
|
514
597
|
}
|
|
515
|
-
if (
|
|
598
|
+
if (p[0] === "si-brochure") {
|
|
599
|
+
// Legacy face: `si-brochure:<lang>:<edition>:<version>:<years>`.
|
|
516
600
|
return new BipmSiBrochure({
|
|
517
|
-
number: presence(
|
|
518
|
-
language: (
|
|
519
|
-
edition:
|
|
520
|
-
version:
|
|
521
|
-
years:
|
|
601
|
+
number: presence(p[2]),
|
|
602
|
+
language: (p[1] ?? "").toUpperCase(),
|
|
603
|
+
edition: p[2],
|
|
604
|
+
version: p[3],
|
|
605
|
+
years: p[4],
|
|
522
606
|
});
|
|
523
607
|
}
|
|
524
|
-
const group = (
|
|
525
|
-
if (
|
|
608
|
+
const group = (p[0] ?? "").toUpperCase();
|
|
609
|
+
if (p[1] === "meeting") {
|
|
526
610
|
return new BipmMeeting({
|
|
527
611
|
group,
|
|
528
|
-
number:
|
|
529
|
-
year:
|
|
612
|
+
number: p[2] ?? "",
|
|
613
|
+
year: p[3] ? Number(p[3]) : undefined,
|
|
530
614
|
});
|
|
531
615
|
}
|
|
616
|
+
// The legacy face carried the lowercase type abbreviation ("res");
|
|
617
|
+
// the v1 face carries the lowercase English type name ("resolution").
|
|
618
|
+
// Both resolve through TYPE_WORD_TO_CODE, so an empty segment (the
|
|
619
|
+
// bare MRA form) stays a nil type_code on either face.
|
|
620
|
+
const segment = presence(p[1]);
|
|
621
|
+
const word = segment === undefined
|
|
622
|
+
? undefined
|
|
623
|
+
: canonical
|
|
624
|
+
? segment.charAt(0).toUpperCase() + segment.slice(1)
|
|
625
|
+
: segment.toUpperCase();
|
|
626
|
+
// Inverse of committeeNumberSegment: split the folded
|
|
627
|
+
// "-a{appendix}[.{annex}]" tail back out of the identifier segment.
|
|
628
|
+
// A bare number is digits and dashes only, so the letter-prefixed
|
|
629
|
+
// tail is unambiguous.
|
|
630
|
+
const raw = p[2] ?? "";
|
|
631
|
+
const folded = /^(.+?)-a(\d+)(?:\.(\d+))?$/.exec(raw);
|
|
632
|
+
const number = folded ? folded[1] : raw;
|
|
532
633
|
return new BipmCommitteeDocument({
|
|
533
634
|
group,
|
|
534
|
-
type_code:
|
|
535
|
-
number: presence(
|
|
536
|
-
year:
|
|
635
|
+
type_code: word === undefined ? undefined : TYPE_WORD_TO_CODE[word],
|
|
636
|
+
number: presence(number),
|
|
637
|
+
year: p[3] ? Number(p[3]) : undefined,
|
|
638
|
+
...(folded
|
|
639
|
+
? { appendix: folded[2], ...(folded[3] !== undefined ? { annex: folded[3] } : {}) }
|
|
640
|
+
: {}),
|
|
537
641
|
});
|
|
538
642
|
},
|
|
539
643
|
parse(input) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubid/pubid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"description": "TypeScript PubID identifiers: resolution, normalization and canonical hashes for every identifier in the pubid-testsuite corpus (41 standards bodies), with a conformance runner mirroring the Ruby reference",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"doc:api": "node scripts/api-reference.mjs"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"parsanol": "0.10.
|
|
22
|
+
"parsanol": "0.10.46",
|
|
23
23
|
"yaml": "^2.5.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
package/vendor/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":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"}
|
|
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":92}},{"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":[60,61,81,82]}},{"Str":{"pattern":"("}},{"Entity":{"atom":79}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[84,85,86]}},{"Alternative":{"atoms":[83,87]}},{"Sequence":{"atoms":[59,88]}},{"Repetition":{"atom":89,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[35,36,40,41,58,90]}},{"Named":{"name":"si_brochure","atom":91}},{"Entity":{"atom":109}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Alternative":{"atoms":[94,95]}},{"Entity":{"atom":3}},{"Entity":{"atom":107}},{"Str":{"pattern":"Appendix"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":101,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[99,100,102]}},{"Str":{"pattern":"Concise"}},{"Str":{"pattern":"FAQ"}},{"Alternative":{"atoms":[103,104,105]}},{"Named":{"name":"variant","atom":106}},{"Sequence":{"atoms":[96,97,98]}},{"Named":{"name":"si_brochure_variant","atom":108}},{"Entity":{"atom":123}},{"Str":{"pattern":"BIPM SI Brochure"}},{"Str":{"pattern":"SI Brochure"}},{"Alternative":{"atoms":[111,112]}},{"Entity":{"atom":3}},{"Str":{"pattern":"Part"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":117,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":118}},{"Sequence":{"atoms":[114,115,116,119]}},{"Repetition":{"atom":120,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[113,121]}},{"Named":{"name":"si_brochure_section","atom":122}},{"Entity":{"atom":155}},{"Str":{"pattern":"SI Brochure"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":127,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":134}},{"Str":{"pattern":"st"}},{"Str":{"pattern":"nd"}},{"Str":{"pattern":"rd"}},{"Str":{"pattern":"th"}},{"Alternative":{"atoms":[130,131,132,133]}},{"Sequence":{"atoms":[128,129]}},{"Named":{"name":"ordinal_edition","atom":135}},{"Entity":{"atom":3}},{"Str":{"pattern":"edition"}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Str":{"pattern":"("}},{"Entity":{"atom":145}},{"Entity":{"atom":5}},{"Repetition":{"atom":143,"min":4,"max":4,"tag":"Repetition"}},{"Named":{"name":"year","atom":144}},{"Str":{"pattern":", "}},{"Entity":{"atom":79}},{"Sequence":{"atoms":[146,147]}},{"Repetition":{"atom":148,"min":0,"max":1,"tag":"Maybe"}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[141,142,149,150]}},{"Sequence":{"atoms":[139,140]}},{"Repetition":{"atom":152,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[125,126,136,137,138,153]}},{"Named":{"name":"si_brochure_ordinal_edition","atom":154}},{"Entity":{"atom":175}},{"Str":{"pattern":"SI Brochure"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":159,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"bare_edition","atom":160}},{"Entity":{"atom":3}},{"Str":{"pattern":"("}},{"Entity":{"atom":145}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[162,163,164,165]}},{"Repetition":{"atom":166,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Str":{"pattern":"("}},{"Entity":{"atom":79}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[168,169,170,171]}},{"Repetition":{"atom":172,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[157,158,161,167,173]}},{"Named":{"name":"si_brochure_bare_edition","atom":174}},{"Entity":{"atom":233}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":201}},{"Str":{"pattern":"SI MEP"}},{"Entity":{"atom":3}},{"Entity":{"atom":187}},{"Entity":{"atom":5}},{"Entity":{"atom":13}},{"Alternative":{"atoms":[183,184]}},{"Repetition":{"atom":185,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"mep_code","atom":186}},{"Sequence":{"atoms":[180,181,182]}},{"Str":{"pattern":"Rapport"}},{"Entity":{"atom":3}},{"Entity":{"atom":199}},{"Str":{"pattern":"BIPM-"}},{"Entity":{"atom":5}},{"Repetition":{"atom":193,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":65}},{"Entity":{"atom":5}},{"Repetition":{"atom":196,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[192,194,195,197]}},{"Named":{"name":"report_code","atom":198}},{"Sequence":{"atoms":[189,190,191]}},{"Alternative":{"atoms":[188,200]}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Str":{"pattern":"Appendix"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":206,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"appendix","atom":207}},{"Entity":{"atom":3}},{"Str":{"pattern":"Annex"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":212,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"annex","atom":213}},{"Sequence":{"atoms":[209,210,211,214]}},{"Repetition":{"atom":215,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Str":{"pattern":"Part"}},{"Entity":{"atom":3}},{"Entity":{"atom":5}},{"Repetition":{"atom":220,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":52}},{"Entity":{"atom":5}},{"Repetition":{"atom":223,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[222,224]}},{"Repetition":{"atom":225,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[221,226]}},{"Named":{"name":"part","atom":227}},{"Sequence":{"atoms":[204,205,208,216,217,218,219,228]}},{"Sequence":{"atoms":[177,178,179,202,203]}},{"Entity":{"atom":201}},{"Alternative":{"atoms":[230,231]}},{"Named":{"name":"mep","atom":232}},{"Entity":{"atom":272}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":266}},{"Entity":{"atom":254}},{"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":[239,240,241,242,243,244,245,246,247,248,249,250,251,252]}},{"Named":{"name":"group","atom":253}},{"Str":{"pattern":"-GD-"}},{"Entity":{"atom":260}},{"Str":{"pattern":"MeP"}},{"Str":{"pattern":"RSI"}},{"Alternative":{"atoms":[257,258]}},{"Named":{"name":"guide_kind","atom":259}},{"Entity":{"atom":262}},{"Str":{"pattern":"-"}},{"Entity":{"atom":5}},{"Repetition":{"atom":263,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"number","atom":264}},{"Sequence":{"atoms":[238,255,256,261,265]}},{"Entity":{"atom":3}},{"Entity":{"atom":229}},{"Sequence":{"atoms":[235,236,237,267,268]}},{"Entity":{"atom":266}},{"Alternative":{"atoms":[269,270]}},{"Named":{"name":"guide","atom":271}},{"Entity":{"atom":323}},{"Entity":{"atom":282}},{"Str":{"pattern":"Recommandation"}},{"Str":{"pattern":"Déclaration"}},{"Str":{"pattern":"Résolution"}},{"Str":{"pattern":"Statement"}},{"Str":{"pattern":"Décision"}},{"Str":{"pattern":"Action"}},{"Alternative":{"atoms":[275,276,277,278,279,280]}},{"Named":{"name":"type_word","atom":281}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":5}},{"Repetition":{"atom":285,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":262}},{"Entity":{"atom":5}},{"Repetition":{"atom":288,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[287,289]}},{"Repetition":{"atom":290,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[286,291]}},{"Named":{"name":"number","atom":292}},{"Sequence":{"atoms":[283,284]}},{"Repetition":{"atom":294,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":300}},{"Str":{"pattern":"de la"}},{"Str":{"pattern":"du"}},{"Alternative":{"atoms":[298,299]}},{"Entity":{"atom":3}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":308}},{"Str":{"pattern":"("}},{"Entity":{"atom":145}},{"Str":{"pattern":")"}},{"Sequence":{"atoms":[305,306,307]}},{"Sequence":{"atoms":[303,304]}},{"Repetition":{"atom":309,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[274,295,296,297,301,302,310]}},{"Entity":{"atom":282}},{"Entity":{"atom":3}},{"Entity":{"atom":254}},{"Entity":{"atom":65}},{"Entity":{"atom":293}},{"Entity":{"atom":3}},{"Entity":{"atom":308}},{"Sequence":{"atoms":[317,318]}},{"Repetition":{"atom":319,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[312,313,314,315,316,320]}},{"Alternative":{"atoms":[311,321]}},{"Named":{"name":"committee_long_fr","atom":322}},{"Entity":{"atom":344}},{"Str":{"pattern":"BIPM"}},{"Entity":{"atom":3}},{"Entity":{"atom":334}},{"Str":{"pattern":"DECL"}},{"Str":{"pattern":"DECN"}},{"Str":{"pattern":"ACT"}},{"Str":{"pattern":"REC"}},{"Str":{"pattern":"RES"}},{"Alternative":{"atoms":[328,329,330,331,332]}},{"Named":{"name":"type_word","atom":333}},{"Entity":{"atom":3}},{"Entity":{"atom":254}},{"Entity":{"atom":65}},{"Entity":{"atom":293}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[339,340]}},{"Repetition":{"atom":341,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[325,326,327,335,336,337,338,342]}},{"Named":{"name":"committee_prefixed","atom":343}},{"Entity":{"atom":506}},{"Entity":{"atom":394}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":134}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[353,354]}},{"Repetition":{"atom":355,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[347,348,349,350,351,352,356]}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[363,364]}},{"Repetition":{"atom":365,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[358,359,360,361,362,366]}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Str":{"pattern":"--"}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":134}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[376,377]}},{"Repetition":{"atom":378,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[368,369,370,371,372,373,374,375,379]}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Str":{"pattern":"--"}},{"Entity":{"atom":3}},{"Str":{"pattern":"Meeting"}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[388,389]}},{"Repetition":{"atom":390,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[381,382,383,384,385,386,387,391]}},{"Alternative":{"atoms":[357,367,380,392]}},{"Named":{"name":"meeting_en","atom":393}},{"Entity":{"atom":432}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Str":{"pattern":"<sup>e</sup>"}},{"Entity":{"atom":3}},{"Str":{"pattern":"réunion"}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[402,403]}},{"Repetition":{"atom":404,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[396,397,398,399,400,401,405]}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Str":{"pattern":"e"}},{"Entity":{"atom":3}},{"Entity":{"atom":415}},{"Str":{"pattern":"Réunion"}},{"Str":{"pattern":"réunion"}},{"Alternative":{"atoms":[413,414]}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[416,417]}},{"Repetition":{"atom":418,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[407,408,409,410,411,412,419]}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":415}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[426,427]}},{"Repetition":{"atom":428,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[421,422,423,424,425,429]}},{"Alternative":{"atoms":[406,420,430]}},{"Named":{"name":"meeting_fr","atom":431}},{"Entity":{"atom":459}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":334}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":3}},{"Str":{"pattern":"A"}},{"Entity":{"atom":5}},{"Repetition":{"atom":441,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"appendix","atom":442}},{"Entity":{"atom":52}},{"Entity":{"atom":5}},{"Repetition":{"atom":445,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"annex","atom":446}},{"Sequence":{"atoms":[444,447]}},{"Repetition":{"atom":448,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[439,440,443,449]}},{"Repetition":{"atom":450,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[437,438,451]}},{"Repetition":{"atom":452,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[454,455]}},{"Repetition":{"atom":456,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[434,435,436,453,457]}},{"Named":{"name":"committee_short","atom":458}},{"Entity":{"atom":481}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":471}},{"Str":{"pattern":"Recommendation"}},{"Str":{"pattern":"Declaration"}},{"Str":{"pattern":"Resolution"}},{"Str":{"pattern":"Statement"}},{"Str":{"pattern":"Decision"}},{"Str":{"pattern":"Action"}},{"Alternative":{"atoms":[464,465,466,467,468,469]}},{"Named":{"name":"type_word","atom":470}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Sequence":{"atoms":[472,473]}},{"Repetition":{"atom":474,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":308}},{"Sequence":{"atoms":[476,477]}},{"Repetition":{"atom":478,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[461,462,463,475,479]}},{"Named":{"name":"committee_long_en","atom":480}},{"Entity":{"atom":495}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":282}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Sequence":{"atoms":[486,487]}},{"Repetition":{"atom":488,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":3}},{"Entity":{"atom":308}},{"Sequence":{"atoms":[490,491]}},{"Repetition":{"atom":492,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[483,484,485,489,493]}},{"Named":{"name":"committee_long_fr","atom":494}},{"Entity":{"atom":505}},{"Entity":{"atom":254}},{"Entity":{"atom":3}},{"Entity":{"atom":293}},{"Entity":{"atom":3}},{"Entity":{"atom":151}},{"Sequence":{"atoms":[500,501]}},{"Repetition":{"atom":502,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[497,498,499,503]}},{"Named":{"name":"committee_bare","atom":504}},{"Alternative":{"atoms":[346,395,433,460,482,496]}},{"Alternative":{"atoms":[0,31,93,110,124,156,176,234,273,324,345]}}],"root":507},"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_bare_edition","path":"si_brochure_bare_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},{"capture":"bare_edition","path":"bare_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 2 and 10 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 3 and 10 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 4 and 10 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 5 and 9 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 9 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 7 and 8 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)","rule identifier: branches 8 and 10 are order-dependent (shared first bytes; ordered choice is decisive)","rule identifier: branches 8 and 11 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":"accept","input":"SI Brochure 9","expect":{}},{"entry":"identifier","kind":"accept","input":"SI Brochure 9 (E)","expect":{}},{"entry":"identifier","kind":"accept","input":"SI Brochure 9 (2024) (F)","expect":{}},{"entry":"identifier","kind":"accept","input":"BIPM SI Brochure 9e","expect":{}},{"entry":"identifier","kind":"accept","input":"BIPM SI Brochure 9e (E)","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_prefixed, committee_long_en,\n# committee_long_fr, committee_bare, meeting_en, meeting_fr,\n# metrologia, si_brochure, si_brochure_variant, si_brochure_section,\n# si_brochure_ordinal_edition, si_brochure_bare_edition, mep, guide),\n# 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 [\n space\n (\n \"(\" years [(\", \" lang)] \")\"\n / \"(\" lang \")\"\n )\n ]\n ) as si_brochure\n )\n }\n # The language-independent form drops the language code and the version is\n # optional (\"SI Brochure 9e (2019, E)\"); the guide's French publication\n # identifier leads with \"Brochure sur le SI\" instead of the English brochure\n # name. A language code may also stand alone in the parens, and the whole\n # parenthetical is optional: the bare-number alias below and the year-less\n # ordinal spelling both name an edition with no year, and their canonical\n # render (\"BIPM SI Brochure 9e\") has to re-parse. All render in the\n # canonical \"BIPM SI Brochure …\" spelling. The corpus-cited ordinal-edition\n # spelling normalizes the English \"9th edition\" onto the canonical \"9e\"\n # 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 # The unmerged si-brochure-id proposal's bare-number edition spellings\n # (\"SI Brochure 9\", \"SI Brochure 9 (E)\", \"SI Brochure 9 (2024) (F)\"): the\n # edition carries no trailing \"e\", and the year and the language may each\n # sit in their own parentheses. A parse-in alias of the canonical \"9e\"\n # edition — the builder appends the \"e\" the proposal drops.\n si_brochure_bare_edition = {\n (\n (\n \"SI Brochure\"\n space\n (1*digit) as bare_edition\n [(space \"(\" year \")\")]\n [(space \"(\" lang \")\")]\n ) as si_brochure_bare_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 / si_brochure_bare_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_bare_edition -> si_brochure_bare_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 bare_edition -> bare_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 accept \"SI Brochure 9\"\n accept \"SI Brochure 9 (E)\"\n accept \"SI Brochure 9 (2024) (F)\"\n accept \"BIPM SI Brochure 9e\"\n accept \"BIPM SI Brochure 9e (E)\"\n reject \"nonsense\"\n }\n}\n","source_hash":"d928b1fffaaa49e3a0ce1bfc09dc7d0bd989d86c83ce7e020496191bcd7cd8bc","unicode_tables":"onigmo (Ruby 3.4.8)","compiler_version":"1.3.126","edition":2,"semantics_hash":"sha256:edaad1d4e5cb5a6d95a082067eb1b8b8bfaeab9a8ba3a36f1456851b8244538a","checksum":"sha256:ad204cb302700103517bfab6fe184455388f8275a2b6e4edc9ada2da35474354"}
|