summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-17 16:55:54 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-17 16:55:54 +0000
commitae28f1b6b3b22afb529f599385d1f2af258624e9 (patch)
tree718fc605c85aa7d3c2b05fbfbc46c41320b74db9 /ext/syck
parent77e941269fcddc8f5af6e553592fc3ef0132727c (diff)
* ext/syck/gram.c: added grammar for certain empty sequence entries.
* ext/syck/handler.c, ext/syck/syck.c, ext/syck/syck.h: track bad anchors. * ext/syck/token.c: added pause token, tag possible circular references. * lib/yaml/rubytypes.rb: parsing YMD time as Date instance. * ext/syck/rubyext.c: ditto. DomainType, PrivateType, BadAlias classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/gram.c449
-rw-r--r--ext/syck/handler.c59
-rw-r--r--ext/syck/rubyext.c160
-rw-r--r--ext/syck/syck.c17
-rw-r--r--ext/syck/syck.h11
-rw-r--r--ext/syck/token.c1078
6 files changed, 1019 insertions, 755 deletions
diff --git a/ext/syck/gram.c b/ext/syck/gram.c
index 1860437..69a21b6 100644
--- a/ext/syck/gram.c
+++ b/ext/syck/gram.c
@@ -228,17 +228,17 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 34
-#define YYLAST 307
+#define YYFINAL 35
+#define YYLAST 333
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 23
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 25
/* YYNRULES -- Number of rules. */
-#define YYNRULES 62
+#define YYNRULES 63
/* YYNRULES -- Number of states. */
-#define YYNSTATES 104
+#define YYNSTATES 106
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -285,12 +285,12 @@ static const unsigned char yytranslate[] =
static const unsigned char yyprhs[] =
{
0, 0, 3, 5, 8, 9, 11, 13, 15, 18,
- 22, 26, 28, 29, 31, 34, 36, 38, 40, 43,
- 46, 49, 52, 54, 56, 58, 61, 63, 65, 67,
- 69, 71, 75, 78, 80, 84, 87, 91, 94, 96,
- 100, 103, 107, 110, 112, 116, 120, 124, 128, 131,
- 135, 138, 142, 144, 150, 152, 156, 160, 163, 167,
- 171, 174, 176
+ 22, 26, 28, 31, 32, 34, 37, 39, 41, 43,
+ 46, 49, 52, 55, 57, 59, 61, 64, 66, 68,
+ 70, 72, 74, 78, 81, 83, 87, 90, 94, 97,
+ 99, 103, 106, 110, 113, 115, 119, 123, 127, 131,
+ 134, 138, 141, 145, 147, 153, 155, 159, 163, 166,
+ 170, 174, 177, 179
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -298,34 +298,35 @@ static const yysigned_char yyrhs[] =
{
24, 0, -1, 33, -1, 10, 27, -1, -1, 32,
-1, 26, -1, 33, -1, 3, 26, -1, 28, 32,
- 31, -1, 28, 26, 31, -1, 25, -1, -1, 11,
- -1, 28, 12, -1, 13, -1, 12, -1, 13, -1,
- 30, 31, -1, 5, 32, -1, 6, 32, -1, 3,
- 32, -1, 4, -1, 7, -1, 8, -1, 5, 33,
- -1, 9, -1, 34, -1, 38, -1, 40, -1, 46,
- -1, 28, 36, 29, -1, 14, 27, -1, 37, -1,
- 5, 30, 36, -1, 5, 36, -1, 3, 30, 36,
- -1, 3, 36, -1, 35, -1, 37, 30, 35, -1,
- 37, 30, -1, 17, 39, 18, -1, 17, 18, -1,
- 25, -1, 39, 21, 25, -1, 28, 41, 29, -1,
- 28, 44, 29, -1, 5, 30, 44, -1, 5, 41,
- -1, 3, 30, 44, -1, 3, 41, -1, 32, 15,
- 27, -1, 42, -1, 22, 25, 30, 15, 27, -1,
- 43, -1, 44, 30, 35, -1, 44, 30, 43, -1,
- 44, 30, -1, 25, 15, 27, -1, 19, 47, 20,
- -1, 19, 20, -1, 45, -1, 47, 21, 45, -1
+ 31, -1, 28, 26, 31, -1, 25, -1, 28, 29,
+ -1, -1, 11, -1, 28, 12, -1, 13, -1, 12,
+ -1, 13, -1, 30, 31, -1, 5, 32, -1, 6,
+ 32, -1, 3, 32, -1, 4, -1, 7, -1, 8,
+ -1, 5, 33, -1, 9, -1, 34, -1, 38, -1,
+ 40, -1, 46, -1, 28, 36, 29, -1, 14, 27,
+ -1, 37, -1, 5, 30, 36, -1, 5, 36, -1,
+ 3, 30, 36, -1, 3, 36, -1, 35, -1, 37,
+ 30, 35, -1, 37, 30, -1, 17, 39, 18, -1,
+ 17, 18, -1, 25, -1, 39, 21, 25, -1, 28,
+ 41, 29, -1, 28, 44, 29, -1, 5, 30, 44,
+ -1, 5, 41, -1, 3, 30, 44, -1, 3, 41,
+ -1, 32, 15, 27, -1, 42, -1, 22, 25, 30,
+ 15, 27, -1, 43, -1, 44, 30, 35, -1, 44,
+ 30, 43, -1, 44, 30, -1, 25, 15, 27, -1,
+ 19, 47, 20, -1, 19, 20, -1, 45, -1, 47,
+ 21, 45, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short yyrline[] =
{
0, 44, 44, 48, 52, 58, 59, 62, 63, 72,
- 76, 82, 83, 101, 102, 105, 108, 111, 112, 120,
- 125, 133, 137, 145, 158, 165, 170, 171, 172, 173,
- 174, 180, 186, 192, 193, 198, 203, 207, 213, 217,
- 222, 231, 235, 241, 245, 255, 260, 267, 272, 277,
- 281, 287, 302, 303, 311, 312, 324, 331, 340, 348,
- 352, 358, 359
+ 76, 82, 83, 96, 114, 115, 118, 121, 124, 125,
+ 133, 138, 146, 150, 158, 171, 178, 183, 184, 185,
+ 186, 187, 193, 199, 205, 206, 211, 216, 220, 226,
+ 230, 235, 244, 248, 254, 258, 268, 273, 280, 285,
+ 290, 294, 300, 315, 316, 324, 325, 337, 344, 353,
+ 361, 365, 371, 372
};
#endif
@@ -361,24 +362,24 @@ static const unsigned short yytoknum[] =
static const unsigned char yyr1[] =
{
0, 23, 24, 24, 24, 25, 25, 26, 26, 26,
- 26, 27, 27, 28, 28, 29, 30, 31, 31, 32,
- 32, 32, 32, 32, 32, 33, 33, 33, 33, 33,
- 33, 34, 35, 36, 36, 36, 36, 36, 37, 37,
- 37, 38, 38, 39, 39, 40, 40, 41, 41, 41,
- 41, 42, 43, 43, 44, 44, 44, 44, 45, 46,
- 46, 47, 47
+ 26, 27, 27, 27, 28, 28, 29, 30, 31, 31,
+ 32, 32, 32, 32, 32, 32, 33, 33, 33, 33,
+ 33, 33, 34, 35, 36, 36, 36, 36, 36, 37,
+ 37, 37, 38, 38, 39, 39, 40, 40, 41, 41,
+ 41, 41, 42, 43, 43, 44, 44, 44, 44, 45,
+ 46, 46, 47, 47
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const unsigned char yyr2[] =
{
0, 2, 1, 2, 0, 1, 1, 1, 2, 3,
- 3, 1, 0, 1, 2, 1, 1, 1, 2, 2,
- 2, 2, 1, 1, 1, 2, 1, 1, 1, 1,
- 1, 3, 2, 1, 3, 2, 3, 2, 1, 3,
- 2, 3, 2, 1, 3, 3, 3, 3, 2, 3,
- 2, 3, 1, 5, 1, 3, 3, 2, 3, 3,
- 2, 1, 3
+ 3, 1, 2, 0, 1, 2, 1, 1, 1, 2,
+ 2, 2, 2, 1, 1, 1, 2, 1, 1, 1,
+ 1, 1, 3, 2, 1, 3, 2, 3, 2, 1,
+ 3, 2, 3, 2, 1, 3, 3, 3, 3, 2,
+ 3, 2, 3, 1, 5, 1, 3, 3, 2, 3,
+ 3, 2, 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -386,51 +387,51 @@ static const unsigned char yyr2[] =
means the default is an error. */
static const unsigned char yydefact[] =
{
- 4, 0, 26, 12, 13, 0, 0, 0, 0, 2,
- 27, 28, 29, 30, 25, 0, 22, 0, 0, 23,
- 24, 11, 6, 3, 0, 5, 7, 42, 43, 0,
- 60, 0, 61, 0, 1, 0, 0, 14, 12, 0,
- 0, 38, 0, 33, 0, 52, 54, 0, 8, 21,
- 0, 19, 0, 20, 0, 0, 0, 0, 41, 0,
- 12, 59, 0, 16, 0, 37, 50, 0, 35, 48,
- 32, 0, 12, 15, 31, 40, 45, 46, 57, 17,
- 0, 10, 9, 44, 58, 62, 0, 0, 36, 49,
- 34, 47, 0, 51, 39, 55, 56, 18, 0, 0,
- 12, 0, 0, 53
+ 4, 0, 27, 13, 14, 0, 0, 0, 0, 2,
+ 28, 29, 30, 31, 26, 0, 23, 0, 0, 24,
+ 25, 11, 6, 3, 0, 5, 7, 43, 44, 0,
+ 0, 61, 0, 62, 0, 1, 0, 0, 15, 13,
+ 0, 0, 39, 0, 34, 0, 53, 55, 0, 8,
+ 22, 0, 20, 0, 21, 0, 0, 16, 0, 12,
+ 0, 42, 0, 13, 60, 0, 17, 0, 38, 51,
+ 0, 36, 49, 33, 0, 13, 32, 41, 46, 47,
+ 58, 18, 0, 10, 9, 45, 59, 63, 0, 0,
+ 37, 50, 35, 48, 0, 52, 40, 56, 57, 19,
+ 0, 0, 13, 0, 0, 54
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
- -1, 7, 21, 22, 23, 24, 74, 78, 81, 25,
- 26, 10, 41, 65, 43, 11, 29, 12, 44, 45,
- 46, 47, 32, 13, 33
+ -1, 7, 21, 22, 23, 29, 59, 80, 83, 25,
+ 26, 10, 42, 68, 44, 11, 30, 12, 45, 46,
+ 47, 48, 33, 13, 34
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -48
+#define YYPACT_NINF -54
static const short yypact[] =
{
- 241, 252, -48, 219, -48, 202, 150, 13, 114, -48,
- -48, -48, -48, -48, -48, 219, -48, 236, 299, -48,
- -48, -48, -48, -48, 94, -48, -48, -48, -48, 4,
- -48, 2, -48, -15, -48, 269, 269, -48, 219, 219,
- 6, -48, 23, 20, 23, -48, -48, 54, -48, -48,
- 299, -48, 299, -48, 168, 185, 75, 38, -48, 219,
- 219, -48, 219, -48, 126, -48, -48, 126, -48, -48,
- -48, 20, 219, -48, -48, 12, -48, -48, 138, -48,
- 75, -48, -48, -48, -48, -48, 281, 281, -48, 20,
- -48, 20, 37, -48, -48, -48, -48, -48, 79, 79,
- 219, 287, 287, -48
+ 267, 278, -54, 245, -54, 228, 176, 8, 140, -54,
+ -54, -54, -54, -54, -54, 245, -54, 262, 325, -54,
+ -54, -54, -54, -54, 100, -54, -54, -54, -54, 120,
+ 48, -54, -5, -54, 52, -54, 295, 295, -54, 245,
+ 245, -3, -54, 13, 9, 13, -54, -54, 76, -54,
+ -54, 325, -54, 325, -54, 194, 211, -54, 108, -54,
+ 103, -54, 245, 245, -54, 245, -54, 152, -54, -54,
+ 152, -54, -54, -54, 9, 245, -54, 24, -54, -54,
+ 164, -54, 108, -54, -54, -54, -54, -54, 307, 307,
+ -54, 9, -54, 9, 32, -54, -54, -54, -54, -54,
+ 6, 6, 245, 313, 313, -54
};
/* YYPGOTO[NTERM-NUM]. */
static const yysigned_char yypgoto[] =
{
- -48, -48, -2, 19, -37, 7, 21, -16, -47, -6,
- 14, -48, -33, -8, -48, -48, -48, -48, 41, -48,
- -24, 11, 27, -48, -48
+ -54, -54, 31, -10, -35, 0, 12, -12, -53, -2,
+ 41, -54, -47, -6, -54, -54, -54, -54, 44, -54,
+ -28, 15, 14, -54, -54
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -440,72 +441,78 @@ static const yysigned_char yypgoto[] =
#define YYTABLE_NINF -1
static const unsigned char yytable[] =
{
- 42, 70, 40, 28, 31, 61, 62, 8, 8, 49,
- 82, 51, 53, 34, 9, 14, 42, 60, 57, 64,
- 67, 72, 58, 84, 8, 59, 38, 75, 68, 49,
- 51, 14, 63, 97, 48, 93, 73, 71, 64, 67,
- 80, 80, 94, 56, 49, 95, 51, 68, 49, 51,
- 63, 79, 100, 72, 96, 92, 88, 83, 40, 90,
- 31, 40, 8, 103, 80, 76, 63, 73, 77, 14,
- 98, 99, 40, 48, 0, 89, 66, 69, 91, 68,
- 49, 51, 101, 0, 102, 98, 99, 63, 79, 85,
- 88, 90, 0, 38, 68, 66, 69, 54, 16, 55,
- 18, 19, 20, 2, 0, 4, 37, 0, 38, 0,
- 0, 5, 0, 6, 0, 0, 39, 35, 16, 36,
- 18, 19, 20, 0, 0, 0, 37, 0, 38, 86,
- 16, 87, 18, 19, 20, 0, 39, 0, 0, 0,
- 38, 50, 16, 52, 18, 19, 20, 0, 39, 0,
- 0, 0, 38, 15, 16, 17, 18, 19, 20, 2,
- 39, 4, 0, 0, 0, 0, 0, 5, 0, 6,
- 30, 54, 16, 55, 18, 19, 20, 2, 0, 4,
- 63, 0, 38, 0, 0, 5, 0, 6, 35, 16,
- 55, 18, 19, 20, 2, 0, 4, 63, 0, 38,
- 0, 0, 5, 0, 6, 15, 16, 17, 18, 19,
- 20, 2, 0, 4, 0, 0, 0, 0, 0, 5,
- 27, 6, 15, 16, 17, 18, 19, 20, 2, 0,
- 4, 0, 0, 0, 0, 0, 5, 0, 6, 50,
- 16, 17, 18, 19, 20, 2, 1, 4, 0, 0,
- 2, 3, 4, 5, 0, 6, 0, 1, 5, 0,
- 6, 2, 0, 4, 0, 0, 0, 0, 0, 5,
- 0, 6, 35, 16, 36, 18, 19, 20, 0, 0,
- 0, 63, 0, 38, 86, 16, 87, 18, 19, 20,
- 101, 0, 102, 63, 0, 38, 0, 0, 0, 63,
- 0, 38, 50, 16, 52, 18, 19, 20
+ 8, 8, 43, 24, 73, 49, 41, 84, 35, 103,
+ 63, 104, 75, 50, 58, 52, 54, 8, 43, 58,
+ 39, 66, 60, 43, 67, 70, 57, 60, 86, 99,
+ 96, 71, 77, 97, 50, 52, 28, 32, 39, 24,
+ 95, 9, 14, 67, 70, 49, 82, 102, 82, 50,
+ 71, 52, 98, 50, 52, 76, 8, 78, 14, 0,
+ 79, 90, 94, 24, 92, 41, 61, 105, 41, 62,
+ 82, 74, 64, 65, 0, 24, 100, 101, 41, 87,
+ 69, 72, 91, 71, 0, 93, 50, 52, 66, 57,
+ 0, 100, 101, 85, 90, 92, 32, 14, 71, 69,
+ 72, 0, 24, 55, 16, 56, 18, 19, 20, 2,
+ 0, 4, 38, 57, 39, 66, 81, 5, 75, 6,
+ 66, 81, 40, 55, 16, 56, 18, 19, 20, 2,
+ 0, 4, 38, 0, 39, 0, 0, 5, 0, 6,
+ 0, 0, 40, 36, 16, 37, 18, 19, 20, 0,
+ 0, 0, 38, 0, 39, 88, 16, 89, 18, 19,
+ 20, 0, 40, 0, 0, 0, 39, 51, 16, 53,
+ 18, 19, 20, 0, 40, 0, 0, 0, 39, 15,
+ 16, 17, 18, 19, 20, 2, 40, 4, 0, 0,
+ 0, 0, 0, 5, 0, 6, 31, 55, 16, 56,
+ 18, 19, 20, 2, 0, 4, 66, 0, 39, 0,
+ 0, 5, 0, 6, 36, 16, 56, 18, 19, 20,
+ 2, 0, 4, 66, 0, 39, 0, 0, 5, 0,
+ 6, 15, 16, 17, 18, 19, 20, 2, 0, 4,
+ 0, 0, 0, 0, 0, 5, 27, 6, 15, 16,
+ 17, 18, 19, 20, 2, 0, 4, 0, 0, 0,
+ 0, 0, 5, 0, 6, 51, 16, 17, 18, 19,
+ 20, 2, 1, 4, 0, 0, 2, 3, 4, 5,
+ 0, 6, 0, 1, 5, 0, 6, 2, 0, 4,
+ 0, 0, 0, 0, 0, 5, 0, 6, 36, 16,
+ 37, 18, 19, 20, 0, 0, 0, 66, 0, 39,
+ 88, 16, 89, 18, 19, 20, 103, 0, 104, 66,
+ 0, 39, 0, 0, 0, 66, 0, 39, 51, 16,
+ 53, 18, 19, 20
};
static const yysigned_char yycheck[] =
{
- 8, 38, 8, 5, 6, 20, 21, 0, 1, 15,
- 57, 17, 18, 0, 0, 1, 24, 15, 24, 35,
- 36, 15, 18, 60, 17, 21, 14, 43, 36, 35,
- 36, 17, 12, 80, 15, 72, 13, 39, 54, 55,
- 56, 57, 75, 24, 50, 78, 52, 55, 54, 55,
- 12, 13, 15, 15, 78, 71, 64, 59, 64, 67,
- 62, 67, 55, 100, 80, 44, 12, 13, 47, 55,
- 86, 87, 78, 54, -1, 64, 35, 36, 67, 87,
- 86, 87, 3, -1, 5, 101, 102, 12, 13, 62,
- 98, 99, -1, 14, 102, 54, 55, 3, 4, 5,
+ 0, 1, 8, 3, 39, 15, 8, 60, 0, 3,
+ 15, 5, 15, 15, 24, 17, 18, 17, 24, 29,
+ 14, 12, 24, 29, 36, 37, 13, 29, 63, 82,
+ 77, 37, 44, 80, 36, 37, 5, 6, 14, 39,
+ 75, 0, 1, 55, 56, 55, 58, 15, 60, 51,
+ 56, 53, 80, 55, 56, 43, 56, 45, 17, -1,
+ 48, 67, 74, 63, 70, 67, 18, 102, 70, 21,
+ 82, 40, 20, 21, -1, 75, 88, 89, 80, 65,
+ 36, 37, 67, 89, -1, 70, 88, 89, 12, 13,
+ -1, 103, 104, 62, 100, 101, 65, 56, 104, 55,
+ 56, -1, 102, 3, 4, 5, 6, 7, 8, 9,
+ -1, 11, 12, 13, 14, 12, 13, 17, 15, 19,
+ 12, 13, 22, 3, 4, 5, 6, 7, 8, 9,
+ -1, 11, 12, -1, 14, -1, -1, 17, -1, 19,
+ -1, -1, 22, 3, 4, 5, 6, 7, 8, -1,
+ -1, -1, 12, -1, 14, 3, 4, 5, 6, 7,
+ 8, -1, 22, -1, -1, -1, 14, 3, 4, 5,
+ 6, 7, 8, -1, 22, -1, -1, -1, 14, 3,
+ 4, 5, 6, 7, 8, 9, 22, 11, -1, -1,
+ -1, -1, -1, 17, -1, 19, 20, 3, 4, 5,
6, 7, 8, 9, -1, 11, 12, -1, 14, -1,
- -1, 17, -1, 19, -1, -1, 22, 3, 4, 5,
- 6, 7, 8, -1, -1, -1, 12, -1, 14, 3,
- 4, 5, 6, 7, 8, -1, 22, -1, -1, -1,
- 14, 3, 4, 5, 6, 7, 8, -1, 22, -1,
- -1, -1, 14, 3, 4, 5, 6, 7, 8, 9,
- 22, 11, -1, -1, -1, -1, -1, 17, -1, 19,
- 20, 3, 4, 5, 6, 7, 8, 9, -1, 11,
- 12, -1, 14, -1, -1, 17, -1, 19, 3, 4,
- 5, 6, 7, 8, 9, -1, 11, 12, -1, 14,
+ -1, 17, -1, 19, 3, 4, 5, 6, 7, 8,
+ 9, -1, 11, 12, -1, 14, -1, -1, 17, -1,
+ 19, 3, 4, 5, 6, 7, 8, 9, -1, 11,
+ -1, -1, -1, -1, -1, 17, 18, 19, 3, 4,
+ 5, 6, 7, 8, 9, -1, 11, -1, -1, -1,
-1, -1, 17, -1, 19, 3, 4, 5, 6, 7,
- 8, 9, -1, 11, -1, -1, -1, -1, -1, 17,
- 18, 19, 3, 4, 5, 6, 7, 8, 9, -1,
- 11, -1, -1, -1, -1, -1, 17, -1, 19, 3,
- 4, 5, 6, 7, 8, 9, 5, 11, -1, -1,
- 9, 10, 11, 17, -1, 19, -1, 5, 17, -1,
- 19, 9, -1, 11, -1, -1, -1, -1, -1, 17,
- -1, 19, 3, 4, 5, 6, 7, 8, -1, -1,
- -1, 12, -1, 14, 3, 4, 5, 6, 7, 8,
- 3, -1, 5, 12, -1, 14, -1, -1, -1, 12,
- -1, 14, 3, 4, 5, 6, 7, 8
+ 8, 9, 5, 11, -1, -1, 9, 10, 11, 17,
+ -1, 19, -1, 5, 17, -1, 19, 9, -1, 11,
+ -1, -1, -1, -1, -1, 17, -1, 19, 3, 4,
+ 5, 6, 7, 8, -1, -1, -1, 12, -1, 14,
+ 3, 4, 5, 6, 7, 8, 3, -1, 5, 12,
+ -1, 14, -1, -1, -1, 12, -1, 14, 3, 4,
+ 5, 6, 7, 8
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -514,15 +521,15 @@ static const unsigned char yystos[] =
{
0, 5, 9, 10, 11, 17, 19, 24, 28, 33,
34, 38, 40, 46, 33, 3, 4, 5, 6, 7,
- 8, 25, 26, 27, 28, 32, 33, 18, 25, 39,
- 20, 25, 45, 47, 0, 3, 5, 12, 14, 22,
- 32, 35, 36, 37, 41, 42, 43, 44, 26, 32,
- 3, 32, 5, 32, 3, 5, 26, 32, 18, 21,
- 15, 20, 21, 12, 30, 36, 41, 30, 36, 41,
- 27, 25, 15, 13, 29, 30, 29, 29, 30, 13,
- 30, 31, 31, 25, 27, 45, 3, 5, 36, 44,
- 36, 44, 30, 27, 35, 35, 43, 31, 30, 30,
- 15, 3, 5, 27
+ 8, 25, 26, 27, 28, 32, 33, 18, 25, 28,
+ 39, 20, 25, 45, 47, 0, 3, 5, 12, 14,
+ 22, 32, 35, 36, 37, 41, 42, 43, 44, 26,
+ 32, 3, 32, 5, 32, 3, 5, 13, 26, 29,
+ 32, 18, 21, 15, 20, 21, 12, 30, 36, 41,
+ 30, 36, 41, 27, 25, 15, 29, 30, 29, 29,
+ 30, 13, 30, 31, 31, 25, 27, 45, 3, 5,
+ 36, 44, 36, 44, 30, 27, 35, 35, 43, 31,
+ 30, 30, 15, 3, 5, 27
};
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -1139,16 +1146,32 @@ yyreduce:
}
break;
- case 19:
-#line 121 "gram.y"
+ case 13:
+#line 97 "gram.y"
+ {
+ SyckNode *n = syck_new_str( "" );
+ if ( ((SyckParser *)parser)->taguri_expansion == 1 )
+ {
+ n->type_id = syck_taguri( YAML_DOMAIN, "null", 4 );
+ }
+ else
+ {
+ n->type_id = syck_strndup( "null", 4 );
+ }
+ yyval.nodeData = n;
+ }
+ break;
+
+ case 20:
+#line 134 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 20:
-#line 126 "gram.y"
+ case 21:
+#line 139 "gram.y"
{
if ( ((SyckParser *)parser)->implicit_typing == 1 )
{
@@ -1158,26 +1181,26 @@ yyreduce:
}
break;
- case 21:
-#line 134 "gram.y"
+ case 22:
+#line 147 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
- case 22:
-#line 138 "gram.y"
+ case 23:
+#line 151 "gram.y"
{
/*
* _Aliases_: The anchor symbol table is scanned for the anchor name.
* The anchor's ID in the language's symbol table is returned.
*/
- yyval.nodeData = syck_hdlr_add_alias( (SyckParser *)parser, yyvsp[0].name );
+ yyval.nodeData = syck_hdlr_get_anchor( (SyckParser *)parser, yyvsp[0].name );
}
break;
- case 23:
-#line 146 "gram.y"
+ case 24:
+#line 159 "gram.y"
{
SyckNode *n = yyvsp[0].nodeData;
if ( ((SyckParser *)parser)->taguri_expansion == 1 )
@@ -1192,157 +1215,157 @@ yyreduce:
}
break;
- case 25:
-#line 166 "gram.y"
+ case 26:
+#line 179 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 31:
-#line 181 "gram.y"
+ case 32:
+#line 194 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 32:
-#line 187 "gram.y"
+ case 33:
+#line 200 "gram.y"
{
yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
}
break;
- case 34:
-#line 194 "gram.y"
+ case 35:
+#line 207 "gram.y"
{
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 35:
-#line 199 "gram.y"
+ case 36:
+#line 212 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 36:
-#line 204 "gram.y"
+ case 37:
+#line 217 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
}
break;
- case 37:
-#line 208 "gram.y"
+ case 38:
+#line 221 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
- case 38:
-#line 214 "gram.y"
+ case 39:
+#line 227 "gram.y"
{
yyval.nodeData = syck_new_seq( yyvsp[0].nodeId );
}
break;
- case 39:
-#line 218 "gram.y"
+ case 40:
+#line 231 "gram.y"
{
syck_seq_add( yyvsp[-2].nodeData, yyvsp[0].nodeId );
yyval.nodeData = yyvsp[-2].nodeData;
}
break;
- case 40:
-#line 223 "gram.y"
+ case 41:
+#line 236 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 41:
-#line 232 "gram.y"
+ case 42:
+#line 245 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 42:
-#line 236 "gram.y"
+ case 43:
+#line 249 "gram.y"
{
yyval.nodeData = syck_alloc_seq();
}
break;
- case 43:
-#line 242 "gram.y"
+ case 44:
+#line 255 "gram.y"
{
yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
}
break;
- case 44:
-#line 246 "gram.y"
+ case 45:
+#line 259 "gram.y"
{
syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
yyval.nodeData = yyvsp[-2].nodeData;
}
break;
- case 45:
-#line 256 "gram.y"
+ case 46:
+#line 269 "gram.y"
{
apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 46:
-#line 261 "gram.y"
+ case 47:
+#line 274 "gram.y"
{
apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 47:
-#line 268 "gram.y"
+ case 48:
+#line 281 "gram.y"
{
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 48:
-#line 273 "gram.y"
+ case 49:
+#line 286 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 49:
-#line 278 "gram.y"
+ case 50:
+#line 291 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
}
break;
- case 50:
-#line 282 "gram.y"
+ case 51:
+#line 295 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
- case 51:
-#line 288 "gram.y"
+ case 52:
+#line 301 "gram.y"
{
yyval.nodeData = syck_new_map(
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
@@ -1350,8 +1373,8 @@ yyreduce:
}
break;
- case 53:
-#line 304 "gram.y"
+ case 54:
+#line 317 "gram.y"
{
yyval.nodeData = syck_new_map(
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-3].nodeData ),
@@ -1359,8 +1382,8 @@ yyreduce:
}
break;
- case 55:
-#line 313 "gram.y"
+ case 56:
+#line 326 "gram.y"
{
if ( yyvsp[-2].nodeData->shortcut == NULL )
{
@@ -1374,8 +1397,8 @@ yyreduce:
}
break;
- case 56:
-#line 325 "gram.y"
+ case 57:
+#line 338 "gram.y"
{
apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );
syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
@@ -1384,15 +1407,15 @@ yyreduce:
}
break;
- case 57:
-#line 332 "gram.y"
+ case 58:
+#line 345 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 58:
-#line 341 "gram.y"
+ case 59:
+#line 354 "gram.y"
{
yyval.nodeData = syck_new_map(
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
@@ -1400,22 +1423,22 @@ yyreduce:
}
break;
- case 59:
-#line 349 "gram.y"
+ case 60:
+#line 362 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 60:
-#line 353 "gram.y"
+ case 61:
+#line 366 "gram.y"
{
yyval.nodeData = syck_alloc_map();
}
break;
- case 62:
-#line 360 "gram.y"
+ case 63:
+#line 373 "gram.y"
{
syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
syck_free_node( yyvsp[0].nodeData );
@@ -1427,7 +1450,7 @@ yyreduce:
}
/* Line 1016 of /usr/local/share/bison/yacc.c. */
-#line 1431 "y.tab.c"
+#line 1454 "y.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1646,7 +1669,7 @@ yyreturn:
}
-#line 367 "gram.y"
+#line 380 "gram.y"
void
diff --git a/ext/syck/handler.c b/ext/syck/handler.c
index d5a4895..aba6a62 100644
--- a/ext/syck/handler.c
+++ b/ext/syck/handler.c
@@ -31,6 +31,18 @@ SyckNode *
syck_hdlr_add_anchor( SyckParser *p, char *a, SyckNode *n )
{
n->anchor = a;
+ if ( p->bad_anchors != NULL )
+ {
+ SyckNode *bad;
+ if ( st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&bad ) )
+ {
+ if ( n->kind != syck_str_kind )
+ {
+ n->id = bad->id;
+ (p->handler)( p, n );
+ }
+ }
+ }
if ( p->anchors == NULL )
{
p->anchors = st_init_strtable();
@@ -39,23 +51,50 @@ syck_hdlr_add_anchor( SyckParser *p, char *a, SyckNode *n )
return n;
}
+void
+syck_hdlr_remove_anchor( SyckParser *p, char *a )
+{
+ if ( p->anchors == NULL )
+ {
+ p->anchors = st_init_strtable();
+ }
+ st_insert( p->anchors, (st_data_t)a, (st_data_t)1 );
+}
+
SyckNode *
-syck_hdlr_add_alias( SyckParser *p, char *a )
+syck_hdlr_get_anchor( SyckParser *p, char *a )
{
- SyckNode *n;
+ SyckNode *n = NULL;
if ( p->anchors != NULL )
{
- if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&n ) )
- {
- return n;
- }
+ if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&n ) )
+ {
+ if ( n != (void *)1 )
+ {
+ return n;
+ }
+ else
+ {
+ if ( p->bad_anchors == NULL )
+ {
+ p->bad_anchors = st_init_strtable();
+ }
+ if ( ! st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&n ) )
+ {
+ n = (p->bad_anchor_handler)( p, a );
+ st_insert( p->bad_anchors, (st_data_t)a, (st_data_t)n );
+ }
+ }
+ }
}
- //
- // FIXME: Return an InvalidAnchor object
- //
- return syck_new_str( "..." );
+ if ( n == NULL )
+ {
+ n = (p->bad_anchor_handler)( p, a );
+ }
+ n->anchor = a;
+ return n;
}
void
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index c260009..98f1bfb 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -12,12 +12,23 @@
#include <sys/types.h>
#include <time.h>
+typedef struct RVALUE {
+ union {
+ struct RBasic basic;
+ struct RObject object;
+ struct RClass klass;
+ struct RArray array;
+ struct RHash hash;
+ struct RStruct rstruct;
+ } as;
+} RVALUE;
+
#define RUBY_DOMAIN "ruby.yaml.org,2002"
-static ID s_utc, s_at, s_to_f, s_read, s_binmode;
+static ID s_new, s_utc, s_at, s_to_f, s_read, s_binmode, s_call, s_transfer;
static VALUE sym_model, sym_generic;
static VALUE sym_scalar, sym_seq, sym_map;
-VALUE cParser, cLoader, cNode, oDefaultLoader;
+VALUE cDate, cParser, cLoader, cNode, cPrivateType, cDomainType, cBadAlias, oDefaultLoader;
/*
* my private collection of numerical oddities.
@@ -32,6 +43,7 @@ static VALUE syck_node_transform( VALUE );
SYMID rb_syck_parse_handler _((SyckParser *, SyckNode *));
SYMID rb_syck_load_handler _((SyckParser *, SyckNode *));
void rb_syck_err_handler _((SyckParser *, char *));
+SyckNode * rb_syck_bad_anchor_handler _((SyckParser *, char *));
struct parser_xtra {
VALUE data; // Borrowed this idea from marshal.c to fix [ruby-dev:8067] problem
@@ -249,7 +261,7 @@ rb_syck_parse_handler(p, n)
bonus = (struct parser_xtra *)p->bonus;
if ( bonus->proc != 0 )
{
- rb_funcall(bonus->proc, rb_intern("call"), 1, v);
+ rb_funcall(bonus->proc, s_call, 1, v);
}
rb_iv_set(obj, "@value", v);
@@ -333,9 +345,28 @@ rb_syck_load_handler(p, n)
}
else if ( strcmp( n->type_id, "timestamp#ymd" ) == 0 )
{
- S_REALLOC_N( n->data.str->ptr, char, 22 );
- strcat( n->data.str->ptr, "t00:00:00Z" );
- obj = rb_syck_mktime( n->data.str->ptr );
+ char *ptr = n->data.str->ptr;
+ VALUE year, mon, day;
+
+ // Year
+ ptr[4] = '\0';
+ year = INT2FIX(strtol(ptr, NULL, 10));
+
+ // Month
+ ptr += 4;
+ while ( !isdigit( *ptr ) ) ptr++;
+ mon = INT2FIX(strtol(ptr, NULL, 10));
+
+ // Day
+ ptr += 2;
+ while ( !isdigit( *ptr ) ) ptr++;
+ day = INT2FIX(strtol(ptr, NULL, 10));
+
+ obj = rb_funcall( cDate, s_new, 3, year, mon, day );
+
+ // S_REALLOC_N( n->data.str->ptr, char, 22 );
+ // strcat( n->data.str->ptr, "t00:00:00Z" );
+ // obj = rb_syck_mktime( n->data.str->ptr );
}
else if ( strncmp( n->type_id, "timestamp", 9 ) == 0 )
{
@@ -367,15 +398,25 @@ rb_syck_load_handler(p, n)
break;
}
+ //
+ // ID already set, let's alter the symbol table to accept the new object
+ //
+ if (n->id > 0)
+ {
+ MEMCPY((void *)n->id, (void *)obj, RVALUE, 1);
+ MEMZERO((void *)obj, RVALUE, 1);
+ obj = n->id;
+ }
+
bonus = (struct parser_xtra *)p->bonus;
if ( bonus->proc != 0 )
{
- rb_funcall(bonus->proc, rb_intern("call"), 1, obj);
+ rb_funcall(bonus->proc, s_call, 1, obj);
}
if ( check_transfers == 1 && n->type_id != NULL )
{
- obj = rb_funcall( oDefaultLoader, rb_intern( "transfer" ), 2, rb_str_new2( n->type_id ), obj );
+ obj = rb_funcall( oDefaultLoader, s_transfer, 2, rb_str_new2( n->type_id ), obj );
}
rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj);
@@ -403,6 +444,16 @@ rb_syck_err_handler(p, msg)
p->lineptr);
}
+SyckNode *
+rb_syck_bad_anchor_handler(p, a)
+ SyckParser *p;
+ char *a;
+{
+ SyckNode *badanc = syck_new_map( rb_str_new2( "name" ), rb_str_new2( a ) );
+ badanc->type_id = syck_strndup( "taguri:ruby.yaml.org,2002:object:YAML::Syck::BadAlias", 53 );
+ return badanc;
+}
+
/*
* data loaded based on the model requested.
*/
@@ -414,17 +465,17 @@ syck_set_model( parser, model )
if ( model == sym_generic )
{
syck_parser_handler( parser, rb_syck_parse_handler );
- syck_parser_error_handler( parser, rb_syck_err_handler );
syck_parser_implicit_typing( parser, 1 );
syck_parser_taguri_expansion( parser, 1 );
}
else
{
syck_parser_handler( parser, rb_syck_load_handler );
- syck_parser_error_handler( parser, rb_syck_err_handler );
syck_parser_implicit_typing( parser, 1 );
syck_parser_taguri_expansion( parser, 0 );
}
+ syck_parser_error_handler( parser, rb_syck_err_handler );
+ syck_parser_bad_anchor_handler( parser, rb_syck_bad_anchor_handler );
}
/*
@@ -561,7 +612,7 @@ syck_parser_load_documents(argc, argv, self)
}
/* Pass document to block */
- rb_funcall( proc, rb_intern("call"), 1, v );
+ rb_funcall( proc, s_call, 1, v );
}
return Qnil;
@@ -732,7 +783,7 @@ syck_loader_transfer( self, type, val )
if ( taguri != NULL )
{
- VALUE scheme, name, type_hash, type_proc;
+ VALUE scheme, domain, name, type_hash, type_proc = Qnil;
VALUE type_uri = rb_str_new2( taguri );
VALUE str_taguri = rb_str_new2("taguri");
VALUE str_xprivate = rb_str_new2("x-private");
@@ -748,7 +799,7 @@ syck_loader_transfer( self, type, val )
}
else if ( rb_str_cmp( scheme, str_taguri ) == 0 )
{
- VALUE domain = rb_ary_shift( parts );
+ domain = rb_ary_shift( parts );
name = rb_ary_join( parts, rb_str_new2( ":" ) );
type_hash = rb_iv_get(self, "@families");
type_hash = rb_hash_aref(type_hash, domain);
@@ -773,9 +824,17 @@ syck_loader_transfer( self, type, val )
// rb_funcall(rb_mKernel, rb_intern("p"), 2, name, type_proc);
}
- if ( rb_respond_to( type_proc, rb_intern("call") ) )
+ if ( rb_respond_to( type_proc, s_call ) )
{
- val = rb_funcall(type_proc, rb_intern("call"), 2, type_uri, val);
+ val = rb_funcall(type_proc, s_call, 2, type_uri, val);
+ }
+ else if ( rb_str_cmp( scheme, str_xprivate ) == 0 )
+ {
+ val = rb_funcall(cPrivateType, s_new, 2, name, val);
+ }
+ else
+ {
+ val = rb_funcall(cDomainType, s_new, 3, domain, name, val);
}
}
@@ -783,6 +842,42 @@ syck_loader_transfer( self, type, val )
}
/*
+ * YAML::Syck::BadAlias.initialize
+ */
+VALUE
+syck_badalias_initialize( self, val )
+ VALUE self, val;
+{
+ rb_iv_set( self, "@name", val );
+ return self;
+}
+
+/*
+ * YAML::Syck::DomainType.initialize
+ */
+VALUE
+syck_domaintype_initialize( self, domain, type_id, val )
+ VALUE self, type_id, val;
+{
+ rb_iv_set( self, "@domain", domain );
+ rb_iv_set( self, "@type_id", type_id );
+ rb_iv_set( self, "@value", val );
+ return self;
+}
+
+/*
+ * YAML::Syck::PrivateType.initialize
+ */
+VALUE
+syck_privatetype_initialize( self, type_id, val )
+ VALUE self, type_id, val;
+{
+ rb_iv_set( self, "@type_id", type_id );
+ rb_iv_set( self, "@value", val );
+ return self;
+}
+
+/*
* YAML::Syck::Node.initialize
*/
VALUE
@@ -838,7 +933,7 @@ syck_node_transform( self )
{
t = val;
}
- return rb_funcall( oDefaultLoader, rb_intern( "transfer" ), 2, type_id, t );
+ return rb_funcall( oDefaultLoader, s_transfer, 2, type_id, t );
}
/*
@@ -854,17 +949,26 @@ Init_syck()
//
// Global symbols
//
+ s_new = rb_intern("new");
s_utc = rb_intern("utc");
s_at = rb_intern("at");
s_to_f = rb_intern("to_f");
s_read = rb_intern("read");
s_binmode = rb_intern("binmode");
+ s_transfer = rb_intern("transfer");
+ s_call = rb_intern("call");
sym_model = ID2SYM(rb_intern("Model"));
sym_generic = ID2SYM(rb_intern("Generic"));
sym_map = ID2SYM(rb_intern("map"));
sym_scalar = ID2SYM(rb_intern("scalar"));
sym_seq = ID2SYM(rb_intern("seq"));
+ //
+ // Load Date module
+ //
+ rb_require( "date" );
+ cDate = rb_funcall( rb_cObject, rb_intern("const_get"), 1, rb_str_new2("Date") );
+
//
// Define YAML::Syck::Loader class
//
@@ -902,5 +1006,29 @@ Init_syck()
rb_define_attr( cNode, "anchor", 1, 1 );
rb_define_method( cNode, "initialize", syck_node_initialize, 2);
rb_define_method( cNode, "transform", syck_node_transform, 0);
+
+ //
+ // Define YAML::Syck::PrivateType class
+ //
+ cPrivateType = rb_define_class_under( rb_syck, "PrivateType", rb_cObject );
+ rb_define_attr( cPrivateType, "type_id", 1, 1 );
+ rb_define_attr( cPrivateType, "value", 1, 1 );
+ rb_define_method( cPrivateType, "initialize", syck_privatetype_initialize, 2);
+
+ //
+ // Define YAML::Syck::DomainType class
+ //
+ cDomainType = rb_define_class_under( rb_syck, "DomainType", rb_cObject );
+ rb_define_attr( cDomainType, "domain", 1, 1 );
+ rb_define_attr( cDomainType, "type_id", 1, 1 );
+ rb_define_attr( cDomainType, "value", 1, 1 );
+ rb_define_method( cDomainType, "initialize", syck_domaintype_initialize, 3);
+
+ //
+ // Define YAML::Syck::BadAlias class
+ //
+ cBadAlias = rb_define_class_under( rb_syck, "BadAlias", rb_cObject );
+ rb_define_attr( cBadAlias, "name", 1, 1 );
+ rb_define_method( cBadAlias, "initialize", syck_badalias_initialize, 1);
}
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index 18623ff..d227a36 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -170,6 +170,7 @@ syck_new_parser()
p->io.str = NULL;
p->syms = NULL;
p->anchors = NULL;
+ p->bad_anchors = NULL;
p->implicit_typing = 1;
p->taguri_expansion = 0;
p->bufsize = SYCK_BUFFERSIZE;
@@ -219,7 +220,7 @@ syck_st_free( SyckParser *p )
}
//
- // Free the anchor table
+ // Free the anchor tables
//
if ( p->anchors != NULL )
{
@@ -227,6 +228,13 @@ syck_st_free( SyckParser *p )
st_free_table( p->anchors );
p->anchors = NULL;
}
+
+ if ( p->bad_anchors != NULL )
+ {
+ st_foreach( p->bad_anchors, syck_st_free_nodes, 0 );
+ st_free_table( p->bad_anchors );
+ p->bad_anchors = NULL;
+ }
}
void
@@ -278,6 +286,13 @@ syck_parser_error_handler( SyckParser *p, SyckErrorHandler hdlr )
}
void
+syck_parser_bad_anchor_handler( SyckParser *p, SyckBadAnchorHandler hdlr )
+{
+ ASSERT( p != NULL );
+ p->bad_anchor_handler = hdlr;
+}
+
+void
syck_parser_file( SyckParser *p, FILE *fp, SyckIoFileRead read )
{
ASSERT( p != NULL );
diff --git a/ext/syck/syck.h b/ext/syck/syck.h
index f4512cf..ef9c054 100644
--- a/ext/syck/syck.h
+++ b/ext/syck/syck.h
@@ -121,6 +121,7 @@ struct _syck_node {
*/
typedef SYMID (*SyckNodeHandler)(SyckParser *, SyckNode *);
typedef void (*SyckErrorHandler)(SyckParser *, char *);
+typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *, char *);
typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long);
typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
@@ -150,6 +151,8 @@ struct _syck_parser {
SyckNodeHandler handler;
// Error handler
SyckErrorHandler error_handler;
+ // InvalidAnchor handler
+ SyckBadAnchorHandler bad_anchor_handler;
// IO type
enum syck_io_type io_type;
// Custom buffer size
@@ -174,8 +177,8 @@ struct _syck_parser {
SyckIoStrRead read;
} *str;
} io;
- // Symbol table
- st_table *anchors;
+ // Symbol table for anchors
+ st_table *anchors, *bad_anchors;
// Optional symbol table for SYMIDs
st_table *syms;
// Levels of indentation
@@ -194,7 +197,8 @@ struct _syck_parser {
*/
SYMID syck_hdlr_add_node( SyckParser *, SyckNode * );
SyckNode *syck_hdlr_add_anchor( SyckParser *, char *, SyckNode * );
-SyckNode *syck_hdlr_add_alias( SyckParser *, char * );
+void syck_hdlr_remove_anchor( SyckParser *, char * );
+SyckNode *syck_hdlr_get_anchor( SyckParser *, char * );
void syck_add_transfer( char *, SyckNode *, int );
char *syck_xprivate( char *, int );
char *syck_taguri( char *, char *, int );
@@ -218,6 +222,7 @@ void syck_parser_implicit_typing( SyckParser *, int );
void syck_parser_taguri_expansion( SyckParser *, int );
void syck_parser_handler( SyckParser *, SyckNodeHandler );
void syck_parser_error_handler( SyckParser *, SyckErrorHandler );
+void syck_parser_bad_anchor_handler( SyckParser *, SyckBadAnchorHandler );
void syck_parser_file( SyckParser *, FILE *, SyckIoFileRead );
void syck_parser_str( SyckParser *, char *, long, SyckIoStrRead );
void syck_parser_str_auto( SyckParser *, char *, SyckIoStrRead );
diff --git a/ext/syck/token.c b/ext/syck/token.c
index 8176899..2051ca2 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Mon Jun 9 18:21:18 2003 */
+/* Generated by re2c 0.5 on Sun Jun 15 16:14:26 2003 */
#line 1 "token.re"
/*
* token.re
@@ -247,89 +247,136 @@ yy0:
if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy6;
- case '\n': goto yy8;
- case '\r': goto yy10;
- case '#': goto yy4;
+ case '\000': goto yy7;
+ case '\n': goto yy9;
+ case '\r': goto yy11;
+ case '#': goto yy5;
case '-': goto yy2;
- default: goto yy11;
+ case '.': goto yy4;
+ default: goto yy12;
}
yy2: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '-': goto yy16;
+ case '-': goto yy24;
default: goto yy3;
}
yy3:
-#line 287
+#line 301
{ YYPOS(0);
goto Document;
}
-yy4: yych = *++YYCURSOR;
-yy5:
-#line 272
+yy4: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch(yych){
+ case '.': goto yy17;
+ default: goto yy3;
+ }
+yy5: yych = *++YYCURSOR;
+yy6:
+#line 286
{ eat_comments( parser );
goto Header;
}
-yy6: yych = *++YYCURSOR;
-yy7:
-#line 276
+yy7: yych = *++YYCURSOR;
+yy8:
+#line 290
{ SyckLevel *lvl = CURRENT_LEVEL();
ENSURE_IEND(lvl, -1);
YYPOS(0);
return 0;
}
-yy8: yyaccept = 1;
+yy9: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy13;
-yy9:
-#line 282
+ goto yy14;
+yy10:
+#line 296
{ int indt_len;
GOBBLE_UP_INDENT( indt_len, YYTOKEN );
goto Header;
}
-yy10: yych = *++YYCURSOR;
+yy11: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy12;
+ case '\n': goto yy13;
default: goto yy3;
}
-yy11: yych = *++YYCURSOR;
+yy12: yych = *++YYCURSOR;
goto yy3;
-yy12: yyaccept = 1;
+yy13: yyaccept = 1;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy13: switch(yych){
- case '\n': case ' ': goto yy12;
- case '\r': goto yy14;
- default: goto yy9;
+yy14: switch(yych){
+ case '\n': case ' ': goto yy13;
+ case '\r': goto yy15;
+ default: goto yy10;
}
-yy14: ++YYCURSOR;
+yy15: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy12;
- default: goto yy15;
+ case '\n': goto yy13;
+ default: goto yy16;
}
-yy15: YYCURSOR = YYMARKER;
+yy16: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 1: goto yy9;
+ case 1: goto yy10;
case 0: goto yy3;
}
-yy16: yych = *++YYCURSOR;
- switch(yych){
- case '-': goto yy17;
- default: goto yy15;
- }
yy17: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy18;
- case '\r': goto yy22;
- case ' ': goto yy20;
- default: goto yy15;
+ case '.': goto yy18;
+ default: goto yy16;
}
yy18: yych = *++YYCURSOR;
-yy19:
+ switch(yych){
+ case '\n': goto yy19;
+ case '\r': goto yy23;
+ case ' ': goto yy21;
+ default: goto yy16;
+ }
+yy19: yych = *++YYCURSOR;
+yy20:
+#line 272
+ { SyckLevel *lvl = CURRENT_LEVEL();
+ if ( lvl->status == syck_lvl_header )
+ {
+ goto Header;
+ }
+ else
+ {
+ ENSURE_IEND(lvl, -1);
+ YYPOS(0);
+ return 0;
+ }
+ return 0;
+ }
+yy21: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+yy22: switch(yych){
+ case ' ': goto yy21;
+ default: goto yy20;
+ }
+yy23: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy19;
+ default: goto yy16;
+ }
+yy24: yych = *++YYCURSOR;
+ switch(yych){
+ case '-': goto yy25;
+ default: goto yy16;
+ }
+yy25: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy26;
+ case '\r': goto yy30;
+ case ' ': goto yy28;
+ default: goto yy16;
+ }
+yy26: yych = *++YYCURSOR;
+yy27:
#line 258
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
@@ -344,20 +391,20 @@ yy19:
return 0;
}
}
-yy20: ++YYCURSOR;
+yy28: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy21: switch(yych){
- case ' ': goto yy20;
- default: goto yy19;
+yy29: switch(yych){
+ case ' ': goto yy28;
+ default: goto yy27;
}
-yy22: yych = *++YYCURSOR;
+yy30: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy18;
- default: goto yy15;
+ case '\n': goto yy26;
+ default: goto yy16;
}
}
-#line 291
+#line 305
Document:
@@ -373,34 +420,34 @@ Document:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy23;
-yy24: ++YYCURSOR;
-yy23:
+ goto yy31;
+yy32: ++YYCURSOR;
+yy31:
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy48;
- case '\n': goto yy25;
- case '\r': goto yy27;
- case ' ': goto yy46;
- case '!': goto yy37;
- case '"': goto yy41;
- case '#': goto yy44;
- case '&': goto yy35;
- case '\'': goto yy39;
- case '*': goto yy36;
- case ',': case ':': goto yy33;
- case '-': case '?': goto yy34;
- case '>': case '|': goto yy43;
- case '[': case '{': goto yy29;
- case ']': case '}': goto yy31;
- default: goto yy50;
- }
-yy25: yyaccept = 0;
+ case '\000': goto yy56;
+ case '\n': goto yy33;
+ case '\r': goto yy35;
+ case ' ': goto yy54;
+ case '!': goto yy45;
+ case '"': goto yy49;
+ case '#': goto yy52;
+ case '&': goto yy43;
+ case '\'': goto yy47;
+ case '*': goto yy44;
+ case ',': case ':': goto yy41;
+ case '-': case '?': goto yy42;
+ case '>': case '|': goto yy51;
+ case '[': case '{': goto yy37;
+ case ']': case '}': goto yy39;
+ default: goto yy58;
+ }
+yy33: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy78;
-yy26:
-#line 305
+ goto yy86;
+yy34:
+#line 319
{ // Isolate spaces
int indt_len;
GOBBLE_UP_INDENT( indt_len, YYTOKEN );
@@ -415,47 +462,47 @@ yy26:
}
return INDENT;
}
-yy27: yych = *++YYCURSOR;
+yy35: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy77;
- default: goto yy28;
+ case '\n': goto yy85;
+ default: goto yy36;
}
-yy28:
-#line 385
+yy36:
+#line 406
{ ENSURE_IOPEN(lvl, 0, 1);
goto Plain;
}
-yy29: yych = *++YYCURSOR;
-yy30:
-#line 320
+yy37: yych = *++YYCURSOR;
+yy38:
+#line 334
{ ENSURE_IOPEN(lvl, 0, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_inline);
return YYTOKEN[0];
}
-yy31: yych = *++YYCURSOR;
-yy32:
-#line 326
+yy39: yych = *++YYCURSOR;
+yy40:
+#line 340
{ POP_LEVEL();
return YYTOKEN[0];
}
-yy33: yyaccept = 1;
+yy41: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy72;
- case '\r': goto yy76;
- case ' ': goto yy74;
- default: goto yy28;
+ case '\n': goto yy80;
+ case '\r': goto yy84;
+ case ' ': goto yy82;
+ default: goto yy36;
}
-yy34: yyaccept = 1;
+yy42: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy67;
- case '\r': goto yy71;
- case ' ': goto yy69;
- default: goto yy28;
+ case '\n': goto yy75;
+ case '\r': goto yy79;
+ case ' ': goto yy77;
+ default: goto yy36;
}
-yy35: yych = *++YYCURSOR;
+yy43: yych = *++YYCURSOR;
switch(yych){
case '-': case '0':
case '1':
@@ -516,10 +563,10 @@ yy35: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy64;
- default: goto yy28;
+ case 'z': goto yy72;
+ default: goto yy36;
}
-yy36: yych = *++YYCURSOR;
+yy44: yych = *++YYCURSOR;
switch(yych){
case '-': case '0':
case '1':
@@ -580,30 +627,30 @@ yy36: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy61;
- default: goto yy28;
+ case 'z': goto yy69;
+ default: goto yy36;
}
-yy37: yych = *++YYCURSOR;
-yy38:
-#line 358
+yy45: yych = *++YYCURSOR;
+yy46:
+#line 379
{ ENSURE_IOPEN(lvl, 0, 1);
goto TransferMethod; }
-yy39: yych = *++YYCURSOR;
-yy40:
-#line 361
+yy47: yych = *++YYCURSOR;
+yy48:
+#line 382
{ ENSURE_IOPEN(lvl, 0, 1);
goto SingleQuote; }
-yy41: yych = *++YYCURSOR;
-yy42:
-#line 364
+yy49: yych = *++YYCURSOR;
+yy50:
+#line 385
{ ENSURE_IOPEN(lvl, 0, 1);
goto DoubleQuote; }
-yy43: yyaccept = 1;
+yy51: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy56;
- case '\r': goto yy60;
- case ' ': goto yy58;
+ case '\n': goto yy64;
+ case '\r': goto yy68;
+ case ' ': goto yy66;
case '+': case '-': case '0':
case '1':
case '2':
@@ -613,43 +660,43 @@ yy43: yyaccept = 1;
case '6':
case '7':
case '8':
- case '9': goto yy53;
- default: goto yy28;
+ case '9': goto yy61;
+ default: goto yy36;
}
-yy44: yych = *++YYCURSOR;
-yy45:
-#line 374
+yy52: yych = *++YYCURSOR;
+yy53:
+#line 395
{ eat_comments( parser );
goto Document;
}
-yy46: yych = *++YYCURSOR;
- goto yy52;
-yy47:
-#line 378
+yy54: yych = *++YYCURSOR;
+ goto yy60;
+yy55:
+#line 399
{ goto Document; }
-yy48: yych = *++YYCURSOR;
-yy49:
-#line 380
+yy56: yych = *++YYCURSOR;
+yy57:
+#line 401
{ ENSURE_IEND(lvl, -1);
YYPOS(0);
return 0;
}
-yy50: yych = *++YYCURSOR;
- goto yy28;
-yy51: ++YYCURSOR;
+yy58: yych = *++YYCURSOR;
+ goto yy36;
+yy59: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy52: switch(yych){
- case ' ': goto yy51;
- default: goto yy47;
+yy60: switch(yych){
+ case ' ': goto yy59;
+ default: goto yy55;
}
-yy53: ++YYCURSOR;
+yy61: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy54: switch(yych){
- case '\n': goto yy56;
- case '\r': goto yy60;
- case ' ': goto yy58;
+yy62: switch(yych){
+ case '\n': goto yy64;
+ case '\r': goto yy68;
+ case ' ': goto yy66;
case '+': case '-': case '0':
case '1':
case '2':
@@ -659,39 +706,39 @@ yy54: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy53;
- default: goto yy55;
+ case '9': goto yy61;
+ default: goto yy63;
}
-yy55: YYCURSOR = YYMARKER;
+yy63: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy26;
- case 1: goto yy28;
+ case 0: goto yy34;
+ case 1: goto yy36;
}
-yy56: yych = *++YYCURSOR;
-yy57:
-#line 367
+yy64: yych = *++YYCURSOR;
+yy65:
+#line 388
{ if ( is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
}
goto ScalarBlock;
}
-yy58: ++YYCURSOR;
+yy66: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy59: switch(yych){
- case ' ': goto yy58;
- default: goto yy57;
+yy67: switch(yych){
+ case ' ': goto yy66;
+ default: goto yy65;
}
-yy60: yych = *++YYCURSOR;
+yy68: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy56;
- default: goto yy55;
+ case '\n': goto yy64;
+ default: goto yy63;
}
-yy61: ++YYCURSOR;
+yy69: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy62: switch(yych){
+yy70: switch(yych){
case '-': case '0':
case '1':
case '2':
@@ -751,19 +798,19 @@ yy62: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy61;
- default: goto yy63;
+ case 'z': goto yy69;
+ default: goto yy71;
}
-yy63:
-#line 353
+yy71:
+#line 374
{ ENSURE_IOPEN(lvl, 0, 1);
yylval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
return ALIAS;
}
-yy64: ++YYCURSOR;
+yy72: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy65: switch(yych){
+yy73: switch(yych){
case '-': case '0':
case '1':
case '2':
@@ -823,18 +870,25 @@ yy65: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy64;
- default: goto yy66;
+ case 'z': goto yy72;
+ default: goto yy74;
}
-yy66:
-#line 348
+yy74:
+#line 362
{ ENSURE_IOPEN(lvl, 0, 1);
yylval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
+
+ //
+ // Remove previous anchors of the same name. Since the parser will likely
+ // construct deeper nodes first, we want those nodes to be placed in the
+ // queue for matching at a higher level of indentation.
+ //
+ syck_hdlr_remove_anchor(parser, yylval->name);
return ANCHOR;
}
-yy67: yych = *++YYCURSOR;
-yy68:
-#line 334
+yy75: yych = *++YYCURSOR;
+yy76:
+#line 348
{ ENSURE_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
FORCE_NEXT_TOKEN(IOPEN);
if ( is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
@@ -848,54 +902,54 @@ yy68:
}
return YYTOKEN[0];
}
-yy69: ++YYCURSOR;
+yy77: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy70: switch(yych){
- case ' ': goto yy69;
- default: goto yy68;
+yy78: switch(yych){
+ case ' ': goto yy77;
+ default: goto yy76;
}
-yy71: yych = *++YYCURSOR;
+yy79: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy67;
- default: goto yy55;
+ case '\n': goto yy75;
+ default: goto yy63;
}
-yy72: yych = *++YYCURSOR;
-yy73:
-#line 330
+yy80: yych = *++YYCURSOR;
+yy81:
+#line 344
{ YYPOS(1);
return YYTOKEN[0];
}
-yy74: ++YYCURSOR;
+yy82: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy75: switch(yych){
- case ' ': goto yy74;
- default: goto yy73;
+yy83: switch(yych){
+ case ' ': goto yy82;
+ default: goto yy81;
}
-yy76: yych = *++YYCURSOR;
+yy84: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy72;
- default: goto yy55;
+ case '\n': goto yy80;
+ default: goto yy63;
}
-yy77: yyaccept = 0;
+yy85: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy78: switch(yych){
- case '\n': case ' ': goto yy77;
- case '\r': goto yy79;
- default: goto yy26;
+yy86: switch(yych){
+ case '\n': case ' ': goto yy85;
+ case '\r': goto yy87;
+ default: goto yy34;
}
-yy79: ++YYCURSOR;
+yy87: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy77;
- default: goto yy55;
+ case '\n': goto yy85;
+ default: goto yy63;
}
}
-#line 389
+#line 410
}
@@ -906,22 +960,22 @@ Directive:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy80;
-yy81: ++YYCURSOR;
-yy80:
+ goto yy88;
+yy89: ++YYCURSOR;
+yy88:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy82;
- case ' ': goto yy85;
- case '%': goto yy83;
- default: goto yy87;
+ case '\000': goto yy90;
+ case ' ': goto yy93;
+ case '%': goto yy91;
+ default: goto yy95;
}
-yy82: YYCURSOR = YYMARKER;
+yy90: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy84;
+ case 0: goto yy92;
}
-yy83: yyaccept = 0;
+yy91: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case '.':
@@ -998,32 +1052,32 @@ yy83: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy90;
- default: goto yy84;
+ case 'z': goto yy98;
+ default: goto yy92;
}
-yy84:
-#line 402
+yy92:
+#line 423
{ YYCURSOR = YYTOKTMP;
return DOCSEP;
}
-yy85: yych = *++YYCURSOR;
- goto yy89;
-yy86:
-#line 400
+yy93: yych = *++YYCURSOR;
+ goto yy97;
+yy94:
+#line 421
{ goto Directive; }
-yy87: yych = *++YYCURSOR;
- goto yy84;
-yy88: ++YYCURSOR;
+yy95: yych = *++YYCURSOR;
+ goto yy92;
+yy96: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy89: switch(yych){
- case ' ': goto yy88;
- default: goto yy86;
+yy97: switch(yych){
+ case ' ': goto yy96;
+ default: goto yy94;
}
-yy90: ++YYCURSOR;
+yy98: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy91: switch(yych){
+yy99: switch(yych){
case '.':
case '/':
case '0':
@@ -1096,11 +1150,11 @@ yy91: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy90;
- case ':': goto yy92;
- default: goto yy82;
+ case 'z': goto yy98;
+ case ':': goto yy100;
+ default: goto yy90;
}
-yy92: yych = *++YYCURSOR;
+yy100: yych = *++YYCURSOR;
switch(yych){
case '.':
case '/':
@@ -1176,13 +1230,13 @@ yy92: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy93;
- default: goto yy82;
+ case 'z': goto yy101;
+ default: goto yy90;
}
-yy93: ++YYCURSOR;
+yy101: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy94: switch(yych){
+yy102: switch(yych){
case '.':
case '/':
case '0':
@@ -1257,14 +1311,14 @@ yy94: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy93;
- default: goto yy95;
+ case 'z': goto yy101;
+ default: goto yy103;
}
-yy95:
-#line 398
+yy103:
+#line 419
{ goto Directive; }
}
-#line 405
+#line 426
}
@@ -1289,26 +1343,26 @@ Plain3:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy96;
-yy97: ++YYCURSOR;
-yy96:
+ goto yy104;
+yy105: ++YYCURSOR;
+yy104:
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy108;
- case '\n': goto yy98;
- case '\r': goto yy100;
- case ' ': goto yy106;
- case ',': goto yy105;
- case ':': goto yy102;
- case ']': case '}': goto yy103;
- default: goto yy110;
- }
-yy98: yyaccept = 0;
+ case '\000': goto yy116;
+ case '\n': goto yy106;
+ case '\r': goto yy108;
+ case ' ': goto yy114;
+ case ',': goto yy113;
+ case ':': goto yy110;
+ case ']': case '}': goto yy111;
+ default: goto yy118;
+ }
+yy106: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy124;
-yy99:
-#line 428
+ goto yy132;
+yy107:
+#line 449
{ int indt_len, nl_count = 0;
SyckLevel *lvl;
char *tok = YYTOKTMP;
@@ -1340,27 +1394,27 @@ yy99:
goto Plain2;
}
-yy100: yych = *++YYCURSOR;
+yy108: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy123;
- default: goto yy101;
+ case '\n': goto yy131;
+ default: goto yy109;
}
-yy101:
-#line 482
+yy109:
+#line 503
{ QUOTECATS(qstr, qcapa, qidx, YYTOKTMP, YYCURSOR - YYTOKTMP);
goto Plain2;
}
-yy102: yyaccept = 1;
+yy110: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy118;
- case '\r': goto yy122;
- case ' ': goto yy120;
- default: goto yy101;
+ case '\n': goto yy126;
+ case '\r': goto yy130;
+ case ' ': goto yy128;
+ default: goto yy109;
}
-yy103: yych = *++YYCURSOR;
-yy104:
-#line 462
+yy111: yych = *++YYCURSOR;
+yy112:
+#line 483
{ if ( plvl->status != syck_lvl_inline )
{
if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) )
@@ -1372,87 +1426,87 @@ yy104:
}
RETURN_IMPLICIT();
}
-yy105: yyaccept = 1;
+yy113: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy113;
- case '\r': goto yy116;
- case ' ': goto yy114;
- default: goto yy101;
+ case '\n': goto yy121;
+ case '\r': goto yy124;
+ case ' ': goto yy122;
+ default: goto yy109;
}
-yy106: yych = *++YYCURSOR;
+yy114: yych = *++YYCURSOR;
switch(yych){
- case '#': goto yy111;
- default: goto yy107;
+ case '#': goto yy119;
+ default: goto yy115;
}
-yy107:
-#line 480
+yy115:
+#line 501
{ goto Plain3; }
-yy108: yych = *++YYCURSOR;
-yy109:
-#line 478
+yy116: yych = *++YYCURSOR;
+yy117:
+#line 499
{ RETURN_IMPLICIT(); }
-yy110: yych = *++YYCURSOR;
- goto yy101;
-yy111: yych = *++YYCURSOR;
-yy112:
-#line 474
+yy118: yych = *++YYCURSOR;
+ goto yy109;
+yy119: yych = *++YYCURSOR;
+yy120:
+#line 495
{ eat_comments( parser );
RETURN_IMPLICIT();
}
-yy113: yych = *++YYCURSOR;
- goto yy104;
-yy114: ++YYCURSOR;
+yy121: yych = *++YYCURSOR;
+ goto yy112;
+yy122: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy115: switch(yych){
- case ' ': goto yy114;
- default: goto yy104;
+yy123: switch(yych){
+ case ' ': goto yy122;
+ default: goto yy112;
}
-yy116: yych = *++YYCURSOR;
+yy124: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy113;
- default: goto yy117;
+ case '\n': goto yy121;
+ default: goto yy125;
}
-yy117: YYCURSOR = YYMARKER;
+yy125: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy99;
- case 1: goto yy101;
+ case 0: goto yy107;
+ case 1: goto yy109;
}
-yy118: yych = *++YYCURSOR;
-yy119:
-#line 460
+yy126: yych = *++YYCURSOR;
+yy127:
+#line 481
{ RETURN_IMPLICIT(); }
-yy120: ++YYCURSOR;
+yy128: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy121: switch(yych){
- case ' ': goto yy120;
- default: goto yy119;
+yy129: switch(yych){
+ case ' ': goto yy128;
+ default: goto yy127;
}
-yy122: yych = *++YYCURSOR;
+yy130: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy118;
- default: goto yy117;
+ case '\n': goto yy126;
+ default: goto yy125;
}
-yy123: yyaccept = 0;
+yy131: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy124: switch(yych){
- case '\n': case ' ': goto yy123;
- case '\r': goto yy125;
- default: goto yy99;
+yy132: switch(yych){
+ case '\n': case ' ': goto yy131;
+ case '\r': goto yy133;
+ default: goto yy107;
}
-yy125: ++YYCURSOR;
+yy133: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy123;
- default: goto yy117;
+ case '\n': goto yy131;
+ default: goto yy125;
}
}
-#line 486
+#line 507
}
@@ -1468,23 +1522,23 @@ SingleQuote2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy126;
-yy127: ++YYCURSOR;
-yy126:
+ goto yy134;
+yy135: ++YYCURSOR;
+yy134:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy134;
- case '\n': goto yy128;
- case '\r': goto yy130;
- case '\'': goto yy132;
- default: goto yy135;
+ case '\000': goto yy142;
+ case '\n': goto yy136;
+ case '\r': goto yy138;
+ case '\'': goto yy140;
+ default: goto yy143;
}
-yy128: yyaccept = 0;
+yy136: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy139;
-yy129:
-#line 500
+ goto yy147;
+yy137:
+#line 521
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
@@ -1520,23 +1574,23 @@ yy129:
goto SingleQuote2;
}
-yy130: yych = *++YYCURSOR;
+yy138: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy138;
- default: goto yy131;
+ case '\n': goto yy146;
+ default: goto yy139;
}
-yy131:
-#line 554
+yy139:
+#line 575
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto SingleQuote2;
}
-yy132: yych = *++YYCURSOR;
+yy140: yych = *++YYCURSOR;
switch(yych){
- case '\'': goto yy136;
- default: goto yy133;
+ case '\'': goto yy144;
+ default: goto yy141;
}
-yy133:
-#line 540
+yy141:
+#line 561
{ SyckLevel *lvl;
SyckNode *n = syck_alloc_str();
lvl = CURRENT_LEVEL();
@@ -1550,38 +1604,38 @@ yy133:
yylval->nodeData = n;
return PLAIN;
}
-yy134: yych = *++YYCURSOR;
- goto yy133;
-yy135: yych = *++YYCURSOR;
- goto yy131;
-yy136: yych = *++YYCURSOR;
-yy137:
-#line 536
+yy142: yych = *++YYCURSOR;
+ goto yy141;
+yy143: yych = *++YYCURSOR;
+ goto yy139;
+yy144: yych = *++YYCURSOR;
+yy145:
+#line 557
{ QUOTECAT(qstr, qcapa, qidx, '\'');
goto SingleQuote2;
}
-yy138: yyaccept = 0;
+yy146: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy139: switch(yych){
- case '\n': case ' ': goto yy138;
- case '\r': goto yy140;
- default: goto yy129;
+yy147: switch(yych){
+ case '\n': case ' ': goto yy146;
+ case '\r': goto yy148;
+ default: goto yy137;
}
-yy140: ++YYCURSOR;
+yy148: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy138;
- default: goto yy141;
+ case '\n': goto yy146;
+ default: goto yy149;
}
-yy141: YYCURSOR = YYMARKER;
+yy149: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy129;
+ case 0: goto yy137;
}
}
-#line 558
+#line 579
}
@@ -1601,24 +1655,24 @@ DoubleQuote2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy142;
-yy143: ++YYCURSOR;
-yy142:
+ goto yy150;
+yy151: ++YYCURSOR;
+yy150:
if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy149;
- case '\n': goto yy144;
- case '\r': goto yy146;
- case '"': goto yy151;
- case '\\': goto yy148;
- default: goto yy152;
- }
-yy144: yyaccept = 0;
+ case '\000': goto yy157;
+ case '\n': goto yy152;
+ case '\r': goto yy154;
+ case '"': goto yy159;
+ case '\\': goto yy156;
+ default: goto yy160;
+ }
+yy152: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy166;
-yy145:
-#line 576
+ goto yy174;
+yy153:
+#line 597
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
@@ -1658,31 +1712,31 @@ yy145:
keep_nl = 1;
goto DoubleQuote2;
}
-yy146: yych = *++YYCURSOR;
+yy154: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy165;
- default: goto yy147;
+ case '\n': goto yy173;
+ default: goto yy155;
}
-yy147:
-#line 660
+yy155:
+#line 681
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto DoubleQuote2;
}
-yy148: yyaccept = 1;
+yy156: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy156;
- case '\r': goto yy158;
- case ' ': goto yy153;
+ case '\n': goto yy164;
+ case '\r': goto yy166;
+ case ' ': goto yy161;
case '"': case '\\': case 'a':
case 'b': case 'e':
- case 'f': case 'n': case 'r': case 't': case 'v': goto yy160;
- case 'x': goto yy159;
- default: goto yy147;
+ case 'f': case 'n': case 'r': case 't': case 'v': goto yy168;
+ case 'x': goto yy167;
+ default: goto yy155;
}
-yy149: yych = *++YYCURSOR;
-yy150:
-#line 646
+yy157: yych = *++YYCURSOR;
+yy158:
+#line 667
{ SyckLevel *lvl;
SyckNode *n = syck_alloc_str();
lvl = CURRENT_LEVEL();
@@ -1696,37 +1750,37 @@ yy150:
yylval->nodeData = n;
return PLAIN;
}
-yy151: yych = *++YYCURSOR;
- goto yy150;
-yy152: yych = *++YYCURSOR;
- goto yy147;
-yy153: ++YYCURSOR;
+yy159: yych = *++YYCURSOR;
+ goto yy158;
+yy160: yych = *++YYCURSOR;
+ goto yy155;
+yy161: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy154: switch(yych){
- case '\n': goto yy156;
- case '\r': goto yy158;
- case ' ': goto yy153;
- default: goto yy155;
+yy162: switch(yych){
+ case '\n': goto yy164;
+ case '\r': goto yy166;
+ case ' ': goto yy161;
+ default: goto yy163;
}
-yy155: YYCURSOR = YYMARKER;
+yy163: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy145;
- case 1: goto yy147;
+ case 0: goto yy153;
+ case 1: goto yy155;
}
-yy156: yych = *++YYCURSOR;
-yy157:
-#line 641
+yy164: yych = *++YYCURSOR;
+yy165:
+#line 662
{ keep_nl = 0;
YYCURSOR--;
goto DoubleQuote2;
}
-yy158: yych = *++YYCURSOR;
+yy166: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy156;
- default: goto yy155;
+ case '\n': goto yy164;
+ default: goto yy163;
}
-yy159: yych = *++YYCURSOR;
+yy167: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1747,12 +1801,12 @@ yy159: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy162;
- default: goto yy155;
+ case 'f': goto yy170;
+ default: goto yy163;
}
-yy160: yych = *++YYCURSOR;
-yy161:
-#line 616
+yy168: yych = *++YYCURSOR;
+yy169:
+#line 637
{ char ch = *( YYCURSOR - 1 );
switch ( ch )
{
@@ -1768,7 +1822,7 @@ yy161:
QUOTECAT(qstr, qcapa, qidx, ch);
goto DoubleQuote2;
}
-yy162: yych = *++YYCURSOR;
+yy170: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1789,12 +1843,12 @@ yy162: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy163;
- default: goto yy155;
+ case 'f': goto yy171;
+ default: goto yy163;
}
-yy163: yych = *++YYCURSOR;
-yy164:
-#line 632
+yy171: yych = *++YYCURSOR;
+yy172:
+#line 653
{ long ch;
char *chr_text = syck_strndup( YYTOKTMP, 4 );
chr_text[0] = '0';
@@ -1803,24 +1857,24 @@ yy164:
QUOTECAT(qstr, qcapa, qidx, ch);
goto DoubleQuote2;
}
-yy165: yyaccept = 0;
+yy173: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy166: switch(yych){
- case '\n': case ' ': goto yy165;
- case '\r': goto yy167;
- default: goto yy145;
+yy174: switch(yych){
+ case '\n': case ' ': goto yy173;
+ case '\r': goto yy175;
+ default: goto yy153;
}
-yy167: ++YYCURSOR;
+yy175: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy165;
- default: goto yy155;
+ case '\n': goto yy173;
+ default: goto yy163;
}
}
-#line 664
+#line 685
}
@@ -1831,21 +1885,21 @@ TransferMethod:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy168;
-yy169: ++YYCURSOR;
-yy168:
+ goto yy176;
+yy177: ++YYCURSOR;
+yy176:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy170;
- case '\n': goto yy171;
- case '\r': goto yy174;
- case ' ': goto yy173;
- default: goto yy176;
+ case '\000': goto yy178;
+ case '\n': goto yy179;
+ case '\r': goto yy182;
+ case ' ': goto yy181;
+ default: goto yy184;
}
-yy170:yy171: yych = *++YYCURSOR;
-yy172:
-#line 673
+yy178:yy179: yych = *++YYCURSOR;
+yy180:
+#line 694
{ SyckLevel *lvl;
YYCURSOR = YYTOKTMP;
if ( YYCURSOR == YYTOKEN + 1 )
@@ -1891,29 +1945,29 @@ yy172:
return TRANSFER;
}
-yy173: yych = *++YYCURSOR;
- goto yy179;
-yy174: yych = *++YYCURSOR;
+yy181: yych = *++YYCURSOR;
+ goto yy187;
+yy182: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy177;
- default: goto yy175;
+ case '\n': goto yy185;
+ default: goto yy183;
}
-yy175:
-#line 719
+yy183:
+#line 740
{ goto TransferMethod; }
-yy176: yych = *++YYCURSOR;
- goto yy175;
-yy177: yych = *++YYCURSOR;
- goto yy172;
-yy178: ++YYCURSOR;
+yy184: yych = *++YYCURSOR;
+ goto yy183;
+yy185: yych = *++YYCURSOR;
+ goto yy180;
+yy186: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy179: switch(yych){
- case ' ': goto yy178;
- default: goto yy172;
+yy187: switch(yych){
+ case ' ': goto yy186;
+ default: goto yy180;
}
}
-#line 721
+#line 742
}
@@ -1963,23 +2017,23 @@ ScalarBlock2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy180;
-yy181: ++YYCURSOR;
-yy180:
+ goto yy188;
+yy189: ++YYCURSOR;
+yy188:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy188;
- case '\n': goto yy182;
- case '\r': goto yy184;
- case '#': goto yy186;
- default: goto yy190;
+ case '\000': goto yy196;
+ case '\n': goto yy190;
+ case '\r': goto yy192;
+ case '#': goto yy194;
+ default: goto yy198;
}
-yy182: yyaccept = 0;
+yy190: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy192;
-yy183:
-#line 769
+ goto yy200;
+yy191:
+#line 790
{ char *pacer;
char *tok = YYTOKTMP;
int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0;
@@ -2045,19 +2099,19 @@ yy183:
}
goto ScalarBlock2;
}
-yy184: yych = *++YYCURSOR;
+yy192: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy191;
- default: goto yy185;
+ case '\n': goto yy199;
+ default: goto yy193;
}
-yy185:
-#line 855
+yy193:
+#line 876
{ QUOTECAT(qstr, qcapa, qidx, *YYTOKTMP);
goto ScalarBlock2;
}
-yy186: yych = *++YYCURSOR;
-yy187:
-#line 836
+yy194: yych = *++YYCURSOR;
+yy195:
+#line 857
{ lvl = CURRENT_LEVEL();
if ( lvl->status != syck_lvl_block )
{
@@ -2070,37 +2124,37 @@ yy187:
}
goto ScalarBlock2;
}
-yy188: yych = *++YYCURSOR;
-yy189:
-#line 850
+yy196: yych = *++YYCURSOR;
+yy197:
+#line 871
{ YYCURSOR--;
POP_LEVEL();
RETURN_BLOCK();
}
-yy190: yych = *++YYCURSOR;
- goto yy185;
-yy191: yyaccept = 0;
+yy198: yych = *++YYCURSOR;
+ goto yy193;
+yy199: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy192: switch(yych){
- case '\n': case ' ': goto yy191;
- case '\r': goto yy193;
- default: goto yy183;
+yy200: switch(yych){
+ case '\n': case ' ': goto yy199;
+ case '\r': goto yy201;
+ default: goto yy191;
}
-yy193: ++YYCURSOR;
+yy201: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy191;
- default: goto yy194;
+ case '\n': goto yy199;
+ default: goto yy202;
}
-yy194: YYCURSOR = YYMARKER;
+yy202: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy183;
+ case 0: goto yy191;
}
}
-#line 860
+#line 881
}
@@ -2118,60 +2172,60 @@ Comment:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy195;
-yy196: ++YYCURSOR;
-yy195:
+ goto yy203;
+yy204: ++YYCURSOR;
+yy203:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy197;
- case '\n': goto yy199;
- case '\r': goto yy200;
- default: goto yy202;
- }
-yy197: yych = *++YYCURSOR;
-yy198:
-#line 876
+ case '\000': goto yy205;
+ case '\n': goto yy207;
+ case '\r': goto yy208;
+ default: goto yy210;
+ }
+yy205: yych = *++YYCURSOR;
+yy206:
+#line 897
{ SyckLevel *lvl = CURRENT_LEVEL();
YYCURSOR = tok;
return;
}
-yy199: yyaccept = 0;
+yy207: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy204;
-yy200: yych = *++YYCURSOR;
+ goto yy212;
+yy208: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy203;
- default: goto yy201;
+ case '\n': goto yy211;
+ default: goto yy209;
}
-yy201:
-#line 881
+yy209:
+#line 902
{ goto Comment;
}
-yy202: yych = *++YYCURSOR;
- goto yy201;
-yy203: yyaccept = 0;
+yy210: yych = *++YYCURSOR;
+ goto yy209;
+yy211: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy204: switch(yych){
- case '\n': goto yy203;
- case '\r': goto yy205;
- default: goto yy198;
+yy212: switch(yych){
+ case '\n': goto yy211;
+ case '\r': goto yy213;
+ default: goto yy206;
}
-yy205: ++YYCURSOR;
+yy213: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy203;
- default: goto yy206;
+ case '\n': goto yy211;
+ default: goto yy214;
}
-yy206: YYCURSOR = YYMARKER;
+yy214: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy198;
+ case 0: goto yy206;
}
}
-#line 884
+#line 905
}