summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-26 23:37:37 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-26 23:37:37 +0000
commitdca7db725d2812358005f32e23486d78a0924bd5 (patch)
treebce523b227d1020c7b2eebe70596d1c988b8ae69 /ext/syck
parentd53e34bbfaaefe3ee4da8eded605c0fab22d7736 (diff)
* lib/yaml/rubytypes.rb: passing Range tests.
* ext/syck/syck.h: version 0.44. * ext/syck/gram.c: transfers no longer open an indentation. fixed transfers which precede blocks. * ext/syck/token.c: ditto. * ext/syck/syck.c: fixed segfault if an anchor has been released already. * ext/syck/node.c (syck_free_members): organized order of free'd nodes. * ext/syck/rubyext.c (syck_emitter_write_m): test for proper string with StringValue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/gram.c365
-rw-r--r--ext/syck/node.c23
-rw-r--r--ext/syck/rubyext.c2
-rw-r--r--ext/syck/syck.c3
-rw-r--r--ext/syck/syck.h2
-rw-r--r--ext/syck/token.c319
6 files changed, 406 insertions, 308 deletions
diff --git a/ext/syck/gram.c b/ext/syck/gram.c
index 1fa724e..4e8020b 100644
--- a/ext/syck/gram.c
+++ b/ext/syck/gram.c
@@ -250,7 +250,7 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 43
-#define YYLAST 436
+#define YYLAST 486
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 23
@@ -259,7 +259,7 @@ union yyalloc
/* YYNRULES -- Number of rules. */
#define YYNRULES 75
/* YYNRULES -- Number of states. */
-#define YYNSTATES 128
+#define YYNSTATES 132
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -306,8 +306,8 @@ static const unsigned char yytranslate[] =
static const unsigned char yyprhs[] =
{
0, 0, 3, 5, 8, 9, 11, 13, 15, 19,
- 21, 24, 28, 32, 34, 37, 38, 40, 43, 45,
- 47, 49, 52, 55, 58, 61, 64, 66, 68, 70,
+ 21, 24, 28, 30, 33, 34, 36, 39, 41, 43,
+ 45, 48, 51, 54, 57, 60, 62, 64, 66, 70,
73, 76, 78, 80, 82, 84, 86, 90, 93, 95,
99, 102, 106, 109, 113, 116, 118, 122, 125, 129,
132, 134, 138, 140, 142, 146, 150, 154, 157, 161,
@@ -320,11 +320,11 @@ static const yysigned_char yyrhs[] =
{
24, 0, -1, 26, -1, 11, 28, -1, -1, 33,
-1, 27, -1, 34, -1, 29, 26, 32, -1, 34,
- -1, 3, 27, -1, 29, 33, 32, -1, 29, 27,
- 32, -1, 25, -1, 29, 30, -1, -1, 12, -1,
- 29, 13, -1, 14, -1, 13, -1, 14, -1, 31,
- 32, -1, 5, 33, -1, 6, 33, -1, 7, 33,
- -1, 3, 33, -1, 4, -1, 8, -1, 9, -1,
+ -1, 3, 27, -1, 29, 27, 32, -1, 25, -1,
+ 29, 30, -1, -1, 12, -1, 29, 13, -1, 14,
+ -1, 13, -1, 14, -1, 31, 32, -1, 5, 33,
+ -1, 6, 33, -1, 7, 33, -1, 3, 33, -1,
+ 4, -1, 8, -1, 9, -1, 29, 33, 32, -1,
5, 34, -1, 6, 34, -1, 10, -1, 35, -1,
39, -1, 42, -1, 48, -1, 29, 37, 30, -1,
15, 28, -1, 38, -1, 5, 31, 37, -1, 5,
@@ -346,13 +346,13 @@ static const yysigned_char yyrhs[] =
static const unsigned short yyrline[] =
{
0, 54, 54, 58, 62, 68, 69, 72, 73, 79,
- 80, 89, 93, 99, 100, 105, 115, 116, 119, 122,
- 125, 126, 134, 139, 144, 152, 156, 164, 177, 184,
+ 80, 89, 95, 96, 101, 111, 112, 115, 118, 121,
+ 122, 130, 135, 140, 148, 152, 160, 173, 174, 184,
189, 194, 195, 196, 197, 198, 204, 210, 216, 217,
222, 227, 232, 237, 241, 247, 251, 256, 265, 269,
275, 279, 286, 287, 293, 298, 305, 310, 315, 320,
- 325, 329, 335, 350, 351, 369, 370, 382, 389, 398,
- 406, 410, 416, 417, 425, 432
+ 325, 329, 335, 350, 351, 369, 370, 382, 390, 399,
+ 407, 411, 417, 418, 427, 434
};
#endif
@@ -390,8 +390,8 @@ static const unsigned short yytoknum[] =
static const unsigned char yyr1[] =
{
0, 23, 24, 24, 24, 25, 25, 26, 26, 27,
- 27, 27, 27, 28, 28, 28, 29, 29, 30, 31,
- 32, 32, 33, 33, 33, 33, 33, 33, 33, 34,
+ 27, 27, 28, 28, 28, 29, 29, 30, 31, 32,
+ 32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
34, 34, 34, 34, 34, 34, 35, 36, 37, 37,
37, 37, 37, 37, 37, 38, 38, 38, 39, 39,
40, 40, 41, 41, 42, 42, 43, 43, 43, 43,
@@ -403,8 +403,8 @@ static const unsigned char yyr1[] =
static const unsigned char yyr2[] =
{
0, 2, 1, 2, 0, 1, 1, 1, 3, 1,
- 2, 3, 3, 1, 2, 0, 1, 2, 1, 1,
- 1, 2, 2, 2, 2, 2, 1, 1, 1, 2,
+ 2, 3, 1, 2, 0, 1, 2, 1, 1, 1,
+ 2, 2, 2, 2, 2, 1, 1, 1, 3, 2,
2, 1, 1, 1, 1, 1, 3, 2, 1, 3,
2, 3, 2, 3, 2, 1, 3, 2, 3, 2,
1, 3, 1, 1, 3, 3, 3, 2, 3, 2,
@@ -417,55 +417,57 @@ static const unsigned char yyr2[] =
means the default is an error. */
static const unsigned char yydefact[] =
{
- 4, 0, 0, 31, 15, 16, 0, 0, 0, 2,
+ 4, 0, 0, 31, 14, 15, 0, 0, 0, 2,
0, 7, 32, 33, 34, 35, 0, 29, 30, 0,
- 26, 0, 0, 0, 27, 28, 13, 6, 3, 0,
+ 25, 0, 0, 0, 26, 27, 12, 6, 3, 0,
5, 9, 49, 52, 0, 0, 50, 53, 71, 74,
- 75, 0, 72, 1, 0, 0, 0, 17, 15, 0,
- 0, 0, 45, 0, 38, 0, 63, 65, 0, 0,
- 0, 10, 25, 0, 22, 23, 0, 0, 24, 0,
- 18, 0, 14, 0, 15, 48, 0, 70, 0, 19,
- 0, 44, 61, 0, 40, 57, 0, 42, 59, 37,
- 0, 20, 0, 8, 15, 36, 47, 54, 55, 68,
- 12, 11, 69, 51, 73, 0, 0, 0, 43, 60,
- 39, 56, 41, 58, 0, 21, 62, 46, 66, 67,
- 0, 0, 0, 15, 0, 0, 0, 64
+ 75, 0, 72, 1, 0, 0, 0, 16, 14, 0,
+ 0, 0, 0, 45, 0, 38, 0, 63, 65, 0,
+ 0, 0, 0, 10, 24, 0, 0, 21, 22, 0,
+ 0, 23, 0, 17, 0, 13, 0, 14, 48, 0,
+ 70, 0, 18, 0, 44, 61, 0, 40, 57, 0,
+ 42, 59, 37, 0, 19, 0, 8, 14, 36, 47,
+ 54, 55, 68, 0, 11, 28, 69, 51, 73, 0,
+ 0, 0, 43, 60, 39, 56, 41, 58, 0, 20,
+ 62, 46, 66, 67, 0, 0, 0, 14, 0, 0,
+ 0, 64
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
- -1, 8, 26, 9, 27, 28, 34, 72, 92, 93,
- 30, 31, 12, 52, 53, 54, 13, 35, 36, 14,
- 55, 56, 57, 58, 37, 15, 41, 42
+ -1, 8, 26, 50, 27, 28, 62, 75, 95, 105,
+ 30, 31, 12, 53, 54, 55, 13, 35, 36, 14,
+ 56, 57, 58, 59, 37, 15, 41, 42
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -77
+#define YYPACT_NINF -79
static const short yypact[] =
{
- 103, 155, 155, -77, 367, -77, 350, 298, 14, -77,
- 198, -77, -77, -77, -77, -77, 238, -77, -77, 367,
- -77, 384, 384, 427, -77, -77, -77, -77, -77, 174,
- -77, -77, -77, 8, 218, -13, -77, -77, -77, 8,
- -77, 7, -77, -77, 401, 316, 316, -77, 367, 367,
- 20, 28, -77, -7, 30, -7, -77, -77, 25, 401,
- 401, -77, -77, 427, -77, -77, 427, 427, -77, 333,
- -77, 20, -77, 111, 367, -77, 367, -77, 367, -77,
- 258, -77, -77, 258, -77, -77, 258, -77, -77, -77,
- 30, -77, 20, -77, 367, -77, 32, -77, -77, 278,
- -77, -77, -77, -77, -77, 414, 414, 414, -77, 30,
- -77, 30, -77, 30, 37, -77, -77, -77, -77, -77,
- 85, 85, 85, 367, 113, 113, 113, -77
+ 412, 420, 420, -79, 385, -79, 368, 316, 12, -79,
+ 256, -79, -79, -79, -79, -79, 152, -79, -79, 385,
+ -79, 402, 402, 474, -79, -79, -79, -79, -79, 236,
+ -79, -79, -79, 14, 276, 22, -79, -79, -79, 14,
+ -79, -4, -79, -79, 437, 334, 334, -79, 385, 385,
+ 62, 256, 23, -79, 4, 11, 4, -79, -79, 85,
+ 437, 437, 463, -79, -79, 474, 152, -79, -79, 474,
+ 474, -79, 351, -79, 62, -79, 127, 385, -79, 385,
+ -79, 385, -79, 201, -79, -79, 201, -79, -79, 201,
+ -79, -79, -79, 11, -79, 62, -79, 385, -79, 39,
+ -79, -79, 296, 62, -79, -79, -79, -79, -79, 450,
+ 450, 450, -79, 11, -79, 11, -79, 11, 44, -79,
+ -79, -79, -79, -79, 32, 32, 32, 385, 65, 65,
+ 65, -79
};
/* YYPGOTO[NTERM-NUM]. */
-static const short yypgoto[] =
+static const yysigned_char yypgoto[] =
{
- -77, -77, 92, 57, -3, -45, 0, -1, 27, -60,
- -4, 154, -77, -76, 24, -77, -77, -77, 1, -77,
- -9, -77, -24, -22, 2, -77, -77, 11
+ -79, -79, 8, 64, -6, -45, 0, -23, 73, -30,
+ 40, 93, -79, -44, 108, -79, -79, -79, -12, -79,
+ -19, -79, -29, -78, 2, -79, -79, 7
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -475,98 +477,108 @@ static const short yypgoto[] =
#define YYTABLE_NINF -1
static const unsigned char yytable[] =
{
- 10, 16, 16, 89, 29, 75, 51, 70, 76, 40,
- 10, 100, 51, 101, 43, 62, 61, 64, 65, 68,
- 117, 16, 16, 118, 74, 73, 71, 77, 78, 102,
- 73, 71, 115, 79, 91, 82, 85, 88, 79, 70,
- 62, 64, 65, 79, 94, 16, 16, 48, 29, 116,
- 85, 88, 95, 123, 97, 64, 65, 98, 109, 62,
- 82, 111, 64, 65, 113, 62, 61, 50, 81, 84,
- 87, 80, 83, 86, 29, 119, 51, 103, 127, 51,
- 40, 96, 51, 84, 87, 99, 83, 86, 124, 104,
- 125, 126, 0, 81, 29, 51, 80, 0, 33, 39,
- 48, 62, 64, 65, 108, 0, 0, 110, 1, 2,
- 112, 0, 0, 3, 4, 5, 124, 114, 125, 126,
- 6, 0, 7, 29, 79, 91, 79, 94, 48, 81,
- 84, 87, 120, 121, 122, 0, 99, 0, 99, 0,
- 99, 90, 0, 0, 108, 110, 112, 0, 81, 84,
- 87, 120, 121, 122, 11, 17, 18, 0, 0, 0,
- 1, 2, 0, 0, 11, 3, 0, 5, 33, 0,
- 39, 0, 6, 0, 7, 17, 18, 69, 20, 45,
- 46, 23, 24, 25, 3, 0, 5, 47, 70, 48,
- 0, 6, 0, 7, 0, 0, 49, 0, 0, 17,
- 18, 44, 20, 45, 46, 23, 24, 25, 3, 0,
- 5, 47, 0, 48, 0, 6, 0, 7, 0, 0,
- 49, 69, 20, 45, 46, 23, 24, 25, 3, 0,
- 5, 47, 0, 48, 0, 6, 0, 7, 0, 0,
- 49, 44, 20, 59, 60, 23, 24, 25, 0, 0,
- 0, 47, 0, 48, 0, 0, 0, 0, 0, 0,
- 49, 105, 20, 106, 107, 23, 24, 25, 0, 0,
- 0, 0, 0, 48, 0, 0, 0, 0, 0, 0,
- 49, 63, 20, 66, 67, 23, 24, 25, 0, 0,
- 0, 0, 0, 48, 0, 0, 0, 0, 0, 0,
- 49, 19, 20, 21, 22, 23, 24, 25, 3, 0,
- 5, 0, 0, 0, 0, 6, 0, 7, 38, 44,
- 20, 45, 46, 23, 24, 25, 3, 0, 5, 79,
- 0, 48, 0, 6, 0, 7, 69, 20, 45, 46,
- 23, 24, 25, 3, 0, 5, 79, 0, 48, 0,
- 6, 0, 7, 19, 20, 21, 22, 23, 24, 25,
- 3, 0, 5, 0, 0, 0, 0, 6, 32, 7,
- 19, 20, 21, 22, 23, 24, 25, 3, 0, 5,
- 0, 0, 0, 0, 6, 0, 7, 63, 20, 21,
- 22, 23, 24, 25, 3, 0, 5, 0, 0, 0,
- 0, 6, 0, 7, 44, 20, 59, 60, 23, 24,
- 25, 0, 0, 0, 79, 0, 48, 105, 20, 106,
- 107, 23, 24, 25, 0, 0, 0, 79, 0, 48,
- 63, 20, 66, 67, 23, 24, 25
+ 10, 16, 16, 92, 29, 113, 34, 34, 115, 40,
+ 51, 117, 43, 63, 33, 39, 80, 81, 73, 34,
+ 96, 66, 66, 74, 82, 85, 88, 91, 74, 34,
+ 77, 98, 106, 100, 34, 128, 101, 129, 130, 97,
+ 78, 88, 91, 79, 104, 66, 66, 48, 29, 34,
+ 52, 51, 120, 85, 48, 121, 52, 93, 122, 64,
+ 127, 67, 68, 71, 9, 119, 63, 107, 128, 76,
+ 129, 130, 34, 123, 76, 82, 94, 29, 82, 34,
+ 48, 34, 131, 40, 64, 67, 68, 33, 108, 39,
+ 0, 76, 0, 11, 17, 18, 0, 29, 82, 73,
+ 67, 68, 103, 11, 0, 64, 76, 0, 0, 67,
+ 68, 0, 64, 0, 17, 18, 0, 83, 86, 89,
+ 0, 0, 0, 52, 0, 0, 52, 29, 99, 52,
+ 0, 0, 102, 86, 89, 0, 0, 0, 17, 18,
+ 82, 94, 52, 97, 11, 83, 0, 0, 0, 64,
+ 67, 68, 84, 87, 90, 44, 20, 60, 61, 23,
+ 24, 25, 0, 0, 5, 47, 118, 48, 87, 90,
+ 0, 0, 0, 0, 49, 0, 0, 0, 0, 0,
+ 84, 0, 124, 125, 126, 0, 102, 0, 102, 0,
+ 102, 112, 0, 0, 114, 0, 0, 116, 0, 0,
+ 0, 124, 125, 126, 109, 20, 110, 111, 23, 24,
+ 25, 0, 0, 5, 0, 0, 48, 84, 87, 90,
+ 0, 0, 0, 49, 0, 0, 0, 0, 0, 0,
+ 0, 0, 112, 114, 116, 0, 84, 87, 90, 72,
+ 20, 45, 46, 23, 24, 25, 3, 0, 5, 47,
+ 73, 48, 0, 6, 0, 7, 0, 0, 49, 44,
+ 20, 45, 46, 23, 24, 25, 3, 0, 5, 47,
+ 0, 48, 0, 6, 0, 7, 0, 0, 49, 72,
+ 20, 45, 46, 23, 24, 25, 3, 0, 5, 47,
+ 0, 48, 0, 6, 0, 7, 0, 0, 49, 65,
+ 20, 69, 70, 23, 24, 25, 0, 0, 5, 0,
+ 0, 48, 0, 0, 0, 0, 0, 0, 49, 19,
+ 20, 21, 22, 23, 24, 25, 3, 0, 5, 0,
+ 0, 0, 0, 6, 0, 7, 38, 44, 20, 45,
+ 46, 23, 24, 25, 3, 0, 5, 82, 0, 48,
+ 0, 6, 0, 7, 72, 20, 45, 46, 23, 24,
+ 25, 3, 0, 5, 82, 0, 48, 0, 6, 0,
+ 7, 19, 20, 21, 22, 23, 24, 25, 3, 0,
+ 5, 0, 0, 0, 0, 6, 32, 7, 19, 20,
+ 21, 22, 23, 24, 25, 3, 0, 5, 0, 0,
+ 0, 0, 6, 0, 7, 65, 20, 21, 22, 23,
+ 24, 25, 3, 0, 5, 0, 0, 1, 2, 6,
+ 0, 7, 3, 4, 5, 1, 2, 0, 0, 6,
+ 3, 7, 5, 0, 0, 0, 0, 6, 0, 7,
+ 44, 20, 60, 61, 23, 24, 25, 0, 0, 5,
+ 82, 0, 48, 109, 20, 110, 111, 23, 24, 25,
+ 0, 0, 5, 82, 0, 48, 65, 20, 69, 70,
+ 23, 24, 25, 0, 0, 5, 47, 65, 20, 69,
+ 70, 23, 24, 25, 0, 0, 5
};
-static const yysigned_char yycheck[] =
+static const short yycheck[] =
{
- 0, 1, 2, 48, 4, 18, 10, 14, 21, 7,
- 10, 71, 16, 73, 0, 19, 19, 21, 22, 23,
- 96, 21, 22, 99, 16, 29, 29, 20, 21, 74,
- 34, 34, 92, 13, 14, 44, 45, 46, 13, 14,
- 44, 45, 46, 13, 16, 45, 46, 15, 48, 94,
- 59, 60, 53, 16, 55, 59, 60, 58, 80, 63,
- 69, 83, 66, 67, 86, 69, 69, 10, 44, 45,
- 46, 44, 45, 46, 74, 99, 80, 76, 123, 83,
- 78, 54, 86, 59, 60, 58, 59, 60, 3, 78,
- 5, 6, -1, 69, 94, 99, 69, -1, 6, 7,
- 15, 105, 106, 107, 80, -1, -1, 83, 5, 6,
- 86, -1, -1, 10, 11, 12, 3, 90, 5, 6,
- 17, -1, 19, 123, 13, 14, 13, 16, 15, 105,
- 106, 107, 105, 106, 107, -1, 109, -1, 111, -1,
- 113, 49, -1, -1, 120, 121, 122, -1, 124, 125,
- 126, 124, 125, 126, 0, 1, 2, -1, -1, -1,
- 5, 6, -1, -1, 10, 10, -1, 12, 76, -1,
- 78, -1, 17, -1, 19, 21, 22, 3, 4, 5,
- 6, 7, 8, 9, 10, -1, 12, 13, 14, 15,
- -1, 17, -1, 19, -1, -1, 22, -1, -1, 45,
- 46, 3, 4, 5, 6, 7, 8, 9, 10, -1,
- 12, 13, -1, 15, -1, 17, -1, 19, -1, -1,
- 22, 3, 4, 5, 6, 7, 8, 9, 10, -1,
- 12, 13, -1, 15, -1, 17, -1, 19, -1, -1,
- 22, 3, 4, 5, 6, 7, 8, 9, -1, -1,
- -1, 13, -1, 15, -1, -1, -1, -1, -1, -1,
- 22, 3, 4, 5, 6, 7, 8, 9, -1, -1,
- -1, -1, -1, 15, -1, -1, -1, -1, -1, -1,
- 22, 3, 4, 5, 6, 7, 8, 9, -1, -1,
- -1, -1, -1, 15, -1, -1, -1, -1, -1, -1,
- 22, 3, 4, 5, 6, 7, 8, 9, 10, -1,
- 12, -1, -1, -1, -1, 17, -1, 19, 20, 3,
+ 0, 1, 2, 48, 4, 83, 6, 7, 86, 7,
+ 10, 89, 0, 19, 6, 7, 20, 21, 14, 19,
+ 50, 21, 22, 29, 13, 44, 45, 46, 34, 29,
+ 16, 54, 77, 56, 34, 3, 59, 5, 6, 16,
+ 18, 60, 61, 21, 74, 45, 46, 15, 48, 49,
+ 10, 51, 97, 72, 15, 99, 16, 49, 102, 19,
+ 16, 21, 22, 23, 0, 95, 72, 79, 3, 29,
+ 5, 6, 72, 102, 34, 13, 14, 77, 13, 79,
+ 15, 81, 127, 81, 44, 45, 46, 79, 81, 81,
+ -1, 51, -1, 0, 1, 2, -1, 97, 13, 14,
+ 60, 61, 62, 10, -1, 65, 66, -1, -1, 69,
+ 70, -1, 72, -1, 21, 22, -1, 44, 45, 46,
+ -1, -1, -1, 83, -1, -1, 86, 127, 55, 89,
+ -1, -1, 59, 60, 61, -1, -1, -1, 45, 46,
+ 13, 14, 102, 16, 51, 72, -1, -1, -1, 109,
+ 110, 111, 44, 45, 46, 3, 4, 5, 6, 7,
+ 8, 9, -1, -1, 12, 13, 93, 15, 60, 61,
+ -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
+ 72, -1, 109, 110, 111, -1, 113, -1, 115, -1,
+ 117, 83, -1, -1, 86, -1, -1, 89, -1, -1,
+ -1, 128, 129, 130, 3, 4, 5, 6, 7, 8,
+ 9, -1, -1, 12, -1, -1, 15, 109, 110, 111,
+ -1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
+ -1, -1, 124, 125, 126, -1, 128, 129, 130, 3,
4, 5, 6, 7, 8, 9, 10, -1, 12, 13,
- -1, 15, -1, 17, -1, 19, 3, 4, 5, 6,
- 7, 8, 9, 10, -1, 12, 13, -1, 15, -1,
- 17, -1, 19, 3, 4, 5, 6, 7, 8, 9,
- 10, -1, 12, -1, -1, -1, -1, 17, 18, 19,
- 3, 4, 5, 6, 7, 8, 9, 10, -1, 12,
- -1, -1, -1, -1, 17, -1, 19, 3, 4, 5,
- 6, 7, 8, 9, 10, -1, 12, -1, -1, -1,
+ 14, 15, -1, 17, -1, 19, -1, -1, 22, 3,
+ 4, 5, 6, 7, 8, 9, 10, -1, 12, 13,
+ -1, 15, -1, 17, -1, 19, -1, -1, 22, 3,
+ 4, 5, 6, 7, 8, 9, 10, -1, 12, 13,
+ -1, 15, -1, 17, -1, 19, -1, -1, 22, 3,
+ 4, 5, 6, 7, 8, 9, -1, -1, 12, -1,
+ -1, 15, -1, -1, -1, -1, -1, -1, 22, 3,
+ 4, 5, 6, 7, 8, 9, 10, -1, 12, -1,
+ -1, -1, -1, 17, -1, 19, 20, 3, 4, 5,
+ 6, 7, 8, 9, 10, -1, 12, 13, -1, 15,
-1, 17, -1, 19, 3, 4, 5, 6, 7, 8,
- 9, -1, -1, -1, 13, -1, 15, 3, 4, 5,
- 6, 7, 8, 9, -1, -1, -1, 13, -1, 15,
- 3, 4, 5, 6, 7, 8, 9
+ 9, 10, -1, 12, 13, -1, 15, -1, 17, -1,
+ 19, 3, 4, 5, 6, 7, 8, 9, 10, -1,
+ 12, -1, -1, -1, -1, 17, 18, 19, 3, 4,
+ 5, 6, 7, 8, 9, 10, -1, 12, -1, -1,
+ -1, -1, 17, -1, 19, 3, 4, 5, 6, 7,
+ 8, 9, 10, -1, 12, -1, -1, 5, 6, 17,
+ -1, 19, 10, 11, 12, 5, 6, -1, -1, 17,
+ 10, 19, 12, -1, -1, -1, -1, 17, -1, 19,
+ 3, 4, 5, 6, 7, 8, 9, -1, -1, 12,
+ 13, -1, 15, 3, 4, 5, 6, 7, 8, 9,
+ -1, -1, 12, 13, -1, 15, 3, 4, 5, 6,
+ 7, 8, 9, -1, -1, 12, 13, 3, 4, 5,
+ 6, 7, 8, 9, -1, -1, 12
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -578,14 +590,15 @@ static const unsigned char yystos[] =
4, 5, 6, 7, 8, 9, 25, 27, 28, 29,
33, 34, 18, 25, 29, 40, 41, 47, 20, 25,
47, 49, 50, 0, 3, 5, 6, 13, 15, 22,
- 26, 33, 36, 37, 38, 43, 44, 45, 46, 5,
- 6, 27, 33, 3, 33, 33, 5, 6, 33, 3,
- 14, 27, 30, 33, 16, 18, 21, 20, 21, 13,
- 31, 37, 43, 31, 37, 43, 31, 37, 43, 28,
- 25, 14, 31, 32, 16, 30, 31, 30, 30, 31,
- 32, 32, 28, 41, 50, 3, 5, 6, 37, 46,
- 37, 46, 37, 46, 31, 32, 28, 36, 36, 45,
- 31, 31, 31, 16, 3, 5, 6, 28
+ 26, 29, 33, 36, 37, 38, 43, 44, 45, 46,
+ 5, 6, 29, 27, 33, 3, 29, 33, 33, 5,
+ 6, 33, 3, 14, 27, 30, 33, 16, 18, 21,
+ 20, 21, 13, 31, 37, 43, 31, 37, 43, 31,
+ 37, 43, 28, 25, 14, 31, 32, 16, 30, 31,
+ 30, 30, 31, 33, 32, 32, 28, 41, 50, 3,
+ 5, 6, 37, 46, 37, 46, 37, 46, 31, 32,
+ 28, 36, 36, 45, 31, 31, 31, 16, 3, 5,
+ 6, 28
};
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -1186,47 +1199,40 @@ yyreduce:
}
break;
- case 12:
-#line 94 "gram.y"
- {
- yyval.nodeData = yyvsp[-1].nodeData;
- }
- break;
-
- case 14:
-#line 101 "gram.y"
+ case 13:
+#line 97 "gram.y"
{
NULL_NODE( parser, n );
yyval.nodeData = n;
}
break;
- case 15:
-#line 106 "gram.y"
+ case 14:
+#line 102 "gram.y"
{
NULL_NODE( parser, n );
yyval.nodeData = n;
}
break;
- case 22:
-#line 135 "gram.y"
+ case 21:
+#line 131 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 23:
-#line 140 "gram.y"
+ case 22:
+#line 136 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 24:
-#line 145 "gram.y"
+ case 23:
+#line 141 "gram.y"
{
if ( ((SyckParser *)parser)->implicit_typing == 1 )
{
@@ -1236,15 +1242,15 @@ yyreduce:
}
break;
- case 25:
-#line 153 "gram.y"
+ case 24:
+#line 149 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
- case 26:
-#line 157 "gram.y"
+ case 25:
+#line 153 "gram.y"
{
/*
* _Aliases_: The anchor symbol table is scanned for the anchor name.
@@ -1254,8 +1260,8 @@ yyreduce:
}
break;
- case 27:
-#line 165 "gram.y"
+ case 26:
+#line 161 "gram.y"
{
SyckNode *n = yyvsp[0].nodeData;
if ( ((SyckParser *)parser)->taguri_expansion == 1 )
@@ -1270,6 +1276,13 @@ yyreduce:
}
break;
+ case 28:
+#line 175 "gram.y"
+ {
+ yyval.nodeData = yyvsp[-1].nodeData;
+ }
+ break;
+
case 29:
#line 185 "gram.y"
{
@@ -1498,19 +1511,20 @@ yyreduce:
apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );
syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
syck_free_node( yyvsp[0].nodeData );
+ yyvsp[0].nodeData = NULL;
yyval.nodeData = yyvsp[-2].nodeData;
}
break;
case 68:
-#line 390 "gram.y"
+#line 391 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
case 69:
-#line 399 "gram.y"
+#line 400 "gram.y"
{
yyval.nodeData = syck_new_map(
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
@@ -1519,30 +1533,31 @@ yyreduce:
break;
case 70:
-#line 407 "gram.y"
+#line 408 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
case 71:
-#line 411 "gram.y"
+#line 412 "gram.y"
{
yyval.nodeData = syck_alloc_map();
}
break;
case 73:
-#line 418 "gram.y"
+#line 419 "gram.y"
{
syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
syck_free_node( yyvsp[0].nodeData );
+ yyvsp[0].nodeData = NULL;
yyval.nodeData = yyvsp[-2].nodeData;
}
break;
case 74:
-#line 426 "gram.y"
+#line 428 "gram.y"
{
NULL_NODE( parser, n );
yyval.nodeData = syck_new_map(
@@ -1555,7 +1570,7 @@ yyreduce:
}
/* Line 1016 of /usr/local/share/bison/yacc.c. */
-#line 1559 "y.tab.c"
+#line 1574 "y.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1774,7 +1789,7 @@ yyreturn:
}
-#line 435 "gram.y"
+#line 437 "gram.y"
void
diff --git a/ext/syck/node.c b/ext/syck/node.c
index f999700..99bb07b 100644
--- a/ext/syck/node.c
+++ b/ext/syck/node.c
@@ -297,27 +297,38 @@ syck_seq_read( SyckNode *seq, long idx )
void
syck_free_members( SyckNode *n )
{
+ if ( n == NULL ) return;
+
switch ( n->kind )
{
case syck_str_kind:
- if ( n->data.str->ptr != NULL )
+ if ( n->data.str != NULL )
{
S_FREE( n->data.str->ptr );
n->data.str->ptr = NULL;
n->data.str->len = 0;
S_FREE( n->data.str );
+ n->data.str = NULL;
}
break;
case syck_seq_kind:
- S_FREE( n->data.list->items );
- S_FREE( n->data.list );
+ if ( n->data.list != NULL )
+ {
+ S_FREE( n->data.list->items );
+ S_FREE( n->data.list );
+ n->data.list = NULL;
+ }
break;
case syck_map_kind:
- S_FREE( n->data.pairs->keys );
- S_FREE( n->data.pairs->values );
- S_FREE( n->data.pairs );
+ if ( n->data.pairs != NULL )
+ {
+ S_FREE( n->data.pairs->keys );
+ S_FREE( n->data.pairs->values );
+ S_FREE( n->data.pairs );
+ n->data.pairs = NULL;
+ }
break;
}
}
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index 7e6d0e6..29ddccb 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -1337,6 +1337,7 @@ syck_emitter_write_m( self, str )
SyckEmitter *emitter;
Data_Get_Struct(self, SyckEmitter, emitter);
+ StringValue(str);
syck_emitter_write( emitter, RSTRING(str)->ptr, RSTRING(str)->len );
return self;
}
@@ -1351,6 +1352,7 @@ syck_emitter_simple_write( self, str )
SyckEmitter *emitter;
Data_Get_Struct(self, SyckEmitter, emitter);
+ StringValue(str);
syck_emitter_simple( emitter, RSTRING(str)->ptr, RSTRING(str)->len );
return self;
}
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index ec4e7a1..72a883d 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -198,7 +198,8 @@ syck_lookup_sym( SyckParser *p, SYMID id, char **data )
int
syck_st_free_nodes( char *key, SyckNode *n, char *arg )
{
- syck_free_node( n );
+ if ( n != (void *)1 ) syck_free_node( n );
+ n = NULL;
return ST_CONTINUE;
}
diff --git a/ext/syck/syck.h b/ext/syck/syck.h
index c2ef061..60c06c0 100644
--- a/ext/syck/syck.h
+++ b/ext/syck/syck.h
@@ -13,7 +13,7 @@
#define SYCK_YAML_MAJOR 1
#define SYCK_YAML_MINOR 0
-#define SYCK_VERSION "0.43"
+#define SYCK_VERSION "0.44"
#define YAML_DOMAIN "yaml.org,2002"
#include <stdio.h>
diff --git a/ext/syck/token.c b/ext/syck/token.c
index f9e0601..56f5daf 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -205,6 +205,7 @@ SyckParser *syck_parser_ptr = NULL;
* Accessory funcs later in this file.
*/
void eat_comments( SyckParser * );
+char escape_seq( char );
int is_newline( char *ptr );
int sycklex_yaml_utf8( YYSTYPE *, SyckParser * );
int sycklex_bytecode_utf8( YYSTYPE *, SyckParser * );
@@ -256,7 +257,7 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
return t;
}
-#line 274
+#line 276
if ( YYLINEPTR != YYCURSOR )
@@ -293,7 +294,7 @@ yy2: yyaccept = 0;
default: goto yy3;
}
yy3:
-#line 333
+#line 335
{ YYPOS(0);
goto Document;
}
@@ -305,13 +306,13 @@ yy4: yyaccept = 0;
}
yy5: yych = *++YYCURSOR;
yy6:
-#line 315
+#line 317
{ eat_comments( parser );
goto Header;
}
yy7: yych = *++YYCURSOR;
yy8:
-#line 319
+#line 321
{ SyckLevel *lvl = CURRENT_LEVEL();
ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
@@ -321,7 +322,7 @@ yy9: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
goto yy18;
yy10:
-#line 325
+#line 327
{ GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN );
goto Header;
}
@@ -333,7 +334,7 @@ yy11: yych = *++YYCURSOR;
yy12: yych = *++YYCURSOR;
goto yy16;
yy13:
-#line 329
+#line 331
{ doc_level = YYCURSOR - YYLINEPTR;
goto Header;
}
@@ -381,7 +382,7 @@ yy22: yych = *++YYCURSOR;
}
yy23: yych = *++YYCURSOR;
yy24:
-#line 301
+#line 303
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
{
@@ -421,7 +422,7 @@ yy29: yych = *++YYCURSOR;
}
yy30: yych = *++YYCURSOR;
yy31:
-#line 287
+#line 289
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
{
@@ -448,7 +449,7 @@ yy34: yych = *++YYCURSOR;
default: goto yy20;
}
}
-#line 337
+#line 339
Document:
@@ -491,7 +492,7 @@ yy37: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
goto yy90;
yy38:
-#line 351
+#line 353
{ /* Isolate spaces */
int indt_len;
GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
@@ -525,7 +526,7 @@ yy40:
}
yy41: yych = *++YYCURSOR;
yy42:
-#line 373
+#line 375
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_inline);
@@ -533,7 +534,7 @@ yy42:
}
yy43: yych = *++YYCURSOR;
yy44:
-#line 379
+#line 381
{ POP_LEVEL();
return YYTOKEN[0];
}
@@ -683,9 +684,8 @@ yy48: yych = *++YYCURSOR;
}
yy49: yych = *++YYCURSOR;
yy50:
-#line 418
- { ENSURE_YAML_IOPEN(lvl, doc_level, 1);
- goto TransferMethod; }
+#line 419
+ { goto TransferMethod; }
yy51: yych = *++YYCURSOR;
yy52:
#line 421
@@ -853,7 +853,7 @@ yy74: switch(yych){
default: goto yy75;
}
yy75:
-#line 413
+#line 414
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
return YAML_ALIAS;
@@ -925,9 +925,8 @@ yy77: switch(yych){
default: goto yy78;
}
yy78:
-#line 401
- { ENSURE_YAML_IOPEN(lvl, doc_level, 1);
- sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
+#line 403
+ { sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
/*
* Remove previous anchors of the same name. Since the parser will likely
@@ -939,7 +938,7 @@ yy78:
}
yy79: yych = *++YYCURSOR;
yy80:
-#line 387
+#line 389
{ ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
FORCE_NEXT_TOKEN(YAML_IOPEN);
if ( is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
@@ -967,7 +966,7 @@ yy83: yych = *++YYCURSOR;
}
yy84: yych = *++YYCURSOR;
yy85:
-#line 383
+#line 385
{ YYPOS(1);
return YYTOKEN[0];
}
@@ -1770,7 +1769,7 @@ yy158: yych = *++YYCURSOR;
default: goto yy159;
}
yy159:
-#line 722
+#line 711
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto DoubleQuote2;
}
@@ -1780,7 +1779,7 @@ yy160: yyaccept = 1;
case '\n': goto yy168;
case '\r': goto yy170;
case ' ': goto yy165;
- case '"': case '\\': case 'a':
+ case '"': case '0': case '\\': case 'a':
case 'b': case 'e':
case 'f': case 'n': case 'r': case 't': case 'v': goto yy172;
case 'x': goto yy171;
@@ -1788,7 +1787,7 @@ yy160: yyaccept = 1;
}
yy161: yych = *++YYCURSOR;
yy162:
-#line 707
+#line 696
{ SyckLevel *lvl;
SyckNode *n = syck_alloc_str();
lvl = CURRENT_LEVEL();
@@ -1823,7 +1822,7 @@ yy167: YYCURSOR = YYMARKER;
}
yy168: yych = *++YYCURSOR;
yy169:
-#line 702
+#line 691
{ keep_nl = 0;
YYCURSOR--;
goto DoubleQuote2;
@@ -1860,19 +1859,8 @@ yy171: yych = *++YYCURSOR;
yy172: yych = *++YYCURSOR;
yy173:
#line 677
- { char ch = *( YYCURSOR - 1 );
- switch ( ch )
- {
- case 'a': ch = 7; break;
- case 'b': ch = '\010'; break;
- case 'e': ch = '\033'; break;
- case 'f': ch = '\014'; break;
- case 'n': ch = '\n'; break;
- case 'r': ch = '\015'; break;
- case 't': ch = '\t'; break;
- case 'v': ch = '\013'; break;
- }
- QUOTECAT(qstr, qcapa, qidx, ch);
+ { char ch = *( YYCURSOR - 1 );
+ QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
goto DoubleQuote2;
}
yy174: yych = *++YYCURSOR;
@@ -1901,7 +1889,7 @@ yy174: yych = *++YYCURSOR;
}
yy175: yych = *++YYCURSOR;
yy176:
-#line 693
+#line 682
{ long ch;
char *chr_text = syck_strndup( YYTOKEN, 4 );
chr_text[0] = '0';
@@ -1927,7 +1915,7 @@ yy179: ++YYCURSOR;
default: goto yy167;
}
}
-#line 726
+#line 715
}
@@ -1962,7 +1950,7 @@ yy182: YYCURSOR = YYMARKER;
}
yy183: yych = *++YYCURSOR;
yy184:
-#line 740
+#line 729
{ SyckLevel *lvl;
YYCURSOR = YYTOKTMP;
if ( YYCURSOR == YYTOKEN + 1 )
@@ -2013,20 +2001,23 @@ yy184:
return YAML_TRANSFER;
}
yy185: yych = *++YYCURSOR;
- goto yy196;
+ goto yy198;
yy186: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy194;
+ case '\n': goto yy196;
default: goto yy187;
}
yy187:
-#line 802
+#line 796
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto TransferMethod2;
}
yy188: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
+ case '"': case '0': case '\\': case 'a':
+ case 'b': case 'e':
+ case 'f': case 'n': case 'r': case 't': case 'v': goto yy191;
case 'x': goto yy190;
default: goto yy187;
}
@@ -2053,10 +2044,17 @@ yy190: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy191;
+ case 'f': goto yy193;
default: goto yy182;
}
yy191: yych = *++YYCURSOR;
+yy192:
+#line 782
+ { char ch = *( YYCURSOR - 1 );
+ QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
+ goto TransferMethod2;
+ }
+yy193: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2077,12 +2075,12 @@ yy191: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy192;
+ case 'f': goto yy194;
default: goto yy182;
}
-yy192: yych = *++YYCURSOR;
-yy193:
-#line 793
+yy194: yych = *++YYCURSOR;
+yy195:
+#line 787
{ long ch;
char *chr_text = syck_strndup( YYTOKTMP, 4 );
chr_text[0] = '0';
@@ -2091,17 +2089,17 @@ yy193:
QUOTECAT(qstr, qcapa, qidx, ch);
goto TransferMethod2;
}
-yy194: yych = *++YYCURSOR;
+yy196: yych = *++YYCURSOR;
goto yy184;
-yy195: ++YYCURSOR;
+yy197: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy196: switch(yych){
- case ' ': goto yy195;
+yy198: switch(yych){
+ case ' ': goto yy197;
default: goto yy184;
}
}
-#line 807
+#line 801
}
@@ -2150,23 +2148,24 @@ ScalarBlock2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy197;
-yy198: ++YYCURSOR;
-yy197:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ goto yy199;
+yy200: ++YYCURSOR;
+yy199:
+ if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy205;
- case '\n': goto yy199;
- case '\r': goto yy201;
- case '#': goto yy203;
- default: goto yy207;
- }
-yy199: yyaccept = 0;
+ case '\000': goto yy207;
+ case '\n': goto yy201;
+ case '\r': goto yy203;
+ case '#': goto yy205;
+ case '-': goto yy209;
+ default: goto yy210;
+ }
+yy201: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy209;
-yy200:
-#line 854
+ goto yy220;
+yy202:
+#line 848
{ char *pacer;
char *tok = YYTOKEN;
int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0;
@@ -2232,19 +2231,19 @@ yy200:
}
goto ScalarBlock2;
}
-yy201: yych = *++YYCURSOR;
+yy203: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy208;
- default: goto yy202;
+ case '\n': goto yy219;
+ default: goto yy204;
}
-yy202:
-#line 940
+yy204:
+#line 953
{ QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
goto ScalarBlock2;
}
-yy203: yych = *++YYCURSOR;
-yy204:
-#line 921
+yy205: yych = *++YYCURSOR;
+yy206:
+#line 915
{ lvl = CURRENT_LEVEL();
if ( lvl->status != syck_lvl_block )
{
@@ -2257,37 +2256,89 @@ yy204:
}
goto ScalarBlock2;
}
-yy205: yych = *++YYCURSOR;
-yy206:
-#line 935
+yy207: yych = *++YYCURSOR;
+yy208:
+#line 929
{ YYCURSOR--;
POP_LEVEL();
RETURN_YAML_BLOCK();
}
-yy207: yych = *++YYCURSOR;
- goto yy202;
-yy208: yyaccept = 0;
+yy209: yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch(yych){
+ case '-': goto yy211;
+ default: goto yy204;
+ }
+yy210: yych = *++YYCURSOR;
+ goto yy204;
+yy211: yych = *++YYCURSOR;
+ switch(yych){
+ case '-': goto yy213;
+ default: goto yy212;
+ }
+yy212: YYCURSOR = YYMARKER;
+ switch(yyaccept){
+ case 0: goto yy202;
+ case 1: goto yy204;
+ }
+yy213: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy214;
+ case '\r': goto yy218;
+ case ' ': goto yy216;
+ default: goto yy212;
+ }
+yy214: yych = *++YYCURSOR;
+yy215:
+#line 934
+ { if ( YYTOKEN == YYLINEPTR )
+ {
+ if ( blockType == BLOCK_FOLD )
+ {
+ qidx -= 1;
+ }
+ QUOTECAT(qstr, qcapa, qidx, '\n');
+ POP_LEVEL();
+ YYCURSOR = YYTOKEN;
+ RETURN_YAML_BLOCK();
+ }
+ else
+ {
+ QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
+ YYCURSOR = YYTOKEN + 1;
+ goto ScalarBlock2;
+ }
+ }
+yy216: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+yy217: switch(yych){
+ case ' ': goto yy216;
+ default: goto yy215;
+ }
+yy218: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy214;
+ default: goto yy212;
+ }
+yy219: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy209: switch(yych){
- case '\n': case ' ': goto yy208;
- case '\r': goto yy210;
- default: goto yy200;
+yy220: switch(yych){
+ case '\n': case ' ': goto yy219;
+ case '\r': goto yy221;
+ default: goto yy202;
}
-yy210: ++YYCURSOR;
+yy221: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy208;
- default: goto yy211;
- }
-yy211: YYCURSOR = YYMARKER;
- switch(yyaccept){
- case 0: goto yy200;
+ case '\n': goto yy219;
+ default: goto yy212;
}
}
-#line 945
+#line 958
}
@@ -2305,65 +2356,83 @@ Comment:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy212;
-yy213: ++YYCURSOR;
-yy212:
+ goto yy222;
+yy223: ++YYCURSOR;
+yy222:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy214;
- case '\n': goto yy216;
- case '\r': goto yy217;
- default: goto yy219;
- }
-yy214: yych = *++YYCURSOR;
-yy215:
-#line 961
+ case '\000': goto yy224;
+ case '\n': goto yy226;
+ case '\r': goto yy227;
+ default: goto yy229;
+ }
+yy224: yych = *++YYCURSOR;
+yy225:
+#line 974
{ YYCURSOR = YYTOKEN;
return;
}
-yy216: yyaccept = 0;
+yy226: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy221;
-yy217: yych = *++YYCURSOR;
+ goto yy231;
+yy227: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy220;
- default: goto yy218;
+ case '\n': goto yy230;
+ default: goto yy228;
}
-yy218:
-#line 965
+yy228:
+#line 978
{ goto Comment;
}
-yy219: yych = *++YYCURSOR;
- goto yy218;
-yy220: yyaccept = 0;
+yy229: yych = *++YYCURSOR;
+ goto yy228;
+yy230: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy221: switch(yych){
- case '\n': goto yy220;
- case '\r': goto yy222;
- default: goto yy215;
+yy231: switch(yych){
+ case '\n': goto yy230;
+ case '\r': goto yy232;
+ default: goto yy225;
}
-yy222: ++YYCURSOR;
+yy232: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy220;
- default: goto yy223;
+ case '\n': goto yy230;
+ default: goto yy233;
}
-yy223: YYCURSOR = YYMARKER;
+yy233: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy215;
+ case 0: goto yy225;
}
}
-#line 968
+#line 981
}
}
+char
+escape_seq( char ch )
+{
+ switch ( ch )
+ {
+ case '0': return '\0';
+ case 'a': return 7;
+ case 'b': return '\010';
+ case 'e': return '\033';
+ case 'f': return '\014';
+ case 'n': return '\n';
+ case 'r': return '\015';
+ case 't': return '\t';
+ case 'v': return '\013';
+ default: return ch;
+ }
+}
+
int
is_newline( char *ptr )
{