2005-09-20 10:50:20 +04:00
|
|
|
/* Generated by re2c 0.9.10 on Mon Sep 19 23:21:26 2005 */
|
2003-10-15 03:15:19 +04:00
|
|
|
#line 1 "bytecode.re"
|
|
|
|
/*
|
|
|
|
* bytecode.re
|
|
|
|
*
|
|
|
|
* $Author$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 why the lucky stiff
|
|
|
|
*/
|
2007-06-10 07:06:15 +04:00
|
|
|
#include "ruby/ruby.h"
|
2004-05-06 10:29:56 +04:00
|
|
|
#include "syck.h"
|
2003-10-15 03:15:19 +04:00
|
|
|
#include "gram.h"
|
|
|
|
|
|
|
|
#define QUOTELEN 128
|
|
|
|
|
|
|
|
/*
|
|
|
|
* They do my bidding...
|
|
|
|
*/
|
|
|
|
#define YYCTYPE char
|
|
|
|
#define YYCURSOR parser->cursor
|
|
|
|
#define YYMARKER parser->marker
|
|
|
|
#define YYLIMIT parser->limit
|
|
|
|
#define YYTOKEN parser->token
|
|
|
|
#define YYTOKTMP parser->toktmp
|
|
|
|
#define YYLINEPTR parser->lineptr
|
|
|
|
#define YYLINECTPTR parser->linectptr
|
|
|
|
#define YYLINE parser->linect
|
|
|
|
#define YYFILL(n) syck_parser_read(parser)
|
|
|
|
|
|
|
|
extern SyckParser *syck_parser_ptr;
|
|
|
|
|
|
|
|
char *get_inline( SyckParser *parser );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Repositions the cursor at `n' offset from the token start.
|
|
|
|
* Only works in `Header' and `Document' sections.
|
|
|
|
*/
|
|
|
|
#define YYPOS(n) YYCURSOR = YYTOKEN + n
|
|
|
|
|
2003-11-25 22:51:38 +03:00
|
|
|
/*
|
|
|
|
* Track line numbers
|
|
|
|
*/
|
|
|
|
#define CHK_NL(ptr) if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }
|
|
|
|
|
2003-10-15 03:15:19 +04:00
|
|
|
/*
|
|
|
|
* I like seeing the level operations as macros...
|
|
|
|
*/
|
|
|
|
#define ADD_LEVEL(len, status) syck_parser_add_level( parser, len, status )
|
|
|
|
#define POP_LEVEL() syck_parser_pop_level( parser )
|
|
|
|
#define CURRENT_LEVEL() syck_parser_current_level( parser )
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Force a token next time around sycklex()
|
|
|
|
*/
|
|
|
|
#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Adding levels in bytecode requires us to make sure
|
|
|
|
* we've got all our tokens worked out.
|
|
|
|
*/
|
|
|
|
#define ADD_BYTE_LEVEL(lvl, len, s ) \
|
|
|
|
switch ( lvl->status ) \
|
|
|
|
{ \
|
|
|
|
case syck_lvl_seq: \
|
|
|
|
lvl->ncount++; \
|
|
|
|
ADD_LEVEL(len, syck_lvl_open); \
|
|
|
|
YYPOS(0); \
|
|
|
|
return '-'; \
|
2003-10-18 00:53:39 +04:00
|
|
|
\
|
|
|
|
case syck_lvl_map: \
|
|
|
|
lvl->ncount++; \
|
|
|
|
ADD_LEVEL(len, s); \
|
|
|
|
break; \
|
2003-10-15 03:15:19 +04:00
|
|
|
\
|
|
|
|
case syck_lvl_open: \
|
|
|
|
lvl->status = s; \
|
|
|
|
break; \
|
|
|
|
\
|
|
|
|
default: \
|
|
|
|
ADD_LEVEL(len, s); \
|
|
|
|
break; \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Nice little macro to ensure we're YAML_IOPENed to the current level.
|
|
|
|
* * Only use this macro in the "Document" section *
|
|
|
|
*/
|
|
|
|
#define ENSURE_YAML_IOPEN(last_lvl, lvl_type, to_len, reset) \
|
|
|
|
if ( last_lvl->spaces < to_len ) \
|
|
|
|
{ \
|
2005-09-13 07:58:33 +04:00
|
|
|
if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
|
2003-10-15 03:15:19 +04:00
|
|
|
{ \
|
|
|
|
goto Document; \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
ADD_LEVEL( to_len, lvl_type ); \
|
|
|
|
if ( reset == 1 ) YYPOS(0); \
|
|
|
|
return YAML_IOPEN; \
|
|
|
|
} \
|
2010-04-22 12:04:13 +04:00
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Nice little macro to ensure closure of levels.
|
|
|
|
* * Only use this macro in the "Document" section *
|
|
|
|
*/
|
|
|
|
#define ENSURE_YAML_IEND(last_lvl, to_len) \
|
|
|
|
if ( last_lvl->spaces > to_len ) \
|
|
|
|
{ \
|
|
|
|
syck_parser_pop_level( parser ); \
|
|
|
|
YYPOS(0); \
|
|
|
|
return YAML_IEND; \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Concatenates string items and manages allocation
|
|
|
|
* to the string
|
|
|
|
*/
|
|
|
|
#define CAT(s, c, i, l) \
|
|
|
|
{ \
|
|
|
|
if ( i + 1 >= c ) \
|
|
|
|
{ \
|
|
|
|
c += QUOTELEN; \
|
|
|
|
S_REALLOC_N( s, char, c ); \
|
|
|
|
} \
|
|
|
|
s[i++] = l; \
|
|
|
|
s[i] = '\0'; \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Parser for standard YAML Bytecode [UTF-8]
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
|
|
|
|
{
|
|
|
|
SyckLevel *lvl;
|
|
|
|
syck_parser_ptr = parser;
|
2010-04-22 12:04:13 +04:00
|
|
|
if ( YYCURSOR == NULL )
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
syck_parser_read( parser );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( parser->force_token != 0 )
|
|
|
|
{
|
|
|
|
int t = parser->force_token;
|
|
|
|
parser->force_token = 0;
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 172 "bytecode.re"
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
if ( lvl->status == syck_lvl_doc )
|
|
|
|
{
|
|
|
|
goto Document;
|
|
|
|
}
|
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
/* Header: */
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
YYTOKEN = YYCURSOR;
|
|
|
|
|
2004-07-15 09:04:49 +04:00
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 165 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
2008-07-23 01:12:00 +04:00
|
|
|
unsigned int yyaccept = 0;
|
2003-10-15 03:15:19 +04:00
|
|
|
goto yy0;
|
2005-09-20 10:50:20 +04:00
|
|
|
++YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy0:
|
|
|
|
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
|
|
|
yych = *YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x00: goto yy2;
|
2003-10-18 00:53:39 +04:00
|
|
|
case 'D': goto yy3;
|
|
|
|
default: goto yy5;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy2: YYCURSOR = YYMARKER;
|
|
|
|
switch(yyaccept){
|
|
|
|
case 0: goto yy4;
|
|
|
|
}
|
|
|
|
yy3: yyaccept = 0;
|
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy6;
|
|
|
|
case 0x0D: goto yy8;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy4;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy4:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 199 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ YYPOS(0);
|
2003-10-15 03:15:19 +04:00
|
|
|
goto Document;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 195 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy5: yych = *++YYCURSOR;
|
|
|
|
goto yy4;
|
2004-07-15 09:04:49 +04:00
|
|
|
yy6: ++YYCURSOR;
|
|
|
|
goto yy7;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy7:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 186 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ if ( lvl->status == syck_lvl_header )
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
2003-11-25 22:51:38 +03:00
|
|
|
CHK_NL(YYCURSOR);
|
2003-10-15 03:15:19 +04:00
|
|
|
goto Directive;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ENSURE_YAML_IEND(lvl, -1);
|
|
|
|
YYPOS(0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 214 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy8: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy6;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy2;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 203 "bytecode.re"
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
Document:
|
|
|
|
{
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
if ( lvl->status == syck_lvl_header )
|
|
|
|
{
|
|
|
|
lvl->status = syck_lvl_doc;
|
|
|
|
}
|
|
|
|
|
|
|
|
YYTOKEN = YYCURSOR;
|
|
|
|
|
2004-07-15 09:04:49 +04:00
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 235 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
goto yy9;
|
2005-09-20 10:50:20 +04:00
|
|
|
++YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy9:
|
|
|
|
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
|
|
|
yych = *YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x00: goto yy30;
|
|
|
|
case 0x0A: goto yy27;
|
|
|
|
case 0x0D: goto yy29;
|
2003-10-18 00:53:39 +04:00
|
|
|
case 'A': goto yy19;
|
|
|
|
case 'D': goto yy12;
|
|
|
|
case 'E': goto yy16;
|
|
|
|
case 'M': goto yy14;
|
|
|
|
case 'P': goto yy13;
|
|
|
|
case 'Q': goto yy15;
|
|
|
|
case 'R': goto yy21;
|
|
|
|
case 'S': goto yy17;
|
|
|
|
case 'T': goto yy23;
|
|
|
|
case 'c': goto yy25;
|
|
|
|
default: goto yy11;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
|
|
|
yy11:yy12: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy41;
|
|
|
|
case 0x0D: goto yy44;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy13: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy41;
|
|
|
|
case 0x0D: goto yy43;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy14: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy38;
|
|
|
|
case 0x0D: goto yy40;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy15: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy35;
|
|
|
|
case 0x0D: goto yy37;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy16: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy32;
|
|
|
|
case 0x0D: goto yy34;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy17: ++YYCURSOR;
|
|
|
|
goto yy18;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy18:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 288 "bytecode.re"
|
2010-04-22 12:04:13 +04:00
|
|
|
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
|
2003-10-15 03:15:19 +04:00
|
|
|
goto Scalar;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 296 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy19: ++YYCURSOR;
|
|
|
|
goto yy20;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy20:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 292 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
|
2003-10-15 03:15:19 +04:00
|
|
|
sycklval->name = get_inline( parser );
|
|
|
|
syck_hdlr_remove_anchor( parser, sycklval->name );
|
2003-11-25 22:51:38 +03:00
|
|
|
CHK_NL(YYCURSOR);
|
2003-10-15 03:15:19 +04:00
|
|
|
return YAML_ANCHOR;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 307 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy21: ++YYCURSOR;
|
|
|
|
goto yy22;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy22:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 299 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
|
2003-10-15 03:15:19 +04:00
|
|
|
sycklval->name = get_inline( parser );
|
|
|
|
POP_LEVEL();
|
|
|
|
if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
|
|
|
|
return YAML_ALIAS;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 318 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy23: ++YYCURSOR;
|
|
|
|
goto yy24;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy24:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 306 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ char *qstr;
|
2003-10-18 00:53:39 +04:00
|
|
|
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
|
|
|
|
qstr = get_inline( parser );
|
2003-11-25 22:51:38 +03:00
|
|
|
CHK_NL(YYCURSOR);
|
2003-10-15 03:15:19 +04:00
|
|
|
if ( qstr[0] == '!' )
|
|
|
|
{
|
2011-03-25 09:46:57 +03:00
|
|
|
size_t qidx = strlen( qstr );
|
2003-10-15 03:15:19 +04:00
|
|
|
if ( qstr[1] == '\0' )
|
|
|
|
{
|
|
|
|
free( qstr );
|
|
|
|
return YAML_ITRANSFER;
|
|
|
|
}
|
|
|
|
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* URL Prefixing
|
|
|
|
*/
|
|
|
|
if ( qstr[1] == '^' )
|
|
|
|
{
|
|
|
|
sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
|
|
|
|
sycklval->name[0] = '\0';
|
|
|
|
strcat( sycklval->name, lvl->domain );
|
|
|
|
strncat( sycklval->name, qstr + 2, qidx - 2 );
|
|
|
|
free( qstr );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char *carat = qstr + 1;
|
|
|
|
char *qend = qstr + qidx;
|
|
|
|
while ( (++carat) < qend )
|
|
|
|
{
|
|
|
|
if ( *carat == '^' )
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( carat < qend )
|
|
|
|
{
|
|
|
|
free( lvl->domain );
|
|
|
|
lvl->domain = syck_strndup( qstr + 1, carat - ( qstr + 1 ) );
|
|
|
|
sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) );
|
|
|
|
sycklval->name[0] = '\0';
|
|
|
|
strcat( sycklval->name, lvl->domain );
|
|
|
|
strncat( sycklval->name, carat + 1, ( qend - carat ) - 1 );
|
|
|
|
free( qstr );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sycklval->name = S_ALLOC_N( char, strlen( qstr ) );
|
2003-10-18 00:53:39 +04:00
|
|
|
sycklval->name[0] = '\0';
|
2003-10-15 03:15:19 +04:00
|
|
|
S_MEMCPY( sycklval->name, qstr + 1, char, strlen( qstr ) );
|
|
|
|
free( qstr );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return YAML_TRANSFER;
|
|
|
|
}
|
|
|
|
sycklval->name = qstr;
|
|
|
|
return YAML_TAGURI;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 382 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy25: ++YYCURSOR;
|
|
|
|
goto yy26;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy26:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 366 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ goto Comment; }
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 388 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy27: ++YYCURSOR;
|
|
|
|
goto yy28;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy28:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 368 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CHK_NL(YYCURSOR);
|
2003-11-25 22:51:38 +03:00
|
|
|
if ( lvl->status == syck_lvl_seq )
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
2010-04-22 12:04:13 +04:00
|
|
|
return YAML_INDENT;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
|
|
|
else if ( lvl->status == syck_lvl_map )
|
|
|
|
{
|
|
|
|
if ( lvl->ncount % 2 == 1 ) return ':';
|
|
|
|
else return YAML_INDENT;
|
|
|
|
}
|
|
|
|
goto Document;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 405 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy29: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy27;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy30: ++YYCURSOR;
|
|
|
|
goto yy31;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy31:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 381 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ ENSURE_YAML_IEND(lvl, -1);
|
2003-10-15 03:15:19 +04:00
|
|
|
YYPOS(0);
|
|
|
|
return 0;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 419 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy32: ++YYCURSOR;
|
|
|
|
goto yy33;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy33:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 252 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
|
2003-10-18 00:53:39 +04:00
|
|
|
{
|
|
|
|
lvl->ncount++;
|
|
|
|
YYPOS(0);
|
|
|
|
FORCE_NEXT_TOKEN( ']' );
|
|
|
|
return '[';
|
|
|
|
}
|
|
|
|
else if ( lvl->status == syck_lvl_map && lvl->ncount == 0 )
|
|
|
|
{
|
|
|
|
lvl->ncount++;
|
|
|
|
YYPOS(0);
|
|
|
|
FORCE_NEXT_TOKEN( '}' );
|
|
|
|
return '{';
|
|
|
|
}
|
2010-04-22 12:04:13 +04:00
|
|
|
|
2003-10-18 00:53:39 +04:00
|
|
|
POP_LEVEL();
|
2003-10-15 03:15:19 +04:00
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
if ( lvl->status == syck_lvl_seq )
|
|
|
|
{
|
2010-04-22 12:04:13 +04:00
|
|
|
FORCE_NEXT_TOKEN(YAML_INDENT);
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
|
|
|
else if ( lvl->status == syck_lvl_map )
|
|
|
|
{
|
|
|
|
if ( lvl->ncount % 2 == 1 )
|
|
|
|
{
|
|
|
|
FORCE_NEXT_TOKEN(':');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FORCE_NEXT_TOKEN(YAML_INDENT);
|
|
|
|
}
|
|
|
|
}
|
2003-11-25 22:51:38 +03:00
|
|
|
CHK_NL(YYCURSOR);
|
2003-10-15 03:15:19 +04:00
|
|
|
return YAML_IEND;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 459 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy34: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy32;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy35: ++YYCURSOR;
|
|
|
|
goto yy36;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy36:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 237 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ int complex = 0;
|
2003-10-18 00:53:39 +04:00
|
|
|
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
|
|
|
|
{
|
|
|
|
complex = 1;
|
|
|
|
}
|
|
|
|
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_seq);
|
2003-11-25 22:51:38 +03:00
|
|
|
CHK_NL(YYCURSOR);
|
2003-10-18 00:53:39 +04:00
|
|
|
if ( complex )
|
|
|
|
{
|
|
|
|
FORCE_NEXT_TOKEN( YAML_IOPEN );
|
|
|
|
return '?';
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
return YAML_IOPEN;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 483 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy37: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy35;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy38: ++YYCURSOR;
|
|
|
|
goto yy39;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy39:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 222 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ int complex = 0;
|
2003-10-18 00:53:39 +04:00
|
|
|
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
|
|
|
|
{
|
|
|
|
complex = 1;
|
|
|
|
}
|
2010-04-22 12:04:13 +04:00
|
|
|
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map);
|
2003-11-25 22:51:38 +03:00
|
|
|
CHK_NL(YYCURSOR);
|
2003-10-18 00:53:39 +04:00
|
|
|
if ( complex )
|
|
|
|
{
|
|
|
|
FORCE_NEXT_TOKEN( YAML_IOPEN );
|
|
|
|
return '?';
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
return YAML_IOPEN;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 507 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy40: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy38;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy41: ++YYCURSOR;
|
|
|
|
goto yy42;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy42:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 217 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ ENSURE_YAML_IEND(lvl, -1);
|
2003-10-15 03:15:19 +04:00
|
|
|
YYPOS(0);
|
|
|
|
return 0;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 521 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy43: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy41;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy44: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy41;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy11;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 386 "bytecode.re"
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Directive:
|
|
|
|
{
|
2004-01-13 01:55:09 +03:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
|
2004-07-15 09:04:49 +04:00
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 543 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
2008-07-23 01:12:00 +04:00
|
|
|
unsigned int yyaccept = 0;
|
2003-10-15 03:15:19 +04:00
|
|
|
goto yy45;
|
2005-09-20 10:50:20 +04:00
|
|
|
++YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy45:
|
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
|
|
|
yych = *YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x00: goto yy47;
|
2003-10-18 00:53:39 +04:00
|
|
|
case 'V': goto yy48;
|
|
|
|
default: goto yy50;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy47: YYCURSOR = YYMARKER;
|
|
|
|
switch(yyaccept){
|
|
|
|
case 0: goto yy49;
|
|
|
|
}
|
|
|
|
yy48: yyaccept = 0;
|
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
|
|
|
case '.':
|
|
|
|
case '/':
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9':
|
|
|
|
case ':':
|
|
|
|
case ';':
|
|
|
|
case '<':
|
|
|
|
case '=':
|
|
|
|
case '>':
|
|
|
|
case '?':
|
|
|
|
case '@':
|
|
|
|
case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F':
|
|
|
|
case 'G':
|
|
|
|
case 'H':
|
|
|
|
case 'I':
|
|
|
|
case 'J':
|
|
|
|
case 'K':
|
|
|
|
case 'L':
|
|
|
|
case 'M':
|
|
|
|
case 'N':
|
|
|
|
case 'O':
|
|
|
|
case 'P':
|
|
|
|
case 'Q':
|
|
|
|
case 'R':
|
|
|
|
case 'S':
|
|
|
|
case 'T':
|
|
|
|
case 'U':
|
|
|
|
case 'V':
|
|
|
|
case 'W':
|
|
|
|
case 'X':
|
|
|
|
case 'Y':
|
|
|
|
case 'Z':
|
|
|
|
case '[':
|
|
|
|
case '\\':
|
|
|
|
case ']':
|
|
|
|
case '^':
|
|
|
|
case '_': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
|
|
|
case 'f':
|
|
|
|
case 'g':
|
|
|
|
case 'h':
|
|
|
|
case 'i':
|
|
|
|
case 'j':
|
|
|
|
case 'k':
|
|
|
|
case 'l':
|
|
|
|
case 'm':
|
|
|
|
case 'n':
|
|
|
|
case 'o':
|
|
|
|
case 'p':
|
|
|
|
case 'q':
|
|
|
|
case 'r':
|
|
|
|
case 's':
|
|
|
|
case 't':
|
|
|
|
case 'u':
|
|
|
|
case 'v':
|
|
|
|
case 'w':
|
|
|
|
case 'x':
|
|
|
|
case 'y':
|
|
|
|
case 'z': goto yy51;
|
|
|
|
default: goto yy49;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy49:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 399 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ YYCURSOR = YYTOKEN;
|
2003-10-15 03:15:19 +04:00
|
|
|
return YAML_DOCSEP;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 646 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy50: yych = *++YYCURSOR;
|
|
|
|
goto yy49;
|
|
|
|
yy51: ++YYCURSOR;
|
2005-09-20 10:50:20 +04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
2003-10-15 03:15:19 +04:00
|
|
|
yych = *YYCURSOR;
|
2004-07-15 09:04:49 +04:00
|
|
|
goto yy52;
|
2003-10-18 00:53:39 +04:00
|
|
|
yy52: switch(yych){
|
|
|
|
case '.':
|
|
|
|
case '/':
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': case ';':
|
|
|
|
case '<':
|
|
|
|
case '=':
|
|
|
|
case '>':
|
|
|
|
case '?':
|
|
|
|
case '@':
|
|
|
|
case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F':
|
|
|
|
case 'G':
|
|
|
|
case 'H':
|
|
|
|
case 'I':
|
|
|
|
case 'J':
|
|
|
|
case 'K':
|
|
|
|
case 'L':
|
|
|
|
case 'M':
|
|
|
|
case 'N':
|
|
|
|
case 'O':
|
|
|
|
case 'P':
|
|
|
|
case 'Q':
|
|
|
|
case 'R':
|
|
|
|
case 'S':
|
|
|
|
case 'T':
|
|
|
|
case 'U':
|
|
|
|
case 'V':
|
|
|
|
case 'W':
|
|
|
|
case 'X':
|
|
|
|
case 'Y':
|
|
|
|
case 'Z':
|
|
|
|
case '[':
|
|
|
|
case '\\':
|
|
|
|
case ']':
|
|
|
|
case '^':
|
|
|
|
case '_': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
|
|
|
case 'f':
|
|
|
|
case 'g':
|
|
|
|
case 'h':
|
|
|
|
case 'i':
|
|
|
|
case 'j':
|
|
|
|
case 'k':
|
|
|
|
case 'l':
|
|
|
|
case 'm':
|
|
|
|
case 'n':
|
|
|
|
case 'o':
|
|
|
|
case 'p':
|
|
|
|
case 'q':
|
|
|
|
case 'r':
|
|
|
|
case 's':
|
|
|
|
case 't':
|
|
|
|
case 'u':
|
|
|
|
case 'v':
|
|
|
|
case 'w':
|
|
|
|
case 'x':
|
|
|
|
case 'y':
|
|
|
|
case 'z': goto yy51;
|
|
|
|
case ':': goto yy53;
|
|
|
|
default: goto yy47;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
|
|
|
yy53: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
|
|
|
case '.':
|
|
|
|
case '/':
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9':
|
|
|
|
case ':':
|
|
|
|
case ';':
|
|
|
|
case '<':
|
|
|
|
case '=':
|
|
|
|
case '>':
|
|
|
|
case '?':
|
|
|
|
case '@':
|
|
|
|
case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F':
|
|
|
|
case 'G':
|
|
|
|
case 'H':
|
|
|
|
case 'I':
|
|
|
|
case 'J':
|
|
|
|
case 'K':
|
|
|
|
case 'L':
|
|
|
|
case 'M':
|
|
|
|
case 'N':
|
|
|
|
case 'O':
|
|
|
|
case 'P':
|
|
|
|
case 'Q':
|
|
|
|
case 'R':
|
|
|
|
case 'S':
|
|
|
|
case 'T':
|
|
|
|
case 'U':
|
|
|
|
case 'V':
|
|
|
|
case 'W':
|
|
|
|
case 'X':
|
|
|
|
case 'Y':
|
|
|
|
case 'Z':
|
|
|
|
case '[':
|
|
|
|
case '\\':
|
|
|
|
case ']':
|
|
|
|
case '^':
|
|
|
|
case '_': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
|
|
|
case 'f':
|
|
|
|
case 'g':
|
|
|
|
case 'h':
|
|
|
|
case 'i':
|
|
|
|
case 'j':
|
|
|
|
case 'k':
|
|
|
|
case 'l':
|
|
|
|
case 'm':
|
|
|
|
case 'n':
|
|
|
|
case 'o':
|
|
|
|
case 'p':
|
|
|
|
case 'q':
|
|
|
|
case 'r':
|
|
|
|
case 's':
|
|
|
|
case 't':
|
|
|
|
case 'u':
|
|
|
|
case 'v':
|
|
|
|
case 'w':
|
|
|
|
case 'x':
|
|
|
|
case 'y':
|
|
|
|
case 'z': goto yy54;
|
|
|
|
default: goto yy47;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy54: ++YYCURSOR;
|
2005-09-20 10:50:20 +04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
2003-10-15 03:15:19 +04:00
|
|
|
yych = *YYCURSOR;
|
2004-07-15 09:04:49 +04:00
|
|
|
goto yy55;
|
2003-10-18 00:53:39 +04:00
|
|
|
yy55: switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy56;
|
|
|
|
case 0x0D: goto yy58;
|
2003-10-18 00:53:39 +04:00
|
|
|
case '.':
|
|
|
|
case '/':
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9':
|
|
|
|
case ':':
|
|
|
|
case ';':
|
|
|
|
case '<':
|
|
|
|
case '=':
|
|
|
|
case '>':
|
|
|
|
case '?':
|
|
|
|
case '@':
|
|
|
|
case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F':
|
|
|
|
case 'G':
|
|
|
|
case 'H':
|
|
|
|
case 'I':
|
|
|
|
case 'J':
|
|
|
|
case 'K':
|
|
|
|
case 'L':
|
|
|
|
case 'M':
|
|
|
|
case 'N':
|
|
|
|
case 'O':
|
|
|
|
case 'P':
|
|
|
|
case 'Q':
|
|
|
|
case 'R':
|
|
|
|
case 'S':
|
|
|
|
case 'T':
|
|
|
|
case 'U':
|
|
|
|
case 'V':
|
|
|
|
case 'W':
|
|
|
|
case 'X':
|
|
|
|
case 'Y':
|
|
|
|
case 'Z':
|
|
|
|
case '[':
|
|
|
|
case '\\':
|
|
|
|
case ']':
|
|
|
|
case '^':
|
|
|
|
case '_': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
|
|
|
case 'f':
|
|
|
|
case 'g':
|
|
|
|
case 'h':
|
|
|
|
case 'i':
|
|
|
|
case 'j':
|
|
|
|
case 'k':
|
|
|
|
case 'l':
|
|
|
|
case 'm':
|
|
|
|
case 'n':
|
|
|
|
case 'o':
|
|
|
|
case 'p':
|
|
|
|
case 'q':
|
|
|
|
case 'r':
|
|
|
|
case 's':
|
|
|
|
case 't':
|
|
|
|
case 'u':
|
|
|
|
case 'v':
|
|
|
|
case 'w':
|
|
|
|
case 'x':
|
|
|
|
case 'y':
|
|
|
|
case 'z': goto yy54;
|
|
|
|
default: goto yy47;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy56: ++YYCURSOR;
|
|
|
|
goto yy57;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy57:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 396 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CHK_NL(YYCURSOR);
|
2003-11-25 22:51:38 +03:00
|
|
|
goto Directive; }
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 899 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy58: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy56;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy47;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 402 "bytecode.re"
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Comment:
|
|
|
|
{
|
2004-01-13 01:55:09 +03:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
|
2004-07-15 09:04:49 +04:00
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 916 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
goto yy59;
|
2005-09-20 10:50:20 +04:00
|
|
|
++YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy59:
|
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
|
|
|
yych = *YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x00: goto yy61;
|
|
|
|
case 0x0A: goto yy62;
|
|
|
|
case 0x0D: goto yy64;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy66;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy61:yy62: ++YYCURSOR;
|
|
|
|
goto yy63;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy63:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 412 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CHK_NL(YYCURSOR);
|
2003-11-25 22:51:38 +03:00
|
|
|
goto Document; }
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 936 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy64: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy67;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy65;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy65:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 415 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ goto Comment; }
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 945 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy66: yych = *++YYCURSOR;
|
|
|
|
goto yy65;
|
2004-07-15 09:04:49 +04:00
|
|
|
yy67: ++YYCURSOR;
|
|
|
|
yych = *YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
goto yy63;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 417 "bytecode.re"
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Scalar:
|
|
|
|
{
|
|
|
|
int idx = 0;
|
|
|
|
int cap = 100;
|
|
|
|
char *str = S_ALLOC_N( char, cap );
|
|
|
|
char *tok;
|
|
|
|
|
2003-10-18 00:53:39 +04:00
|
|
|
str[0] = '\0';
|
|
|
|
|
2003-10-15 03:15:19 +04:00
|
|
|
Scalar2:
|
|
|
|
tok = YYCURSOR;
|
|
|
|
|
2004-07-15 09:04:49 +04:00
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 970 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
goto yy68;
|
2005-09-20 10:50:20 +04:00
|
|
|
++YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy68:
|
|
|
|
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
|
|
|
yych = *YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x00: goto yy74;
|
|
|
|
case 0x0A: goto yy70;
|
|
|
|
case 0x0D: goto yy72;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy76;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy70: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2003-10-18 00:53:39 +04:00
|
|
|
case 'C': goto yy78;
|
|
|
|
case 'N': goto yy80;
|
|
|
|
case 'Z': goto yy83;
|
|
|
|
default: goto yy71;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
|
|
|
yy71:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 461 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ YYCURSOR = tok;
|
2010-04-22 12:04:13 +04:00
|
|
|
goto ScalarEnd;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 996 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy72: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy77;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy73;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy73:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 469 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CAT(str, cap, idx, tok[0]);
|
2010-04-22 12:04:13 +04:00
|
|
|
goto Scalar2;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1007 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy74: ++YYCURSOR;
|
|
|
|
goto yy75;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy75:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 465 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ YYCURSOR = tok;
|
2003-10-15 03:15:19 +04:00
|
|
|
goto ScalarEnd;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1015 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy76: yych = *++YYCURSOR;
|
|
|
|
goto yy73;
|
|
|
|
yy77: yych = *++YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
|
|
|
case 'C': goto yy78;
|
|
|
|
case 'N': goto yy80;
|
|
|
|
case 'Z': goto yy83;
|
|
|
|
default: goto yy71;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy78: ++YYCURSOR;
|
|
|
|
goto yy79;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy79:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 435 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CHK_NL(tok+1);
|
2003-11-25 22:51:38 +03:00
|
|
|
goto Scalar2; }
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1031 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy80: ++YYCURSOR;
|
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-07-15 09:04:49 +04:00
|
|
|
goto yy81;
|
2003-10-18 00:53:39 +04:00
|
|
|
yy81: switch(yych){
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': goto yy80;
|
|
|
|
default: goto yy82;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy82:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 438 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CHK_NL(tok+1);
|
2003-11-25 22:51:38 +03:00
|
|
|
if ( tok + 2 < YYCURSOR )
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
char *count = tok + 2;
|
|
|
|
int total = strtod( count, NULL );
|
|
|
|
int i;
|
|
|
|
for ( i = 0; i < total; i++ )
|
|
|
|
{
|
|
|
|
CAT(str, cap, idx, '\n');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
CAT(str, cap, idx, '\n');
|
|
|
|
}
|
|
|
|
goto Scalar2;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1068 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy83: ++YYCURSOR;
|
|
|
|
goto yy84;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy84:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 456 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CHK_NL(tok+1);
|
2003-11-25 22:51:38 +03:00
|
|
|
CAT(str, cap, idx, '\0');
|
2010-04-22 12:04:13 +04:00
|
|
|
goto Scalar2;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1077 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 473 "bytecode.re"
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
ScalarEnd:
|
|
|
|
{
|
|
|
|
SyckNode *n = syck_alloc_str();
|
|
|
|
n->data.str->ptr = str;
|
|
|
|
n->data.str->len = idx;
|
|
|
|
sycklval->nodeData = n;
|
|
|
|
POP_LEVEL();
|
|
|
|
if ( parser->implicit_typing == 1 )
|
|
|
|
{
|
|
|
|
try_tag_implicit( sycklval->nodeData, parser->taguri_expansion );
|
|
|
|
}
|
|
|
|
return YAML_PLAIN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
char *
|
|
|
|
get_inline( SyckParser *parser )
|
|
|
|
{
|
|
|
|
int idx = 0;
|
|
|
|
int cap = 100;
|
|
|
|
char *str = S_ALLOC_N( char, cap );
|
|
|
|
char *tok;
|
|
|
|
|
2003-10-18 00:53:39 +04:00
|
|
|
str[0] = '\0';
|
|
|
|
|
2003-10-15 03:15:19 +04:00
|
|
|
Inline:
|
|
|
|
{
|
|
|
|
tok = YYCURSOR;
|
|
|
|
|
2004-07-15 09:04:49 +04:00
|
|
|
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1114 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
goto yy85;
|
2005-09-20 10:50:20 +04:00
|
|
|
++YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy85:
|
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
|
|
|
yych = *YYCURSOR;
|
2003-10-18 00:53:39 +04:00
|
|
|
switch(yych){
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x00: goto yy91;
|
|
|
|
case 0x0A: goto yy87;
|
|
|
|
case 0x0D: goto yy89;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy93;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2004-07-15 09:04:49 +04:00
|
|
|
yy87: ++YYCURSOR;
|
|
|
|
goto yy88;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy88:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 508 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CHK_NL(YYCURSOR);
|
2003-11-25 22:51:38 +03:00
|
|
|
return str; }
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1134 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy89: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-20 10:50:20 +04:00
|
|
|
case 0x0A: goto yy94;
|
2003-10-18 00:53:39 +04:00
|
|
|
default: goto yy90;
|
|
|
|
}
|
2003-10-15 03:15:19 +04:00
|
|
|
yy90:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 515 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ CAT(str, cap, idx, tok[0]);
|
2010-04-22 12:04:13 +04:00
|
|
|
goto Inline;
|
2003-10-15 03:15:19 +04:00
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1145 "<stdout>"
|
2004-07-15 09:04:49 +04:00
|
|
|
yy91: ++YYCURSOR;
|
|
|
|
goto yy92;
|
2003-10-15 03:15:19 +04:00
|
|
|
yy92:
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 511 "bytecode.re"
|
2004-07-15 09:04:49 +04:00
|
|
|
{ YYCURSOR = tok;
|
2003-10-15 03:15:19 +04:00
|
|
|
return str;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 1153 "<stdout>"
|
2003-10-15 03:15:19 +04:00
|
|
|
yy93: yych = *++YYCURSOR;
|
|
|
|
goto yy90;
|
2004-07-15 09:04:49 +04:00
|
|
|
yy94: ++YYCURSOR;
|
|
|
|
yych = *YYCURSOR;
|
2003-10-15 03:15:19 +04:00
|
|
|
goto yy88;
|
|
|
|
}
|
2005-09-20 10:50:20 +04:00
|
|
|
#line 519 "bytecode.re"
|
2003-10-15 03:15:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|