yeptris 0.6.70.0-arm-linux-eabihf → 0.6.72.0-arm-linux-eabihf

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: 722bb72b0f932efe924ec46716462f477139078c56e5959efa26b689515a5dd4
4
- data.tar.gz: 9b63994cf95798afb22eec748db21e3651fc28471ed67d685cf7d57ca0571020
3
+ metadata.gz: ca58045e861a74c4bf34058cf7dcd32770502d1174de21c1999ea32aed2eba12
4
+ data.tar.gz: ba1417e04290240e1f849b05995f4b795e2c00965e1b2a0893b92a296d41386c
5
5
  SHA512:
6
- metadata.gz: d3258f7702ac7bbde62a2b9265457b4d850241655a0147eb039a468480572dd9daa1bf0e373385f253541cddf348a33ce4f7177b9decd851af67330208a11a9f
7
- data.tar.gz: f2a612d10ba8c7cb03d1e65a086d4fcb6964d3b1e7378dded81c58a17f13f6b26c7d45e268b5e907230dd7eea590c9601a52ea6732659a5752478b2f5d6cd06c
6
+ metadata.gz: 59facb0b35b4e6d0456b5926b1b3d2bc102f994bde805cd6dabc41b1a9aaea9350873aecb27d05072c27f450989370dc66df2fd6d80b9620d6900abd6440c5db
7
+ data.tar.gz: c32b72f2f917b484dba664f4cb0d7bac3d2003e09b69e277cf31ee9120175496b764f9e902c3e2d4e992da43a5019755f241348d747a21023ed320dd5cf57300
@@ -11,8 +11,8 @@
11
11
 
12
12
  #define YEPTRIS_VERSION_MAJOR 0
13
13
  #define YEPTRIS_VERSION_MINOR 6
14
- #define YEPTRIS_VERSION_PATCH 70
15
- #define YEPTRIS_VERSION_STRING "0.6.70"
14
+ #define YEPTRIS_VERSION_PATCH 72
15
+ #define YEPTRIS_VERSION_STRING "0.6.72"
16
16
 
17
17
  #ifdef __cplusplus
18
18
  extern "C" {
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.70.0".freeze
6
+ VERSION = "0.6.72.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
data/libyeptris.so CHANGED
Binary file
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(yeptris
6
- VERSION 0.6.70
6
+ VERSION 0.6.72
7
7
  DESCRIPTION "Ultra-fast YAML 1.2 parser, emitter and streamer in C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -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
- return e_fail(e, YEP_ERR_UNEXPECTED, e->pos);
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
- return e_fail(e, YEP_ERR_UNEXPECTED, s.end);
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.70.0
4
+ version: 0.6.72.0
5
5
  platform: arm-linux-eabihf
6
6
  authors:
7
7
  - Ribose Inc.