yeptris 0.6.70.0 → 0.6.71.0
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/yeptris.rb +1 -1
- data/vendor/libyeptris/CMakeLists.txt +1 -1
- data/vendor/libyeptris/src/yeptris/parse/engine.c +37 -7
- 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: 8e7ee8245c5d9372bc8e16c38c6e2d9247331aa89dbd4e402d0f44a04d13bdea
|
|
4
|
+
data.tar.gz: 5fbd2d3bfb6bccac5676ac50b7ed77cf57b2d7fbbbdfe8f685a4a5a3b913ac0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6a3d65afd21e361d451968a0b1c64bcbce22b4a13419eedd1f3188c45db31aa88ddfc0e74ecfa37e4b0b55e9faca19b5600b63bf949c76b938a5827e8cdee89
|
|
7
|
+
data.tar.gz: 4082b40d4fa6d0f882dc128f609b9ebf56ec1a0108936825a717de246987fd9f6511a3462514ab6ca20c2f665ce08e0ee00a7be96ff634719e70bd147274c199
|
data/lib/yeptris.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Yeptris
|
|
4
4
|
# The gem's version lives in the parent namespace's file — the last
|
|
5
5
|
# internal require (yeptris/version) retired with it.
|
|
6
|
-
VERSION = "0.6.
|
|
6
|
+
VERSION = "0.6.71.0".freeze
|
|
7
7
|
|
|
8
8
|
# Informational notices are OPT-IN (yeptris-ruby#217): consumers
|
|
9
9
|
# embed yeptris inside CLIs that assert clean stderr, and a
|
|
@@ -2392,7 +2392,8 @@ static int e_flow_json(yep_engine* e, yep_view anchor, yep_view tag, uint32_t an
|
|
|
2392
2392
|
|
|
2393
2393
|
/* Iterative flow kernel; emits events for the whole collection. */
|
|
2394
2394
|
/* Initializes one flow frame (SSOT: every field, every push site). */
|
|
2395
|
-
static void e_flow_frame_init(void* stv, int idx, int kind, int pending_key
|
|
2395
|
+
static void e_flow_frame_init(void* stv, int idx, int kind, int pending_key, uint32_t open_line,
|
|
2396
|
+
uint32_t open_col) {
|
|
2396
2397
|
typedef struct {
|
|
2397
2398
|
uint8_t kind;
|
|
2398
2399
|
uint8_t pending_key;
|
|
@@ -2411,6 +2412,8 @@ static void e_flow_frame_init(void* stv, int idx, int kind, int pending_key) {
|
|
|
2411
2412
|
int32_t buf_from;
|
|
2412
2413
|
uint32_t entry_line;
|
|
2413
2414
|
uint32_t entries;
|
|
2415
|
+
uint32_t open_line;
|
|
2416
|
+
uint32_t open_col;
|
|
2414
2417
|
} e_flow_frame;
|
|
2415
2418
|
e_flow_frame* st = (e_flow_frame*)stv;
|
|
2416
2419
|
st[idx].kind = (uint8_t)kind;
|
|
@@ -2427,6 +2430,8 @@ static void e_flow_frame_init(void* stv, int idx, int kind, int pending_key) {
|
|
|
2427
2430
|
st[idx].buf_from = -1;
|
|
2428
2431
|
st[idx].entry_line = 0;
|
|
2429
2432
|
st[idx].entries = 0;
|
|
2433
|
+
st[idx].open_line = open_line;
|
|
2434
|
+
st[idx].open_col = open_col;
|
|
2430
2435
|
}
|
|
2431
2436
|
|
|
2432
2437
|
static int e_flow(yep_engine* e, yep_view anchor, yep_view tag, uint32_t anchor_id) {
|
|
@@ -2446,10 +2451,14 @@ static int e_flow(yep_engine* e, yep_view anchor, yep_view tag, uint32_t anchor_
|
|
|
2446
2451
|
int32_t buf_from; /* seq: entry events buffered from this index */
|
|
2447
2452
|
uint32_t entry_line; /* seq: line where the buffered entry ended */
|
|
2448
2453
|
uint32_t entries; /* completed entries (for trailing-comma detection) */
|
|
2454
|
+
uint32_t open_line; /* 1-based mark of the opening indicator: */
|
|
2455
|
+
uint32_t open_col; /* libyaml's context mark for its diagnostics */
|
|
2449
2456
|
} st[YEP_MAX_DEPTH];
|
|
2450
2457
|
int n = 0;
|
|
2451
2458
|
|
|
2452
2459
|
unsigned char open = (unsigned char)e->p[e->pos];
|
|
2460
|
+
uint32_t open_line = e->line;
|
|
2461
|
+
uint32_t open_col = e_col(e, e->pos) + 1;
|
|
2453
2462
|
e->pos++;
|
|
2454
2463
|
yep_event ev;
|
|
2455
2464
|
e_event_init(&ev, open == '[' ? YEP_EV_SEQ_START : YEP_EV_MAP_START);
|
|
@@ -2464,7 +2473,7 @@ static int e_flow(yep_engine* e, yep_view anchor, yep_view tag, uint32_t anchor_
|
|
|
2464
2473
|
if (emit_now(e, &ev) != 0) {
|
|
2465
2474
|
return -2;
|
|
2466
2475
|
}
|
|
2467
|
-
e_flow_frame_init(st, n, (open == '[') ? 0 : 1, 0);
|
|
2476
|
+
e_flow_frame_init(st, n, (open == '[') ? 0 : 1, 0, open_line, open_col);
|
|
2468
2477
|
n++;
|
|
2469
2478
|
|
|
2470
2479
|
for (;;) {
|
|
@@ -2617,6 +2626,8 @@ static int e_flow(yep_engine* e, yep_view anchor, yep_view tag, uint32_t anchor_
|
|
|
2617
2626
|
st[n - 1].pair_value = 1;
|
|
2618
2627
|
}
|
|
2619
2628
|
unsigned char oc = (unsigned char)e->p[e->pos];
|
|
2629
|
+
uint32_t oc_line = e->line;
|
|
2630
|
+
uint32_t oc_col = e_col(e, e->pos) + 1;
|
|
2620
2631
|
e->pos++;
|
|
2621
2632
|
yep_view pa = ev.anchor, pt = ev.tag; /* props before the opener */
|
|
2622
2633
|
uint32_t paid = ev.anchor_id;
|
|
@@ -2642,7 +2653,7 @@ static int e_flow(yep_engine* e, yep_view anchor, yep_view tag, uint32_t anchor_
|
|
|
2642
2653
|
st[n - 1].key_coll = (uint8_t)coll_key;
|
|
2643
2654
|
st[n - 1].sep = 0;
|
|
2644
2655
|
st[n - 1].entries++;
|
|
2645
|
-
e_flow_frame_init(st, n, (oc == '[') ? 0 : 1, 0);
|
|
2656
|
+
e_flow_frame_init(st, n, (oc == '[') ? 0 : 1, 0, oc_line, oc_col);
|
|
2646
2657
|
n++;
|
|
2647
2658
|
continue;
|
|
2648
2659
|
}
|
|
@@ -2722,8 +2733,15 @@ static int e_flow(yep_engine* e, yep_view anchor, yep_view tag, uint32_t anchor_
|
|
|
2722
2733
|
}
|
|
2723
2734
|
if (st[n - 1].buf_from >= 0 && !quoted && !q_key &&
|
|
2724
2735
|
(save_pos < e->line_start || ev.multiline)) {
|
|
2725
|
-
/* "[a\n: b]": an IMPLICIT key cannot span lines ("? " may)
|
|
2726
|
-
|
|
2736
|
+
/* "[a\n: b]": an IMPLICIT key cannot span lines ("? " may).
|
|
2737
|
+
* libyaml's parser error carries its words and its
|
|
2738
|
+
* context mark: the '[' that opened this sequence
|
|
2739
|
+
* (Psych "... while parsing a flow sequence at line 1
|
|
2740
|
+
* column 1"); the offset stays at the ':' */
|
|
2741
|
+
yep_error_set(&e->err, YEP_ERR_UNEXPECTED, st[n - 1].open_line,
|
|
2742
|
+
st[n - 1].open_col, e->pos, "%s",
|
|
2743
|
+
"did not find expected ',' or ']' while parsing a flow sequence");
|
|
2744
|
+
return -1;
|
|
2727
2745
|
}
|
|
2728
2746
|
/* single-pair mapping inside a sequence: the entry's
|
|
2729
2747
|
* events are buffered; wrap them in MAP_START .. MAP_END */
|
|
@@ -3192,7 +3210,7 @@ static int e_flow(yep_engine* e, yep_view anchor, yep_view tag, uint32_t anchor_
|
|
|
3192
3210
|
}
|
|
3193
3211
|
st[n - 1].sep = 0;
|
|
3194
3212
|
st[n - 1].entries++;
|
|
3195
|
-
e_flow_frame_init(st, n, 1, 1);
|
|
3213
|
+
e_flow_frame_init(st, n, 1, 1, st[n - 1].open_line, st[n - 1].open_col);
|
|
3196
3214
|
st[n].pair_wrap = 1; /* the seq single-pair wrapper */
|
|
3197
3215
|
n++;
|
|
3198
3216
|
continue;
|
|
@@ -3854,6 +3872,12 @@ static int e_node(yep_engine* e, yep_ctx ctx, uint32_t floor_col) {
|
|
|
3854
3872
|
return -1;
|
|
3855
3873
|
}
|
|
3856
3874
|
if (e_colon_at(e, e->pos)) {
|
|
3875
|
+
if (ctx == YEP_CTX_AFTER_COLON && !ev.multiline) {
|
|
3876
|
+
/* "a: 'b': c": a pair separator after a same-line value;
|
|
3877
|
+
* libyaml's scanner words, marked at the ':' */
|
|
3878
|
+
return e_fail_msg(e, YEP_ERR_UNEXPECTED, e->pos,
|
|
3879
|
+
"mapping values are not allowed in this context");
|
|
3880
|
+
}
|
|
3857
3881
|
if (ctx == YEP_CTX_AFTER_COLON || ev.multiline) {
|
|
3858
3882
|
return e_fail(e, YEP_ERR_UNEXPECTED, e->pos);
|
|
3859
3883
|
}
|
|
@@ -3943,7 +3967,13 @@ static int e_node(yep_engine* e, yep_ctx ctx, uint32_t floor_col) {
|
|
|
3943
3967
|
}
|
|
3944
3968
|
if (s.term == YEP_TERM_COLON) {
|
|
3945
3969
|
if (ctx == YEP_CTX_AFTER_COLON) {
|
|
3946
|
-
|
|
3970
|
+
/* "a: b: c": a second pair separator on the value's line.
|
|
3971
|
+
* libyaml's scanner rejects it with its words, marked at
|
|
3972
|
+
* that ':' (Psych "mapping values are not allowed in this
|
|
3973
|
+
* context at line 1 column 5"); the code, offset and
|
|
3974
|
+
* acceptance are unchanged */
|
|
3975
|
+
return e_fail_msg(e, YEP_ERR_UNEXPECTED, s.end,
|
|
3976
|
+
"mapping values are not allowed in this context");
|
|
3947
3977
|
}
|
|
3948
3978
|
if (node_at > 0 && e->p[node_at - 1] == '\t' && !e->doc_inline) {
|
|
3949
3979
|
/* (on the --- line the marker-line gate names the same
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yeptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.71.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|