summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/gram.c58
-rw-r--r--ext/syck/gram.h44
-rw-r--r--ext/syck/token.c90
3 files changed, 97 insertions, 95 deletions
diff --git a/ext/syck/gram.c b/ext/syck/gram.c
index df915e5f0a..edc6da3a45 100644
--- a/ext/syck/gram.c
+++ b/ext/syck/gram.c
@@ -59,30 +59,30 @@
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
- ANCHOR = 258,
- ALIAS = 259,
- TRANSFER = 260,
- ITRANSFER = 261,
- WORD = 262,
- PLAIN = 263,
- BLOCK = 264,
- DOCSEP = 265,
- IOPEN = 266,
- INDENT = 267,
- IEND = 268
+ YAML_ANCHOR = 258,
+ YAML_ALIAS = 259,
+ YAML_TRANSFER = 260,
+ YAML_ITRANSFER = 261,
+ YAML_WORD = 262,
+ YAML_PLAIN = 263,
+ YAML_BLOCK = 264,
+ YAML_DOCSEP = 265,
+ YAML_IOPEN = 266,
+ YAML_INDENT = 267,
+ YAML_IEND = 268
};
#endif
-#define ANCHOR 258
-#define ALIAS 259
-#define TRANSFER 260
-#define ITRANSFER 261
-#define WORD 262
-#define PLAIN 263
-#define BLOCK 264
-#define DOCSEP 265
-#define IOPEN 266
-#define INDENT 267
-#define IEND 268
+#define YAML_ANCHOR 258
+#define YAML_ALIAS 259
+#define YAML_TRANSFER 260
+#define YAML_ITRANSFER 261
+#define YAML_WORD 262
+#define YAML_PLAIN 263
+#define YAML_BLOCK 264
+#define YAML_DOCSEP 265
+#define YAML_IOPEN 266
+#define YAML_INDENT 267
+#define YAML_IEND 268
@@ -97,6 +97,7 @@
#define YYLEX_PARAM parser
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -344,11 +345,12 @@ static const unsigned short yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "ANCHOR", "ALIAS", "TRANSFER", "ITRANSFER",
- "WORD", "PLAIN", "BLOCK", "DOCSEP", "IOPEN", "INDENT", "IEND", "'-'",
- "':'", "'+'", "'['", "']'", "'{'", "'}'", "','", "'?'", "$accept",
- "doc", "atom", "ind_rep", "atom_or_empty", "indent_open", "indent_end",
- "indent_sep", "indent_flex_end", "word_rep", "struct_rep",
+ "$end", "error", "$undefined", "YAML_ANCHOR", "YAML_ALIAS",
+ "YAML_TRANSFER", "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",
@@ -1459,7 +1461,7 @@ yyreduce:
}
/* Line 1016 of /usr/local/share/bison/yacc.c. */
-#line 1463 "y.tab.c"
+#line 1464 "y.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
diff --git a/ext/syck/gram.h b/ext/syck/gram.h
index 46d6c82e37..f21796a64d 100644
--- a/ext/syck/gram.h
+++ b/ext/syck/gram.h
@@ -32,30 +32,30 @@
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
- ANCHOR = 258,
- ALIAS = 259,
- TRANSFER = 260,
- ITRANSFER = 261,
- WORD = 262,
- PLAIN = 263,
- BLOCK = 264,
- DOCSEP = 265,
- IOPEN = 266,
- INDENT = 267,
- IEND = 268
+ YAML_ANCHOR = 258,
+ YAML_ALIAS = 259,
+ YAML_TRANSFER = 260,
+ YAML_ITRANSFER = 261,
+ YAML_WORD = 262,
+ YAML_PLAIN = 263,
+ YAML_BLOCK = 264,
+ YAML_DOCSEP = 265,
+ YAML_IOPEN = 266,
+ YAML_INDENT = 267,
+ YAML_IEND = 268
};
#endif
-#define ANCHOR 258
-#define ALIAS 259
-#define TRANSFER 260
-#define ITRANSFER 261
-#define WORD 262
-#define PLAIN 263
-#define BLOCK 264
-#define DOCSEP 265
-#define IOPEN 266
-#define INDENT 267
-#define IEND 268
+#define YAML_ANCHOR 258
+#define YAML_ALIAS 259
+#define YAML_TRANSFER 260
+#define YAML_ITRANSFER 261
+#define YAML_WORD 262
+#define YAML_PLAIN 263
+#define YAML_BLOCK 264
+#define YAML_DOCSEP 265
+#define YAML_IOPEN 266
+#define YAML_INDENT 267
+#define YAML_IEND 268
diff --git a/ext/syck/token.c b/ext/syck/token.c
index 8cdb787fa9..1fc274c590 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Mon Jul 28 11:21:46 2003 */
+/* Generated by re2c 0.5 on Mon Jul 28 21:10:39 2003 */
#line 1 "token.re"
/*
* token.re
@@ -55,10 +55,10 @@
#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok;
/*
- * Nice little macro to ensure we're IOPENed to the current level.
+ * Nice little macro to ensure we're YAML_IOPENed to the current level.
* * Only use this macro in the "Document" section *
*/
-#define ENSURE_IOPEN(last_lvl, to_len, reset) \
+#define ENSURE_YAML_IOPEN(last_lvl, to_len, reset) \
if ( last_lvl->spaces < to_len ) \
{ \
if ( last_lvl->status == syck_lvl_inline ) \
@@ -69,7 +69,7 @@
{ \
ADD_LEVEL( to_len, syck_lvl_doc ); \
if ( reset == 1 ) YYPOS(0); \
- return IOPEN; \
+ return YAML_IOPEN; \
} \
}
@@ -77,12 +77,12 @@
* Nice little macro to ensure closure of levels.
* * Only use this macro in the "Document" section *
*/
-#define ENSURE_IEND(last_lvl, to_len) \
+#define ENSURE_YAML_IEND(last_lvl, to_len) \
if ( last_lvl->spaces > to_len ) \
{ \
syck_parser_pop_level( parser ); \
YYPOS(0); \
- return IEND; \
+ return YAML_IEND; \
}
/*
@@ -127,14 +127,14 @@
{ \
try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); \
} \
- return PLAIN; \
+ return YAML_PLAIN; \
}
/*
* Keep or chomp block?
* * Use only in "ScalarBlock" section *
*/
-#define RETURN_BLOCK() \
+#define RETURN_YAML_BLOCK() \
{ \
SyckNode *n = syck_alloc_str(); \
n->data.str->ptr = qstr; \
@@ -151,13 +151,13 @@
} \
} \
sycklval->nodeData = n; \
- return BLOCK; \
+ return YAML_BLOCK; \
}
/*
* Handles newlines, calculates indent
*/
-#define GOBBLE_UP_INDENT( ict, start ) \
+#define GOBBLE_UP_YAML_INDENT( ict, start ) \
char *indent = start; \
NEWLINE(indent); \
while ( indent < YYCURSOR ) \
@@ -181,7 +181,7 @@
/*
* If an indent exists at the current level, back up.
*/
-#define GET_TRUE_INDENT(indt_len) \
+#define GET_TRUE_YAML_INDENT(indt_len) \
{ \
SyckLevel *lvl_deep = CURRENT_LEVEL(); \
indt_len = lvl_deep->spaces; \
@@ -284,7 +284,7 @@ yy7: yych = *++YYCURSOR;
yy8:
#line 291
{ SyckLevel *lvl = CURRENT_LEVEL();
- ENSURE_IEND(lvl, -1);
+ ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
@@ -294,7 +294,7 @@ yy9: yyaccept = 1;
yy10:
#line 297
{ int indt_len;
- GOBBLE_UP_INDENT( indt_len, YYTOKEN );
+ GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
goto Header;
}
yy11: yych = *++YYCURSOR;
@@ -347,7 +347,7 @@ yy20:
}
else
{
- ENSURE_IEND(lvl, -1);
+ ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
@@ -388,7 +388,7 @@ yy27:
}
else
{
- ENSURE_IEND(lvl, -1);
+ ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
@@ -452,17 +452,17 @@ yy34:
#line 320
{ /* Isolate spaces */
int indt_len;
- GOBBLE_UP_INDENT( indt_len, YYTOKEN );
+ GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
lvl = CURRENT_LEVEL();
/* Check for open indent */
- ENSURE_IEND(lvl, indt_len);
- ENSURE_IOPEN(lvl, indt_len, 0);
+ ENSURE_YAML_IEND(lvl, indt_len);
+ ENSURE_YAML_IOPEN(lvl, indt_len, 0);
if ( indt_len == -1 )
{
return 0;
}
- return INDENT;
+ return YAML_INDENT;
}
yy35: yych = *++YYCURSOR;
switch(yych){
@@ -471,13 +471,13 @@ yy35: yych = *++YYCURSOR;
}
yy36:
#line 407
- { ENSURE_IOPEN(lvl, 0, 1);
+ { ENSURE_YAML_IOPEN(lvl, 0, 1);
goto Plain;
}
yy37: yych = *++YYCURSOR;
yy38:
#line 335
- { ENSURE_IOPEN(lvl, 0, 1);
+ { ENSURE_YAML_IOPEN(lvl, 0, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_inline);
return YYTOKEN[0];
@@ -635,17 +635,17 @@ yy44: yych = *++YYCURSOR;
yy45: yych = *++YYCURSOR;
yy46:
#line 380
- { ENSURE_IOPEN(lvl, 0, 1);
+ { ENSURE_YAML_IOPEN(lvl, 0, 1);
goto TransferMethod; }
yy47: yych = *++YYCURSOR;
yy48:
#line 383
- { ENSURE_IOPEN(lvl, 0, 1);
+ { ENSURE_YAML_IOPEN(lvl, 0, 1);
goto SingleQuote; }
yy49: yych = *++YYCURSOR;
yy50:
#line 386
- { ENSURE_IOPEN(lvl, 0, 1);
+ { ENSURE_YAML_IOPEN(lvl, 0, 1);
goto DoubleQuote; }
yy51: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
@@ -679,7 +679,7 @@ yy55:
yy56: yych = *++YYCURSOR;
yy57:
#line 402
- { ENSURE_IEND(lvl, -1);
+ { ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
@@ -805,9 +805,9 @@ yy70: switch(yych){
}
yy71:
#line 375
- { ENSURE_IOPEN(lvl, 0, 1);
+ { ENSURE_YAML_IOPEN(lvl, 0, 1);
sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
- return ALIAS;
+ return YAML_ALIAS;
}
yy72: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -877,7 +877,7 @@ yy73: switch(yych){
}
yy74:
#line 363
- { ENSURE_IOPEN(lvl, 0, 1);
+ { ENSURE_YAML_IOPEN(lvl, 0, 1);
sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
/*
@@ -886,13 +886,13 @@ yy74:
* queue for matching at a higher level of indentation.
*/
syck_hdlr_remove_anchor(parser, sycklval->name);
- return ANCHOR;
+ return YAML_ANCHOR;
}
yy75: yych = *++YYCURSOR;
yy76:
#line 349
- { ENSURE_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
- FORCE_NEXT_TOKEN(IOPEN);
+ { ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
+ FORCE_NEXT_TOKEN(YAML_IOPEN);
if ( is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
@@ -1060,7 +1060,7 @@ yy91: yyaccept = 0;
yy92:
#line 424
{ YYCURSOR = YYTOKTMP;
- return DOCSEP;
+ return YAML_DOCSEP;
}
yy93: yych = *++YYCURSOR;
goto yy97;
@@ -1335,7 +1335,7 @@ Plain:
YYCURSOR = YYTOKEN;
plvl = CURRENT_LEVEL();
- GET_TRUE_INDENT(parentIndent);
+ GET_TRUE_YAML_INDENT(parentIndent);
Plain2:
YYTOKTMP = YYCURSOR;
@@ -1368,7 +1368,7 @@ yy107:
{ int indt_len, nl_count = 0;
SyckLevel *lvl;
char *tok = YYTOKTMP;
- GOBBLE_UP_INDENT( indt_len, tok );
+ GOBBLE_UP_YAML_INDENT( indt_len, tok );
lvl = CURRENT_LEVEL();
if ( indt_len <= parentIndent )
@@ -1544,7 +1544,7 @@ yy137:
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
- GOBBLE_UP_INDENT( indt_len, YYTOKTMP );
+ GOBBLE_UP_YAML_INDENT( indt_len, YYTOKTMP );
lvl = CURRENT_LEVEL();
if ( lvl->status != syck_lvl_str )
@@ -1604,7 +1604,7 @@ yy141:
n->data.str->ptr = qstr;
n->data.str->len = qidx;
sycklval->nodeData = n;
- return PLAIN;
+ return YAML_PLAIN;
}
yy142: yych = *++YYCURSOR;
goto yy141;
@@ -1678,7 +1678,7 @@ yy153:
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
- GOBBLE_UP_INDENT( indt_len, YYTOKTMP );
+ GOBBLE_UP_YAML_INDENT( indt_len, YYTOKTMP );
lvl = CURRENT_LEVEL();
if ( lvl->status != syck_lvl_str )
@@ -1750,7 +1750,7 @@ yy158:
n->data.str->ptr = qstr;
n->data.str->len = qidx;
sycklval->nodeData = n;
- return PLAIN;
+ return YAML_PLAIN;
}
yy159: yych = *++YYCURSOR;
goto yy158;
@@ -1917,7 +1917,7 @@ yy180:
if ( YYCURSOR == YYTOKEN + 1 )
{
free( qstr );
- return ITRANSFER;
+ return YAML_ITRANSFER;
}
lvl = CURRENT_LEVEL();
@@ -1959,7 +1959,7 @@ yy180:
}
}
- return TRANSFER;
+ return YAML_TRANSFER;
}
yy181: yych = *++YYCURSOR;
goto yy192;
@@ -2066,7 +2066,7 @@ ScalarBlock:
char *yyt = YYTOKEN;
SyckLevel *lvl = CURRENT_LEVEL();
int parentIndent;
- GET_TRUE_INDENT(parentIndent);
+ GET_TRUE_YAML_INDENT(parentIndent);
switch ( *yyt )
{
@@ -2119,7 +2119,7 @@ yy196:
{ char *pacer;
char *tok = YYTOKTMP;
int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0;
- GOBBLE_UP_INDENT( indt_len, tok );
+ GOBBLE_UP_YAML_INDENT( indt_len, tok );
lvl = CURRENT_LEVEL();
if ( indt_len > parentIndent && lvl->status != syck_lvl_block )
@@ -2133,7 +2133,7 @@ yy196:
else if ( lvl->status != syck_lvl_block )
{
YYCURSOR = YYTOKTMP;
- RETURN_BLOCK();
+ RETURN_YAML_BLOCK();
}
/*
@@ -2177,7 +2177,7 @@ yy196:
{
POP_LEVEL();
YYCURSOR = YYTOKTMP;
- RETURN_BLOCK();
+ RETURN_YAML_BLOCK();
}
goto ScalarBlock2;
}
@@ -2211,7 +2211,7 @@ yy202:
#line 895
{ YYCURSOR--;
POP_LEVEL();
- RETURN_BLOCK();
+ RETURN_YAML_BLOCK();
}
yy203: yych = *++YYCURSOR;
goto yy198;