yeptris 0.6.34.3-arm-linux-eabihf → 0.6.35.2-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 +4 -4
- data/lib/yeptris/3.4/native.so +0 -0
- data/lib/yeptris/cbor.rb +8 -1
- data/lib/yeptris/document.rb +10 -2
- data/lib/yeptris/ffi.rb +1 -0
- data/lib/yeptris/json.rb +2 -0
- data/lib/yeptris/psych/visitors.rb +2 -2
- data/lib/yeptris.rb +1 -1
- data/libyeptris.so +0 -0
- data/vendor/libyeptris/CMakeLists.txt +1 -1
- data/vendor/libyeptris/src/include/yeptris/dom.h +6 -0
- data/vendor/libyeptris/src/yeptris/build.c +16 -0
- data/vendor/libyeptris/src/yeptris/dom/dom.c +6 -6
- data/vendor/libyeptris/src/yeptris/dom/dom.h +5 -0
- data/vendor/libyeptris/src/yeptris/dom/mutate.c +2 -2
- data/vendor/libyeptris/src/yeptris/emit/style.c +15 -0
- data/vendor/libyeptris/src/yeptris/emit/writer.c +7 -1
- data/vendor/libyeptris/src/yeptris/marshal.c +79 -29
- data/vendor/libyeptris/src/yeptris/parse/engine.c +567 -48
- data/vendor/libyeptris/src/yeptris/parse/scalars.c +22 -3
- data/vendor/libyeptris/src/yeptris/resolve/compat11.c +10 -3
- data/vendor/libyeptris/src/yeptris/scan/scan.c +1 -0
- metadata +1 -1
|
@@ -268,14 +268,33 @@ static uint32_t finish_double_body(const char* p, uint32_t start, uint32_t end,
|
|
|
268
268
|
}
|
|
269
269
|
case '\n':
|
|
270
270
|
case '\r': {
|
|
271
|
-
/* line
|
|
271
|
+
/* Escaped line break: the break itself is removed, but every
|
|
272
|
+
* break after it (whitespace-only lines included) contributes
|
|
273
|
+
* one newline, and the next line's leading whitespace is
|
|
274
|
+
* stripped. Folding the remaining run with the plain N-1 rule
|
|
275
|
+
* loses one break (libyaml and libfyaml agree on this count). */
|
|
272
276
|
size_t j = i;
|
|
273
277
|
if (p[j] == '\r' && j + 1 < end && p[j + 1] == '\n') {
|
|
274
278
|
j++;
|
|
275
279
|
}
|
|
276
280
|
j++;
|
|
277
|
-
|
|
278
|
-
|
|
281
|
+
uint32_t extra = 0;
|
|
282
|
+
for (;;) {
|
|
283
|
+
while (j < end && (p[j] == ' ' || p[j] == '\t')) {
|
|
284
|
+
j++;
|
|
285
|
+
}
|
|
286
|
+
if (j < end && (p[j] == '\n' || p[j] == '\r')) {
|
|
287
|
+
if (p[j] == '\r' && j + 1 < end && p[j + 1] == '\n') {
|
|
288
|
+
j++;
|
|
289
|
+
}
|
|
290
|
+
j++;
|
|
291
|
+
extra++;
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
for (uint32_t k = 0; k < extra; k++) {
|
|
297
|
+
yep_buf_putc(b, '\n');
|
|
279
298
|
}
|
|
280
299
|
i = j;
|
|
281
300
|
break;
|
|
@@ -290,9 +290,15 @@ static yep_tag_id compat11(void* ctx, const char* p, uint32_t n) {
|
|
|
290
290
|
return 1; /* plain 0 */
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
/* decimal int / float with underscores and commas (psych legacy)
|
|
293
|
+
/* decimal int / float with underscores and commas (psych legacy).
|
|
294
|
+
* The float law is psych's scanner (and libyaml's 1.1 resolver): a
|
|
295
|
+
* DOT is required, and an exponent only counts when SIGNED —
|
|
296
|
+
* "1e0" and "1.5e2" stay strings (psych tokenize; libyaml's 1.1
|
|
297
|
+
* float regex agrees), "1.5" / ".5" / "1.5e+2" are floats. The
|
|
298
|
+
* unqualified-exponent float leaked host strings into number
|
|
299
|
+
* typing (yeptris-ruby #293's CBOR dump). */
|
|
294
300
|
{
|
|
295
|
-
int digits = 0, dot = 0, e = 0, ed = 0;
|
|
301
|
+
int digits = 0, dot = 0, e = 0, ed = 0, esigned = 0;
|
|
296
302
|
for (uint32_t k = i; k < n; k++) {
|
|
297
303
|
char c = p[k];
|
|
298
304
|
if (c >= '0' && c <= '9') {
|
|
@@ -311,13 +317,14 @@ static yep_tag_id compat11(void* ctx, const char* p, uint32_t n) {
|
|
|
311
317
|
} else if ((c == 'e' || c == 'E') && digits && !e) {
|
|
312
318
|
e = 1;
|
|
313
319
|
if (k + 1 < n && (p[k + 1] == '-' || p[k + 1] == '+')) {
|
|
320
|
+
esigned = 1;
|
|
314
321
|
k++;
|
|
315
322
|
}
|
|
316
323
|
} else {
|
|
317
324
|
return 0;
|
|
318
325
|
}
|
|
319
326
|
}
|
|
320
|
-
if (digits &&
|
|
327
|
+
if (digits && dot && (!e || (ed && esigned))) {
|
|
321
328
|
return 2;
|
|
322
329
|
}
|
|
323
330
|
if (digits && !dot && !e) {
|
|
@@ -214,6 +214,7 @@ static int shape_val_bail(unsigned char c, const char* p, size_t len, size_t at)
|
|
|
214
214
|
case '[':
|
|
215
215
|
case '{':
|
|
216
216
|
case '*': /* an alias after an anchor is an error shape (SR86) */
|
|
217
|
+
case '&': /* a second anchor is the suite's 4JVG error (catch 156) */
|
|
217
218
|
return 1;
|
|
218
219
|
case '-':
|
|
219
220
|
case '?':
|