summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-03 08:13:22 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-03 08:13:22 +0000
commit1ba2a61687b9bc4f1fe7645c629511d0d986cca2 (patch)
treefe4b77b2b5162ad40f8235ed24ab6991c5673596 /ext/syck
parent7c67e3f978264212cea7ded1791da719961c446c (diff)
* ext/syck/syck.h: version 0.43.
* ext/syck/lib/gram.c: allow root-level inline collections. [ruby-talk:94922] * lib/yaml/rubytypes.rb (Symbol#to_yaml): emit symbols as implicits. [ruby-talk:94930] * ext/syck/bytecode.c: turn off default implicit typing. * ext/syck/implicit.c: detect base60 integers. * ext/syck/rubyext.c: handle base60, as well as hex and octal with commas. implicit typing of ruby symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/bytecode.c8
-rw-r--r--ext/syck/gram.c634
-rw-r--r--ext/syck/implicit.c1183
-rw-r--r--ext/syck/rubyext.c403
-rw-r--r--ext/syck/syck.h2
5 files changed, 1179 insertions, 1051 deletions
diff --git a/ext/syck/bytecode.c b/ext/syck/bytecode.c
index df15658..eff21d2 100644
--- a/ext/syck/bytecode.c
+++ b/ext/syck/bytecode.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Sun Nov 23 14:51:02 2003 */
+/* Generated by re2c 0.5 on Mon Jan 12 11:40:10 2004 */
#line 1 "bytecode.re"
/*
* bytecode.re
@@ -510,7 +510,7 @@ yy44: yych = *++YYCURSOR;
Directive:
{
- YYTOKTMP = YYCURSOR;
+ YYTOKEN = YYCURSOR;
{
YYCTYPE yych;
@@ -611,7 +611,7 @@ yy48: yyaccept = 0;
}
yy49:
#line 400
- { YYCURSOR = YYTOKTMP;
+ { YYCURSOR = YYTOKEN;
return YAML_DOCSEP;
}
yy50: yych = *++YYCURSOR;
@@ -876,7 +876,7 @@ yy58: yych = *++YYCURSOR;
Comment:
{
- YYTOKTMP = YYCURSOR;
+ YYTOKEN = YYCURSOR;
{
YYCTYPE yych;
diff --git a/ext/syck/gram.c b/ext/syck/gram.c
index 5bdd025..1fa724e 100644
--- a/ext/syck/gram.c
+++ b/ext/syck/gram.c
@@ -98,6 +98,16 @@
#define YYPARSE_PARAM parser
#define YYLEX_PARAM parser
+#define NULL_NODE(parser, node) \
+ SyckNode *node = syck_new_str( "" ); \
+ if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
+ { \
+ node->type_id = syck_taguri( YAML_DOMAIN, "null", 4 ); \
+ } \
+ else \
+ { \
+ node->type_id = syck_strndup( "null", 4 ); \
+ }
/* Enabling traces. */
@@ -114,14 +124,14 @@
#endif
#ifndef YYSTYPE
-#line 23 "gram.y"
+#line 33 "gram.y"
typedef union {
SYMID nodeId;
SyckNode *nodeData;
char *name;
} yystype;
/* Line 193 of /usr/local/share/bison/yacc.c. */
-#line 125 "y.tab.c"
+#line 135 "y.tab.c"
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -139,11 +149,10 @@ typedef struct yyltype
#endif
/* Copy the second part of user declarations. */
-int sycklex( YYSTYPE *, SyckParser * );
/* Line 213 of /usr/local/share/bison/yacc.c. */
-#line 146 "y.tab.c"
+#line 156 "y.tab.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
@@ -240,17 +249,17 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 38
-#define YYLAST 414
+#define YYFINAL 43
+#define YYLAST 436
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 23
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 25
+#define YYNNTS 28
/* YYNRULES -- Number of rules. */
-#define YYNRULES 69
+#define YYNRULES 75
/* YYNRULES -- Number of states. */
-#define YYNSTATES 121
+#define YYNSTATES 128
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -296,51 +305,54 @@ static const unsigned char yytranslate[] =
YYRHS. */
static const unsigned char yyprhs[] =
{
- 0, 0, 3, 5, 8, 9, 11, 13, 15, 18,
- 22, 26, 28, 31, 32, 34, 37, 39, 41, 43,
- 46, 49, 52, 55, 58, 60, 62, 64, 67, 70,
- 72, 74, 76, 78, 80, 84, 87, 89, 93, 96,
- 100, 103, 107, 110, 112, 116, 119, 123, 126, 128,
- 132, 136, 140, 144, 147, 151, 154, 158, 161, 165,
- 167, 173, 175, 179, 183, 186, 190, 194, 197, 199
+ 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,
+ 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,
+ 164, 168, 171, 175, 177, 183, 185, 189, 193, 196,
+ 200, 204, 207, 209, 213, 215
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] =
{
- 24, 0, -1, 33, -1, 11, 27, -1, -1, 32,
- -1, 26, -1, 33, -1, 3, 26, -1, 28, 32,
- 31, -1, 28, 26, 31, -1, 25, -1, 28, 29,
- -1, -1, 12, -1, 28, 13, -1, 14, -1, 13,
- -1, 14, -1, 30, 31, -1, 5, 32, -1, 6,
- 32, -1, 7, 32, -1, 3, 32, -1, 4, -1,
- 8, -1, 9, -1, 5, 33, -1, 6, 33, -1,
- 10, -1, 34, -1, 38, -1, 40, -1, 46, -1,
- 28, 36, 29, -1, 15, 27, -1, 37, -1, 5,
- 30, 36, -1, 5, 36, -1, 6, 30, 36, -1,
- 6, 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, 6, 30, 44,
- -1, 6, 41, -1, 3, 30, 44, -1, 3, 41,
- -1, 32, 16, 27, -1, 42, -1, 22, 25, 30,
- 16, 27, -1, 43, -1, 44, 30, 35, -1, 44,
- 30, 43, -1, 44, 30, -1, 25, 16, 27, -1,
- 19, 47, 20, -1, 19, 20, -1, 45, -1, 47,
- 21, 45, -1
+ 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,
+ 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,
+ 37, -1, 6, 31, 37, -1, 6, 37, -1, 3,
+ 31, 37, -1, 3, 37, -1, 36, -1, 38, 31,
+ 36, -1, 38, 31, -1, 17, 40, 18, -1, 17,
+ 18, -1, 41, -1, 40, 21, 41, -1, 25, -1,
+ 47, -1, 29, 43, 30, -1, 29, 46, 30, -1,
+ 5, 31, 46, -1, 5, 43, -1, 6, 31, 46,
+ -1, 6, 43, -1, 3, 31, 46, -1, 3, 43,
+ -1, 33, 16, 28, -1, 44, -1, 22, 25, 31,
+ 16, 28, -1, 45, -1, 46, 31, 36, -1, 46,
+ 31, 45, -1, 46, 31, -1, 25, 16, 28, -1,
+ 19, 49, 20, -1, 19, 20, -1, 50, -1, 49,
+ 21, 50, -1, 25, -1, 47, -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, 96, 114, 115, 118, 121, 124, 125,
- 133, 138, 143, 151, 155, 163, 176, 183, 188, 193,
- 194, 195, 196, 197, 203, 209, 215, 216, 221, 226,
- 231, 236, 240, 246, 250, 255, 264, 268, 274, 278,
- 288, 293, 300, 305, 310, 315, 320, 324, 330, 345,
- 346, 354, 355, 367, 374, 383, 391, 395, 401, 402
+ 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,
+ 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
};
#endif
@@ -353,12 +365,13 @@ static const char *const yytname[] =
"YAML_TRANSFER", "YAML_TAGURI", "YAML_ITRANSFER", "YAML_WORD",
"YAML_PLAIN", "YAML_BLOCK", "YAML_DOCSEP", "YAML_IOPEN", "YAML_INDENT",
"YAML_IEND", "'-'", "':'", "'['", "']'", "'{'", "'}'", "','", "'?'",
- "$accept", "doc", "atom", "ind_rep", "atom_or_empty", "indent_open",
- "indent_end", "indent_sep", "indent_flex_end", "word_rep", "struct_rep",
- "implicit_seq", "basic_seq", "top_imp_seq", "in_implicit_seq",
- "inline_seq", "in_inline_seq", "implicit_map", "top_imp_map",
- "basic_mapping", "complex_mapping", "in_implicit_map", "basic_mapping2",
- "inline_map", "in_inline_map", 0
+ "$accept", "doc", "atom", "doc_struct_rep", "ind_rep", "atom_or_empty",
+ "indent_open", "indent_end", "indent_sep", "indent_flex_end",
+ "word_rep", "struct_rep", "implicit_seq", "basic_seq", "top_imp_seq",
+ "in_implicit_seq", "inline_seq", "in_inline_seq", "inline_seq_atom",
+ "implicit_map", "top_imp_map", "basic_mapping", "complex_mapping",
+ "in_implicit_map", "basic_mapping2", "inline_map", "in_inline_map",
+ "inline_map_atom", 0
};
#endif
@@ -376,25 +389,27 @@ static const unsigned short yytoknum[] =
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const unsigned char yyr1[] =
{
- 0, 23, 24, 24, 24, 25, 25, 26, 26, 26,
- 26, 27, 27, 27, 28, 28, 29, 30, 31, 31,
- 32, 32, 32, 32, 32, 32, 32, 33, 33, 33,
- 33, 33, 33, 33, 34, 35, 36, 36, 36, 36,
- 36, 36, 36, 37, 37, 37, 38, 38, 39, 39,
- 40, 40, 41, 41, 41, 41, 41, 41, 42, 43,
- 43, 44, 44, 44, 44, 45, 46, 46, 47, 47
+ 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,
+ 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,
+ 43, 43, 44, 45, 45, 46, 46, 46, 46, 47,
+ 48, 48, 49, 49, 50, 50
};
/* 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, 2, 0, 1, 2, 1, 1, 1, 2,
- 2, 2, 2, 2, 1, 1, 1, 2, 2, 1,
- 1, 1, 1, 1, 3, 2, 1, 3, 2, 3,
- 2, 3, 2, 1, 3, 2, 3, 2, 1, 3,
- 3, 3, 3, 2, 3, 2, 3, 2, 3, 1,
- 5, 1, 3, 3, 2, 3, 3, 2, 1, 3
+ 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, 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,
+ 3, 2, 3, 1, 5, 1, 3, 3, 2, 3,
+ 3, 2, 1, 3, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -402,55 +417,55 @@ static const unsigned char yyr2[] =
means the default is an error. */
static const unsigned char yydefact[] =
{
- 4, 0, 0, 29, 13, 14, 0, 0, 0, 0,
- 2, 30, 31, 32, 33, 27, 28, 0, 24, 0,
- 0, 0, 25, 26, 11, 6, 3, 0, 5, 7,
- 47, 48, 0, 0, 67, 0, 68, 0, 1, 0,
- 0, 0, 15, 13, 0, 0, 43, 0, 36, 0,
- 59, 61, 0, 8, 23, 0, 20, 21, 0, 0,
- 22, 0, 0, 0, 16, 0, 12, 0, 46, 0,
- 13, 66, 0, 17, 0, 42, 57, 0, 38, 53,
- 0, 40, 55, 35, 0, 13, 34, 45, 50, 51,
- 64, 18, 0, 10, 9, 49, 65, 69, 0, 0,
- 0, 41, 56, 37, 52, 39, 54, 0, 58, 44,
- 62, 63, 19, 0, 0, 0, 13, 0, 0, 0,
- 60
+ 4, 0, 0, 31, 15, 16, 0, 0, 0, 2,
+ 0, 7, 32, 33, 34, 35, 0, 29, 30, 0,
+ 26, 0, 0, 0, 27, 28, 13, 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
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
- -1, 8, 24, 25, 26, 32, 66, 90, 93, 28,
- 29, 11, 46, 75, 48, 12, 33, 13, 49, 50,
- 51, 52, 36, 14, 37
+ -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
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -68
+#define YYPACT_NINF -77
static const short yypact[] =
{
- 133, 177, 177, -68, 352, -68, 335, 283, 27, 223,
- -68, -68, -68, -68, -68, -68, -68, 352, -68, 369,
- 369, 97, -68, -68, -68, -68, -68, 154, -68, -68,
- -68, -68, 203, -12, -68, 17, -68, 46, -68, 386,
- 386, 386, -68, 352, 352, 25, -68, 30, 33, 30,
- -68, -68, 67, -68, -68, 97, -68, -68, 97, 97,
- -68, 301, 318, 318, -68, 107, -68, 37, -68, 352,
- 352, -68, 352, -68, 243, -68, -68, 243, -68, -68,
- 243, -68, -68, -68, 33, 352, -68, 40, -68, -68,
- 263, -68, 107, -68, -68, -68, -68, -68, 399, 399,
- 399, -68, 33, -68, 33, -68, 33, 42, -68, -68,
- -68, -68, -68, 84, 84, 84, 352, 9, 9, 9,
- -68
+ 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
};
/* YYPGOTO[NTERM-NUM]. */
-static const yysigned_char yypgoto[] =
+static const short yypgoto[] =
{
- -68, -68, 10, -9, -38, 0, -7, 86, -56, 56,
- 29, -68, -62, -6, -68, -68, -68, -68, -2, -68,
- -26, -67, -3, -68, -68
+ -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
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -460,113 +475,117 @@ static const yysigned_char yypgoto[] =
#define YYTABLE_NINF -1
static const unsigned char yytable[] =
{
- 9, 9, 9, 47, 27, 83, 68, 102, 53, 69,
- 104, 94, 117, 106, 118, 119, 31, 35, 65, 9,
- 9, 47, 73, 65, 43, 109, 47, 38, 110, 10,
- 15, 16, 96, 70, 78, 81, 112, 76, 79, 82,
- 86, 85, 88, 27, 64, 89, 73, 108, 15, 16,
- 73, 91, 53, 85, 84, 43, 78, 81, 116, 76,
- 79, 82, 9, 9, 111, 45, 71, 72, 101, 97,
- 27, 103, 0, 54, 105, 56, 57, 60, 120, 95,
- 73, 64, 35, 67, 0, 27, 0, 117, 67, 118,
- 119, 15, 16, 78, 81, 54, 56, 57, 0, 43,
- 55, 18, 58, 59, 21, 22, 23, 101, 103, 105,
- 0, 54, 78, 81, 56, 57, 27, 54, 56, 57,
- 73, 91, 0, 0, 0, 74, 77, 80, 0, 0,
- 45, 0, 0, 45, 87, 0, 45, 0, 1, 2,
- 0, 0, 0, 3, 4, 5, 45, 74, 77, 80,
- 6, 92, 7, 92, 54, 56, 57, 61, 18, 62,
- 63, 21, 22, 23, 3, 0, 5, 42, 64, 43,
- 107, 6, 0, 7, 0, 0, 44, 0, 92, 0,
- 0, 0, 1, 2, 113, 114, 115, 3, 0, 5,
- 0, 0, 0, 0, 6, 0, 7, 0, 0, 0,
- 0, 0, 0, 113, 114, 115, 61, 18, 62, 63,
- 21, 22, 23, 3, 0, 5, 42, 0, 43, 0,
- 6, 0, 7, 0, 0, 44, 39, 18, 40, 41,
- 21, 22, 23, 0, 0, 0, 42, 0, 43, 0,
- 0, 0, 0, 0, 0, 44, 98, 18, 99, 100,
- 21, 22, 23, 0, 0, 0, 0, 0, 43, 0,
- 0, 0, 0, 0, 0, 44, 55, 18, 58, 59,
- 21, 22, 23, 0, 0, 0, 0, 0, 43, 0,
- 0, 0, 0, 0, 0, 44, 17, 18, 19, 20,
- 21, 22, 23, 3, 0, 5, 0, 0, 0, 0,
- 6, 0, 7, 34, 61, 18, 62, 63, 21, 22,
- 23, 3, 0, 5, 73, 0, 43, 0, 6, 0,
- 7, 39, 18, 62, 63, 21, 22, 23, 3, 0,
- 5, 73, 0, 43, 0, 6, 0, 7, 17, 18,
- 19, 20, 21, 22, 23, 3, 0, 5, 0, 0,
- 0, 0, 6, 30, 7, 17, 18, 19, 20, 21,
- 22, 23, 3, 0, 5, 0, 0, 0, 0, 6,
- 0, 7, 55, 18, 19, 20, 21, 22, 23, 3,
- 0, 5, 0, 0, 0, 0, 6, 0, 7, 39,
- 18, 40, 41, 21, 22, 23, 0, 0, 0, 73,
- 0, 43, 98, 18, 99, 100, 21, 22, 23, 0,
- 0, 0, 73, 0, 43
+ 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
};
static const yysigned_char yycheck[] =
{
- 0, 1, 2, 9, 4, 43, 18, 74, 17, 21,
- 77, 67, 3, 80, 5, 6, 6, 7, 27, 19,
- 20, 27, 13, 32, 15, 87, 32, 0, 90, 0,
- 1, 2, 70, 16, 40, 41, 92, 39, 40, 41,
- 47, 16, 49, 43, 14, 52, 13, 85, 19, 20,
- 13, 14, 61, 16, 44, 15, 62, 63, 16, 61,
- 62, 63, 62, 63, 90, 9, 20, 21, 74, 72,
- 70, 77, -1, 17, 80, 19, 20, 21, 116, 69,
- 13, 14, 72, 27, -1, 85, -1, 3, 32, 5,
- 6, 62, 63, 99, 100, 39, 40, 41, -1, 15,
- 3, 4, 5, 6, 7, 8, 9, 113, 114, 115,
- -1, 55, 118, 119, 58, 59, 116, 61, 62, 63,
- 13, 14, -1, -1, -1, 39, 40, 41, -1, -1,
- 74, -1, -1, 77, 48, -1, 80, -1, 5, 6,
- -1, -1, -1, 10, 11, 12, 90, 61, 62, 63,
- 17, 65, 19, 67, 98, 99, 100, 3, 4, 5,
+ 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,
- 84, 17, -1, 19, -1, -1, 22, -1, 92, -1,
- -1, -1, 5, 6, 98, 99, 100, 10, -1, 12,
- -1, -1, -1, -1, 17, -1, 19, -1, -1, -1,
- -1, -1, -1, 117, 118, 119, 3, 4, 5, 6,
+ -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,
+ 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, -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, 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, -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
+ 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,
+ -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
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const unsigned char yystos[] =
{
- 0, 5, 6, 10, 11, 12, 17, 19, 24, 28,
- 33, 34, 38, 40, 46, 33, 33, 3, 4, 5,
- 6, 7, 8, 9, 25, 26, 27, 28, 32, 33,
- 18, 25, 28, 39, 20, 25, 45, 47, 0, 3,
- 5, 6, 13, 15, 22, 32, 35, 36, 37, 41,
- 42, 43, 44, 26, 32, 3, 32, 32, 5, 6,
- 32, 3, 5, 6, 14, 26, 29, 32, 18, 21,
- 16, 20, 21, 13, 30, 36, 41, 30, 36, 41,
- 30, 36, 41, 27, 25, 16, 29, 30, 29, 29,
- 30, 14, 30, 31, 31, 25, 27, 45, 3, 5,
- 6, 36, 44, 36, 44, 36, 44, 30, 27, 35,
- 35, 43, 31, 30, 30, 30, 16, 3, 5, 6,
- 27
+ 0, 5, 6, 10, 11, 12, 17, 19, 24, 26,
+ 29, 34, 35, 39, 42, 48, 29, 34, 34, 3,
+ 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
};
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -1121,28 +1140,35 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 45 "gram.y"
+#line 55 "gram.y"
{
((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
}
break;
case 3:
-#line 49 "gram.y"
+#line 59 "gram.y"
{
((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
}
break;
case 4:
-#line 53 "gram.y"
+#line 63 "gram.y"
{
((SyckParser *)parser)->eof = 1;
}
break;
case 8:
-#line 64 "gram.y"
+#line 74 "gram.y"
+ {
+ yyval.nodeData = yyvsp[-1].nodeData;
+ }
+ break;
+
+ case 10:
+#line 81 "gram.y"
{
/*
* _Anchors_: The language binding must keep a separate symbol table
@@ -1153,70 +1179,54 @@ yyreduce:
}
break;
- case 9:
-#line 73 "gram.y"
+ case 11:
+#line 90 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 10:
-#line 77 "gram.y"
+ case 12:
+#line 94 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 12:
-#line 84 "gram.y"
+ case 14:
+#line 101 "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;
+ NULL_NODE( parser, n );
+ yyval.nodeData = n;
}
break;
- case 13:
-#line 97 "gram.y"
+ case 15:
+#line 106 "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;
+ NULL_NODE( parser, n );
+ yyval.nodeData = n;
}
break;
- case 20:
-#line 134 "gram.y"
+ case 22:
+#line 135 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 21:
-#line 139 "gram.y"
+ case 23:
+#line 140 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 22:
-#line 144 "gram.y"
+ case 24:
+#line 145 "gram.y"
{
if ( ((SyckParser *)parser)->implicit_typing == 1 )
{
@@ -1226,15 +1236,15 @@ yyreduce:
}
break;
- case 23:
-#line 152 "gram.y"
+ case 25:
+#line 153 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
- case 24:
-#line 156 "gram.y"
+ case 26:
+#line 157 "gram.y"
{
/*
* _Aliases_: The anchor symbol table is scanned for the anchor name.
@@ -1244,8 +1254,8 @@ yyreduce:
}
break;
- case 25:
-#line 164 "gram.y"
+ case 27:
+#line 165 "gram.y"
{
SyckNode *n = yyvsp[0].nodeData;
if ( ((SyckParser *)parser)->taguri_expansion == 1 )
@@ -1260,197 +1270,197 @@ yyreduce:
}
break;
- case 27:
-#line 184 "gram.y"
+ case 29:
+#line 185 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 28:
-#line 189 "gram.y"
+ case 30:
+#line 190 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 34:
-#line 204 "gram.y"
+ case 36:
+#line 205 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 35:
-#line 210 "gram.y"
+ case 37:
+#line 211 "gram.y"
{
yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
}
break;
- case 37:
-#line 217 "gram.y"
+ case 39:
+#line 218 "gram.y"
{
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 38:
-#line 222 "gram.y"
+ case 40:
+#line 223 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 39:
-#line 227 "gram.y"
+ case 41:
+#line 228 "gram.y"
{
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 40:
-#line 232 "gram.y"
+ case 42:
+#line 233 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 41:
-#line 237 "gram.y"
+ case 43:
+#line 238 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
}
break;
- case 42:
-#line 241 "gram.y"
+ case 44:
+#line 242 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
- case 43:
-#line 247 "gram.y"
+ case 45:
+#line 248 "gram.y"
{
yyval.nodeData = syck_new_seq( yyvsp[0].nodeId );
}
break;
- case 44:
-#line 251 "gram.y"
+ case 46:
+#line 252 "gram.y"
{
syck_seq_add( yyvsp[-2].nodeData, yyvsp[0].nodeId );
yyval.nodeData = yyvsp[-2].nodeData;
}
break;
- case 45:
-#line 256 "gram.y"
+ case 47:
+#line 257 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 46:
-#line 265 "gram.y"
+ case 48:
+#line 266 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 47:
-#line 269 "gram.y"
+ case 49:
+#line 270 "gram.y"
{
yyval.nodeData = syck_alloc_seq();
}
break;
- case 48:
-#line 275 "gram.y"
+ case 50:
+#line 276 "gram.y"
{
yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
}
break;
- case 49:
-#line 279 "gram.y"
+ case 51:
+#line 280 "gram.y"
{
syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
yyval.nodeData = yyvsp[-2].nodeData;
}
break;
- case 50:
-#line 289 "gram.y"
+ case 54:
+#line 294 "gram.y"
{
apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 51:
-#line 294 "gram.y"
+ case 55:
+#line 299 "gram.y"
{
apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 52:
-#line 301 "gram.y"
+ case 56:
+#line 306 "gram.y"
{
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 53:
-#line 306 "gram.y"
+ case 57:
+#line 311 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 54:
-#line 311 "gram.y"
+ case 58:
+#line 316 "gram.y"
{
syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 55:
-#line 316 "gram.y"
+ case 59:
+#line 321 "gram.y"
{
syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
yyval.nodeData = yyvsp[0].nodeData;
}
break;
- case 56:
-#line 321 "gram.y"
+ case 60:
+#line 326 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
}
break;
- case 57:
-#line 325 "gram.y"
+ case 61:
+#line 330 "gram.y"
{
yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
}
break;
- case 58:
-#line 331 "gram.y"
+ case 62:
+#line 336 "gram.y"
{
yyval.nodeData = syck_new_map(
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
@@ -1458,8 +1468,8 @@ yyreduce:
}
break;
- case 60:
-#line 347 "gram.y"
+ case 64:
+#line 352 "gram.y"
{
yyval.nodeData = syck_new_map(
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-3].nodeData ),
@@ -1467,8 +1477,8 @@ yyreduce:
}
break;
- case 62:
-#line 356 "gram.y"
+ case 66:
+#line 371 "gram.y"
{
if ( yyvsp[-2].nodeData->shortcut == NULL )
{
@@ -1482,8 +1492,8 @@ yyreduce:
}
break;
- case 63:
-#line 368 "gram.y"
+ case 67:
+#line 383 "gram.y"
{
apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );
syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
@@ -1492,15 +1502,15 @@ yyreduce:
}
break;
- case 64:
-#line 375 "gram.y"
+ case 68:
+#line 390 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 65:
-#line 384 "gram.y"
+ case 69:
+#line 399 "gram.y"
{
yyval.nodeData = syck_new_map(
syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
@@ -1508,22 +1518,22 @@ yyreduce:
}
break;
- case 66:
-#line 392 "gram.y"
+ case 70:
+#line 407 "gram.y"
{
yyval.nodeData = yyvsp[-1].nodeData;
}
break;
- case 67:
-#line 396 "gram.y"
+ case 71:
+#line 411 "gram.y"
{
yyval.nodeData = syck_alloc_map();
}
break;
- case 69:
-#line 403 "gram.y"
+ case 73:
+#line 418 "gram.y"
{
syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
syck_free_node( yyvsp[0].nodeData );
@@ -1531,11 +1541,21 @@ yyreduce:
}
break;
+ case 74:
+#line 426 "gram.y"
+ {
+ NULL_NODE( parser, n );
+ yyval.nodeData = syck_new_map(
+ syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
+ syck_hdlr_add_node( (SyckParser *)parser, n ) );
+ }
+ break;
+
}
/* Line 1016 of /usr/local/share/bison/yacc.c. */
-#line 1538 "y.tab.c"
+#line 1559 "y.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1754,7 +1774,7 @@ yyreturn:
}
-#line 410 "gram.y"
+#line 435 "gram.y"
void
diff --git a/ext/syck/implicit.c b/ext/syck/implicit.c
index 1dfeac3..b6f1237 100644
--- a/ext/syck/implicit.c
+++ b/ext/syck/implicit.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Thu Oct 16 14:12:57 2003 */
+/* Generated by re2c 0.5 on Mon Jan 12 00:56:58 2004 */
#line 1 "implicit.re"
/*
* implicit.re
@@ -91,86 +91,86 @@ yy0:
yy2: yych = *++YYCURSOR;
if(yych <= '\000') goto yy6;
yy3:
-#line 116
+#line 119
{ return "str"; }
yy4: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'o': goto yy163;
- case 'u': goto yy191;
+ case 'o': goto yy168;
+ case 'u': goto yy196;
default: goto yy3;
}
yy5: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'O': case 'o': goto yy163;
- case 'U': goto yy186;
- case 'u': goto yy187;
+ case 'O': case 'o': goto yy168;
+ case 'U': goto yy191;
+ case 'u': goto yy192;
default: goto yy3;
}
yy6: yych = *++YYCURSOR;
yy7:
-#line 82
+#line 83
{ return "null"; }
yy8: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'r': goto yy184;
+ case 'r': goto yy189;
default: goto yy3;
}
yy9: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'R': goto yy180;
- case 'r': goto yy181;
+ case 'R': goto yy185;
+ case 'r': goto yy186;
default: goto yy3;
}
yy10: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'e': goto yy179;
+ case 'e': goto yy184;
default: goto yy3;
}
yy11: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'E': goto yy177;
- case 'e': goto yy178;
+ case 'E': goto yy182;
+ case 'e': goto yy183;
default: goto yy3;
}
yy12: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'f': goto yy176;
- case 'n': goto yy173;
+ case 'f': goto yy181;
+ case 'n': goto yy178;
default: goto yy3;
}
yy13: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'F': goto yy171;
- case 'N': case 'n': goto yy173;
- case 'f': goto yy172;
+ case 'F': goto yy176;
+ case 'N': case 'n': goto yy178;
+ case 'f': goto yy177;
default: goto yy3;
}
yy14: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'a': goto yy168;
+ case 'a': goto yy173;
default: goto yy3;
}
yy15: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'A': goto yy159;
- case 'a': goto yy160;
+ case 'A': goto yy164;
+ case 'a': goto yy165;
default: goto yy3;
}
yy16: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '.': goto yy158;
- case '0': goto yy149;
+ case '.': goto yy163;
+ case '0': goto yy154;
case '1':
case '2':
case '3':
@@ -185,8 +185,8 @@ yy16: yyaccept = 0;
yy17: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '.': goto yy148;
- case '0': goto yy149;
+ case '.': goto yy153;
+ case '0': goto yy154;
case '1':
case '2':
case '3':
@@ -202,7 +202,7 @@ yy18: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case '\000': goto yy51;
- case ',': goto yy133;
+ case ',': goto yy138;
case '.': goto yy49;
case '0':
case '1':
@@ -211,10 +211,11 @@ yy18: yyaccept = 0;
case '4':
case '5':
case '6':
- case '7': goto yy131;
+ case '7': goto yy136;
case '8':
- case '9': goto yy132;
- case 'x': goto yy135;
+ case '9': goto yy137;
+ case ':': goto yy53;
+ case 'x': goto yy140;
default: goto yy3;
}
yy19: yyaccept = 0;
@@ -233,6 +234,7 @@ yy19: yyaccept = 0;
case '7':
case '8':
case '9': goto yy46;
+ case ':': goto yy53;
default: goto yy3;
}
yy20: yyaccept = 0;
@@ -263,11 +265,11 @@ yy25: YYCURSOR = YYMARKER;
}
yy26: yych = *++YYCURSOR;
yy27:
-#line 114
+#line 117
{ return "merge"; }
yy28: yych = *++YYCURSOR;
yy29:
-#line 112
+#line 115
{ return "default"; }
yy30: yych = *++YYCURSOR;
switch(yych){
@@ -305,7 +307,7 @@ yy36: yych = *++YYCURSOR;
if(yych >= '\001') goto yy25;
yy37: yych = *++YYCURSOR;
yy38:
-#line 98
+#line 101
{ return "float#inf"; }
yy39: yych = *++YYCURSOR;
switch(yych){
@@ -326,7 +328,7 @@ yy42: yych = *++YYCURSOR;
if(yych >= '\001') goto yy25;
yy43: yych = *++YYCURSOR;
yy44:
-#line 102
+#line 105
{ return "float#nan"; }
yy45: yych = *++YYCURSOR;
switch(yych){
@@ -344,7 +346,7 @@ yy46: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy65;
+ case '9': goto yy70;
default: goto yy48;
}
yy47: ++YYCURSOR;
@@ -363,15 +365,16 @@ yy48: switch(yych){
case '8':
case '9': goto yy47;
case '.': goto yy49;
+ case ':': goto yy53;
default: goto yy25;
}
yy49: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy50: switch(yych){
- case '\000': goto yy55;
- case ',': goto yy53;
- case '.': goto yy57;
+ case '\000': goto yy60;
+ case ',': goto yy58;
+ case '.': goto yy62;
case '0':
case '1':
case '2':
@@ -382,18 +385,64 @@ yy50: switch(yych){
case '7':
case '8':
case '9': goto yy49;
- case 'E': case 'e': goto yy59;
+ case 'E': case 'e': goto yy64;
default: goto yy25;
}
yy51: yych = *++YYCURSOR;
yy52:
-#line 92
+#line 95
{ return "int"; }
yy53: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy54: switch(yych){
- case '\000': goto yy55;
+ switch(yych){
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5': goto yy54;
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy55;
+ default: goto yy25;
+ }
+yy54: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ switch(yych){
+ case '\000': goto yy56;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy55;
+ case ':': goto yy53;
+ default: goto yy25;
+ }
+yy55: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ switch(yych){
+ case '\000': goto yy56;
+ case ':': goto yy53;
+ default: goto yy25;
+ }
+yy56: yych = *++YYCURSOR;
+yy57:
+#line 93
+ { return "int#base60"; }
+yy58: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+yy59: switch(yych){
+ case '\000': goto yy60;
case ',': case '0':
case '1':
case '2':
@@ -403,17 +452,17 @@ yy54: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy53;
+ case '9': goto yy58;
default: goto yy25;
}
-yy55: yych = *++YYCURSOR;
-yy56:
-#line 94
+yy60: yych = *++YYCURSOR;
+yy61:
+#line 97
{ return "float#fix"; }
-yy57: ++YYCURSOR;
+yy62: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy58: switch(yych){
+yy63: switch(yych){
case '.': case '0':
case '1':
case '2':
@@ -423,23 +472,23 @@ yy58: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy57;
- case 'E': case 'e': goto yy59;
+ case '9': goto yy62;
+ case 'E': case 'e': goto yy64;
default: goto yy25;
}
-yy59: yych = *++YYCURSOR;
+yy64: yych = *++YYCURSOR;
switch(yych){
- case '+': case '-': goto yy60;
+ case '+': case '-': goto yy65;
default: goto yy25;
}
-yy60: yych = *++YYCURSOR;
+yy65: yych = *++YYCURSOR;
if(yych <= '\000') goto yy25;
- goto yy62;
-yy61: ++YYCURSOR;
+ goto yy67;
+yy66: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy62: switch(yych){
- case '\000': goto yy63;
+yy67: switch(yych){
+ case '\000': goto yy68;
case '0':
case '1':
case '2':
@@ -449,14 +498,14 @@ yy62: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy61;
+ case '9': goto yy66;
default: goto yy25;
}
-yy63: yych = *++YYCURSOR;
-yy64:
-#line 96
+yy68: yych = *++YYCURSOR;
+yy69:
+#line 99
{ return "float#exp"; }
-yy65: yych = *++YYCURSOR;
+yy70: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -467,15 +516,15 @@ yy65: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy66;
+ case '9': goto yy71;
default: goto yy48;
}
-yy66: yych = *++YYCURSOR;
+yy71: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy67;
+ case '-': goto yy72;
default: goto yy48;
}
-yy67: yych = *++YYCURSOR;
+yy72: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -486,10 +535,10 @@ yy67: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy68;
+ case '9': goto yy73;
default: goto yy25;
}
-yy68: yych = *++YYCURSOR;
+yy73: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -500,15 +549,15 @@ yy68: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy69;
+ case '9': goto yy74;
default: goto yy25;
}
-yy69: yych = *++YYCURSOR;
+yy74: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy70;
+ case '-': goto yy75;
default: goto yy25;
}
-yy70: yych = *++YYCURSOR;
+yy75: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -519,10 +568,10 @@ yy70: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy71;
+ case '9': goto yy76;
default: goto yy25;
}
-yy71: yych = *++YYCURSOR;
+yy76: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -533,12 +582,12 @@ yy71: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy72;
+ case '9': goto yy77;
default: goto yy25;
}
-yy72: yych = *++YYCURSOR;
+yy77: yych = *++YYCURSOR;
switch(yych){
- case '\000': goto yy73;
+ case '\000': goto yy78;
case '0':
case '1':
case '2':
@@ -549,15 +598,15 @@ yy72: yych = *++YYCURSOR;
case '7':
case '8':
case '9': goto yy25;
- case 'T': goto yy75;
- case 't': goto yy76;
- default: goto yy78;
+ case 'T': goto yy80;
+ case 't': goto yy81;
+ default: goto yy83;
}
-yy73: yych = *++YYCURSOR;
-yy74:
-#line 104
+yy78: yych = *++YYCURSOR;
+yy79:
+#line 107
{ return "timestamp#ymd"; }
-yy75: yych = *++YYCURSOR;
+yy80: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -568,10 +617,10 @@ yy75: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy117;
+ case '9': goto yy122;
default: goto yy25;
}
-yy76: yych = *++YYCURSOR;
+yy81: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -582,14 +631,14 @@ yy76: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy99;
+ case '9': goto yy104;
default: goto yy25;
}
-yy77: ++YYCURSOR;
+yy82: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy78: switch(yych){
- case '\t': case ' ': goto yy77;
+yy83: switch(yych){
+ case '\t': case ' ': goto yy82;
case '0':
case '1':
case '2':
@@ -599,10 +648,10 @@ yy78: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy79;
+ case '9': goto yy84;
default: goto yy25;
}
-yy79: yych = *++YYCURSOR;
+yy84: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -613,15 +662,15 @@ yy79: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy80;
+ case '9': goto yy85;
default: goto yy25;
}
-yy80: yych = *++YYCURSOR;
+yy85: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy81;
+ case ':': goto yy86;
default: goto yy25;
}
-yy81: yych = *++YYCURSOR;
+yy86: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -632,10 +681,10 @@ yy81: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy82;
+ case '9': goto yy87;
default: goto yy25;
}
-yy82: yych = *++YYCURSOR;
+yy87: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -646,15 +695,15 @@ yy82: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy83;
+ case '9': goto yy88;
default: goto yy25;
}
-yy83: yych = *++YYCURSOR;
+yy88: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy84;
+ case ':': goto yy89;
default: goto yy25;
}
-yy84: yych = *++YYCURSOR;
+yy89: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -665,10 +714,10 @@ yy84: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy85;
+ case '9': goto yy90;
default: goto yy25;
}
-yy85: yych = *++YYCURSOR;
+yy90: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -679,20 +728,20 @@ yy85: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy86;
+ case '9': goto yy91;
default: goto yy25;
}
-yy86: yych = *++YYCURSOR;
+yy91: yych = *++YYCURSOR;
switch(yych){
- case '\t': case ' ': goto yy89;
- case '.': goto yy87;
+ case '\t': case ' ': goto yy94;
+ case '.': goto yy92;
default: goto yy25;
}
-yy87: ++YYCURSOR;
+yy92: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy88: switch(yych){
- case '\t': case ' ': goto yy89;
+yy93: switch(yych){
+ case '\t': case ' ': goto yy94;
case '0':
case '1':
case '2':
@@ -702,22 +751,22 @@ yy88: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy87;
+ case '9': goto yy92;
default: goto yy25;
}
-yy89: ++YYCURSOR;
+yy94: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy90: switch(yych){
- case '\t': case ' ': goto yy89;
- case '+': case '-': goto yy92;
- case 'Z': goto yy91;
+yy95: switch(yych){
+ case '\t': case ' ': goto yy94;
+ case '+': case '-': goto yy97;
+ case 'Z': goto yy96;
default: goto yy25;
}
-yy91: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy96;
+yy96: yych = *++YYCURSOR;
+ if(yych <= '\000') goto yy101;
goto yy25;
-yy92: yych = *++YYCURSOR;
+yy97: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -728,10 +777,10 @@ yy92: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy93;
+ case '9': goto yy98;
default: goto yy25;
}
-yy93: yych = *++YYCURSOR;
+yy98: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -742,16 +791,16 @@ yy93: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy94;
+ case '9': goto yy99;
default: goto yy25;
}
-yy94: yych = *++YYCURSOR;
+yy99: yych = *++YYCURSOR;
switch(yych){
- case '\000': goto yy96;
- case ':': goto yy95;
+ case '\000': goto yy101;
+ case ':': goto yy100;
default: goto yy25;
}
-yy95: yych = *++YYCURSOR;
+yy100: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -762,14 +811,14 @@ yy95: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy98;
+ case '9': goto yy103;
default: goto yy25;
}
-yy96: yych = *++YYCURSOR;
-yy97:
-#line 108
+yy101: yych = *++YYCURSOR;
+yy102:
+#line 111
{ return "timestamp#spaced"; }
-yy98: yych = *++YYCURSOR;
+yy103: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -780,10 +829,10 @@ yy98: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy91;
+ case '9': goto yy96;
default: goto yy25;
}
-yy99: yych = *++YYCURSOR;
+yy104: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -794,15 +843,15 @@ yy99: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy100;
+ case '9': goto yy105;
default: goto yy25;
}
-yy100: yych = *++YYCURSOR;
+yy105: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy101;
+ case ':': goto yy106;
default: goto yy25;
}
-yy101: yych = *++YYCURSOR;
+yy106: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -813,10 +862,10 @@ yy101: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy102;
+ case '9': goto yy107;
default: goto yy25;
}
-yy102: yych = *++YYCURSOR;
+yy107: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -827,15 +876,15 @@ yy102: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy103;
+ case '9': goto yy108;
default: goto yy25;
}
-yy103: yych = *++YYCURSOR;
+yy108: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy104;
+ case ':': goto yy109;
default: goto yy25;
}
-yy104: yych = *++YYCURSOR;
+yy109: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -846,10 +895,10 @@ yy104: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy105;
+ case '9': goto yy110;
default: goto yy25;
}
-yy105: yych = *++YYCURSOR;
+yy110: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -860,12 +909,12 @@ yy105: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy106;
+ case '9': goto yy111;
default: goto yy25;
}
-yy106: yych = *++YYCURSOR;
+yy111: yych = *++YYCURSOR;
switch(yych){
- case '.': goto yy107;
+ case '.': goto yy112;
case '0':
case '1':
case '2':
@@ -876,13 +925,13 @@ yy106: yych = *++YYCURSOR;
case '7':
case '8':
case '9': goto yy25;
- default: goto yy108;
+ default: goto yy113;
}
-yy107: ++YYCURSOR;
+yy112: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy108: switch(yych){
- case '+': case '-': goto yy110;
+yy113: switch(yych){
+ case '+': case '-': goto yy115;
case '0':
case '1':
case '2':
@@ -892,14 +941,14 @@ yy108: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy107;
- case 'Z': goto yy109;
+ case '9': goto yy112;
+ case 'Z': goto yy114;
default: goto yy25;
}
-yy109: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy114;
+yy114: yych = *++YYCURSOR;
+ if(yych <= '\000') goto yy119;
goto yy25;
-yy110: yych = *++YYCURSOR;
+yy115: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -910,10 +959,10 @@ yy110: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy111;
+ case '9': goto yy116;
default: goto yy25;
}
-yy111: yych = *++YYCURSOR;
+yy116: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -924,16 +973,16 @@ yy111: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy112;
+ case '9': goto yy117;
default: goto yy25;
}
-yy112: yych = *++YYCURSOR;
+yy117: yych = *++YYCURSOR;
switch(yych){
- case '\000': goto yy114;
- case ':': goto yy113;
+ case '\000': goto yy119;
+ case ':': goto yy118;
default: goto yy25;
}
-yy113: yych = *++YYCURSOR;
+yy118: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -944,14 +993,14 @@ yy113: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy116;
+ case '9': goto yy121;
default: goto yy25;
}
-yy114: yych = *++YYCURSOR;
-yy115:
-#line 106
+yy119: yych = *++YYCURSOR;
+yy120:
+#line 109
{ return "timestamp#iso8601"; }
-yy116: yych = *++YYCURSOR;
+yy121: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -962,10 +1011,10 @@ yy116: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy109;
+ case '9': goto yy114;
default: goto yy25;
}
-yy117: yych = *++YYCURSOR;
+yy122: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -976,15 +1025,15 @@ yy117: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy118;
+ case '9': goto yy123;
default: goto yy25;
}
-yy118: yych = *++YYCURSOR;
+yy123: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy119;
+ case ':': goto yy124;
default: goto yy25;
}
-yy119: yych = *++YYCURSOR;
+yy124: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -995,10 +1044,10 @@ yy119: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy120;
+ case '9': goto yy125;
default: goto yy25;
}
-yy120: yych = *++YYCURSOR;
+yy125: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1009,15 +1058,15 @@ yy120: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy121;
+ case '9': goto yy126;
default: goto yy25;
}
-yy121: yych = *++YYCURSOR;
+yy126: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy122;
+ case ':': goto yy127;
default: goto yy25;
}
-yy122: yych = *++YYCURSOR;
+yy127: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1028,10 +1077,10 @@ yy122: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy123;
+ case '9': goto yy128;
default: goto yy25;
}
-yy123: yych = *++YYCURSOR;
+yy128: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1042,12 +1091,12 @@ yy123: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy124;
+ case '9': goto yy129;
default: goto yy25;
}
-yy124: yych = *++YYCURSOR;
+yy129: yych = *++YYCURSOR;
switch(yych){
- case '.': goto yy125;
+ case '.': goto yy130;
case '0':
case '1':
case '2':
@@ -1058,15 +1107,15 @@ yy124: yych = *++YYCURSOR;
case '7':
case '8':
case '9': goto yy25;
- case 'Z': goto yy127;
- default: goto yy126;
+ case 'Z': goto yy132;
+ default: goto yy131;
}
-yy125: ++YYCURSOR;
+yy130: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yych = *YYCURSOR;
-yy126: switch(yych){
- case '+': case '-': goto yy110;
- case '0': goto yy125;
+yy131: switch(yych){
+ case '+': case '-': goto yy115;
+ case '0': goto yy130;
case '1':
case '2':
case '3':
@@ -1075,20 +1124,20 @@ yy126: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy129;
- case 'Z': goto yy109;
+ case '9': goto yy134;
+ case 'Z': goto yy114;
default: goto yy25;
}
-yy127: yych = *++YYCURSOR;
+yy132: yych = *++YYCURSOR;
if(yych >= '\001') goto yy25;
-yy128: yych = *++YYCURSOR;
- goto yy115;
-yy129: ++YYCURSOR;
+yy133: yych = *++YYCURSOR;
+ goto yy120;
+yy134: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yych = *YYCURSOR;
-yy130: switch(yych){
- case '+': case '-': goto yy110;
- case '0': goto yy125;
+yy135: switch(yych){
+ case '+': case '-': goto yy115;
+ case '0': goto yy130;
case '1':
case '2':
case '3':
@@ -1097,11 +1146,11 @@ yy130: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy129;
- case 'Z': goto yy127;
+ case '9': goto yy134;
+ case 'Z': goto yy132;
default: goto yy25;
}
-yy131: yych = *++YYCURSOR;
+yy136: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1110,12 +1159,12 @@ yy131: yych = *++YYCURSOR;
case '4':
case '5':
case '6':
- case '7': goto yy146;
+ case '7': goto yy151;
case '8':
- case '9': goto yy144;
- default: goto yy134;
+ case '9': goto yy149;
+ default: goto yy139;
}
-yy132: yych = *++YYCURSOR;
+yy137: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1126,14 +1175,14 @@ yy132: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy144;
- default: goto yy143;
+ case '9': goto yy149;
+ default: goto yy148;
}
-yy133: ++YYCURSOR;
+yy138: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy134: switch(yych){
- case '\000': goto yy140;
+yy139: switch(yych){
+ case '\000': goto yy145;
case ',': case '0':
case '1':
case '2':
@@ -1141,20 +1190,21 @@ yy134: switch(yych){
case '4':
case '5':
case '6':
- case '7': goto yy133;
+ case '7': goto yy138;
case '.': goto yy49;
case '8':
- case '9': goto yy142;
+ case '9': goto yy147;
+ case ':': goto yy53;
default: goto yy25;
}
-yy135: yych = *++YYCURSOR;
+yy140: yych = *++YYCURSOR;
if(yych <= '\000') goto yy25;
- goto yy137;
-yy136: ++YYCURSOR;
+ goto yy142;
+yy141: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy137: switch(yych){
- case '\000': goto yy138;
+yy142: switch(yych){
+ case '\000': goto yy143;
case ',': case '0':
case '1':
case '2':
@@ -1174,21 +1224,21 @@ yy137: switch(yych){
case 'c':
case 'd':
case 'e':
- case 'f': goto yy136;
+ case 'f': goto yy141;
default: goto yy25;
}
-yy138: yych = *++YYCURSOR;
-yy139:
-#line 88
+yy143: yych = *++YYCURSOR;
+yy144:
+#line 89
{ return "int#hex"; }
-yy140: yych = *++YYCURSOR;
-yy141:
-#line 90
+yy145: yych = *++YYCURSOR;
+yy146:
+#line 91
{ return "int#oct"; }
-yy142: ++YYCURSOR;
+yy147: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy143: switch(yych){
+yy148: switch(yych){
case ',': case '0':
case '1':
case '2':
@@ -1198,11 +1248,12 @@ yy143: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy142;
+ case '9': goto yy147;
case '.': goto yy49;
+ case ':': goto yy53;
default: goto yy25;
}
-yy144: yych = *++YYCURSOR;
+yy149: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1213,15 +1264,15 @@ yy144: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy145;
- default: goto yy143;
+ case '9': goto yy150;
+ default: goto yy148;
}
-yy145: yych = *++YYCURSOR;
+yy150: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy67;
- default: goto yy143;
+ case '-': goto yy72;
+ default: goto yy148;
}
-yy146: yych = *++YYCURSOR;
+yy151: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1230,218 +1281,218 @@ yy146: yych = *++YYCURSOR;
case '4':
case '5':
case '6':
- case '7': goto yy147;
+ case '7': goto yy152;
case '8':
- case '9': goto yy145;
- default: goto yy134;
+ case '9': goto yy150;
+ default: goto yy139;
}
-yy147: yych = *++YYCURSOR;
+yy152: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy67;
- default: goto yy134;
+ case '-': goto yy72;
+ default: goto yy139;
}
-yy148: yych = *++YYCURSOR;
+yy153: yych = *++YYCURSOR;
switch(yych){
- case 'I': goto yy151;
- case 'i': goto yy150;
+ case 'I': goto yy156;
+ case 'i': goto yy155;
default: goto yy25;
}
-yy149: yych = *++YYCURSOR;
+yy154: yych = *++YYCURSOR;
switch(yych){
case '\000': goto yy51;
- case 'x': goto yy135;
- default: goto yy134;
+ case 'x': goto yy140;
+ default: goto yy139;
}
-yy150: yych = *++YYCURSOR;
+yy155: yych = *++YYCURSOR;
switch(yych){
- case 'n': goto yy157;
+ case 'n': goto yy162;
default: goto yy25;
}
-yy151: yych = *++YYCURSOR;
+yy156: yych = *++YYCURSOR;
switch(yych){
- case 'N': goto yy152;
- case 'n': goto yy153;
+ case 'N': goto yy157;
+ case 'n': goto yy158;
default: goto yy25;
}
-yy152: yych = *++YYCURSOR;
+yy157: yych = *++YYCURSOR;
switch(yych){
- case 'F': goto yy154;
+ case 'F': goto yy159;
default: goto yy25;
}
-yy153: yych = *++YYCURSOR;
+yy158: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy154;
+ case 'f': goto yy159;
default: goto yy25;
}
-yy154: yych = *++YYCURSOR;
+yy159: yych = *++YYCURSOR;
if(yych >= '\001') goto yy25;
-yy155: yych = *++YYCURSOR;
-yy156:
-#line 100
+yy160: yych = *++YYCURSOR;
+yy161:
+#line 103
{ return "float#neginf"; }
-yy157: yych = *++YYCURSOR;
+yy162: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy154;
+ case 'f': goto yy159;
default: goto yy25;
}
-yy158: yych = *++YYCURSOR;
+yy163: yych = *++YYCURSOR;
switch(yych){
case 'I': goto yy33;
case 'i': goto yy32;
default: goto yy25;
}
-yy159: yych = *++YYCURSOR;
+yy164: yych = *++YYCURSOR;
switch(yych){
- case 'L': goto yy166;
+ case 'L': goto yy171;
default: goto yy25;
}
-yy160: yych = *++YYCURSOR;
+yy165: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy161;
+ case 'l': goto yy166;
default: goto yy25;
}
-yy161: yych = *++YYCURSOR;
+yy166: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy162;
+ case 's': goto yy167;
default: goto yy25;
}
-yy162: yych = *++YYCURSOR;
+yy167: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy163;
+ case 'e': goto yy168;
default: goto yy25;
}
-yy163: yych = *++YYCURSOR;
+yy168: yych = *++YYCURSOR;
if(yych >= '\001') goto yy25;
-yy164: yych = *++YYCURSOR;
-yy165:
-#line 86
+yy169: yych = *++YYCURSOR;
+yy170:
+#line 87
{ return "bool#no"; }
-yy166: yych = *++YYCURSOR;
+yy171: yych = *++YYCURSOR;
switch(yych){
- case 'S': goto yy167;
+ case 'S': goto yy172;
default: goto yy25;
}
-yy167: yych = *++YYCURSOR;
+yy172: yych = *++YYCURSOR;
switch(yych){
- case 'E': goto yy163;
+ case 'E': goto yy168;
default: goto yy25;
}
-yy168: yych = *++YYCURSOR;
+yy173: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy169;
+ case 'l': goto yy174;
default: goto yy25;
}
-yy169: yych = *++YYCURSOR;
+yy174: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy170;
+ case 's': goto yy175;
default: goto yy25;
}
-yy170: yych = *++YYCURSOR;
+yy175: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy163;
+ case 'e': goto yy168;
default: goto yy25;
}
-yy171: yych = *++YYCURSOR;
+yy176: yych = *++YYCURSOR;
switch(yych){
- case 'F': goto yy163;
+ case 'F': goto yy168;
default: goto yy25;
}
-yy172: yych = *++YYCURSOR;
+yy177: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy163;
+ case 'f': goto yy168;
default: goto yy25;
}
-yy173: yych = *++YYCURSOR;
+yy178: yych = *++YYCURSOR;
if(yych >= '\001') goto yy25;
-yy174: yych = *++YYCURSOR;
-yy175:
-#line 84
+yy179: yych = *++YYCURSOR;
+yy180:
+#line 85
{ return "bool#yes"; }
-yy176: yych = *++YYCURSOR;
+yy181: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy163;
+ case 'f': goto yy168;
default: goto yy25;
}
-yy177: yych = *++YYCURSOR;
+yy182: yych = *++YYCURSOR;
switch(yych){
- case 'S': goto yy173;
+ case 'S': goto yy178;
default: goto yy25;
}
-yy178: yych = *++YYCURSOR;
+yy183: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy173;
+ case 's': goto yy178;
default: goto yy25;
}
-yy179: yych = *++YYCURSOR;
+yy184: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy173;
+ case 's': goto yy178;
default: goto yy25;
}
-yy180: yych = *++YYCURSOR;
+yy185: yych = *++YYCURSOR;
switch(yych){
- case 'U': goto yy183;
+ case 'U': goto yy188;
default: goto yy25;
}
-yy181: yych = *++YYCURSOR;
+yy186: yych = *++YYCURSOR;
switch(yych){
- case 'u': goto yy182;
+ case 'u': goto yy187;
default: goto yy25;
}
-yy182: yych = *++YYCURSOR;
+yy187: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy173;
+ case 'e': goto yy178;
default: goto yy25;
}
-yy183: yych = *++YYCURSOR;
+yy188: yych = *++YYCURSOR;
switch(yych){
- case 'E': goto yy173;
+ case 'E': goto yy178;
default: goto yy25;
}
-yy184: yych = *++YYCURSOR;
+yy189: yych = *++YYCURSOR;
switch(yych){
- case 'u': goto yy185;
+ case 'u': goto yy190;
default: goto yy25;
}
-yy185: yych = *++YYCURSOR;
+yy190: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy173;
+ case 'e': goto yy178;
default: goto yy25;
}
-yy186: yych = *++YYCURSOR;
+yy191: yych = *++YYCURSOR;
switch(yych){
- case 'L': goto yy190;
+ case 'L': goto yy195;
default: goto yy25;
}
-yy187: yych = *++YYCURSOR;
+yy192: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy188;
+ case 'l': goto yy193;
default: goto yy25;
}
-yy188: yych = *++YYCURSOR;
+yy193: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy189;
+ case 'l': goto yy194;
default: goto yy25;
}
-yy189: yych = *++YYCURSOR;
+yy194: yych = *++YYCURSOR;
if(yych <= '\000') goto yy6;
goto yy25;
-yy190: yych = *++YYCURSOR;
+yy195: yych = *++YYCURSOR;
switch(yych){
- case 'L': goto yy189;
+ case 'L': goto yy194;
default: goto yy25;
}
-yy191: yych = *++YYCURSOR;
+yy196: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy192;
+ case 'l': goto yy197;
default: goto yy25;
}
-yy192: yych = *++YYCURSOR;
+yy197: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy189;
+ case 'l': goto yy194;
default: goto yy25;
}
}
-#line 118
+#line 121
}
@@ -1457,14 +1508,14 @@ syck_type_id_to_uri( char *type_id )
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy193;
-yy194: ++YYCURSOR;
-yy193:
+ goto yy198;
+yy199: ++YYCURSOR;
+yy198:
if((YYLIMIT - YYCURSOR) < 21) YYFILL(21);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy195;
- case '!': goto yy199;
+ case '\000': goto yy200;
+ case '!': goto yy204;
case '0':
case '1':
case '2':
@@ -1520,22 +1571,22 @@ yy193:
case 's': case 'u':
case 'v':
case 'w': case 'y':
- case 'z': goto yy201;
- case 't': goto yy196;
- case 'x': goto yy198;
- default: goto yy202;
+ case 'z': goto yy206;
+ case 't': goto yy201;
+ case 'x': goto yy203;
+ default: goto yy207;
}
-yy195: YYCURSOR = YYMARKER;
+yy200: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy197;
+ case 0: goto yy202;
}
-yy196: yyaccept = 0;
+yy201: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case ',': goto yy207;
- case '-': goto yy203;
- case '.': goto yy208;
- case '/': goto yy209;
+ case ',': goto yy212;
+ case '-': goto yy208;
+ case '.': goto yy213;
+ case '/': goto yy214;
case '0':
case '1':
case '2':
@@ -1594,14 +1645,14 @@ yy196: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy205;
- case 'a': goto yy237;
- default: goto yy197;
+ case 'z': goto yy210;
+ case 'a': goto yy242;
+ default: goto yy202;
}
-yy197:
-#line 170
+yy202:
+#line 173
{ return syck_taguri( YAML_DOMAIN, type_id, strlen( type_id ) ); }
-yy198: yyaccept = 0;
+yy203: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case ',': case '.':
@@ -1665,21 +1716,21 @@ yy198: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy206;
- case '-': goto yy227;
- default: goto yy197;
+ case 'z': goto yy211;
+ case '-': goto yy232;
+ default: goto yy202;
}
-yy199: yych = *++YYCURSOR;
-yy200:
-#line 144
+yy204: yych = *++YYCURSOR;
+yy205:
+#line 147
{ return syck_xprivate( type_id + 1, strlen( type_id ) - 1 ); }
-yy201: yyaccept = 0;
+yy206: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case ',': goto yy207;
- case '-': goto yy203;
- case '.': goto yy208;
- case '/': goto yy209;
+ case ',': goto yy212;
+ case '-': goto yy208;
+ case '.': goto yy213;
+ case '/': goto yy214;
case '0':
case '1':
case '2':
@@ -1739,16 +1790,16 @@ yy201: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy205;
- default: goto yy197;
+ case 'z': goto yy210;
+ default: goto yy202;
}
-yy202: yych = *++YYCURSOR;
- goto yy197;
-yy203: ++YYCURSOR;
+yy207: yych = *++YYCURSOR;
+ goto yy202;
+yy208: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy204: switch(yych){
- case '-': goto yy203;
+yy209: switch(yych){
+ case '-': goto yy208;
case '0':
case '1':
case '2':
@@ -1808,17 +1859,17 @@ yy204: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy205;
- default: goto yy195;
+ case 'z': goto yy210;
+ default: goto yy200;
}
-yy205: ++YYCURSOR;
+yy210: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy206: switch(yych){
- case ',': goto yy207;
- case '-': goto yy203;
- case '.': goto yy208;
- case '/': goto yy209;
+yy211: switch(yych){
+ case ',': goto yy212;
+ case '-': goto yy208;
+ case '.': goto yy213;
+ case '/': goto yy214;
case '0':
case '1':
case '2':
@@ -1878,10 +1929,10 @@ yy206: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy205;
- default: goto yy195;
+ case 'z': goto yy210;
+ default: goto yy200;
}
-yy207: yych = *++YYCURSOR;
+yy212: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1892,10 +1943,10 @@ yy207: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy215;
- default: goto yy195;
+ case '9': goto yy220;
+ default: goto yy200;
}
-yy208: ++YYCURSOR;
+yy213: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
@@ -1958,12 +2009,12 @@ yy208: ++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy211;
- default: goto yy195;
+ case 'z': goto yy216;
+ default: goto yy200;
}
-yy209: yych = *++YYCURSOR;
-yy210:
-#line 146
+yy214: yych = *++YYCURSOR;
+yy215:
+#line 149
{ char *domain = S_ALLOC_N( char, ( YYCURSOR - type_id ) + 15 );
char *uri;
@@ -1976,14 +2027,14 @@ yy210:
S_FREE( domain );
return uri;
}
-yy211: ++YYCURSOR;
+yy216: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
-yy212: switch(yych){
- case ',': goto yy207;
- case '-': goto yy213;
- case '.': goto yy208;
- case '/': goto yy209;
+yy217: switch(yych){
+ case ',': goto yy212;
+ case '-': goto yy218;
+ case '.': goto yy213;
+ case '/': goto yy214;
case '0':
case '1':
case '2':
@@ -2043,14 +2094,14 @@ yy212: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy211;
- default: goto yy195;
+ case 'z': goto yy216;
+ default: goto yy200;
}
-yy213: ++YYCURSOR;
+yy218: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy214: switch(yych){
- case '-': goto yy213;
+yy219: switch(yych){
+ case '-': goto yy218;
case '0':
case '1':
case '2':
@@ -2110,10 +2161,10 @@ yy214: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy211;
- default: goto yy195;
+ case 'z': goto yy216;
+ default: goto yy200;
}
-yy215: yych = *++YYCURSOR;
+yy220: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2124,10 +2175,10 @@ yy215: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy216;
- default: goto yy195;
+ case '9': goto yy221;
+ default: goto yy200;
}
-yy216: yych = *++YYCURSOR;
+yy221: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2138,10 +2189,10 @@ yy216: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy217;
- default: goto yy195;
+ case '9': goto yy222;
+ default: goto yy200;
}
-yy217: yych = *++YYCURSOR;
+yy222: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2152,16 +2203,16 @@ yy217: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy218;
- default: goto yy195;
+ case '9': goto yy223;
+ default: goto yy200;
}
-yy218: yych = *++YYCURSOR;
+yy223: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy219;
- case '/': goto yy220;
- default: goto yy195;
+ case '-': goto yy224;
+ case '/': goto yy225;
+ default: goto yy200;
}
-yy219: yych = *++YYCURSOR;
+yy224: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2172,12 +2223,12 @@ yy219: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy222;
- default: goto yy195;
+ case '9': goto yy227;
+ default: goto yy200;
}
-yy220: yych = *++YYCURSOR;
-yy221:
-#line 159
+yy225: yych = *++YYCURSOR;
+yy226:
+#line 162
{ char *domain = S_ALLOC_N( char, YYCURSOR - type_id );
char *uri;
@@ -2188,7 +2239,7 @@ yy221:
S_FREE( domain );
return uri;
}
-yy222: yych = *++YYCURSOR;
+yy227: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2199,16 +2250,16 @@ yy222: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy223;
- default: goto yy195;
+ case '9': goto yy228;
+ default: goto yy200;
}
-yy223: yych = *++YYCURSOR;
+yy228: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy224;
- case '/': goto yy220;
- default: goto yy195;
+ case '-': goto yy229;
+ case '/': goto yy225;
+ default: goto yy200;
}
-yy224: yych = *++YYCURSOR;
+yy229: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2219,10 +2270,10 @@ yy224: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy225;
- default: goto yy195;
+ case '9': goto yy230;
+ default: goto yy200;
}
-yy225: yych = *++YYCURSOR;
+yy230: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2233,109 +2284,109 @@ yy225: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy226;
- default: goto yy195;
+ case '9': goto yy231;
+ default: goto yy200;
}
-yy226: yych = *++YYCURSOR;
+yy231: yych = *++YYCURSOR;
switch(yych){
- case '/': goto yy220;
- default: goto yy195;
+ case '/': goto yy225;
+ default: goto yy200;
}
-yy227: yych = *++YYCURSOR;
+yy232: yych = *++YYCURSOR;
switch(yych){
- case 'p': goto yy228;
- default: goto yy204;
+ case 'p': goto yy233;
+ default: goto yy209;
}
-yy228: yych = *++YYCURSOR;
+yy233: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case 'r': goto yy229;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case 'r': goto yy234;
+ default: goto yy209;
}
-yy229: yych = *++YYCURSOR;
+yy234: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case 'i': goto yy230;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case 'i': goto yy235;
+ default: goto yy209;
}
-yy230: yych = *++YYCURSOR;
+yy235: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case 'v': goto yy231;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case 'v': goto yy236;
+ default: goto yy209;
}
-yy231: yych = *++YYCURSOR;
+yy236: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case 'a': goto yy232;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case 'a': goto yy237;
+ default: goto yy209;
}
-yy232: yych = *++YYCURSOR;
+yy237: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case 't': goto yy233;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case 't': goto yy238;
+ default: goto yy209;
}
-yy233: yych = *++YYCURSOR;
+yy238: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case 'e': goto yy234;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case 'e': goto yy239;
+ default: goto yy209;
}
-yy234: yych = *++YYCURSOR;
+yy239: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case ':': goto yy235;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case ':': goto yy240;
+ default: goto yy209;
}
-yy235: yych = *++YYCURSOR;
-yy236:
-#line 142
+yy240: yych = *++YYCURSOR;
+yy241:
+#line 145
{ return type_id; }
-yy237: yych = *++YYCURSOR;
+yy242: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case 'g': goto yy238;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case 'g': goto yy243;
+ default: goto yy209;
}
-yy238: yych = *++YYCURSOR;
+yy243: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy207;
- case '.': goto yy208;
- case '/': goto yy209;
- case ':': goto yy239;
- default: goto yy204;
+ case ',': goto yy212;
+ case '.': goto yy213;
+ case '/': goto yy214;
+ case ':': goto yy244;
+ default: goto yy209;
}
-yy239: yych = *++YYCURSOR;
+yy244: yych = *++YYCURSOR;
switch(yych){
case ',':
case '-':
- case '.': goto yy195;
- default: goto yy241;
+ case '.': goto yy200;
+ default: goto yy246;
}
-yy240: ++YYCURSOR;
+yy245: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy241: switch(yych){
- case ',': goto yy244;
- case '-': goto yy242;
- case '.': goto yy245;
+yy246: switch(yych){
+ case ',': goto yy249;
+ case '-': goto yy247;
+ case '.': goto yy250;
case '0':
case '1':
case '2':
@@ -2395,14 +2446,14 @@ yy241: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy240;
- default: goto yy195;
+ case 'z': goto yy245;
+ default: goto yy200;
}
-yy242: ++YYCURSOR;
+yy247: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy243: switch(yych){
- case '-': goto yy242;
+yy248: switch(yych){
+ case '-': goto yy247;
case '0':
case '1':
case '2':
@@ -2462,10 +2513,10 @@ yy243: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy240;
- default: goto yy195;
+ case 'z': goto yy245;
+ default: goto yy200;
}
-yy244: yych = *++YYCURSOR;
+yy249: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2476,10 +2527,10 @@ yy244: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy250;
- default: goto yy195;
+ case '9': goto yy255;
+ default: goto yy200;
}
-yy245: ++YYCURSOR;
+yy250: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
@@ -2542,16 +2593,16 @@ yy245: ++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy246;
- default: goto yy195;
+ case 'z': goto yy251;
+ default: goto yy200;
}
-yy246: ++YYCURSOR;
+yy251: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
-yy247: switch(yych){
- case ',': goto yy244;
- case '-': goto yy248;
- case '.': goto yy245;
+yy252: switch(yych){
+ case ',': goto yy249;
+ case '-': goto yy253;
+ case '.': goto yy250;
case '0':
case '1':
case '2':
@@ -2611,14 +2662,14 @@ yy247: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy246;
- default: goto yy195;
+ case 'z': goto yy251;
+ default: goto yy200;
}
-yy248: ++YYCURSOR;
+yy253: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy249: switch(yych){
- case '-': goto yy248;
+yy254: switch(yych){
+ case '-': goto yy253;
case '0':
case '1':
case '2':
@@ -2678,10 +2729,10 @@ yy249: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy246;
- default: goto yy195;
+ case 'z': goto yy251;
+ default: goto yy200;
}
-yy250: yych = *++YYCURSOR;
+yy255: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2692,10 +2743,10 @@ yy250: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy251;
- default: goto yy195;
+ case '9': goto yy256;
+ default: goto yy200;
}
-yy251: yych = *++YYCURSOR;
+yy256: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2706,10 +2757,10 @@ yy251: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy252;
- default: goto yy195;
+ case '9': goto yy257;
+ default: goto yy200;
}
-yy252: yych = *++YYCURSOR;
+yy257: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2720,16 +2771,16 @@ yy252: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy253;
- default: goto yy195;
+ case '9': goto yy258;
+ default: goto yy200;
}
-yy253: yych = *++YYCURSOR;
+yy258: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy254;
- case ':': goto yy255;
- default: goto yy195;
+ case '-': goto yy259;
+ case ':': goto yy260;
+ default: goto yy200;
}
-yy254: yych = *++YYCURSOR;
+yy259: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2740,14 +2791,14 @@ yy254: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy257;
- default: goto yy195;
+ case '9': goto yy262;
+ default: goto yy200;
}
-yy255: yych = *++YYCURSOR;
-yy256:
-#line 140
+yy260: yych = *++YYCURSOR;
+yy261:
+#line 143
{ return type_id; }
-yy257: yych = *++YYCURSOR;
+yy262: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2758,16 +2809,16 @@ yy257: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy258;
- default: goto yy195;
+ case '9': goto yy263;
+ default: goto yy200;
}
-yy258: yych = *++YYCURSOR;
+yy263: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy259;
- case ':': goto yy255;
- default: goto yy195;
+ case '-': goto yy264;
+ case ':': goto yy260;
+ default: goto yy200;
}
-yy259: yych = *++YYCURSOR;
+yy264: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2778,10 +2829,10 @@ yy259: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy260;
- default: goto yy195;
+ case '9': goto yy265;
+ default: goto yy200;
}
-yy260: yych = *++YYCURSOR;
+yy265: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2792,16 +2843,16 @@ yy260: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy261;
- default: goto yy195;
+ case '9': goto yy266;
+ default: goto yy200;
}
-yy261: yych = *++YYCURSOR;
+yy266: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy255;
- default: goto yy195;
+ case ':': goto yy260;
+ default: goto yy200;
}
}
-#line 172
+#line 175
}
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index 012d727..7e6d0e6 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -1,3 +1,4 @@
+/* -*- indent-tabs-mode: nil -*-
/*
* rubyext.c
*
@@ -15,23 +16,23 @@
typedef struct RVALUE {
union {
#if 0
- struct {
- unsigned long flags; /* always 0 for freed obj */
- struct RVALUE *next;
- } free;
+ struct {
+ unsigned long flags; /* always 0 for freed obj */
+ struct RVALUE *next;
+ } free;
#endif
- struct RBasic basic;
- struct RObject object;
- struct RClass klass;
- /*struct RFloat flonum;*/
- /*struct RString string;*/
- struct RArray array;
- /*struct RRegexp regexp;*/
- struct RHash hash;
- /*struct RData data;*/
- struct RStruct rstruct;
- /*struct RBignum bignum;*/
- /*struct RFile file;*/
+ struct RBasic basic;
+ struct RObject object;
+ struct RClass klass;
+ /*struct RFloat flonum;*/
+ /*struct RString string;*/
+ struct RArray array;
+ /*struct RRegexp regexp;*/
+ struct RHash hash;
+ /*struct RData data;*/
+ struct RStruct rstruct;
+ /*struct RBignum bignum;*/
+ /*struct RFile file;*/
} as;
} RVALUE;
@@ -49,6 +50,7 @@ typedef struct {
* symbols and constants
*/
static ID s_new, s_utc, s_at, s_to_f, s_to_i, s_read, s_binmode, s_call, s_transfer, s_update, s_dup, s_match, s_keys, s_to_str, s_unpack, s_tr_bang, s_anchors, s_default_set;
+static ID s_anchors, s_domain, s_families, s_kind, s_name, s_options, s_private_types, s_type_id, s_value;
static VALUE sym_model, sym_generic, sym_input, sym_bytecode;
static VALUE sym_scalar, sym_seq, sym_map;
VALUE cDate, cParser, cLoader, cNode, cPrivateType, cDomainType, cBadAlias, cDefaultKey, cMergeKey, cEmitter;
@@ -85,7 +87,7 @@ struct parser_xtra {
*/
VALUE
rb_syck_compile(self, port)
- VALUE self, port;
+ VALUE self, port;
{
SYMID oid;
int taint;
@@ -94,7 +96,7 @@ rb_syck_compile(self, port)
bytestring_t *sav;
SyckParser *parser = syck_new_parser();
- taint = syck_parser_assign_io(parser, port);
+ taint = syck_parser_assign_io(parser, port);
syck_parser_handler( parser, syck_yaml2byte_handler );
syck_parser_error_handler( parser, NULL );
syck_parser_implicit_typing( parser, 0 );
@@ -151,14 +153,14 @@ rb_syck_io_str_read( char *buf, SyckIoStr *str, long max_size, long skip )
*/
int
syck_parser_assign_io(parser, port)
- SyckParser *parser;
- VALUE port;
+ SyckParser *parser;
+ VALUE port;
{
int taint = Qtrue;
if (rb_respond_to(port, s_to_str)) {
- taint = OBJ_TAINTED(port); /* original taintedness */
- StringValue(port); /* possible conversion */
- syck_parser_str( parser, RSTRING(port)->ptr, RSTRING(port)->len, NULL );
+ taint = OBJ_TAINTED(port); /* original taintedness */
+ StringValue(port); /* possible conversion */
+ syck_parser_str( parser, RSTRING(port)->ptr, RSTRING(port)->len, NULL );
}
else if (rb_respond_to(port, s_read)) {
if (rb_respond_to(port, s_binmode)) {
@@ -197,7 +199,8 @@ rb_syck_mktime(str)
{
VALUE time;
char *ptr = str;
- VALUE year, mon, day, hour, min, sec, usec;
+ VALUE year, mon, day, hour, min, sec;
+ long usec;
/* Year*/
ptr[4] = '\0';
@@ -232,23 +235,23 @@ rb_syck_mktime(str)
ptr += 2;
if ( *ptr == '.' )
{
- usec = INT2FIX( strtod( ptr, NULL ) * 1000000 );
+ char *padded = syck_strndup( "000000", 6 );
+ char *end = ptr + 1;
+ while ( isdigit( *end ) ) end++;
+ MEMCPY(padded, ptr + 1, char, end - (ptr + 1));
+ usec = strtol(padded, NULL, 10);
}
else
{
- usec = INT2FIX( 0 );
+ usec = 0;
}
- /* Make UTC time*/
- time = rb_funcall(rb_cTime, s_utc, 7, year, mon, day, hour, min, sec, usec);
-
/* Time Zone*/
while ( *ptr != 'Z' && *ptr != '+' && *ptr != '-' && *ptr != '\0' ) ptr++;
if ( *ptr == '-' || *ptr == '+' )
{
- double tz_offset = 0;
- double utc_time = 0;
- tz_offset += strtod(ptr, NULL) * 3600;
+ time_t tz_offset = strtol(ptr, NULL, 10) * 3600;
+ time_t tmp;
while ( *ptr != ':' && *ptr != '\0' ) ptr++;
if ( *ptr == ':' )
@@ -256,21 +259,25 @@ rb_syck_mktime(str)
ptr += 1;
if ( tz_offset < 0 )
{
- tz_offset -= strtod(ptr, NULL) * 60;
+ tz_offset -= strtol(ptr, NULL, 10) * 60;
}
else
{
- tz_offset += strtod(ptr, NULL) * 60;
+ tz_offset += strtol(ptr, NULL, 10) * 60;
}
}
/* Make TZ time*/
- utc_time = NUM2DBL(rb_funcall(time, s_to_f, 0));
- utc_time -= tz_offset;
- time = rb_funcall(rb_cTime, s_at, 1, rb_float_new(utc_time));
- }
+ time = rb_funcall(rb_cTime, s_utc, 6, year, mon, day, hour, min, sec);
+ tmp = NUM2LONG(rb_funcall(time, s_to_i, 0)) - tz_offset;
+ return rb_funcall(rb_cTime, s_at, 2, LONG2NUM(tmp), LONG2NUM(usec));
+ }
+ else
+ {
+ /* Make UTC time*/
+ return rb_funcall(rb_cTime, s_utc, 7, year, mon, day, hour, min, sec, LONG2NUM(usec));
- return time;
+ }
}
/*
@@ -290,18 +297,18 @@ rb_syck_parse_handler(p, n)
if ( n->type_id != NULL )
{
t = rb_str_new2(n->type_id);
- rb_iv_set(obj, "@type_id", t);
+ rb_ivar_set(obj, s_type_id, t);
}
switch (n->kind)
{
case syck_str_kind:
- rb_iv_set(obj, "@kind", sym_scalar);
+ rb_ivar_set(obj, s_kind, sym_scalar);
v = rb_str_new( n->data.str->ptr, n->data.str->len );
break;
case syck_seq_kind:
- rb_iv_set(obj, "@kind", sym_seq);
+ rb_ivar_set(obj, s_kind, sym_seq);
v = rb_ary_new2( n->data.list->idx );
for ( i = 0; i < n->data.list->idx; i++ )
{
@@ -310,7 +317,7 @@ rb_syck_parse_handler(p, n)
break;
case syck_map_kind:
- rb_iv_set(obj, "@kind", sym_map);
+ rb_ivar_set(obj, s_kind, sym_map);
v = rb_hash_new();
for ( i = 0; i < n->data.pairs->idx; i++ )
{
@@ -326,9 +333,9 @@ rb_syck_parse_handler(p, n)
bonus = (struct parser_xtra *)p->bonus;
if ( bonus->taint) OBJ_TAINT( obj );
- if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, v);
+ if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, v);
- rb_iv_set(obj, "@value", v);
+ rb_ivar_set(obj, s_value, v);
rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj);
return obj;
}
@@ -341,10 +348,10 @@ VALUE
syck_merge_i( entry, hsh )
VALUE entry, hsh;
{
- if ( rb_obj_is_kind_of( entry, rb_cHash ) )
- {
- rb_funcall( hsh, s_update, 1, entry );
- }
+ if ( rb_obj_is_kind_of( entry, rb_cHash ) )
+ {
+ rb_funcall( hsh, s_update, 1, entry );
+ }
return Qnil;
}
@@ -360,12 +367,12 @@ rb_new_syck_node( obj, type_id )
if (rb_respond_to(obj, s_to_str))
{
- StringValue(obj); /* possible conversion */
+ StringValue(obj); /* possible conversion */
n = syck_alloc_str();
n->data.str->ptr = RSTRING(obj)->ptr;
n->data.str->len = RSTRING(obj)->len;
}
- else if ( rb_obj_is_kind_of( obj, rb_cArray ) )
+ else if ( rb_obj_is_kind_of( obj, rb_cArray ) )
{
n = syck_alloc_seq();
for ( i = 0; i < RARRAY(obj)->len; i++ )
@@ -411,7 +418,7 @@ yaml_org_handler( n, ref )
{
case syck_str_kind:
transferred = 1;
- if ( type_id == NULL || strcmp( type_id, "str" ) == 0 )
+ if ( type_id == NULL )
{
obj = rb_str_new( n->data.str->ptr, n->data.str->len );
}
@@ -437,12 +444,39 @@ yaml_org_handler( n, ref )
}
else if ( strcmp( type_id, "int#hex" ) == 0 )
{
+ syck_str_blow_away_commas( n );
obj = rb_cstr2inum( n->data.str->ptr, 16 );
}
else if ( strcmp( type_id, "int#oct" ) == 0 )
{
+ syck_str_blow_away_commas( n );
obj = rb_cstr2inum( n->data.str->ptr, 8 );
}
+ else if ( strcmp( type_id, "int#base60" ) == 0 )
+ {
+ char *ptr, *end;
+ long sixty = 1;
+ long total = 0;
+ syck_str_blow_away_commas( n );
+ ptr = n->data.str->ptr;
+ end = n->data.str->ptr + n->data.str->len;
+ while ( end > ptr )
+ {
+ long bnum = 0;
+ char *colon = end - 1;
+ while ( colon >= ptr && *colon != ':' )
+ {
+ colon--;
+ }
+ if ( *colon == ':' ) *colon = '\0';
+
+ bnum = strtol( colon + 1, NULL, 10 );
+ total += bnum * sixty;
+ sixty *= 60;
+ end = colon;
+ }
+ obj = INT2FIX(total);
+ }
else if ( strncmp( type_id, "int", 3 ) == 0 )
{
syck_str_blow_away_commas( n );
@@ -493,6 +527,14 @@ yaml_org_handler( n, ref )
ptr += 2;
while ( !ISDIGIT( *ptr ) ) ptr++;
day = INT2FIX(strtol(ptr, NULL, 10));
+
+ if ( !cDate ) {
+ /*
+ * Load Date module
+ */
+ rb_require( "date" );
+ cDate = rb_const_get( rb_cObject, rb_intern("Date") );
+ }
obj = rb_funcall( cDate, s_new, 3, year, mon, day );
}
@@ -508,6 +550,17 @@ yaml_org_handler( n, ref )
{
obj = rb_funcall( cDefaultKey, s_new, 0 );
}
+ else if ( strncmp( n->data.str->ptr, ":", 1 ) == 0 )
+ {
+ char *tmp;
+ tmp = syck_strndup( n->data.str->ptr + 1, n->data.str->len - 1 );
+ obj = ID2SYM( rb_intern( tmp ) );
+ free( tmp );
+ }
+ else if ( strcmp( type_id, "str" ) == 0 )
+ {
+ obj = rb_str_new( n->data.str->ptr, n->data.str->len );
+ }
else
{
transferred = 0;
@@ -616,7 +669,7 @@ rb_syck_load_handler(p, n)
bonus = (struct parser_xtra *)p->bonus;
if ( bonus->taint) OBJ_TAINT( obj );
- if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, obj);
+ if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, obj);
rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj);
return obj;
@@ -662,21 +715,21 @@ rb_syck_bad_anchor_handler(p, a)
*/
void
syck_set_model( parser, input, model )
- SyckParser *parser;
- VALUE input, model;
+ SyckParser *parser;
+ VALUE input, model;
{
- if ( model == sym_generic )
- {
- syck_parser_handler( parser, rb_syck_parse_handler );
- syck_parser_implicit_typing( parser, 1 );
- syck_parser_taguri_expansion( parser, 1 );
- }
- else
- {
- syck_parser_handler( parser, rb_syck_load_handler );
- syck_parser_implicit_typing( parser, 1 );
- syck_parser_taguri_expansion( parser, 0 );
- }
+ if ( model == sym_generic )
+ {
+ syck_parser_handler( parser, rb_syck_parse_handler );
+ syck_parser_implicit_typing( parser, 1 );
+ syck_parser_taguri_expansion( parser, 1 );
+ }
+ else
+ {
+ syck_parser_handler( parser, rb_syck_load_handler );
+ syck_parser_implicit_typing( parser, 1 );
+ syck_parser_taguri_expansion( parser, 0 );
+ }
if ( input == sym_bytecode )
{
syck_parser_set_input_type( parser, syck_bytecode_utf8 );
@@ -703,13 +756,13 @@ VALUE
syck_parser_new(argc, argv, class)
int argc;
VALUE *argv;
- VALUE class;
+ VALUE class;
{
- VALUE pobj, options, init_argv[1];
+ VALUE pobj, options, init_argv[1];
SyckParser *parser = syck_new_parser();
rb_scan_args(argc, argv, "01", &options);
- pobj = Data_Wrap_Struct( class, syck_mark_parser, syck_free_parser, parser );
+ pobj = Data_Wrap_Struct( class, syck_mark_parser, syck_free_parser, parser );
syck_parser_set_root_on_error( parser, Qnil );
@@ -717,9 +770,9 @@ syck_parser_new(argc, argv, class)
{
options = rb_hash_new();
}
- init_argv[0] = options;
- rb_obj_call_init(pobj, 1, init_argv);
- return pobj;
+ init_argv[0] = options;
+ rb_obj_call_init(pobj, 1, init_argv);
+ return pobj;
}
/*
@@ -729,8 +782,8 @@ static VALUE
syck_parser_initialize( self, options )
VALUE self, options;
{
- rb_iv_set(self, "@options", options);
- return self;
+ rb_ivar_set(self, s_options, options);
+ return self;
}
/*
@@ -740,13 +793,13 @@ static VALUE
syck_parser_bufsize_set( self, size )
VALUE self, size;
{
- SyckParser *parser;
+ SyckParser *parser;
- Data_Get_Struct(self, SyckParser, parser);
+ Data_Get_Struct(self, SyckParser, parser);
if ( rb_respond_to( size, s_to_i ) ) {
parser->bufsize = NUM2INT(rb_funcall(size, s_to_i, 0));
}
- return self;
+ return self;
}
/*
@@ -756,10 +809,10 @@ static VALUE
syck_parser_bufsize_get( self )
VALUE self;
{
- SyckParser *parser;
+ SyckParser *parser;
- Data_Get_Struct(self, SyckParser, parser);
- return INT2FIX( parser->bufsize );
+ Data_Get_Struct(self, SyckParser, parser);
+ return INT2FIX( parser->bufsize );
}
/*
@@ -769,26 +822,26 @@ VALUE
syck_parser_load(argc, argv, self)
int argc;
VALUE *argv;
- VALUE self;
+ VALUE self;
{
VALUE port, proc, model, input;
- SyckParser *parser;
+ SyckParser *parser;
struct parser_xtra bonus;
volatile VALUE hash; /* protect from GC */
rb_scan_args(argc, argv, "11", &port, &proc);
- Data_Get_Struct(self, SyckParser, parser);
+ Data_Get_Struct(self, SyckParser, parser);
- input = rb_hash_aref( rb_iv_get( self, "@options" ), sym_input );
- model = rb_hash_aref( rb_iv_get( self, "@options" ), sym_model );
- syck_set_model( parser, input, model );
+ input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
+ model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
+ syck_set_model( parser, input, model );
- bonus.taint = syck_parser_assign_io(parser, port);
+ bonus.taint = syck_parser_assign_io(parser, port);
bonus.data = hash = rb_hash_new();
- if ( NIL_P( proc ) ) bonus.proc = 0;
+ if ( NIL_P( proc ) ) bonus.proc = 0;
else bonus.proc = proc;
-
- parser->bonus = (void *)&bonus;
+
+ parser->bonus = (void *)&bonus;
return syck_parse( parser );
}
@@ -800,38 +853,38 @@ VALUE
syck_parser_load_documents(argc, argv, self)
int argc;
VALUE *argv;
- VALUE self;
+ VALUE self;
{
VALUE port, proc, v, input, model;
- SyckParser *parser;
+ SyckParser *parser;
struct parser_xtra bonus;
volatile VALUE hash;
rb_scan_args(argc, argv, "1&", &port, &proc);
- Data_Get_Struct(self, SyckParser, parser);
+ Data_Get_Struct(self, SyckParser, parser);
- input = rb_hash_aref( rb_iv_get( self, "@options" ), sym_input );
- model = rb_hash_aref( rb_iv_get( self, "@options" ), sym_model );
- syck_set_model( parser, input, model );
+ input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
+ model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
+ syck_set_model( parser, input, model );
- bonus.taint = syck_parser_assign_io(parser, port);
+ bonus.taint = syck_parser_assign_io(parser, port);
while ( 1 )
- {
+ {
/* Reset hash for tracking nodes */
bonus.data = hash = rb_hash_new();
bonus.proc = 0;
parser->bonus = (void *)&bonus;
/* Parse a document */
- v = syck_parse( parser );
+ v = syck_parse( parser );
if ( parser->eof == 1 )
{
break;
}
/* Pass document to block */
- rb_funcall( proc, s_call, 1, v );
- }
+ rb_funcall( proc, s_call, 1, v );
+ }
return Qnil;
}
@@ -845,15 +898,15 @@ syck_loader_initialize( self )
{
VALUE families;
- rb_iv_set(self, "@families", rb_hash_new() );
- rb_iv_set(self, "@private_types", rb_hash_new() );
- rb_iv_set(self, "@anchors", rb_hash_new() );
- families = rb_iv_get(self, "@families");
+ families = rb_hash_new();
+ rb_ivar_set(self, s_families, families);
+ rb_ivar_set(self, s_private_types, rb_hash_new());
+ rb_ivar_set(self, s_anchors, rb_hash_new());
rb_hash_aset(families, rb_str_new2( YAML_DOMAIN ), rb_hash_new());
rb_hash_aset(families, rb_str_new2( RUBY_DOMAIN ), rb_hash_new());
- return self;
+ return self;
}
/*
@@ -865,7 +918,7 @@ syck_loader_add_type_family( self, domain, type_re, proc )
{
VALUE families, domain_types;
- families = rb_iv_get(self, "@families");
+ families = rb_attr_get(self, s_families);
domain_types = syck_get_hash_aref(families, domain);
rb_hash_aset( domain_types, type_re, proc );
return Qnil;
@@ -933,7 +986,7 @@ syck_loader_add_private_type( argc, argv, self )
rb_scan_args(argc, argv, "1&", &type_re, &proc);
- priv_types = rb_iv_get(self, "@private_types");
+ priv_types = rb_attr_get(self, s_private_types);
rb_hash_aset( priv_types, type_re, proc );
return Qnil;
}
@@ -965,15 +1018,15 @@ transfer_find_i(entry, col)
{
VALUE key = rb_ary_entry( entry, 0 );
VALUE tid = rb_ary_entry( col, 0 );
- if ( rb_respond_to( key, s_match ) )
- {
- VALUE match = rb_funcall( key, rb_intern("match"), 1, tid );
- if ( ! NIL_P( match ) )
- {
- rb_ary_push( col, rb_ary_entry( entry, 1 ) );
- rb_iter_break();
- }
- }
+ if ( rb_respond_to( key, s_match ) )
+ {
+ VALUE match = rb_funcall( key, rb_intern("match"), 1, tid );
+ if ( ! NIL_P( match ) )
+ {
+ rb_ary_push( col, rb_ary_entry( entry, 1 ) );
+ rb_iter_break();
+ }
+ }
return Qnil;
}
@@ -1018,13 +1071,13 @@ syck_loader_transfer( self, type, val )
if ( rb_str_cmp( scheme, str_xprivate ) == 0 )
{
name = rb_ary_join( parts, rb_str_new2( ":" ) );
- type_hash = rb_iv_get(self, "@private_types");
+ type_hash = rb_attr_get(self, s_private_types);
}
else if ( rb_str_cmp( scheme, str_taguri ) == 0 )
{
domain = rb_ary_shift( parts );
name = rb_ary_join( parts, rb_str_new2( ":" ) );
- type_hash = rb_iv_get(self, "@families");
+ type_hash = rb_attr_get(self, s_families);
type_hash = rb_hash_aref(type_hash, domain);
/*
@@ -1089,7 +1142,7 @@ VALUE
syck_badalias_initialize( self, val )
VALUE self, val;
{
- rb_iv_set( self, "@name", val );
+ rb_ivar_set( self, s_name, val );
return self;
}
@@ -1100,9 +1153,9 @@ 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 );
+ rb_ivar_set( self, s_domain, domain );
+ rb_ivar_set( self, s_type_id, type_id );
+ rb_ivar_set( self, s_value, val );
return self;
}
@@ -1113,8 +1166,8 @@ 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 );
+ rb_ivar_set( self, s_type_id, type_id );
+ rb_ivar_set( self, s_value, val );
return self;
}
@@ -1125,8 +1178,8 @@ VALUE
syck_node_initialize( self, type_id, val )
VALUE self, type_id, val;
{
- rb_iv_set( self, "@type_id", type_id );
- rb_iv_set( self, "@value", val );
+ rb_ivar_set( self, s_type_id, type_id );
+ rb_ivar_set( self, s_value, val );
return self;
}
@@ -1158,8 +1211,8 @@ syck_node_transform( self )
VALUE self;
{
VALUE t = Qnil;
- VALUE type_id = rb_iv_get( self, "@type_id" );
- VALUE val = rb_iv_get( self, "@value" );
+ VALUE type_id = rb_attr_get( self, s_type_id );
+ VALUE val = rb_attr_get( self, s_value );
if ( rb_obj_is_instance_of( val, rb_cHash ) )
{
t = rb_hash_new();
@@ -1215,9 +1268,9 @@ VALUE
syck_emitter_new(argc, argv, class)
int argc;
VALUE *argv;
- VALUE class;
+ VALUE class;
{
- VALUE pobj, options, init_argv[1];
+ VALUE pobj, options, init_argv[1];
SyckEmitter *emitter = syck_new_emitter();
syck_emitter_ignore_id( emitter, Qnil );
syck_emitter_handler( emitter, rb_syck_output_handler );
@@ -1225,15 +1278,15 @@ syck_emitter_new(argc, argv, class)
emitter->bonus = (void *)rb_str_new2( "" );
rb_scan_args(argc, argv, "01", &options);
- pobj = Data_Wrap_Struct( class, syck_mark_emitter, syck_free_emitter, emitter );
+ pobj = Data_Wrap_Struct( class, syck_mark_emitter, syck_free_emitter, emitter );
if ( ! rb_obj_is_instance_of( options, rb_cHash ) )
{
options = rb_hash_new();
}
- init_argv[0] = options;
- rb_obj_call_init(pobj, 1, init_argv);
- return pobj;
+ init_argv[0] = options;
+ rb_obj_call_init(pobj, 1, init_argv);
+ return pobj;
}
/*
@@ -1243,8 +1296,8 @@ static VALUE
syck_emitter_initialize( self, options )
VALUE self, options;
{
- rb_iv_set(self, "@options", options);
- return self;
+ rb_ivar_set(self, s_options, options);
+ return self;
}
/*
@@ -1256,7 +1309,7 @@ syck_emitter_level_m( self )
{
SyckEmitter *emitter;
- Data_Get_Struct(self, SyckEmitter, emitter);
+ Data_Get_Struct(self, SyckEmitter, emitter);
return LONG2NUM( emitter->level );
}
@@ -1269,7 +1322,7 @@ syck_emitter_flush_m( self )
{
SyckEmitter *emitter;
- Data_Get_Struct(self, SyckEmitter, emitter);
+ Data_Get_Struct(self, SyckEmitter, emitter);
syck_emitter_flush( emitter, 0 );
return self;
}
@@ -1283,7 +1336,7 @@ syck_emitter_write_m( self, str )
{
SyckEmitter *emitter;
- Data_Get_Struct(self, SyckEmitter, emitter);
+ Data_Get_Struct(self, SyckEmitter, emitter);
syck_emitter_write( emitter, RSTRING(str)->ptr, RSTRING(str)->len );
return self;
}
@@ -1297,7 +1350,7 @@ syck_emitter_simple_write( self, str )
{
SyckEmitter *emitter;
- Data_Get_Struct(self, SyckEmitter, emitter);
+ Data_Get_Struct(self, SyckEmitter, emitter);
syck_emitter_simple( emitter, RSTRING(str)->ptr, RSTRING(str)->len );
return self;
}
@@ -1312,7 +1365,7 @@ syck_emitter_start_object( self, oid )
char *anchor_name;
SyckEmitter *emitter;
- Data_Get_Struct(self, SyckEmitter, emitter);
+ Data_Get_Struct(self, SyckEmitter, emitter);
anchor_name = syck_emitter_start_obj( emitter, oid );
if ( anchor_name == NULL )
@@ -1332,7 +1385,7 @@ syck_emitter_end_object( self )
{
SyckEmitter *emitter;
- Data_Get_Struct(self, SyckEmitter, emitter);
+ Data_Get_Struct(self, SyckEmitter, emitter);
syck_emitter_end_obj( emitter );
if ( emitter->level < 0 )
@@ -1353,9 +1406,9 @@ Init_syck()
rb_define_const( rb_syck, "VERSION", rb_str_new2( SYCK_VERSION ) );
rb_define_module_function( rb_syck, "compile", rb_syck_compile, 1 );
- /*
- * Global symbols
- */
+ /*
+ * Global symbols
+ */
s_new = rb_intern("new");
s_utc = rb_intern("utc");
s_at = rb_intern("at");
@@ -1366,30 +1419,34 @@ Init_syck()
s_binmode = rb_intern("binmode");
s_transfer = rb_intern("transfer");
s_call = rb_intern("call");
- s_update = rb_intern("update");
- s_dup = rb_intern("dup");
+ s_update = rb_intern("update");
+ s_dup = rb_intern("dup");
s_default_set = rb_intern("default=");
- s_match = rb_intern("match");
- s_keys = rb_intern("keys");
- s_to_str = rb_intern("to_str");
- s_tr_bang = rb_intern("tr!");
+ s_match = rb_intern("match");
+ s_keys = rb_intern("keys");
+ s_to_str = rb_intern("to_str");
+ s_tr_bang = rb_intern("tr!");
s_unpack = rb_intern("unpack");
- sym_model = ID2SYM(rb_intern("Model"));
- sym_generic = ID2SYM(rb_intern("Generic"));
- sym_input = ID2SYM(rb_intern("Input"));
- sym_bytecode = ID2SYM(rb_intern("Bytecode"));
+ s_anchors = rb_intern("@anchors");
+ s_domain = rb_intern("@domain");
+ s_families = rb_intern("@families");
+ s_kind = rb_intern("@kind");
+ s_name = rb_intern("@name");
+ s_options = rb_intern("@options");
+ s_private_types = rb_intern("@private_types");
+ s_type_id = rb_intern("@type_id");
+ s_value = rb_intern("@value");
+
+ sym_model = ID2SYM(rb_intern("Model"));
+ sym_generic = ID2SYM(rb_intern("Generic"));
+ sym_input = ID2SYM(rb_intern("Input"));
+ sym_bytecode = ID2SYM(rb_intern("Bytecode"));
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
*/
cLoader = rb_define_class_under( rb_syck, "Loader", rb_cObject );
@@ -1414,7 +1471,7 @@ Init_syck()
*/
cParser = rb_define_class_under( rb_syck, "Parser", rb_cObject );
rb_define_attr( cParser, "options", 1, 1 );
- rb_define_singleton_method( cParser, "new", syck_parser_new, -1 );
+ rb_define_singleton_method( cParser, "new", syck_parser_new, -1 );
rb_define_method(cParser, "initialize", syck_parser_initialize, 1);
rb_define_method(cParser, "load", syck_parser_load, -1);
rb_define_method(cParser, "load_documents", syck_parser_load_documents, -1);
@@ -1454,21 +1511,21 @@ Init_syck()
rb_define_attr( cBadAlias, "name", 1, 1 );
rb_define_method( cBadAlias, "initialize", syck_badalias_initialize, 1);
- /*
- * Define YAML::Syck::MergeKey class
- */
- cMergeKey = rb_define_class_under( rb_syck, "MergeKey", rb_cObject );
+ /*
+ * Define YAML::Syck::MergeKey class
+ */
+ cMergeKey = rb_define_class_under( rb_syck, "MergeKey", rb_cObject );
- /*
- * Define YAML::Syck::DefaultKey class
- */
- cDefaultKey = rb_define_class_under( rb_syck, "DefaultKey", rb_cObject );
+ /*
+ * Define YAML::Syck::DefaultKey class
+ */
+ cDefaultKey = rb_define_class_under( rb_syck, "DefaultKey", rb_cObject );
/*
* Define YAML::Syck::Emitter class
*/
cEmitter = rb_define_class_under( rb_syck, "Emitter", rb_cObject );
- rb_define_singleton_method( cEmitter, "new", syck_emitter_new, -1 );
+ rb_define_singleton_method( cEmitter, "new", syck_emitter_new, -1 );
rb_define_method( cEmitter, "initialize", syck_emitter_initialize, 1 );
rb_define_method( cEmitter, "level", syck_emitter_level_m, 0 );
rb_define_method( cEmitter, "write", syck_emitter_write_m, 1 );
diff --git a/ext/syck/syck.h b/ext/syck/syck.h
index 0383c5a..c2ef061 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.42"
+#define SYCK_VERSION "0.43"
#define YAML_DOMAIN "yaml.org,2002"
#include <stdio.h>