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 +4 -4
- data/lib/parsanol/parg/compiler.rb +17 -1
- data/lib/parsanol/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a5eae02b01793cba6627f5e7e91d63789b3b4870da638d45868b6857dc557bd
|
|
4
|
+
data.tar.gz: c32369c415f06ed312afe42cbb2621c59918b4ca10c8c1945d9b39bd69e9244f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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)
|
data/lib/parsanol/version.rb
CHANGED
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.
|
|
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-
|
|
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
|