parsanol 1.3.89-aarch64-linux → 1.3.90-aarch64-linux

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: 793a4f1724c81072a3f354a960173cd8adc1a281cbabf669ccd59a94a503079e
4
- data.tar.gz: 68254a2de4d0ee8e663396376170e23b33013daabe418b0852915d2eed9d1f36
3
+ metadata.gz: 0a5eae02b01793cba6627f5e7e91d63789b3b4870da638d45868b6857dc557bd
4
+ data.tar.gz: c32369c415f06ed312afe42cbb2621c59918b4ca10c8c1945d9b39bd69e9244f
5
5
  SHA512:
6
- metadata.gz: b644ca34ddf4a38d101559cc4fbf0b0a7fdfed853d970bd8fd09a51a546c544fbd7df358a7e0f9c49b37a1715aff998206d9bcebac02028503dc35906a9fee55
7
- data.tar.gz: 7090433460d16713fdef854b7b804da4e757ee23026ec74cd6ea1f7fb6f636e086ba751385f20ad1e74e458c59214b598c6b9c9bd9d3eca5433a88ce2b9fe1ae
6
+ metadata.gz: 9c3fa5252fa8b34f870c741a0df64f27edf52e587217a07c56dbaefd344259870e483def84a1260eebb867af9da4c9b18ac8d799b2d18f678a44865d9c691bfa
7
+ data.tar.gz: 59d50b74eb42a3451108150ba3ba99bb537f561fad472fab7b6645859688adbbda8345e0090a03c975b1da20bc365b7005b4f04ad4a30629c08a419286bc7776
@@ -421,7 +421,23 @@ module Parsanol
421
421
  Atoms::Alternative.new(*node.a.map { |child| build_atom(child) })
422
422
  when :rep
423
423
  Atoms::Repetition.new(build_atom(node.a), node.b, node.c)
424
- when :opt then Atoms::Repetition.new(build_atom(node.a), 0, 1, :maybe)
424
+ when :opt
425
+ # [ … ] is the OPTIONAL form; a bracket whose elements are all
426
+ # character classes reads as an optional SEQUENCE of single
427
+ # characters (matchable empty — captures come back nil), which
428
+ # is almost certainly a mis-typed multi-range class
429
+ # (parsanol-ruby#201). One class alone stays a legitimate
430
+ # optional ([ %x0D ] — CRLF handling).
431
+ if (content = node.a).kind == :seq && content.a.length > 1 &&
432
+ content.a.all? { |el| el.kind == :class }
433
+ raise CompileError,
434
+ "brackets contain a sequence of character classes: " \
435
+ "[ … ] is the optional form, so each class matches one " \
436
+ "character and the sequence can match empty (an as-capture " \
437
+ "over it yields nil). A multi-range character class is an " \
438
+ "alternation: (%x21-2f / %x3a-40 / …)"
439
+ end
440
+ Atoms::Repetition.new(build_atom(node.a), 0, 1, :maybe)
425
441
  when :pred
426
442
  if node.c == :behind
427
443
  build_lookbehind(node)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.89"
4
+ VERSION = "1.3.90"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsanol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.89
4
+ version: 1.3.90
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-09 00:00:00.000000000 Z
11
+ date: 2026-10-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A small Ruby library for constructing parsers in the PEG (Parsing Expression
14
14
  Grammar) fashion. Parsanol provides Parslet-compatible API with additional features