pubid 2.0.0.pre.alpha.33 → 2.0.0.pre.alpha.35

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1968a24c0ddc8228697d62cfb2bb2aa37cc41a731aa128d4bba63d8abb2b3b08
4
- data.tar.gz: 2b2e44e893577c04071ff69c4bf722832fa4aaa1aa39a0193fa42973ca1e3e2c
3
+ metadata.gz: 5d11a1f42ca90ce7489640c2bf8ac820f33771d979a1d68f75cd4a54357ab499
4
+ data.tar.gz: 72795ffeef7a638ea1d3c461482e73df85501fa55ec66bd1181e82c360b6fd7c
5
5
  SHA512:
6
- metadata.gz: cbce7d61343f23691c27e92d547e5bb1d9847aee64df86cb8f6bca006b63f5fbf253dbf59c7aba7739459fdc453a41823a25ce89e4ee10e5db67dc8ee527156c
7
- data.tar.gz: 0acc55b8b56109e8eef6acd2b046c1f5e1026e431203720a92ae118a326340e14939d3b25b655f135fabf1b1af8291888379c8724328c3b838fff5e984c0a5a8
6
+ metadata.gz: 9066cd0d86ed4340acc32bf7c408b967be6d2363bf8c7a452b874f774418e352fe187823a9ab8e672245efa241527bc248f0ed2d6ea974c3a63cb539c8d9322e
7
+ data.tar.gz: 50aa7a3a914db2405b76476f905aaa5ca226acc709383dc953aa5f50c759598d616e069851998868565ef29d59a4805935d73094bc28fa831052f4189fd96630
data/data/parg/omg.json CHANGED
@@ -1 +1 @@
1
- {"bindings":null,"version":"0.1.0","grammar":"PubidOmg","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"OMG"}},{"Entity":{"atom":2}},{"Str":{"pattern":" "}},{"Entity":{"atom":24}},{"Entity":{"atom":7}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[5,6]}},{"Entity":{"atom":13}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Re":{"pattern":"[+]"}},{"Alternative":{"atoms":[9,10,11,12]}},{"Repetition":{"atom":8,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":18}},{"Re":{"pattern":"[\\-]"}},{"Re":{"pattern":"[/]"}},{"Alternative":{"atoms":[16,17]}},{"Entity":{"atom":13}},{"Repetition":{"atom":19,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[15,20]}},{"Repetition":{"atom":21,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[4,14,22]}},{"Named":{"name":"acronym","atom":23}},{"Entity":{"atom":2}},{"Entity":{"atom":54}},{"Entity":{"atom":28}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":27,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":31}},{"Str":{"pattern":"."}},{"Entity":{"atom":28}},{"Repetition":{"atom":32,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[30,33]}},{"Repetition":{"atom":34,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":51}},{"Str":{"pattern":" beta"}},{"Entity":{"atom":42}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Alternative":{"atoms":[39,40,41]}},{"Lookahead":{"atom":38,"positive":false}},{"Entity":{"atom":2}},{"Entity":{"atom":28}},{"Repetition":{"atom":45,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":42}},{"Lookahead":{"atom":47,"positive":false}},{"Sequence":{"atoms":[44,46,48]}},{"Repetition":{"atom":49,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[37,43,50]}},{"Repetition":{"atom":36,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[29,35,52]}},{"Named":{"name":"version","atom":53}},{"Entity":{"atom":59}},{"Entity":{"atom":2}},{"Entity":{"atom":58}},{"Str":{"pattern":"/"}},{"Alternative":{"atoms":[56,57]}},{"Entity":{"atom":63}},{"Entity":{"atom":42}},{"Repetition":{"atom":61,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":62}},{"Sequence":{"atoms":[55,60]}},{"Repetition":{"atom":64,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[25,26,65]}},{"Entity":{"atom":2}},{"Entity":{"atom":63}},{"Sequence":{"atoms":[67,68]}},{"Alternative":{"atoms":[66,69]}},{"Repetition":{"atom":70,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,1,3,71]}}],"root":72},"bindings":[]}},"preprocess":{},"tables":{},"lint":{"order_warnings":[]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"OMG IDL 4.2","expect":{}},{"entry":"identifier","kind":"accept","input":"OMG UML 2.5.1","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/omg/parser.rb: OMG <acronym>[ <version>[<sep><part>]]\n# with the beta-label word-boundary guards (a bare \"beta\" must not be\n# swallowed by the part rule).\n grammar PubidOmg version \"0.1.0\" {\n digit = %x30-39\n acronym_char = %x41-5A / %x61-7A / %x30-39 / %x2B\n acronym_join = %x2D / %x2F\n acronym = (letter 1*acronym_char *(acronym_join 1*acronym_char)) as acronym\n word_boundary = !alnum_char\n beta = \" beta\" !alnum_char ([space 1*digit !alnum_char])\n version = (1*digit *(dot 1*digit) [beta]) as version\n part_separator = space / slash\n part = (1*alnum_char) as part\n identifier = \"OMG\" space acronym [((space version [part_separator part]) / (space part))]\n alnum_char = %x41-5A / %x61-7A / %x30-39\n letter = %x41-5A / %x61-7A\n dot = \".\"\n slash = \"/\"\n space = \" \"\n entry identifier: identifier\n\n test {\n accept \"OMG IDL 4.2\"\n accept \"OMG UML 2.5.1\"\n reject \"nonsense\"\n }\n}\n","source_hash":"2dac987a51409c0af26e59449f71fab80a2249a14f119a9a244633ce7149faa6","compiler_version":"1.3.93","checksum":"sha256:229f295dc796802ddf19b56803bb420107218420ba5dc7acab3d58d1a9a7bb9e"}
1
+ {"bindings":null,"version":"0.1.0","grammar":"PubidOmg","shape":"parsanol-tree/v2","binding_version":1,"entries":{"identifier":{"root":"identifier","grammar":{"atoms":[{"Str":{"pattern":"OMG"}},{"Entity":{"atom":2}},{"Str":{"pattern":" "}},{"Entity":{"atom":24}},{"Entity":{"atom":7}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Alternative":{"atoms":[5,6]}},{"Entity":{"atom":13}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Re":{"pattern":"[+]"}},{"Alternative":{"atoms":[9,10,11,12]}},{"Repetition":{"atom":8,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":18}},{"Re":{"pattern":"[\\-]"}},{"Re":{"pattern":"[/]"}},{"Alternative":{"atoms":[16,17]}},{"Entity":{"atom":13}},{"Repetition":{"atom":19,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[15,20]}},{"Repetition":{"atom":21,"min":0,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[4,14,22]}},{"Named":{"name":"acronym","atom":23}},{"Entity":{"atom":2}},{"Entity":{"atom":63}},{"Entity":{"atom":28}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Repetition":{"atom":27,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":31}},{"Str":{"pattern":"."}},{"Entity":{"atom":28}},{"Repetition":{"atom":32,"min":1,"max":null,"tag":"Repetition"}},{"Sequence":{"atoms":[30,33]}},{"Repetition":{"atom":34,"min":0,"max":null,"tag":"Repetition"}},{"Entity":{"atom":60}},{"Str":{"pattern":" beta"}},{"Entity":{"atom":42}},{"Re":{"pattern":"[\\x41-\\x5a]"}},{"Re":{"pattern":"[\\x61-\\x7a]"}},{"Re":{"pattern":"[\\x30-\\x39]"}},{"Alternative":{"atoms":[39,40,41]}},{"Lookahead":{"atom":38,"positive":false}},{"Entity":{"atom":2}},{"Entity":{"atom":28}},{"Repetition":{"atom":45,"min":1,"max":null,"tag":"Repetition"}},{"Entity":{"atom":42}},{"Lookahead":{"atom":47,"positive":false}},{"Sequence":{"atoms":[44,46,48]}},{"Repetition":{"atom":49,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[37,43,50]}},{"Entity":{"atom":2}},{"Str":{"pattern":"Beta"}},{"Entity":{"atom":28}},{"Repetition":{"atom":54,"min":1,"max":null,"tag":"Repetition"}},{"Repetition":{"atom":55,"min":0,"max":1,"tag":"Maybe"}},{"Entity":{"atom":42}},{"Lookahead":{"atom":57,"positive":false}},{"Sequence":{"atoms":[52,53,56,58]}},{"Alternative":{"atoms":[51,59]}},{"Repetition":{"atom":36,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[29,35,61]}},{"Named":{"name":"version","atom":62}},{"Entity":{"atom":68}},{"Entity":{"atom":2}},{"Entity":{"atom":67}},{"Str":{"pattern":"/"}},{"Alternative":{"atoms":[65,66]}},{"Entity":{"atom":72}},{"Entity":{"atom":42}},{"Repetition":{"atom":70,"min":1,"max":null,"tag":"Repetition"}},{"Named":{"name":"part","atom":71}},{"Sequence":{"atoms":[64,69]}},{"Repetition":{"atom":73,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[25,26,74]}},{"Entity":{"atom":2}},{"Entity":{"atom":72}},{"Sequence":{"atoms":[76,77]}},{"Alternative":{"atoms":[75,78]}},{"Repetition":{"atom":79,"min":0,"max":1,"tag":"Maybe"}},{"Sequence":{"atoms":[0,1,3,80]}}],"root":81},"bindings":[]}},"preprocess":{},"tables":{},"lint":{"order_warnings":["rule beta: branches 1 and 2 are order-dependent (shared first bytes; ordered choice is decisive)"]},"default_entry":"identifier","render":{},"derive":{},"tests":[{"entry":"identifier","kind":"accept","input":"OMG IDL 4.2","expect":{}},{"entry":"identifier","kind":"accept","input":"OMG UML 2.5.1","expect":{}},{"entry":"identifier","kind":"reject","input":"nonsense","expect":{}}],"docs":{},"source":"# Port of lib/pubid/omg/parser.rb: OMG <acronym>[ <version>[<sep><part>]]\n# with the beta-label word-boundary guards (a bare \"beta\" must not be\n# swallowed by the part rule). The GLUED CATALOGUE label (\"Beta1\" --\n# capitalized, the /spec/ALMAS/1.5/Beta1 URL segment) classifies into\n# the version (the 2026-10-19 pubid#548 ruling); the LOWERCASE glued\n# form (\"beta2\") stays a document part (the DDS ruling, spec-pinned). A\n# /spec/ALMAS/1.5/Beta1 URL segment) classifies into the version (the\n# 2026-10-19 pubid#548 ruling); a Beta-prefixed part without digits\n# (\"BetaWave\") still lexes as the part — the boundary guard keeps it.\n grammar PubidOmg version \"0.1.0\" {\n digit = %x30-39\n acronym_char = %x41-5A / %x61-7A / %x30-39 / %x2B\n acronym_join = %x2D / %x2F\n acronym = (letter 1*acronym_char *(acronym_join 1*acronym_char)) as acronym\n word_boundary = !alnum_char\n beta = (\" beta\" !alnum_char ([space 1*digit !alnum_char]) / (space \"Beta\" [1*digit] !alnum_char))\n version = (1*digit *(dot 1*digit) [beta]) as version\n part_separator = space / slash\n part = (1*alnum_char) as part\n identifier = \"OMG\" space acronym [((space version [part_separator part]) / (space part))]\n alnum_char = %x41-5A / %x61-7A / %x30-39\n letter = %x41-5A / %x61-7A\n dot = \".\"\n slash = \"/\"\n space = \" \"\n entry identifier: identifier\n\n test {\n accept \"OMG IDL 4.2\"\n accept \"OMG UML 2.5.1\"\n reject \"nonsense\"\n }\n}\n","source_hash":"9ed6dcd5dff95df514aa465c3cbd923780c6275761db3415b8eba5e05213cd20","compiler_version":"1.3.93","checksum":"sha256:d33c557faf6c8ac5ea071abee1576c15c08e7a93f988423f77aff7c4f5831c54"}
@@ -1883,18 +1883,30 @@ module Pubid
1883
1883
  else
1884
1884
  extract_value(dv)
1885
1885
  end
1886
- # Normalize a leading hyphen ("/D-3.0" -> "3.0"); the draft
1887
- # designator is otherwise held verbatim so no digit is lost.
1888
- version = version.sub(/\A-/, "") if version
1886
+ # Normalize a leading hyphen ("/D-3.0" -> "3.0") and drop a
1887
+ # zero-padded designator prefix ("/013.0" -> "13.0", the
1888
+ # 2026-10-19 ruling; the strip is scoped to the dotted
1889
+ # designator class — "D043"/"D09"/"D0.16" keep their
1890
+ # conventional widths). The designator is
1891
+ # otherwise held verbatim so no digit is lost.
1892
+ version = version.sub(/\A-/, "").sub(/\A0(?=\d+\.\d)/, "") if version
1889
1893
 
1890
1894
  # FDIS/CDV/… are ISO/IEC stage tokens, not draft ordinals (C1
1891
- # ruling, testsuite#2). "/DDIS" and "/DFDIS" are hallucinated
1895
+ # ruling, testsuite#2). "/DDIS" and "/DFCD" are hallucinated
1892
1896
  # concatenations — the designator D does not merge onto a
1893
1897
  # stage word, and IEEE speak has no such token. The draft of
1894
1898
  # a stage rides the iso_stage slot, which Draft#to_s renders
1895
- # as the D= designator face ("…/D=DIS-2020").
1896
- if version.match?(/\A(FDIS|FCD|CDV|DIS|CD|WD|PWI|NP)\z/)
1897
- iso_stage = version
1899
+ # as the D= designator face ("…/D=DIS-2020"). The glued
1900
+ # month-name date ("-June2010", pubid#548 follow-up 2026-10-19)
1901
+ # rides the designator's date slot with the month numeric —
1902
+ # "FCD" IS an ISO stage (the 2026-10-19 ruling).
1903
+ if (m = version.match(/\A(FDIS|FCD|CDV|DIS|CD|WD|PWI|NP)(\d+)?(?:-([A-Za-z]+)(\d{4}))?\z/))
1904
+ iso_stage = m[1] + (m[2] || "")
1905
+ if m[3]
1906
+ month = REV_MONTH_NUMBERS[m[3].capitalize] ||
1907
+ (Date.parse(m[3]).month.to_s rescue nil)
1908
+ year = m[4]
1909
+ end
1898
1910
  version = nil
1899
1911
  end
1900
1912
  end
@@ -172,11 +172,12 @@ module Pubid
172
172
  # Join with space and add the date (a decomposed D= date rides
173
173
  # here as the year).
174
174
  result = parts.join(" ") + iso_date_suffix(year || draft_year)
175
- # Only the language/edition marker ("(E)", "(E/F)") prints; a
176
- # trailing relationship narrative is metadata, not identity.
177
- if parenthetical_content&.match?(%r{\A[A-Z](?:\s*[/&]\s*[A-Z])*\z})
178
- result += " (#{parenthetical_content})"
179
- end
175
+ # The face is lossless: parse(to_s) == self (pubid#477; the
176
+ # 2026-10-19 ruling). The bare language/edition marker ("(E)",
177
+ # "(E/F)") and the trailing cross-reference narrative alike ride
178
+ # the parenthetical slot — dropping the narrative emitted a
179
+ # human the grammar rejects, so the round trip raised.
180
+ result += " (#{parenthetical_content})" if parenthetical_content
180
181
  # The redline marker is identity — the joint ISO print spells it
181
182
  # with the space-dash form ("15289:2015(E) - Redline", pubid#215).
182
183
  result += " - Redline" if redline
@@ -253,6 +254,9 @@ module Pubid
253
254
  result = parts.join(" ")
254
255
  result += "-#{year}" if year && !@designator_carries_year &&
255
256
  !ieee_draft.to_s.end_with?("-#{year}")
257
+ # Lossless on the IEEE face too: the parenthetical rides after
258
+ # the year, before the redline marker.
259
+ result += " (#{parenthetical_content})" if parenthetical_content
256
260
  result += " - Redline" if redline
257
261
 
258
262
  result
data/lib/pubid/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pubid
4
- VERSION = "2.0.0.pre.alpha.33"
4
+ VERSION = "2.0.0.pre.alpha.35"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.alpha.33
4
+ version: 2.0.0.pre.alpha.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-18 00:00:00.000000000 Z
11
+ date: 2026-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model