[r-cran-yaml] 01/04: New upstream version 2.1.14
Andreas Tille
tille at debian.org
Tue Nov 29 16:07:45 UTC 2016
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-cran-yaml.
commit b8fe84ece5071a2ed42a847f773a227057a5415b
Author: Andreas Tille <tille at debian.org>
Date: Tue Nov 29 16:38:34 2016 +0100
New upstream version 2.1.14
---
DESCRIPTION | 12 +-
MD5 | 30 +-
R/as.yaml.R | 4 +-
R/yaml.load.R | 2 +-
R/yaml.load_file.R | 2 +-
inst/CHANGELOG | 4 +
inst/THANKS | 3 +-
inst/tests/test_as_yaml.R | 5 +
man/as.yaml.Rd | 6 +-
src/api.c | 14 +-
src/emitter.c | 4 +-
src/implicit.c | 1874 ++++++++++++++++++++-------------------------
src/r-ext.c | 26 +-
src/scanner.c | 7 -
src/yaml.h | 12 +
src/yaml_private.h | 4 +-
16 files changed, 914 insertions(+), 1095 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index f7a7123..89cd5b2 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,14 +1,14 @@
Package: yaml
Type: Package
-Title: Methods to convert R data to YAML and back
-Version: 2.1.13
+Title: Methods to Convert R Data to YAML and Back
+Version: 2.1.14
Suggests: testthat
-Date: 2014-06-12
+Date: 2016-11-12
Author: Jeremy Stephens <jeremy.stephens at vanderbilt.edu>
Maintainer: Jeremy Stephens <jeremy.stephens at vanderbilt.edu>
License: BSD_3_clause + file LICENSE
-Description: This package implements the libyaml YAML 1.1 parser and emitter (http://pyyaml.org/wiki/LibYAML) for R.
-Packaged: 2014-06-12 18:04:44 UTC; stephej1
+Description: Implements the 'libyaml' 'YAML' 1.1 parser and emitter (<http://pyyaml.org/wiki/LibYAML>) for R.
NeedsCompilation: yes
+Packaged: 2016-11-12 15:41:59 UTC; viking
Repository: CRAN
-Date/Publication: 2014-06-12 21:01:16
+Date/Publication: 2016-11-12 19:55:17
diff --git a/MD5 b/MD5
index 9650f5d..a53f1c9 100644
--- a/MD5
+++ b/MD5
@@ -1,32 +1,32 @@
17f17ecffb6e67ff170511cbd1ddafac *COPYING
-aa556058138c8da6cf8bc2eba21bab7a *DESCRIPTION
+8624cc369234068363f259d0454b0ce3 *DESCRIPTION
5337609961f572ed04106f2c15194fca *LICENSE
386131dc45ea829321445197322e41ac *NAMESPACE
-88710d36c1647ea5bf8ac3ed455cb6ac *R/as.yaml.R
-6afd5d2e4ec2e30595e0b59bb916ddc0 *R/yaml.load.R
-2e5d3ad2a9c22ea4393343fbd2fdf5c6 *R/yaml.load_file.R
+683773cfe260c30ed5eab8b5f7af8e63 *R/as.yaml.R
+f2eaab095fc1c63c863fe45052565643 *R/yaml.load.R
+abe1c868b111c1c2a3f1af472605e5e7 *R/yaml.load_file.R
59d3ef441a03e63a67784ef7d111f8fe *R/zzz.R
-67fb2e609b31f7716136c6a07aa22b81 *inst/CHANGELOG
-847f4d25cfbdd2d857847a728ff31ca8 *inst/THANKS
+2b3da711bdc8d9179c6940d571868274 *inst/CHANGELOG
+c2b8a0fc9a61a3a3c87de76e3dfa821b *inst/THANKS
8c2a09db7dcf19aea339fc0192f57faa *inst/implicit.re
b70b0ade3126a031e5bf77d8aa9af4f2 *inst/tests/files/test.yml
-a62a389bc4da2bf191edd23333dfa036 *inst/tests/test_as_yaml.R
+34b3dc8062f04cd5f9c1cec5f9ac4260 *inst/tests/test_as_yaml.R
a44b585ea1ef84432e60e092ceb752dd *inst/tests/test_yaml_load.R
ac16a6d9c781906b034638c213eaf68e *inst/tests/test_yaml_load_file.R
-0dbbcc3dc5d7bf09f88ab45932075062 *man/as.yaml.Rd
+916e622be973c8ce2802a10976986ee9 *man/as.yaml.Rd
e429424f42aa1774562c7ea9a3444ca1 *man/yaml.load.Rd
6b0576349be43cf3d872205b41aff77d *src/Makevars
-b4f982d998632cb8239ee87d4e3ba7b0 *src/api.c
+55dfab3483ed1c7b2729f54ecb7d6079 *src/api.c
fc3b40e7be71bf6c15fc119275f1c13d *src/dumper.c
-abcf95521eeca0a9e350ed5c060d7ddb *src/emitter.c
-20fb70767318d50089c2c3151dca6667 *src/implicit.c
+9c1a8f3fe9933a2c0bbb2152cfb6d3ee *src/emitter.c
+01fd734c3ddc9812fe8fbd25fd5fff54 *src/implicit.c
c3ea5a68879f54f058c8bbfed18c55a0 *src/loader.c
1a16662902d2e63e2af2470d0fe43794 *src/parser.c
-99c7a93650ae2246b53a5919f593bbaa *src/r-ext.c
+c7b6e7a6ca02793f453ad7d339e8de10 *src/r-ext.c
373058f34116b270dd6e07cc6e99a5de *src/r-ext.h
095b4acfce41313fe01603812558230f *src/reader.c
-2b7277870ee184b0670c0fb9bee2c324 *src/scanner.c
+965007c37e953ccbcf0227b1d18552a3 *src/scanner.c
ede6fecf08c77109b81f1054d4224a91 *src/writer.c
-def79a19118f65e1eed6edb097665617 *src/yaml.h
-4b7cc26a42a4ed613404e7b58ff93e30 *src/yaml_private.h
+15de991a4135cd810bff4b12b6d3ccea *src/yaml.h
+d1e4445ff461060f4b369a070338c106 *src/yaml_private.h
b851f8244b61633af16cf580db95a8b8 *tests/run-all.R
diff --git a/R/as.yaml.R b/R/as.yaml.R
index c8a4ec3..7d7f412 100644
--- a/R/as.yaml.R
+++ b/R/as.yaml.R
@@ -1,5 +1,5 @@
`as.yaml` <-
-function(x, line.sep = c('\n', '\r\n', '\r'), indent = 2, omap = FALSE, column.major = TRUE, unicode = TRUE, precision = getOption('digits')) {
+function(x, line.sep = c('\n', '\r\n', '\r'), indent = 2, omap = FALSE, column.major = TRUE, unicode = TRUE, precision = getOption('digits'), indent.mapping.sequence = FALSE) {
line.sep <- match.arg(line.sep)
- .Call("as.yaml", x, line.sep, indent, omap, column.major, unicode, precision, PACKAGE="yaml")
+ .Call("as.yaml", x, line.sep, indent, omap, column.major, unicode, precision, indent.mapping.sequence, PACKAGE="yaml")
}
diff --git a/R/yaml.load.R b/R/yaml.load.R
index 963f6d1..b3d202b 100644
--- a/R/yaml.load.R
+++ b/R/yaml.load.R
@@ -1,4 +1,4 @@
`yaml.load` <-
function(string, as.named.list = TRUE, handlers = NULL) {
- .Call("yaml.load", string, as.named.list, handlers, PACKAGE="yaml")
+ .Call("yaml.load", enc2utf8(string), as.named.list, handlers, PACKAGE="yaml")
}
diff --git a/R/yaml.load_file.R b/R/yaml.load_file.R
index 572da64..b7ec3ae 100644
--- a/R/yaml.load_file.R
+++ b/R/yaml.load_file.R
@@ -1,4 +1,4 @@
`yaml.load_file` <-
function(input, ...) {
- yaml.load(paste(readLines(input), collapse="\n"), ...)
+ yaml.load(paste(readLines(input, encoding = 'UTF-8'), collapse="\n"), ...)
}
diff --git a/inst/CHANGELOG b/inst/CHANGELOG
index 254d504..fed2637 100644
--- a/inst/CHANGELOG
+++ b/inst/CHANGELOG
@@ -1,3 +1,7 @@
+v2.1.14
+ - mark character input/output as UTF-8 (patch submitted by Yihui Xie)
+ - update LibYAML to 0.1.7
+
v2.1.13
- fix integer overflow issue
- explicitly cast pointers from char to yaml_char_t, and vice versa
diff --git a/inst/THANKS b/inst/THANKS
index d68ef18..9e555ce 100644
--- a/inst/THANKS
+++ b/inst/THANKS
@@ -2,4 +2,5 @@ Thanks to the following people for helping out:
- Jeff Horner, for general advice and incorporating the syck parser into this package
Patches submitted by:
-- Brendan O'Connor (dfe10f615562458142a73e5bb26b1227a1836581)
+- Brendan O'Connor (dfe10f6)
+- Yihui Xie (d8e65c2, 069bb89)
diff --git a/inst/tests/test_as_yaml.R b/inst/tests/test_as_yaml.R
index 4d318be..e3ebd5f 100644
--- a/inst/tests/test_as_yaml.R
+++ b/inst/tests/test_as_yaml.R
@@ -124,6 +124,11 @@ test_that("custom indent is used", {
expect_equal("foo:\n bar:\n - foo\n - bar\n", result)
})
+test_that("block sequences in mapping context are indented when indent.mapping.sequence is TRUE", {
+ result <- as.yaml(list(foo=list(bar=list('foo', 'bar'))), indent.mapping.sequence = TRUE)
+ expect_equal("foo:\n bar:\n - foo\n - bar\n", result)
+})
+
test_that("indent value is validated", {
expect_that(as.yaml(list(foo=list(bar=list('foo', 'bar'))), indent = 0),
throws_error())
diff --git a/man/as.yaml.Rd b/man/as.yaml.Rd
index 3760aa7..bef29eb 100644
--- a/man/as.yaml.Rd
+++ b/man/as.yaml.Rd
@@ -6,7 +6,8 @@
}
\usage{
as.yaml(x, line.sep = c("\n", "\r\n", "\r"), indent = 2, omap = FALSE,
- column.major = TRUE, unicode = TRUE, precision = getOption('digits'))
+ column.major = TRUE, unicode = TRUE, precision = getOption('digits'),
+ indent.mapping.sequence = FALSE)
}
\arguments{
\item{x}{ the object to be converted }
@@ -16,6 +17,7 @@
\item{column.major}{ determines how to convert a data.frame; see Details }
\item{unicode}{ determines whether or not to allow unescaped unicode characters in output }
\item{precision}{ number of significant digits to use when formatting numeric values }
+ \item{indent.mapping.sequence}{ determines whether or not to indent sequences in mapping context }
}
\details{
If you set the \code{omap} option to TRUE, as.yaml will create ordered maps
@@ -42,6 +44,8 @@
\examples{
as.yaml(1:10)
as.yaml(list(foo=1:10, bar=c("test1", "test2")))
+ as.yaml(list(foo=1:10, bar=c("test1", "test2")), indent=3)
+ as.yaml(list(foo=1:10, bar=c("test1", "test2")), indent.mapping.sequence=TRUE)
as.yaml(data.frame(a=1:10, b=letters[1:10], c=11:20))
as.yaml(list(a=1:2, b=3:4), omap=TRUE)
as.yaml("multi\nline\nstring")
diff --git a/src/api.c b/src/api.c
index 0c4732e..f599763 100644
--- a/src/api.c
+++ b/src/api.c
@@ -415,7 +415,7 @@ yaml_string_write_handler(void *data, unsigned char *buffer, size_t size)
{
yaml_emitter_t *emitter = data;
- if (emitter->output.string.size + *emitter->output.string.size_written
+ if (emitter->output.string.size - *emitter->output.string.size_written
< size) {
memcpy(emitter->output.string.buffer
+ *emitter->output.string.size_written,
@@ -535,6 +535,18 @@ yaml_emitter_set_indent(yaml_emitter_t *emitter, int indent)
}
/*
+ * Set whether or not to indent block sequences in mapping context.
+ */
+
+YAML_DECLARE(void)
+yaml_emitter_set_indent_mapping_sequence(yaml_emitter_t *emitter, int indent_mapping_sequence)
+{
+ assert(emitter); /* Non-NULL emitter object expected. */
+
+ emitter->indent_mapping_sequence = indent_mapping_sequence;
+}
+
+/*
* Set the preferred line width.
*/
diff --git a/src/emitter.c b/src/emitter.c
index c4b56a2..57a138e 100644
--- a/src/emitter.c
+++ b/src/emitter.c
@@ -869,7 +869,9 @@ yaml_emitter_emit_block_sequence_item(yaml_emitter_t *emitter,
if (first)
{
if (!yaml_emitter_increase_indent(emitter, 0,
- (emitter->mapping_context && !emitter->indention)))
+ (emitter->mapping_context
+ && !emitter->indent_mapping_sequence
+ && !emitter->indention)))
return 0;
}
diff --git a/src/implicit.c b/src/implicit.c
index 3db5932..095e324 100644
--- a/src/implicit.c
+++ b/src/implicit.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.16 */
#line 1 "implicit.re"
#include "yaml.h"
@@ -19,14 +19,13 @@ find_implicit_tag(str, len)
#line 20 "implicit.c"
{
yaml_char_t yych;
-
yych = *cursor;
switch (yych) {
- case 0x00: goto yy6;
- case '+': goto yy17;
- case '-': goto yy18;
- case '.': goto yy16;
- case '0': goto yy19;
+ case 0x00: goto yy2;
+ case '+': goto yy6;
+ case '-': goto yy7;
+ case '.': goto yy8;
+ case '0': goto yy9;
case '1':
case '2':
case '3':
@@ -35,239 +34,225 @@ find_implicit_tag(str, len)
case '6':
case '7':
case '8':
- case '9': goto yy20;
- case '<': goto yy22;
- case '=': goto yy21;
- case 'F': goto yy15;
- case 'N': goto yy5;
- case 'O': goto yy13;
- case 'T': goto yy11;
- case 'Y': goto yy8;
- case 'f': goto yy14;
- case 'n': goto yy4;
- case 'o': goto yy12;
- case 't': goto yy10;
- case 'y': goto yy9;
- case '~': goto yy2;
- default: goto yy23;
+ case '9': goto yy10;
+ case '<': goto yy11;
+ case '=': goto yy12;
+ case 'F': goto yy13;
+ case 'N': goto yy14;
+ case 'O': goto yy15;
+ case 'T': goto yy16;
+ case 'Y': goto yy17;
+ case 'f': goto yy18;
+ case 'n': goto yy19;
+ case 'o': goto yy20;
+ case 't': goto yy21;
+ case 'y': goto yy22;
+ case '~': goto yy23;
+ default: goto yy4;
}
yy2:
++cursor;
- if ((yych = *cursor) <= 0x00) goto yy6;
-yy3:
+#line 60 "implicit.re"
+ { return (yaml_char_t *)"null"; }
+#line 58 "implicit.c"
+yy4:
+ ++cursor;
+yy5:
#line 106 "implicit.re"
{ return (yaml_char_t *)"str"; }
-#line 61 "implicit.c"
-yy4:
+#line 64 "implicit.c"
+yy6:
yych = *(marker = ++cursor);
switch (yych) {
- case 0x00: goto yy202;
- case 'o': goto yy201;
- case 'u': goto yy229;
- default: goto yy3;
+ case '.': goto yy24;
+ case '0': goto yy26;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy27;
+ default: goto yy5;
}
-yy5:
+yy7:
yych = *(marker = ++cursor);
switch (yych) {
- case 0x00: goto yy202;
- case 'O':
- case 'o': goto yy201;
- case 'U': goto yy224;
- case 'u': goto yy225;
- default: goto yy3;
+ case '.': goto yy29;
+ case '0': goto yy26;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy27;
+ default: goto yy5;
}
-yy6:
- ++cursor;
-#line 60 "implicit.re"
- { return (yaml_char_t *)"null"; }
-#line 84 "implicit.c"
yy8:
yych = *(marker = ++cursor);
switch (yych) {
- case 0x00: goto yy212;
- case 'E': goto yy222;
- case 'e': goto yy223;
- default: goto yy3;
+ case 'I': goto yy30;
+ case 'N': goto yy31;
+ case 'i': goto yy32;
+ case 'n': goto yy33;
+ default: goto yy5;
}
yy9:
yych = *(marker = ++cursor);
switch (yych) {
- case 0x00: goto yy212;
- case 'e': goto yy221;
- default: goto yy3;
+ case 0x00: goto yy34;
+ case ',': goto yy36;
+ case '.': goto yy38;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7': goto yy40;
+ case '8':
+ case '9': goto yy41;
+ case ':': goto yy42;
+ case 'x': goto yy43;
+ default: goto yy5;
}
yy10:
yych = *(marker = ++cursor);
switch (yych) {
- case 'r': goto yy219;
- default: goto yy3;
+ case 0x00: goto yy34;
+ case ',': goto yy27;
+ case '.': goto yy38;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy44;
+ case ':': goto yy42;
+ default: goto yy5;
}
yy11:
yych = *(marker = ++cursor);
switch (yych) {
- case 'R': goto yy215;
- case 'r': goto yy216;
- default: goto yy3;
+ case '<': goto yy45;
+ default: goto yy5;
}
yy12:
- yych = *(marker = ++cursor);
- switch (yych) {
- case 'f': goto yy214;
- case 'n': goto yy211;
- default: goto yy3;
- }
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy46;
+ goto yy5;
yy13:
yych = *(marker = ++cursor);
switch (yych) {
- case 'F': goto yy209;
- case 'N':
- case 'n': goto yy211;
- case 'f': goto yy210;
- default: goto yy3;
+ case 'A': goto yy48;
+ case 'a': goto yy49;
+ default: goto yy5;
}
yy14:
yych = *(marker = ++cursor);
switch (yych) {
- case 'a': goto yy206;
- default: goto yy3;
+ case 0x00: goto yy50;
+ case 'O':
+ case 'o': goto yy52;
+ case 'U': goto yy53;
+ case 'u': goto yy54;
+ default: goto yy5;
}
yy15:
yych = *(marker = ++cursor);
switch (yych) {
- case 'A': goto yy197;
- case 'a': goto yy198;
- default: goto yy3;
+ case 'F': goto yy55;
+ case 'N':
+ case 'n': goto yy56;
+ case 'f': goto yy57;
+ default: goto yy5;
}
yy16:
yych = *(marker = ++cursor);
switch (yych) {
- case 'I': goto yy153;
- case 'N': goto yy161;
- case 'i': goto yy152;
- case 'n': goto yy160;
- default: goto yy3;
+ case 'R': goto yy58;
+ case 'r': goto yy59;
+ default: goto yy5;
}
yy17:
yych = *(marker = ++cursor);
switch (yych) {
- case '.': goto yy151;
- case '0': goto yy142;
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy31;
- default: goto yy3;
+ case 0x00: goto yy60;
+ case 'E': goto yy62;
+ case 'e': goto yy63;
+ default: goto yy5;
}
yy18:
yych = *(marker = ++cursor);
switch (yych) {
- case '.': goto yy141;
- case '0': goto yy142;
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy31;
- default: goto yy3;
+ case 'a': goto yy49;
+ default: goto yy5;
}
yy19:
yych = *(marker = ++cursor);
switch (yych) {
- case 0x00: goto yy36;
- case ',': goto yy126;
- case '.': goto yy34;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7': goto yy124;
- case '8':
- case '9': goto yy125;
- case ':': goto yy33;
- case 'x': goto yy128;
- default: goto yy3;
+ case 0x00: goto yy50;
+ case 'o': goto yy52;
+ case 'u': goto yy54;
+ default: goto yy5;
}
yy20:
yych = *(marker = ++cursor);
switch (yych) {
- case 0x00: goto yy36;
- case ',': goto yy31;
- case '.': goto yy34;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy30;
- case ':': goto yy33;
- default: goto yy3;
+ case 'f': goto yy57;
+ case 'n': goto yy56;
+ default: goto yy5;
}
yy21:
- yych = *++cursor;
- if (yych <= 0x00) goto yy28;
- goto yy3;
+ yych = *(marker = ++cursor);
+ switch (yych) {
+ case 'r': goto yy59;
+ default: goto yy5;
+ }
yy22:
yych = *(marker = ++cursor);
switch (yych) {
- case '<': goto yy24;
- default: goto yy3;
+ case 0x00: goto yy60;
+ case 'e': goto yy63;
+ default: goto yy5;
}
yy23:
yych = *++cursor;
- goto yy3;
+ if (yych <= 0x00) goto yy2;
+ goto yy5;
yy24:
yych = *++cursor;
- if (yych <= 0x00) goto yy26;
+ switch (yych) {
+ case 'I': goto yy30;
+ case 'i': goto yy32;
+ default: goto yy25;
+ }
yy25:
cursor = marker;
- goto yy3;
+ goto yy5;
yy26:
- ++cursor;
-#line 104 "implicit.re"
- { return (yaml_char_t *)"merge"; }
-#line 245 "implicit.c"
-yy28:
- ++cursor;
-#line 102 "implicit.re"
- { return (yaml_char_t *)"default"; }
-#line 250 "implicit.c"
-yy30:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy58;
- default: goto yy32;
+ case 0x00: goto yy34;
+ case 'x': goto yy43;
+ default: goto yy37;
}
-yy31:
+yy27:
++cursor;
yych = *cursor;
-yy32:
+yy28:
switch (yych) {
- case 0x00: goto yy36;
+ case 0x00: goto yy34;
case ',':
case '0':
case '1':
@@ -278,58 +263,55 @@ yy32:
case '6':
case '7':
case '8':
- case '9': goto yy31;
- case '.': goto yy34;
- case ':': goto yy33;
+ case '9': goto yy27;
+ case '.': goto yy38;
+ case ':': goto yy42;
default: goto yy25;
}
-yy33:
- ++cursor;
- yych = *cursor;
+yy29:
+ yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5': goto yy50;
- case '6':
- case '7':
- case '8':
- case '9': goto yy51;
+ case 'I': goto yy66;
+ case 'i': goto yy67;
default: goto yy25;
}
-yy34:
- ++cursor;
- yych = *cursor;
+yy30:
+ yych = *++cursor;
switch (yych) {
- case 0x00: goto yy40;
- case ',': goto yy38;
- case '.': goto yy42;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy34;
- case 'E':
- case 'e': goto yy44;
+ case 'N': goto yy68;
+ case 'n': goto yy69;
default: goto yy25;
}
-yy36:
+yy31:
+ yych = *++cursor;
+ switch (yych) {
+ case 'A':
+ case 'a': goto yy70;
+ default: goto yy25;
+ }
+yy32:
+ yych = *++cursor;
+ switch (yych) {
+ case 'n': goto yy69;
+ default: goto yy25;
+ }
+yy33:
+ yych = *++cursor;
+ switch (yych) {
+ case 'a': goto yy71;
+ default: goto yy25;
+ }
+yy34:
++cursor;
#line 76 "implicit.re"
{ return (yaml_char_t *)"int"; }
-#line 328 "implicit.c"
-yy38:
+#line 309 "implicit.c"
+yy36:
++cursor;
yych = *cursor;
+yy37:
switch (yych) {
- case 0x00: goto yy40;
+ case 0x00: goto yy72;
case ',':
case '0':
case '1':
@@ -338,21 +320,20 @@ yy38:
case '4':
case '5':
case '6':
- case '7':
+ case '7': goto yy36;
+ case '.': goto yy38;
case '8':
- case '9': goto yy38;
+ case '9': goto yy64;
+ case ':': goto yy42;
default: goto yy25;
}
-yy40:
- ++cursor;
-#line 78 "implicit.re"
- { return (yaml_char_t *)"float#fix"; }
-#line 351 "implicit.c"
-yy42:
+yy38:
++cursor;
yych = *cursor;
switch (yych) {
- case '.':
+ case 0x00: goto yy74;
+ case ',': goto yy76;
+ case '.': goto yy78;
case '0':
case '1':
case '2':
@@ -362,28 +343,14 @@ yy42:
case '6':
case '7':
case '8':
- case '9': goto yy42;
+ case '9': goto yy38;
case 'E':
- case 'e': goto yy44;
- default: goto yy25;
- }
-yy44:
- yych = *++cursor;
- switch (yych) {
- case '+':
- case '-': goto yy45;
+ case 'e': goto yy80;
default: goto yy25;
}
-yy45:
+yy40:
yych = *++cursor;
- if (yych <= 0x00) goto yy25;
- goto yy47;
-yy46:
- ++cursor;
- yych = *cursor;
-yy47:
switch (yych) {
- case 0x00: goto yy48;
case '0':
case '1':
case '2':
@@ -391,22 +358,14 @@ yy47:
case '4':
case '5':
case '6':
- case '7':
+ case '7': goto yy81;
case '8':
- case '9': goto yy46;
- default: goto yy25;
+ case '9': goto yy82;
+ default: goto yy37;
}
-yy48:
- ++cursor;
-#line 80 "implicit.re"
- { return (yaml_char_t *)"float#exp"; }
-#line 404 "implicit.c"
-yy50:
- ++cursor;
- yych = *cursor;
+yy41:
+ yych = *++cursor;
switch (yych) {
- case 0x00: goto yy54;
- case '.': goto yy52;
case '0':
case '1':
case '2':
@@ -416,48 +375,30 @@ yy50:
case '6':
case '7':
case '8':
- case '9': goto yy51;
- case ':': goto yy33;
- default: goto yy25;
- }
-yy51:
- ++cursor;
- yych = *cursor;
- switch (yych) {
- case 0x00: goto yy54;
- case '.': goto yy52;
- case ':': goto yy33;
- default: goto yy25;
+ case '9': goto yy82;
+ default: goto yy65;
}
-yy52:
+yy42:
++cursor;
yych = *cursor;
switch (yych) {
- case 0x00: goto yy56;
- case ',':
case '0':
case '1':
case '2':
case '3':
case '4':
- case '5':
+ case '5': goto yy83;
case '6':
case '7':
case '8':
- case '9': goto yy52;
+ case '9': goto yy84;
default: goto yy25;
}
-yy54:
- ++cursor;
-#line 72 "implicit.re"
- { return (yaml_char_t *)"int#base60"; }
-#line 455 "implicit.c"
-yy56:
- ++cursor;
-#line 82 "implicit.re"
- { return (yaml_char_t *)"float#base60"; }
-#line 460 "implicit.c"
-yy58:
+yy43:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy25;
+ goto yy86;
+yy44:
yych = *++cursor;
switch (yych) {
case '0':
@@ -469,141 +410,102 @@ yy58:
case '6':
case '7':
case '8':
- case '9': goto yy59;
- default: goto yy32;
+ case '9': goto yy87;
+ default: goto yy28;
}
-yy59:
+yy45:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy88;
+ goto yy25;
+yy46:
+ ++cursor;
+#line 102 "implicit.re"
+ { return (yaml_char_t *)"default"; }
+#line 425 "implicit.c"
+yy48:
yych = *++cursor;
switch (yych) {
- case '-': goto yy60;
- default: goto yy32;
+ case 'L': goto yy90;
+ default: goto yy25;
}
-yy60:
+yy49:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy61;
+ case 'l': goto yy91;
default: goto yy25;
}
-yy61:
+yy50:
+ ++cursor;
+#line 64 "implicit.re"
+ { return (yaml_char_t *)"bool#no"; }
+#line 442 "implicit.c"
+yy52:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy50;
+ goto yy25;
+yy53:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy62;
+ case 'L': goto yy92;
default: goto yy25;
}
-yy62:
+yy54:
yych = *++cursor;
switch (yych) {
- case '-': goto yy63;
+ case 'l': goto yy93;
default: goto yy25;
}
-yy63:
+yy55:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy64;
+ case 'F': goto yy52;
default: goto yy25;
}
-yy64:
+yy56:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy60;
+ goto yy25;
+yy57:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy65;
+ case 'f': goto yy52;
default: goto yy25;
}
-yy65:
+yy58:
yych = *++cursor;
switch (yych) {
- case 0x00: goto yy66;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy25;
- case 'T': goto yy68;
- case 't': goto yy69;
- default: goto yy71;
+ case 'U': goto yy94;
+ default: goto yy25;
}
-yy66:
+yy59:
+ yych = *++cursor;
+ switch (yych) {
+ case 'u': goto yy95;
+ default: goto yy25;
+ }
+yy60:
++cursor;
-#line 92 "implicit.re"
- { return (yaml_char_t *)"timestamp#ymd"; }
-#line 570 "implicit.c"
-yy68:
+#line 62 "implicit.re"
+ { return (yaml_char_t *)"bool#yes"; }
+#line 491 "implicit.c"
+yy62:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy110;
+ case 'S': goto yy56;
default: goto yy25;
}
-yy69:
+yy63:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy92;
+ case 's': goto yy56;
default: goto yy25;
}
-yy70:
+yy64:
++cursor;
yych = *cursor;
-yy71:
+yy65:
switch (yych) {
- case '\t':
- case ' ': goto yy70;
+ case ',':
case '0':
case '1':
case '2':
@@ -613,33 +515,66 @@ yy71:
case '6':
case '7':
case '8':
- case '9': goto yy72;
+ case '9': goto yy64;
+ case '.': goto yy38;
+ case ':': goto yy42;
default: goto yy25;
}
-yy72:
+yy66:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy73;
+ case 'N': goto yy96;
+ case 'n': goto yy97;
default: goto yy25;
}
-yy73:
+yy67:
yych = *++cursor;
switch (yych) {
- case ':': goto yy74;
+ case 'n': goto yy97;
default: goto yy25;
}
-yy74:
+yy68:
+ yych = *++cursor;
+ switch (yych) {
+ case 'F': goto yy98;
+ default: goto yy25;
+ }
+yy69:
+ yych = *++cursor;
+ switch (yych) {
+ case 'f': goto yy98;
+ default: goto yy25;
+ }
+yy70:
+ yych = *++cursor;
+ switch (yych) {
+ case 'N': goto yy99;
+ default: goto yy25;
+ }
+yy71:
yych = *++cursor;
switch (yych) {
+ case 0x00: goto yy100;
+ case '.': goto yy102;
+ case 'n': goto yy99;
+ default: goto yy25;
+ }
+yy72:
+ ++cursor;
+#line 70 "implicit.re"
+ { return (yaml_char_t *)"int#oct"; }
+#line 567 "implicit.c"
+yy74:
+ ++cursor;
+#line 78 "implicit.re"
+ { return (yaml_char_t *)"float#fix"; }
+#line 572 "implicit.c"
+yy76:
+ ++cursor;
+ yych = *cursor;
+ switch (yych) {
+ case 0x00: goto yy74;
+ case ',':
case '0':
case '1':
case '2':
@@ -649,12 +584,14 @@ yy74:
case '6':
case '7':
case '8':
- case '9': goto yy75;
+ case '9': goto yy76;
default: goto yy25;
}
-yy75:
- yych = *++cursor;
+yy78:
+ ++cursor;
+ yych = *cursor;
switch (yych) {
+ case '.':
case '0':
case '1':
case '2':
@@ -664,16 +601,19 @@ yy75:
case '6':
case '7':
case '8':
- case '9': goto yy76;
+ case '9': goto yy78;
+ case 'E':
+ case 'e': goto yy80;
default: goto yy25;
}
-yy76:
+yy80:
yych = *++cursor;
switch (yych) {
- case ':': goto yy77;
+ case '+':
+ case '-': goto yy103;
default: goto yy25;
}
-yy77:
+yy81:
yych = *++cursor;
switch (yych) {
case '0':
@@ -683,12 +623,12 @@ yy77:
case '4':
case '5':
case '6':
- case '7':
+ case '7': goto yy104;
case '8':
- case '9': goto yy78;
- default: goto yy25;
+ case '9': goto yy105;
+ default: goto yy37;
}
-yy78:
+yy82:
yych = *++cursor;
switch (yych) {
case '0':
@@ -700,23 +640,15 @@ yy78:
case '6':
case '7':
case '8':
- case '9': goto yy79;
- default: goto yy25;
- }
-yy79:
- yych = *++cursor;
- switch (yych) {
- case '\t':
- case ' ': goto yy82;
- case '.': goto yy80;
- default: goto yy25;
+ case '9': goto yy105;
+ default: goto yy65;
}
-yy80:
+yy83:
++cursor;
yych = *cursor;
switch (yych) {
- case '\t':
- case ' ': goto yy82;
+ case 0x00: goto yy106;
+ case '.': goto yy108;
case '0':
case '1':
case '2':
@@ -726,27 +658,26 @@ yy80:
case '6':
case '7':
case '8':
- case '9': goto yy80;
+ case '9': goto yy84;
+ case ':': goto yy42;
default: goto yy25;
}
-yy82:
+yy84:
++cursor;
yych = *cursor;
switch (yych) {
- case '\t':
- case ' ': goto yy82;
- case '+':
- case '-': goto yy85;
- case 'Z': goto yy84;
+ case 0x00: goto yy106;
+ case '.': goto yy108;
+ case ':': goto yy42;
default: goto yy25;
}
-yy84:
- yych = *++cursor;
- if (yych <= 0x00) goto yy89;
- goto yy25;
yy85:
- yych = *++cursor;
+ ++cursor;
+ yych = *cursor;
+yy86:
switch (yych) {
+ case 0x00: goto yy110;
+ case ',':
case '0':
case '1':
case '2':
@@ -756,10 +687,22 @@ yy85:
case '6':
case '7':
case '8':
- case '9': goto yy86;
+ case '9':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f': goto yy85;
default: goto yy25;
}
-yy86:
+yy87:
yych = *++cursor;
switch (yych) {
case '0':
@@ -771,142 +714,110 @@ yy86:
case '6':
case '7':
case '8':
- case '9': goto yy87;
- default: goto yy25;
- }
-yy87:
- yych = *++cursor;
- switch (yych) {
- case 0x00: goto yy89;
- case ':': goto yy88;
- default: goto yy25;
+ case '9': goto yy112;
+ default: goto yy28;
}
yy88:
+ ++cursor;
+#line 104 "implicit.re"
+ { return (yaml_char_t *)"merge"; }
+#line 725 "implicit.c"
+yy90:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy91;
+ case 'S': goto yy113;
default: goto yy25;
}
-yy89:
- ++cursor;
-#line 96 "implicit.re"
- { return (yaml_char_t *)"timestamp#spaced"; }
-#line 804 "implicit.c"
yy91:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy84;
+ case 's': goto yy114;
default: goto yy25;
}
yy92:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy93;
+ case 'L': goto yy115;
default: goto yy25;
}
yy93:
yych = *++cursor;
switch (yych) {
- case ':': goto yy94;
+ case 'l': goto yy115;
default: goto yy25;
}
yy94:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy95;
+ case 'E': goto yy56;
default: goto yy25;
}
yy95:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy96;
+ case 'e': goto yy56;
default: goto yy25;
}
yy96:
yych = *++cursor;
switch (yych) {
- case ':': goto yy97;
+ case 'F': goto yy116;
default: goto yy25;
}
yy97:
yych = *++cursor;
switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy98;
+ case 'f': goto yy116;
default: goto yy25;
}
yy98:
yych = *++cursor;
- switch (yych) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy99;
- default: goto yy25;
- }
+ if (yych <= 0x00) goto yy117;
+ goto yy25;
yy99:
yych = *++cursor;
+ if (yych <= 0x00) goto yy119;
+ goto yy25;
+yy100:
+ ++cursor;
+#line 66 "implicit.re"
+ { return (yaml_char_t *)"bool#na"; }
+#line 786 "implicit.c"
+yy102:
+ yych = *++cursor;
+ switch (yych) {
+ case 'c': goto yy121;
+ case 'i': goto yy122;
+ case 'r': goto yy123;
+ default: goto yy25;
+ }
+yy103:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy25;
+ goto yy125;
+yy104:
+ yych = *++cursor;
+ switch (yych) {
+ case '-': goto yy126;
+ default: goto yy37;
+ }
+yy105:
+ yych = *++cursor;
+ switch (yych) {
+ case '-': goto yy126;
+ default: goto yy65;
+ }
+yy106:
+ ++cursor;
+#line 72 "implicit.re"
+ { return (yaml_char_t *)"int#base60"; }
+#line 815 "implicit.c"
+yy108:
+ ++cursor;
+ yych = *cursor;
switch (yych) {
- case '.': goto yy100;
+ case 0x00: goto yy127;
+ case ',':
case '0':
case '1':
case '2':
@@ -916,16 +827,74 @@ yy99:
case '6':
case '7':
case '8':
- case '9': goto yy25;
- default: goto yy101;
+ case '9': goto yy108;
+ default: goto yy25;
}
-yy100:
+yy110:
+ ++cursor;
+#line 68 "implicit.re"
+ { return (yaml_char_t *)"int#hex"; }
+#line 838 "implicit.c"
+yy112:
+ yych = *++cursor;
+ switch (yych) {
+ case '-': goto yy126;
+ default: goto yy28;
+ }
+yy113:
+ yych = *++cursor;
+ switch (yych) {
+ case 'E': goto yy52;
+ default: goto yy25;
+ }
+yy114:
+ yych = *++cursor;
+ switch (yych) {
+ case 'e': goto yy52;
+ default: goto yy25;
+ }
+yy115:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy2;
+ goto yy25;
+yy116:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy129;
+ goto yy25;
+yy117:
+ ++cursor;
+#line 84 "implicit.re"
+ { return (yaml_char_t *)"float#inf"; }
+#line 869 "implicit.c"
+yy119:
+ ++cursor;
+#line 88 "implicit.re"
+ { return (yaml_char_t *)"float#nan"; }
+#line 874 "implicit.c"
+yy121:
+ yych = *++cursor;
+ switch (yych) {
+ case 'h': goto yy131;
+ default: goto yy25;
+ }
+yy122:
+ yych = *++cursor;
+ switch (yych) {
+ case 'n': goto yy132;
+ default: goto yy25;
+ }
+yy123:
+ yych = *++cursor;
+ switch (yych) {
+ case 'e': goto yy133;
+ default: goto yy25;
+ }
+yy124:
++cursor;
yych = *cursor;
-yy101:
+yy125:
switch (yych) {
- case '+':
- case '-': goto yy103;
+ case 0x00: goto yy134;
case '0':
case '1':
case '2':
@@ -935,15 +904,10 @@ yy101:
case '6':
case '7':
case '8':
- case '9': goto yy100;
- case 'Z': goto yy102;
+ case '9': goto yy124;
default: goto yy25;
}
-yy102:
- yych = *++cursor;
- if (yych <= 0x00) goto yy107;
- goto yy25;
-yy103:
+yy126:
yych = *++cursor;
switch (yych) {
case '0':
@@ -955,10 +919,43 @@ yy103:
case '6':
case '7':
case '8':
- case '9': goto yy104;
+ case '9': goto yy136;
default: goto yy25;
}
-yy104:
+yy127:
+ ++cursor;
+#line 82 "implicit.re"
+ { return (yaml_char_t *)"float#base60"; }
+#line 930 "implicit.c"
+yy129:
+ ++cursor;
+#line 86 "implicit.re"
+ { return (yaml_char_t *)"float#neginf"; }
+#line 935 "implicit.c"
+yy131:
+ yych = *++cursor;
+ switch (yych) {
+ case 'a': goto yy137;
+ default: goto yy25;
+ }
+yy132:
+ yych = *++cursor;
+ switch (yych) {
+ case 't': goto yy138;
+ default: goto yy25;
+ }
+yy133:
+ yych = *++cursor;
+ switch (yych) {
+ case 'a': goto yy139;
+ default: goto yy25;
+ }
+yy134:
+ ++cursor;
+#line 80 "implicit.re"
+ { return (yaml_char_t *)"float#exp"; }
+#line 958 "implicit.c"
+yy136:
yych = *++cursor;
switch (yych) {
case '0':
@@ -970,17 +967,50 @@ yy104:
case '6':
case '7':
case '8':
- case '9': goto yy105;
+ case '9': goto yy140;
default: goto yy25;
}
-yy105:
+yy137:
yych = *++cursor;
switch (yych) {
- case 0x00: goto yy107;
- case ':': goto yy106;
+ case 'r': goto yy141;
default: goto yy25;
}
-yy106:
+yy138:
+ yych = *++cursor;
+ switch (yych) {
+ case 'e': goto yy142;
+ default: goto yy25;
+ }
+yy139:
+ yych = *++cursor;
+ switch (yych) {
+ case 'l': goto yy143;
+ default: goto yy25;
+ }
+yy140:
+ yych = *++cursor;
+ switch (yych) {
+ case '-': goto yy144;
+ default: goto yy25;
+ }
+yy141:
+ yych = *++cursor;
+ switch (yych) {
+ case 'a': goto yy145;
+ default: goto yy25;
+ }
+yy142:
+ yych = *++cursor;
+ switch (yych) {
+ case 'g': goto yy146;
+ default: goto yy25;
+ }
+yy143:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy147;
+ goto yy25;
+yy144:
yych = *++cursor;
switch (yych) {
case '0':
@@ -992,16 +1022,27 @@ yy106:
case '6':
case '7':
case '8':
- case '9': goto yy109;
+ case '9': goto yy149;
+ default: goto yy25;
+ }
+yy145:
+ yych = *++cursor;
+ switch (yych) {
+ case 'c': goto yy150;
+ default: goto yy25;
+ }
+yy146:
+ yych = *++cursor;
+ switch (yych) {
+ case 'e': goto yy151;
default: goto yy25;
}
-yy107:
+yy147:
++cursor;
-yy108:
-#line 94 "implicit.re"
- { return (yaml_char_t *)"timestamp#iso8601"; }
-#line 1004 "implicit.c"
-yy109:
+#line 90 "implicit.re"
+ { return (yaml_char_t *)"float#na"; }
+#line 1045 "implicit.c"
+yy149:
yych = *++cursor;
switch (yych) {
case '0':
@@ -1013,12 +1054,25 @@ yy109:
case '6':
case '7':
case '8':
- case '9': goto yy102;
+ case '9': goto yy152;
default: goto yy25;
}
-yy110:
+yy150:
+ yych = *++cursor;
+ switch (yych) {
+ case 't': goto yy153;
+ default: goto yy25;
+ }
+yy151:
+ yych = *++cursor;
+ switch (yych) {
+ case 'r': goto yy154;
+ default: goto yy25;
+ }
+yy152:
yych = *++cursor;
switch (yych) {
+ case 0x00: goto yy155;
case '0':
case '1':
case '2':
@@ -1028,18 +1082,33 @@ yy110:
case '6':
case '7':
case '8':
- case '9': goto yy111;
- default: goto yy25;
+ case '9': goto yy25;
+ case 'T':
+ case 't': goto yy159;
+ default: goto yy158;
}
-yy111:
+yy153:
yych = *++cursor;
switch (yych) {
- case ':': goto yy112;
+ case 'e': goto yy160;
default: goto yy25;
}
-yy112:
+yy154:
yych = *++cursor;
+ if (yych <= 0x00) goto yy161;
+ goto yy25;
+yy155:
+ ++cursor;
+#line 92 "implicit.re"
+ { return (yaml_char_t *)"timestamp#ymd"; }
+#line 1105 "implicit.c"
+yy157:
+ ++cursor;
+ yych = *cursor;
+yy158:
switch (yych) {
+ case '\t':
+ case ' ': goto yy157;
case '0':
case '1':
case '2':
@@ -1049,10 +1118,10 @@ yy112:
case '6':
case '7':
case '8':
- case '9': goto yy113;
+ case '9': goto yy163;
default: goto yy25;
}
-yy113:
+yy159:
yych = *++cursor;
switch (yych) {
case '0':
@@ -1064,16 +1133,21 @@ yy113:
case '6':
case '7':
case '8':
- case '9': goto yy114;
+ case '9': goto yy164;
default: goto yy25;
}
-yy114:
+yy160:
yych = *++cursor;
switch (yych) {
- case ':': goto yy115;
+ case 'r': goto yy165;
default: goto yy25;
}
-yy115:
+yy161:
+ ++cursor;
+#line 74 "implicit.re"
+ { return (yaml_char_t *)"int#na"; }
+#line 1150 "implicit.c"
+yy163:
yych = *++cursor;
switch (yych) {
case '0':
@@ -1085,10 +1159,10 @@ yy115:
case '6':
case '7':
case '8':
- case '9': goto yy116;
+ case '9': goto yy166;
default: goto yy25;
}
-yy116:
+yy164:
yych = *++cursor;
switch (yych) {
case '0':
@@ -1100,13 +1174,33 @@ yy116:
case '6':
case '7':
case '8':
- case '9': goto yy117;
+ case '9': goto yy167;
default: goto yy25;
}
-yy117:
+yy165:
+ yych = *++cursor;
+ if (yych <= 0x00) goto yy168;
+ goto yy25;
+yy166:
+ yych = *++cursor;
+ switch (yych) {
+ case ':': goto yy170;
+ default: goto yy25;
+ }
+yy167:
+ yych = *++cursor;
+ switch (yych) {
+ case ':': goto yy171;
+ default: goto yy25;
+ }
+yy168:
+ ++cursor;
+#line 100 "implicit.re"
+ { return (yaml_char_t *)"str#na"; }
+#line 1201 "implicit.c"
+yy170:
yych = *++cursor;
switch (yych) {
- case '.': goto yy118;
case '0':
case '1':
case '2':
@@ -1116,18 +1210,13 @@ yy117:
case '6':
case '7':
case '8':
- case '9': goto yy25;
- case 'Z': goto yy120;
- default: goto yy119;
+ case '9': goto yy172;
+ default: goto yy25;
}
-yy118:
- ++cursor;
- yych = *cursor;
-yy119:
+yy171:
+ yych = *++cursor;
switch (yych) {
- case '+':
- case '-': goto yy103;
- case '0': goto yy118;
+ case '0':
case '1':
case '2':
case '3':
@@ -1136,22 +1225,13 @@ yy119:
case '6':
case '7':
case '8':
- case '9': goto yy122;
- case 'Z': goto yy102;
+ case '9': goto yy173;
default: goto yy25;
}
-yy120:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
+yy172:
yych = *++cursor;
- goto yy108;
-yy122:
- ++cursor;
- yych = *cursor;
switch (yych) {
- case '+':
- case '-': goto yy103;
- case '0': goto yy118;
+ case '0':
case '1':
case '2':
case '3':
@@ -1160,11 +1240,10 @@ yy122:
case '6':
case '7':
case '8':
- case '9': goto yy122;
- case 'Z': goto yy120;
+ case '9': goto yy174;
default: goto yy25;
}
-yy124:
+yy173:
yych = *++cursor;
switch (yych) {
case '0':
@@ -1174,12 +1253,24 @@ yy124:
case '4':
case '5':
case '6':
- case '7': goto yy139;
+ case '7':
case '8':
- case '9': goto yy137;
- default: goto yy127;
+ case '9': goto yy175;
+ default: goto yy25;
}
-yy125:
+yy174:
+ yych = *++cursor;
+ switch (yych) {
+ case ':': goto yy176;
+ default: goto yy25;
+ }
+yy175:
+ yych = *++cursor;
+ switch (yych) {
+ case ':': goto yy177;
+ default: goto yy25;
+ }
+yy176:
yych = *++cursor;
switch (yych) {
case '0':
@@ -1191,16 +1282,12 @@ yy125:
case '6':
case '7':
case '8':
- case '9': goto yy137;
- default: goto yy136;
+ case '9': goto yy178;
+ default: goto yy25;
}
-yy126:
- ++cursor;
- yych = *cursor;
-yy127:
+yy177:
+ yych = *++cursor;
switch (yych) {
- case 0x00: goto yy133;
- case ',':
case '0':
case '1':
case '2':
@@ -1208,24 +1295,14 @@ yy127:
case '4':
case '5':
case '6':
- case '7': goto yy126;
- case '.': goto yy34;
+ case '7':
case '8':
- case '9': goto yy135;
- case ':': goto yy33;
+ case '9': goto yy179;
default: goto yy25;
}
-yy128:
+yy178:
yych = *++cursor;
- if (yych <= 0x00) goto yy25;
- goto yy130;
-yy129:
- ++cursor;
- yych = *cursor;
-yy130:
switch (yych) {
- case 0x00: goto yy131;
- case ',':
case '0':
case '1':
case '2':
@@ -1235,37 +1312,12 @@ yy130:
case '6':
case '7':
case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f': goto yy129;
+ case '9': goto yy180;
default: goto yy25;
}
-yy131:
- ++cursor;
-#line 68 "implicit.re"
- { return (yaml_char_t *)"int#hex"; }
-#line 1258 "implicit.c"
-yy133:
- ++cursor;
-#line 70 "implicit.re"
- { return (yaml_char_t *)"int#oct"; }
-#line 1263 "implicit.c"
-yy135:
- ++cursor;
- yych = *cursor;
-yy136:
+yy179:
+ yych = *++cursor;
switch (yych) {
- case ',':
case '0':
case '1':
case '2':
@@ -1275,14 +1327,21 @@ yy136:
case '6':
case '7':
case '8':
- case '9': goto yy135;
- case '.': goto yy34;
- case ':': goto yy33;
+ case '9': goto yy181;
default: goto yy25;
}
-yy137:
+yy180:
yych = *++cursor;
switch (yych) {
+ case '\t':
+ case ' ': goto yy182;
+ case '.': goto yy184;
+ default: goto yy25;
+ }
+yy181:
+ yych = *++cursor;
+ switch (yych) {
+ case '.': goto yy187;
case '0':
case '1':
case '2':
@@ -1292,18 +1351,26 @@ yy137:
case '6':
case '7':
case '8':
- case '9': goto yy138;
- default: goto yy136;
+ case '9': goto yy25;
+ default: goto yy188;
}
-yy138:
- yych = *++cursor;
+yy182:
+ ++cursor;
+ yych = *cursor;
switch (yych) {
- case '-': goto yy60;
- default: goto yy136;
+ case '\t':
+ case ' ': goto yy182;
+ case '+':
+ case '-': goto yy190;
+ case 'Z': goto yy191;
+ default: goto yy25;
}
-yy139:
- yych = *++cursor;
+yy184:
+ ++cursor;
+ yych = *cursor;
switch (yych) {
+ case '\t':
+ case ' ': goto yy182;
case '0':
case '1':
case '2':
@@ -1311,470 +1378,181 @@ yy139:
case '4':
case '5':
case '6':
- case '7': goto yy140;
+ case '7':
case '8':
- case '9': goto yy138;
- default: goto yy127;
- }
-yy140:
- yych = *++cursor;
- switch (yych) {
- case '-': goto yy60;
- default: goto yy127;
- }
-yy141:
- yych = *++cursor;
- switch (yych) {
- case 'I': goto yy144;
- case 'i': goto yy143;
- default: goto yy25;
- }
-yy142:
- yych = *++cursor;
- switch (yych) {
- case 0x00: goto yy36;
- case 'x': goto yy128;
- default: goto yy127;
- }
-yy143:
- yych = *++cursor;
- switch (yych) {
- case 'n': goto yy150;
- default: goto yy25;
- }
-yy144:
- yych = *++cursor;
- switch (yych) {
- case 'N': goto yy145;
- case 'n': goto yy146;
- default: goto yy25;
- }
-yy145:
- yych = *++cursor;
- switch (yych) {
- case 'F': goto yy147;
- default: goto yy25;
- }
-yy146:
- yych = *++cursor;
- switch (yych) {
- case 'f': goto yy147;
- default: goto yy25;
- }
-yy147:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
- ++cursor;
-#line 86 "implicit.re"
- { return (yaml_char_t *)"float#neginf"; }
-#line 1371 "implicit.c"
-yy150:
- yych = *++cursor;
- switch (yych) {
- case 'f': goto yy147;
- default: goto yy25;
- }
-yy151:
- yych = *++cursor;
- switch (yych) {
- case 'I': goto yy153;
- case 'i': goto yy152;
- default: goto yy25;
- }
-yy152:
- yych = *++cursor;
- switch (yych) {
- case 'n': goto yy159;
- default: goto yy25;
- }
-yy153:
- yych = *++cursor;
- switch (yych) {
- case 'N': goto yy154;
- case 'n': goto yy155;
- default: goto yy25;
- }
-yy154:
- yych = *++cursor;
- switch (yych) {
- case 'F': goto yy156;
- default: goto yy25;
- }
-yy155:
- yych = *++cursor;
- switch (yych) {
- case 'f': goto yy156;
- default: goto yy25;
- }
-yy156:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
- ++cursor;
-#line 84 "implicit.re"
- { return (yaml_char_t *)"float#inf"; }
-#line 1416 "implicit.c"
-yy159:
- yych = *++cursor;
- switch (yych) {
- case 'f': goto yy156;
- default: goto yy25;
- }
-yy160:
- yych = *++cursor;
- switch (yych) {
- case 'a': goto yy167;
- default: goto yy25;
- }
-yy161:
- yych = *++cursor;
- switch (yych) {
- case 'A': goto yy162;
- case 'a': goto yy163;
+ case '9': goto yy184;
default: goto yy25;
}
-yy162:
- yych = *++cursor;
- switch (yych) {
- case 'N': goto yy164;
- default: goto yy25;
- }
-yy163:
- yych = *++cursor;
- switch (yych) {
- case 'N': goto yy164;
- default: goto yy25;
- }
-yy164:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
- ++cursor;
-#line 88 "implicit.re"
- { return (yaml_char_t *)"float#nan"; }
-#line 1454 "implicit.c"
-yy167:
- yych = *++cursor;
- switch (yych) {
- case 0x00: goto yy169;
- case '.': goto yy168;
- case 'n': goto yy164;
- default: goto yy25;
- }
-yy168:
- yych = *++cursor;
- switch (yych) {
- case 'c': goto yy173;
- case 'i': goto yy171;
- case 'r': goto yy172;
- default: goto yy25;
- }
-yy169:
- ++cursor;
-#line 66 "implicit.re"
- { return (yaml_char_t *)"bool#na"; }
-#line 1475 "implicit.c"
-yy171:
- yych = *++cursor;
- switch (yych) {
- case 'n': goto yy189;
- default: goto yy25;
- }
-yy172:
- yych = *++cursor;
- switch (yych) {
- case 'e': goto yy184;
- default: goto yy25;
- }
-yy173:
- yych = *++cursor;
- switch (yych) {
- case 'h': goto yy174;
- default: goto yy25;
- }
-yy174:
- yych = *++cursor;
- switch (yych) {
- case 'a': goto yy175;
- default: goto yy25;
- }
-yy175:
- yych = *++cursor;
- switch (yych) {
- case 'r': goto yy176;
- default: goto yy25;
- }
-yy176:
- yych = *++cursor;
- switch (yych) {
- case 'a': goto yy177;
- default: goto yy25;
- }
-yy177:
- yych = *++cursor;
- switch (yych) {
- case 'c': goto yy178;
- default: goto yy25;
- }
-yy178:
- yych = *++cursor;
- switch (yych) {
- case 't': goto yy179;
- default: goto yy25;
- }
-yy179:
- yych = *++cursor;
- switch (yych) {
- case 'e': goto yy180;
- default: goto yy25;
- }
-yy180:
+yy186:
yych = *++cursor;
switch (yych) {
- case 'r': goto yy181;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy192;
default: goto yy25;
}
-yy181:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
+yy187:
++cursor;
-#line 100 "implicit.re"
- { return (yaml_char_t *)"str#na"; }
-#line 1542 "implicit.c"
-yy184:
- yych = *++cursor;
- switch (yych) {
- case 'a': goto yy185;
- default: goto yy25;
- }
-yy185:
- yych = *++cursor;
+ yych = *cursor;
+yy188:
switch (yych) {
- case 'l': goto yy186;
+ case '+':
+ case '-': goto yy186;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy187;
+ case 'Z': goto yy189;
default: goto yy25;
}
-yy186:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
- ++cursor;
-#line 90 "implicit.re"
- { return (yaml_char_t *)"float#na"; }
-#line 1561 "implicit.c"
yy189:
yych = *++cursor;
- switch (yych) {
- case 't': goto yy190;
- default: goto yy25;
- }
+ if (yych <= 0x00) goto yy193;
+ goto yy25;
yy190:
yych = *++cursor;
switch (yych) {
- case 'e': goto yy191;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy195;
default: goto yy25;
}
yy191:
yych = *++cursor;
- switch (yych) {
- case 'g': goto yy192;
- default: goto yy25;
- }
+ if (yych <= 0x00) goto yy196;
+ goto yy25;
yy192:
yych = *++cursor;
switch (yych) {
- case 'e': goto yy193;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy198;
default: goto yy25;
}
yy193:
- yych = *++cursor;
- switch (yych) {
- case 'r': goto yy194;
- default: goto yy25;
- }
-yy194:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
++cursor;
-#line 74 "implicit.re"
- { return (yaml_char_t *)"int#na"; }
-#line 1598 "implicit.c"
-yy197:
+#line 94 "implicit.re"
+ { return (yaml_char_t *)"timestamp#iso8601"; }
+#line 1464 "implicit.c"
+yy195:
yych = *++cursor;
switch (yych) {
- case 'L': goto yy204;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy199;
default: goto yy25;
}
+yy196:
+ ++cursor;
+#line 96 "implicit.re"
+ { return (yaml_char_t *)"timestamp#spaced"; }
+#line 1484 "implicit.c"
yy198:
yych = *++cursor;
switch (yych) {
- case 'l': goto yy199;
+ case 0x00: goto yy193;
+ case ':': goto yy200;
default: goto yy25;
}
yy199:
yych = *++cursor;
switch (yych) {
- case 's': goto yy200;
+ case 0x00: goto yy196;
+ case ':': goto yy201;
default: goto yy25;
}
yy200:
yych = *++cursor;
switch (yych) {
- case 'e': goto yy201;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy202;
default: goto yy25;
}
yy201:
yych = *++cursor;
- if (yych >= 0x01) goto yy25;
-yy202:
- ++cursor;
-#line 64 "implicit.re"
- { return (yaml_char_t *)"bool#no"; }
-#line 1630 "implicit.c"
-yy204:
- yych = *++cursor;
- switch (yych) {
- case 'S': goto yy205;
- default: goto yy25;
- }
-yy205:
- yych = *++cursor;
- switch (yych) {
- case 'E': goto yy201;
- default: goto yy25;
- }
-yy206:
- yych = *++cursor;
switch (yych) {
- case 'l': goto yy207;
- default: goto yy25;
- }
-yy207:
- yych = *++cursor;
- switch (yych) {
- case 's': goto yy208;
- default: goto yy25;
- }
-yy208:
- yych = *++cursor;
- switch (yych) {
- case 'e': goto yy201;
- default: goto yy25;
- }
-yy209:
- yych = *++cursor;
- switch (yych) {
- case 'F': goto yy201;
- default: goto yy25;
- }
-yy210:
- yych = *++cursor;
- switch (yych) {
- case 'f': goto yy201;
- default: goto yy25;
- }
-yy211:
- yych = *++cursor;
- if (yych >= 0x01) goto yy25;
-yy212:
- ++cursor;
-#line 62 "implicit.re"
- { return (yaml_char_t *)"bool#yes"; }
-#line 1680 "implicit.c"
-yy214:
- yych = *++cursor;
- switch (yych) {
- case 'f': goto yy201;
- default: goto yy25;
- }
-yy215:
- yych = *++cursor;
- switch (yych) {
- case 'U': goto yy218;
- default: goto yy25;
- }
-yy216:
- yych = *++cursor;
- switch (yych) {
- case 'u': goto yy217;
- default: goto yy25;
- }
-yy217:
- yych = *++cursor;
- switch (yych) {
- case 'e': goto yy211;
- default: goto yy25;
- }
-yy218:
- yych = *++cursor;
- switch (yych) {
- case 'E': goto yy211;
- default: goto yy25;
- }
-yy219:
- yych = *++cursor;
- switch (yych) {
- case 'u': goto yy220;
- default: goto yy25;
- }
-yy220:
- yych = *++cursor;
- switch (yych) {
- case 'e': goto yy211;
- default: goto yy25;
- }
-yy221:
- yych = *++cursor;
- switch (yych) {
- case 's': goto yy211;
- default: goto yy25;
- }
-yy222:
- yych = *++cursor;
- switch (yych) {
- case 'S': goto yy211;
- default: goto yy25;
- }
-yy223:
- yych = *++cursor;
- switch (yych) {
- case 's': goto yy211;
- default: goto yy25;
- }
-yy224:
- yych = *++cursor;
- switch (yych) {
- case 'L': goto yy228;
- default: goto yy25;
- }
-yy225:
- yych = *++cursor;
- switch (yych) {
- case 'l': goto yy226;
- default: goto yy25;
- }
-yy226:
- yych = *++cursor;
- switch (yych) {
- case 'l': goto yy227;
- default: goto yy25;
- }
-yy227:
- yych = *++cursor;
- if (yych <= 0x00) goto yy6;
- goto yy25;
-yy228:
- yych = *++cursor;
- switch (yych) {
- case 'L': goto yy227;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy203;
default: goto yy25;
}
-yy229:
+yy202:
yych = *++cursor;
switch (yych) {
- case 'l': goto yy230;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy189;
default: goto yy25;
}
-yy230:
+yy203:
++cursor;
switch ((yych = *cursor)) {
- case 'l': goto yy227;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy191;
default: goto yy25;
}
}
diff --git a/src/r-ext.c b/src/r-ext.c
index 2d4910e..0b67cd5 100644
--- a/src/r-ext.c
+++ b/src/r-ext.c
@@ -95,7 +95,7 @@ R_collapse(obj, collapse)
SETCAR(pcall, R_PasteFunc); pcall = CDR(pcall);
SETCAR(pcall, obj); pcall = CDR(pcall);
SETCAR(pcall, PROTECT(allocVector(STRSXP, 1)));
- SET_STRING_ELT(CAR(pcall), 0, mkChar(collapse));
+ SET_STRING_ELT(CAR(pcall), 0, mkCharCE(collapse, CE_UTF8));
SET_TAG(pcall, R_CollapseSymbol);
retval = eval(call, R_GlobalEnv);
UNPROTECT(2);
@@ -154,7 +154,7 @@ R_deparse_function(f)
*tail = 0;
PROTECT(result = allocVector(STRSXP, 1));
- SET_STRING_ELT(result, 0, mkChar(head));
+ SET_STRING_ELT(result, 0, mkCharCE(head, CE_UTF8));
UNPROTECT(1);
free(head);
@@ -256,7 +256,7 @@ R_format_real(obj, precision)
}
}
- SET_STRING_ELT(retval, i, mkChar(str));
+ SET_STRING_ELT(retval, i, mkCharCE(str, CE_UTF8));
}
}
UNPROTECT(1);
@@ -319,7 +319,7 @@ R_format_string(obj)
PROTECT(retval = duplicate(obj));
for (i = 0; i < length(obj); i++) {
if (STRING_ELT(obj, i) == NA_STRING) {
- SET_STRING_ELT(retval, i, mkChar(".na.character"));
+ SET_STRING_ELT(retval, i, mkCharCE(".na.character", CE_UTF8));
}
}
UNPROTECT(1);
@@ -336,7 +336,7 @@ R_set_str_attrib( obj, sym, str )
{
SEXP val;
PROTECT(val = NEW_STRING(1));
- SET_STRING_ELT(val, 0, mkChar(str));
+ SET_STRING_ELT(val, 0, mkCharCE(str, CE_UTF8));
setAttrib(obj, sym, val);
UNPROTECT(1);
}
@@ -988,7 +988,7 @@ handle_scalar(event, stack, return_tag)
#endif
PROTECT(obj = NEW_STRING(1));
- SET_STRING_ELT(obj, 0, mkChar((char *)value));
+ SET_STRING_ELT(obj, 0, mkCharCE((char *)value, CE_UTF8));
stack_push(stack, 0, NULL, new_prot_object(obj));
return 0;
@@ -1947,7 +1947,7 @@ emit_object(emitter, event, obj, tag, omap, column_major, precision)
}
SEXP
-as_yaml(s_obj, s_line_sep, s_indent, s_omap, s_column_major, s_unicode, s_precision)
+as_yaml(s_obj, s_line_sep, s_indent, s_omap, s_column_major, s_unicode, s_precision, s_indent_mapping_sequence)
SEXP s_obj;
SEXP s_line_sep;
SEXP s_indent;
@@ -1955,12 +1955,13 @@ as_yaml(s_obj, s_line_sep, s_indent, s_omap, s_column_major, s_unicode, s_precis
SEXP s_column_major;
SEXP s_unicode;
SEXP s_precision;
+ SEXP s_indent_mapping_sequence;
{
SEXP retval;
yaml_emitter_t emitter;
yaml_event_t event;
s_emitter_output output;
- int status, line_sep, indent, omap, column_major, unicode, precision;
+ int status, line_sep, indent, omap, column_major, unicode, precision, indent_mapping_sequence;
const char *c_line_sep;
c_line_sep = CHAR(STRING_ELT(s_line_sep, 0));
@@ -2030,10 +2031,17 @@ as_yaml(s_obj, s_line_sep, s_indent, s_omap, s_column_major, s_unicode, s_precis
error("argument `precision` must be in the range 1..22");
}
+ if (!isLogical(s_indent_mapping_sequence) || length(s_indent_mapping_sequence) != 1) {
+ error("argument `indent.mapping.sequence` must be either TRUE or FALSE");
+ return R_NilValue;
+ }
+ indent_mapping_sequence = LOGICAL(s_indent_mapping_sequence)[0];
+
yaml_emitter_initialize(&emitter);
yaml_emitter_set_unicode(&emitter, unicode);
yaml_emitter_set_break(&emitter, line_sep);
yaml_emitter_set_indent(&emitter, indent);
+ yaml_emitter_set_indent_mapping_sequence(&emitter, indent_mapping_sequence);
output.buffer = NULL;
output.size = output.capa = 0;
@@ -2088,7 +2096,7 @@ done:
R_CallMethodDef callMethods[] = {
{"yaml.load", (DL_FUNC)&load_yaml_str, 3},
- {"as.yaml", (DL_FUNC)&as_yaml, 7},
+ {"as.yaml", (DL_FUNC)&as_yaml, 8},
{NULL, NULL, 0}
};
diff --git a/src/scanner.c b/src/scanner.c
index 88d4fa5..5ec0be0 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1106,13 +1106,6 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
&& parser->indent == (ptrdiff_t)parser->mark.column);
/*
- * A simple key is required only when it is the first token in the current
- * line. Therefore it is always allowed. But we add a check anyway.
- */
-
- assert(parser->simple_key_allowed || !required); /* Impossible. */
-
- /*
* If the current position may start a simple key, save it.
*/
diff --git a/src/yaml.h b/src/yaml.h
index acd6e87..531230c 100644
--- a/src/yaml.h
+++ b/src/yaml.h
@@ -1595,6 +1595,8 @@ typedef struct yaml_emitter_s {
int canonical;
/** The number of indentation spaces. */
int best_indent;
+ /** Whether or not to indent block sequences in mapping context. */
+ int indent_mapping_sequence;
/** The preferred width of the output lines. */
int best_width;
/** Allow unescaped non-ASCII characters? */
@@ -1850,6 +1852,16 @@ yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical);
YAML_DECLARE(void)
yaml_emitter_set_indent(yaml_emitter_t *emitter, int indent);
+/*
+ * Set whether or not to indent block sequences in mapping context.
+ *
+ * @param[in,out] emitter An emitter object.
+ * @param[in] indent_mapping_sequence Boolean.
+ */
+
+YAML_DECLARE(void)
+yaml_emitter_set_indent_mapping_sequence(yaml_emitter_t *emitter, int indent_mapping_sequence);
+
/**
* Set the preferred line width. @c -1 means unlimited.
*
diff --git a/src/yaml_private.h b/src/yaml_private.h
index c4e40f2..a18cb61 100644
--- a/src/yaml_private.h
+++ b/src/yaml_private.h
@@ -1,7 +1,7 @@
#define YAML_VERSION_MAJOR 0
#define YAML_VERSION_MINOR 1
-#define YAML_VERSION_PATCH 6
-#define YAML_VERSION_STRING "0.1.6"
+#define YAML_VERSION_PATCH 7
+#define YAML_VERSION_STRING "0.1.7"
#include "yaml.h"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-yaml.git
More information about the debian-science-commits
mailing list