2005-09-20 19:58:18 -04:00
|
|
|
/* Generated by re2c 0.9.10 on Tue Sep 20 17:46:17 2005 */
|
2003-05-09 17:25:50 -04:00
|
|
|
#line 1 "token.re"
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* token.re
|
|
|
|
*
|
|
|
|
* $Author$
|
|
|
|
* $Date$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 why the lucky stiff
|
|
|
|
*/
|
2007-06-09 23:06:15 -04:00
|
|
|
#include "ruby/ruby.h"
|
2004-05-06 02:29:56 -04:00
|
|
|
#include "syck.h"
|
2003-05-09 17:25:50 -04:00
|
|
|
#include "gram.h"
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Allocate quoted strings in chunks
|
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
#define QUOTELEN 1024
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* They do my bidding...
|
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
#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
|
2003-05-19 12:37:20 -04:00
|
|
|
#define YYLINECTPTR parser->linectptr
|
2003-05-09 17:25:50 -04:00
|
|
|
#define YYLINE parser->linect
|
|
|
|
#define YYFILL(n) syck_parser_read(parser)
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Repositions the cursor at `n' offset from the token start.
|
|
|
|
* Only works in `Header' and `Document' sections.
|
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
#define YYPOS(n) YYCURSOR = YYTOKEN + n
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Track line numbers
|
|
|
|
*/
|
2004-07-30 16:31:09 -04:00
|
|
|
#define NEWLINE(ptr) YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; }
|
2003-05-09 17:25:50 -04:00
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* I like seeing the level operations as macros...
|
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
#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 )
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
2003-07-28 15:27:42 -04:00
|
|
|
* Force a token next time around sycklex()
|
2003-05-13 02:34:18 -04:00
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok;
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
2003-07-28 23:27:01 -04:00
|
|
|
* Nice little macro to ensure we're YAML_IOPENed to the current level.
|
2003-05-13 02:34:18 -04:00
|
|
|
* * Only use this macro in the "Document" section *
|
|
|
|
*/
|
2003-07-28 23:27:01 -04:00
|
|
|
#define ENSURE_YAML_IOPEN(last_lvl, to_len, reset) \
|
2003-05-09 17:25:50 -04:00
|
|
|
if ( last_lvl->spaces < to_len ) \
|
|
|
|
{ \
|
2005-09-12 23:58:33 -04:00
|
|
|
if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
|
2003-05-09 17:25:50 -04:00
|
|
|
{ \
|
|
|
|
goto Document; \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
ADD_LEVEL( to_len, syck_lvl_doc ); \
|
|
|
|
if ( reset == 1 ) YYPOS(0); \
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_IOPEN; \
|
2003-05-09 17:25:50 -04:00
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Nice little macro to ensure closure of levels.
|
|
|
|
* * Only use this macro in the "Document" section *
|
|
|
|
*/
|
2003-07-28 23:27:01 -04:00
|
|
|
#define ENSURE_YAML_IEND(last_lvl, to_len) \
|
2003-05-09 17:25:50 -04:00
|
|
|
if ( last_lvl->spaces > to_len ) \
|
|
|
|
{ \
|
|
|
|
syck_parser_pop_level( parser ); \
|
|
|
|
YYPOS(0); \
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_IEND; \
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Concatenates quoted string items and manages allocation
|
|
|
|
* to the quoted string
|
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
#define QUOTECAT(s, c, i, l) \
|
|
|
|
{ \
|
|
|
|
if ( i + 1 >= c ) \
|
|
|
|
{ \
|
|
|
|
c += QUOTELEN; \
|
|
|
|
S_REALLOC_N( s, char, c ); \
|
|
|
|
} \
|
|
|
|
s[i++] = l; \
|
|
|
|
s[i] = '\0'; \
|
|
|
|
}
|
|
|
|
|
2003-05-29 19:33:10 -04:00
|
|
|
#define QUOTECATS(s, c, i, cs, cl) \
|
|
|
|
{ \
|
|
|
|
while ( i + cl >= c ) \
|
|
|
|
{ \
|
|
|
|
c += QUOTELEN; \
|
|
|
|
S_REALLOC_N( s, char, c ); \
|
|
|
|
} \
|
|
|
|
S_MEMCPY( s + i, cs, char, cl ); \
|
|
|
|
i += cl; \
|
|
|
|
s[i] = '\0'; \
|
|
|
|
}
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Tags a plain scalar with a transfer method
|
|
|
|
* * Use only in "Plain" section *
|
|
|
|
*/
|
2003-05-29 19:33:10 -04:00
|
|
|
#define RETURN_IMPLICIT() \
|
2003-05-09 17:25:50 -04:00
|
|
|
{ \
|
2003-05-29 19:33:10 -04:00
|
|
|
SyckNode *n = syck_alloc_str(); \
|
2003-11-25 14:51:38 -05:00
|
|
|
YYCURSOR = YYTOKEN; \
|
2003-05-29 19:33:10 -04:00
|
|
|
n->data.str->ptr = qstr; \
|
|
|
|
n->data.str->len = qidx; \
|
2004-05-14 23:11:28 -04:00
|
|
|
n->data.str->style = scalar_plain; \
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklval->nodeData = n; \
|
2003-05-09 17:25:50 -04:00
|
|
|
if ( parser->implicit_typing == 1 ) \
|
|
|
|
{ \
|
2003-07-28 15:27:42 -04:00
|
|
|
try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); \
|
2003-05-09 17:25:50 -04:00
|
|
|
} \
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_PLAIN; \
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
|
2005-09-12 23:58:33 -04:00
|
|
|
/* concat the inline characters to the plain scalar */
|
|
|
|
#define PLAIN_NOT_INL() \
|
|
|
|
if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) ) \
|
|
|
|
{ \
|
|
|
|
YYCURSOR--; \
|
|
|
|
} \
|
|
|
|
QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); \
|
|
|
|
goto Plain2;
|
|
|
|
|
|
|
|
/* trim spaces off the end in case of indent */
|
|
|
|
#define PLAIN_IS_INL() \
|
|
|
|
char *walker = qstr + qidx - 1; \
|
2005-09-17 13:22:49 -04:00
|
|
|
while ( walker > qstr && ( *walker == '\n' || *walker == ' ' || *walker == '\t' ) ) \
|
2005-09-12 23:58:33 -04:00
|
|
|
{ \
|
|
|
|
qidx--; \
|
|
|
|
walker[0] = '\0'; \
|
|
|
|
walker--; \
|
|
|
|
}
|
|
|
|
|
2003-05-29 19:33:10 -04:00
|
|
|
/*
|
|
|
|
* Keep or chomp block?
|
|
|
|
* * Use only in "ScalarBlock" section *
|
|
|
|
*/
|
2003-07-28 23:27:01 -04:00
|
|
|
#define RETURN_YAML_BLOCK() \
|
2003-05-29 19:33:10 -04:00
|
|
|
{ \
|
|
|
|
SyckNode *n = syck_alloc_str(); \
|
2005-09-12 23:58:33 -04:00
|
|
|
if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
|
|
|
|
{ \
|
|
|
|
n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
n->type_id = syck_strndup( "str", 3 ); \
|
|
|
|
} \
|
2003-05-29 19:33:10 -04:00
|
|
|
n->data.str->ptr = qstr; \
|
|
|
|
n->data.str->len = qidx; \
|
2005-09-12 23:58:33 -04:00
|
|
|
if ( blockType == BLOCK_LIT ) { \
|
|
|
|
n->data.str->style = scalar_literal; \
|
|
|
|
} else { \
|
|
|
|
n->data.str->style = scalar_fold; \
|
|
|
|
} \
|
2003-05-29 19:33:10 -04:00
|
|
|
if ( qidx > 0 ) \
|
|
|
|
{ \
|
|
|
|
if ( nlDoWhat != NL_KEEP ) \
|
|
|
|
{ \
|
|
|
|
char *fc = n->data.str->ptr + n->data.str->len - 1; \
|
2003-06-10 10:15:27 -04:00
|
|
|
while ( is_newline( fc ) ) fc--; \
|
2004-07-30 16:31:09 -04:00
|
|
|
if ( nlDoWhat != NL_CHOMP && fc < n->data.str->ptr + n->data.str->len - 1 ) \
|
2003-05-29 19:33:10 -04:00
|
|
|
fc += 1; \
|
|
|
|
n->data.str->len = fc - n->data.str->ptr + 1; \
|
|
|
|
} \
|
|
|
|
} \
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklval->nodeData = n; \
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_BLOCK; \
|
2003-05-29 19:33:10 -04:00
|
|
|
}
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Handles newlines, calculates indent
|
|
|
|
*/
|
2003-07-28 23:27:01 -04:00
|
|
|
#define GOBBLE_UP_YAML_INDENT( ict, start ) \
|
2003-05-09 17:25:50 -04:00
|
|
|
char *indent = start; \
|
|
|
|
NEWLINE(indent); \
|
|
|
|
while ( indent < YYCURSOR ) \
|
|
|
|
{ \
|
2003-06-10 10:15:27 -04:00
|
|
|
if ( is_newline( ++indent ) ) \
|
2003-05-09 17:25:50 -04:00
|
|
|
{ \
|
|
|
|
NEWLINE(indent); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
ict = 0; \
|
|
|
|
if ( *YYCURSOR == '\0' ) \
|
|
|
|
{ \
|
|
|
|
ict = -1; \
|
2003-05-15 17:46:47 -04:00
|
|
|
start = YYCURSOR - 1; \
|
2003-05-09 17:25:50 -04:00
|
|
|
} \
|
|
|
|
else if ( *YYLINEPTR == ' ' ) \
|
|
|
|
{ \
|
|
|
|
ict = YYCURSOR - YYLINEPTR; \
|
|
|
|
}
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* If an indent exists at the current level, back up.
|
|
|
|
*/
|
2003-07-28 23:27:01 -04:00
|
|
|
#define GET_TRUE_YAML_INDENT(indt_len) \
|
2003-05-09 17:25:50 -04:00
|
|
|
{ \
|
|
|
|
SyckLevel *lvl_deep = CURRENT_LEVEL(); \
|
|
|
|
indt_len = lvl_deep->spaces; \
|
2005-09-20 19:58:18 -04:00
|
|
|
if ( lvl_deep->status == syck_lvl_seq || ( indt_len == YYCURSOR - YYLINEPTR && lvl_deep->status != syck_lvl_map ) ) \
|
2003-05-09 17:25:50 -04:00
|
|
|
{ \
|
|
|
|
SyckLevel *lvl_over; \
|
|
|
|
parser->lvl_idx--; \
|
|
|
|
lvl_over = CURRENT_LEVEL(); \
|
|
|
|
indt_len = lvl_over->spaces; \
|
|
|
|
parser->lvl_idx++; \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
2003-07-28 15:27:42 -04:00
|
|
|
* Argjh! I hate globals! Here for syckerror() only!
|
2003-05-13 02:34:18 -04:00
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
SyckParser *syck_parser_ptr = NULL;
|
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
|
|
|
* Accessory funcs later in this file.
|
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
void eat_comments( SyckParser * );
|
2004-04-26 19:24:46 -04:00
|
|
|
char escape_seq( char );
|
2003-07-28 15:27:42 -04:00
|
|
|
int is_newline( char *ptr );
|
2004-07-30 16:31:09 -04:00
|
|
|
int newline_len( char *ptr );
|
2003-10-14 19:15:19 -04:00
|
|
|
int sycklex_yaml_utf8( YYSTYPE *, SyckParser * );
|
|
|
|
int sycklex_bytecode_utf8( YYSTYPE *, SyckParser * );
|
|
|
|
int syckwrap();
|
2003-05-09 17:25:50 -04:00
|
|
|
|
2003-05-13 02:34:18 -04:00
|
|
|
/*
|
2003-07-28 15:27:42 -04:00
|
|
|
* My own re-entrant sycklex() using re2c.
|
2003-05-13 02:34:18 -04:00
|
|
|
* You really get used to the limited regexp.
|
|
|
|
* It's really nice to not rely on backtracking and such.
|
|
|
|
*/
|
2003-05-09 17:25:50 -04:00
|
|
|
int
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklex( YYSTYPE *sycklval, SyckParser *parser )
|
2003-10-14 19:15:19 -04:00
|
|
|
{
|
|
|
|
switch ( parser->input_type )
|
|
|
|
{
|
|
|
|
case syck_yaml_utf8:
|
|
|
|
return sycklex_yaml_utf8( sycklval, parser );
|
|
|
|
|
|
|
|
case syck_yaml_utf16:
|
|
|
|
syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
|
|
|
|
break;
|
|
|
|
|
|
|
|
case syck_yaml_utf32:
|
|
|
|
syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
|
|
|
|
break;
|
|
|
|
|
|
|
|
case syck_bytecode_utf8:
|
|
|
|
return sycklex_bytecode_utf8( sycklval, parser );
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
return YAML_DOCSEP;
|
2003-10-14 19:15:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Parser for standard YAML [UTF-8]
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2003-09-03 14:58:27 -04:00
|
|
|
int doc_level = 0;
|
2003-05-09 17:25:50 -04:00
|
|
|
syck_parser_ptr = parser;
|
|
|
|
if ( YYCURSOR == NULL )
|
|
|
|
{
|
|
|
|
syck_parser_read( parser );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( parser->force_token != 0 )
|
|
|
|
{
|
|
|
|
int t = parser->force_token;
|
|
|
|
parser->force_token = 0;
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 315 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
if ( YYLINEPTR != YYCURSOR )
|
|
|
|
{
|
|
|
|
goto Document;
|
|
|
|
}
|
|
|
|
|
|
|
|
Header:
|
|
|
|
|
|
|
|
YYTOKEN = YYCURSOR;
|
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 307 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
|
|
|
goto yy0;
|
2005-09-17 13:22:49 -04:00
|
|
|
++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
yy0:
|
2003-06-10 10:15:27 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy7;
|
|
|
|
case 0x09: case ' ': goto yy12;
|
|
|
|
case 0x0A: goto yy9;
|
|
|
|
case 0x0D: goto yy11;
|
2004-08-13 12:14:23 -04:00
|
|
|
case '#': goto yy5;
|
|
|
|
case '-': goto yy2;
|
|
|
|
case '.': goto yy4;
|
|
|
|
default: goto yy14;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
yy2: yyaccept = 0;
|
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '-': goto yy28;
|
|
|
|
default: goto yy3;
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
yy3:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 374 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ YYPOS(0);
|
2003-05-09 17:25:50 -04:00
|
|
|
goto Document;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 337 "<stdout>"
|
2003-06-17 12:55:54 -04:00
|
|
|
yy4: yyaccept = 0;
|
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '.': goto yy21;
|
|
|
|
default: goto yy3;
|
|
|
|
}
|
|
|
|
yy5: ++YYCURSOR;
|
|
|
|
goto yy6;
|
2003-06-17 12:55:54 -04:00
|
|
|
yy6:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 356 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ eat_comments( parser );
|
2003-05-09 17:25:50 -04:00
|
|
|
goto Header;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 351 "<stdout>"
|
2004-08-13 12:14:23 -04:00
|
|
|
yy7: ++YYCURSOR;
|
|
|
|
goto yy8;
|
2003-06-17 12:55:54 -04:00
|
|
|
yy8:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 360 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ SyckLevel *lvl = CURRENT_LEVEL();
|
2003-07-28 23:27:01 -04:00
|
|
|
ENSURE_YAML_IEND(lvl, -1);
|
2003-06-05 13:42:06 -04:00
|
|
|
YYPOS(0);
|
2003-05-09 17:25:50 -04:00
|
|
|
return 0;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 361 "<stdout>"
|
2003-06-17 12:55:54 -04:00
|
|
|
yy9: yyaccept = 1;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2003-09-03 14:58:27 -04:00
|
|
|
goto yy18;
|
2003-06-17 12:55:54 -04:00
|
|
|
yy10:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 366 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN );
|
2003-05-09 17:25:50 -04:00
|
|
|
goto Header;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 370 "<stdout>"
|
2003-06-17 12:55:54 -04:00
|
|
|
yy11: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy17;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy3;
|
|
|
|
}
|
|
|
|
yy12: ++YYCURSOR;
|
|
|
|
yych = *YYCURSOR;
|
2003-09-03 14:58:27 -04:00
|
|
|
goto yy16;
|
|
|
|
yy13:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 370 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ doc_level = YYCURSOR - YYLINEPTR;
|
2003-09-03 14:58:27 -04:00
|
|
|
goto Header;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 384 "<stdout>"
|
2003-09-03 14:58:27 -04:00
|
|
|
yy14: yych = *++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
goto yy3;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy15: ++YYCURSOR;
|
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
goto yy16;
|
|
|
|
yy16: switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x09: case ' ': goto yy15;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy13;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy17: yyaccept = 1;
|
2003-06-10 10:15:27 -04:00
|
|
|
YYMARKER = ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
goto yy18;
|
|
|
|
yy18: switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: case ' ': goto yy17;
|
|
|
|
case 0x0D: goto yy19;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy10;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy19: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy17;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy20;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy20: YYCURSOR = YYMARKER;
|
2003-05-09 17:25:50 -04:00
|
|
|
switch(yyaccept){
|
2003-06-17 12:55:54 -04:00
|
|
|
case 1: goto yy10;
|
2003-05-09 17:25:50 -04:00
|
|
|
case 0: goto yy3;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy21: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '.': goto yy22;
|
|
|
|
default: goto yy20;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy22: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy23;
|
|
|
|
case 0x0D: goto yy27;
|
2004-08-13 12:14:23 -04:00
|
|
|
case ' ': goto yy25;
|
|
|
|
default: goto yy20;
|
|
|
|
}
|
|
|
|
yy23: ++YYCURSOR;
|
|
|
|
goto yy24;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy24:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 342 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ SyckLevel *lvl = CURRENT_LEVEL();
|
2003-06-17 12:55:54 -04:00
|
|
|
if ( lvl->status == syck_lvl_header )
|
|
|
|
{
|
|
|
|
goto Header;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-07-28 23:27:01 -04:00
|
|
|
ENSURE_YAML_IEND(lvl, -1);
|
2003-06-17 12:55:54 -04:00
|
|
|
YYPOS(0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 446 "<stdout>"
|
2003-09-03 14:58:27 -04:00
|
|
|
yy25: ++YYCURSOR;
|
2003-06-17 12:55:54 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
goto yy26;
|
|
|
|
yy26: switch(yych){
|
|
|
|
case ' ': goto yy25;
|
|
|
|
default: goto yy24;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy27: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy23;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy20;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy28: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '-': goto yy29;
|
|
|
|
default: goto yy20;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy29: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy30;
|
|
|
|
case 0x0D: goto yy34;
|
2004-08-13 12:14:23 -04:00
|
|
|
case ' ': goto yy32;
|
|
|
|
default: goto yy20;
|
|
|
|
}
|
|
|
|
yy30: ++YYCURSOR;
|
|
|
|
goto yy31;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy31:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 328 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ SyckLevel *lvl = CURRENT_LEVEL();
|
2003-05-09 17:25:50 -04:00
|
|
|
if ( lvl->status == syck_lvl_header )
|
|
|
|
{
|
|
|
|
YYPOS(3);
|
|
|
|
goto Directive;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-07-28 23:27:01 -04:00
|
|
|
ENSURE_YAML_IEND(lvl, -1);
|
2003-05-09 17:25:50 -04:00
|
|
|
YYPOS(0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 489 "<stdout>"
|
2003-09-03 14:58:27 -04:00
|
|
|
yy32: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
goto yy33;
|
|
|
|
yy33: switch(yych){
|
|
|
|
case ' ': goto yy32;
|
|
|
|
default: goto yy31;
|
|
|
|
}
|
|
|
|
yy34: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy30;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy20;
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 378 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
Document:
|
|
|
|
{
|
|
|
|
SyckLevel *lvl = CURRENT_LEVEL();
|
|
|
|
if ( lvl->status == syck_lvl_header )
|
|
|
|
{
|
|
|
|
lvl->status = syck_lvl_doc;
|
|
|
|
}
|
|
|
|
|
|
|
|
YYTOKEN = YYCURSOR;
|
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 518 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2003-09-03 14:58:27 -04:00
|
|
|
goto yy35;
|
2005-09-17 13:22:49 -04:00
|
|
|
++YYCURSOR;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy35:
|
2003-06-10 10:15:27 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy62;
|
|
|
|
case 0x09: case ' ': goto yy60;
|
|
|
|
case 0x0A: goto yy37;
|
|
|
|
case 0x0D: goto yy39;
|
2005-09-12 23:58:33 -04:00
|
|
|
case '!': goto yy51;
|
|
|
|
case '"': goto yy55;
|
|
|
|
case '#': goto yy58;
|
|
|
|
case '&': goto yy49;
|
|
|
|
case '\'': goto yy53;
|
|
|
|
case '*': goto yy50;
|
|
|
|
case ',': case ':': goto yy47;
|
|
|
|
case '-': case '?': goto yy48;
|
|
|
|
case '>': case '|': goto yy57;
|
|
|
|
case '[': goto yy41;
|
|
|
|
case ']': case '}': goto yy45;
|
|
|
|
case '{': goto yy43;
|
|
|
|
default: goto yy64;
|
2003-09-03 14:58:27 -04:00
|
|
|
}
|
|
|
|
yy37: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy92;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy38:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 392 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ /* Isolate spaces */
|
2003-05-09 17:25:50 -04:00
|
|
|
int indt_len;
|
2003-07-28 23:27:01 -04:00
|
|
|
GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
|
2003-05-09 17:25:50 -04:00
|
|
|
lvl = CURRENT_LEVEL();
|
2003-09-03 14:58:27 -04:00
|
|
|
doc_level = 0;
|
2003-05-09 17:25:50 -04:00
|
|
|
|
2003-10-14 19:15:19 -04:00
|
|
|
/* XXX: Comment lookahead */
|
|
|
|
if ( *YYCURSOR == '#' )
|
|
|
|
{
|
|
|
|
goto Document;
|
|
|
|
}
|
|
|
|
|
2004-08-07 11:34:39 -04:00
|
|
|
/* Ignore indentation inside inlines */
|
2005-09-12 23:58:33 -04:00
|
|
|
if ( lvl->status == syck_lvl_iseq || lvl->status == syck_lvl_imap )
|
2004-08-07 11:34:39 -04:00
|
|
|
{
|
|
|
|
goto Document;
|
|
|
|
}
|
|
|
|
|
2003-07-04 08:51:42 -04:00
|
|
|
/* Check for open indent */
|
2003-07-28 23:27:01 -04:00
|
|
|
ENSURE_YAML_IEND(lvl, indt_len);
|
|
|
|
ENSURE_YAML_IOPEN(lvl, indt_len, 0);
|
2003-05-11 02:32:13 -04:00
|
|
|
if ( indt_len == -1 )
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_INDENT;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 578 "<stdout>"
|
2004-08-13 12:14:23 -04:00
|
|
|
yy39: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy91;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy40;
|
|
|
|
}
|
2003-09-03 14:58:27 -04:00
|
|
|
yy40:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 497 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
|
2003-06-10 10:15:27 -04:00
|
|
|
goto Plain;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 589 "<stdout>"
|
2004-08-13 12:14:23 -04:00
|
|
|
yy41: ++YYCURSOR;
|
|
|
|
goto yy42;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy42:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 420 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
|
2003-05-09 17:25:50 -04:00
|
|
|
lvl = CURRENT_LEVEL();
|
2005-09-12 23:58:33 -04:00
|
|
|
ADD_LEVEL(lvl->spaces + 1, syck_lvl_iseq);
|
2003-05-09 17:25:50 -04:00
|
|
|
return YYTOKEN[0];
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 599 "<stdout>"
|
2004-08-13 12:14:23 -04:00
|
|
|
yy43: ++YYCURSOR;
|
|
|
|
goto yy44;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy44:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 426 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
ADD_LEVEL(lvl->spaces + 1, syck_lvl_imap);
|
|
|
|
return YYTOKEN[0];
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 609 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy45: ++YYCURSOR;
|
|
|
|
goto yy46;
|
|
|
|
yy46:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 432 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ POP_LEVEL();
|
2003-05-09 17:25:50 -04:00
|
|
|
return YYTOKEN[0];
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 617 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy47: yyaccept = 1;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy86;
|
|
|
|
case 0x0D: goto yy90;
|
2005-09-12 23:58:33 -04:00
|
|
|
case ' ': goto yy88;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy40;
|
2003-05-19 14:46:57 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy48: yyaccept = 1;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy81;
|
|
|
|
case 0x0D: goto yy85;
|
2005-09-12 23:58:33 -04:00
|
|
|
case ' ': goto yy83;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy40;
|
2003-05-19 14:46:57 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy49: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '-': case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': 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 '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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy78;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy40;
|
2003-05-19 14:46:57 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy50: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '-': case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': 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 '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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy75;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy40;
|
|
|
|
}
|
|
|
|
yy51: ++YYCURSOR;
|
|
|
|
goto yy52;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy52:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 471 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ goto TransferMethod; }
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 767 "<stdout>"
|
2004-08-13 12:14:23 -04:00
|
|
|
yy53: ++YYCURSOR;
|
|
|
|
goto yy54;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy54:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 473 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
|
|
|
|
goto SingleQuote; }
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 774 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy55: ++YYCURSOR;
|
|
|
|
goto yy56;
|
|
|
|
yy56:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 476 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
|
2003-05-22 13:56:30 -04:00
|
|
|
goto DoubleQuote; }
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 781 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy57: yyaccept = 1;
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy70;
|
|
|
|
case 0x0D: goto yy74;
|
2005-09-12 23:58:33 -04:00
|
|
|
case ' ': goto yy72;
|
2004-08-13 12:14:23 -04:00
|
|
|
case '+': case '-': case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
2005-09-12 23:58:33 -04:00
|
|
|
case '9': goto yy67;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy40;
|
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy58: ++YYCURSOR;
|
|
|
|
goto yy59;
|
|
|
|
yy59:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 486 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ eat_comments( parser );
|
2003-05-09 17:25:50 -04:00
|
|
|
goto Document;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 807 "<stdout>"
|
2004-08-13 12:14:23 -04:00
|
|
|
yy60: ++YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
yych = *YYCURSOR;
|
|
|
|
goto yy66;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy61:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 490 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ goto Document; }
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 814 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy62: ++YYCURSOR;
|
|
|
|
goto yy63;
|
|
|
|
yy63:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 492 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ ENSURE_YAML_IEND(lvl, -1);
|
2003-06-05 13:42:06 -04:00
|
|
|
YYPOS(0);
|
2003-05-09 17:25:50 -04:00
|
|
|
return 0;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 823 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy64: yych = *++YYCURSOR;
|
2003-09-03 14:58:27 -04:00
|
|
|
goto yy40;
|
|
|
|
yy65: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
goto yy66;
|
|
|
|
yy66: switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x09: case ' ': goto yy65;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy61;
|
|
|
|
}
|
|
|
|
yy67: ++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
2005-09-12 23:58:33 -04:00
|
|
|
yych = *YYCURSOR;
|
|
|
|
goto yy68;
|
|
|
|
yy68: switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy70;
|
|
|
|
case 0x0D: goto yy74;
|
2005-09-12 23:58:33 -04:00
|
|
|
case ' ': goto yy72;
|
2004-08-13 12:14:23 -04:00
|
|
|
case '+': case '-': case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
2005-09-12 23:58:33 -04:00
|
|
|
case '9': goto yy67;
|
|
|
|
default: goto yy69;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy69: YYCURSOR = YYMARKER;
|
2003-05-09 17:25:50 -04:00
|
|
|
switch(yyaccept){
|
2003-09-03 14:58:27 -04:00
|
|
|
case 0: goto yy38;
|
|
|
|
case 1: goto yy40;
|
2003-05-19 14:46:57 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy70: ++YYCURSOR;
|
|
|
|
goto yy71;
|
|
|
|
yy71:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 479 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ if ( is_newline( YYCURSOR - 1 ) )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCURSOR--;
|
|
|
|
}
|
|
|
|
goto ScalarBlock;
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 869 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy72: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy73;
|
|
|
|
yy73: switch(yych){
|
|
|
|
case ' ': goto yy72;
|
|
|
|
default: goto yy71;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy74: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy70;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy69;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy75: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy76;
|
|
|
|
yy76: switch(yych){
|
2004-08-13 12:14:23 -04:00
|
|
|
case '-': case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': 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 '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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy75;
|
|
|
|
default: goto yy77;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy77:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 466 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_ALIAS;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 956 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy78: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy79;
|
|
|
|
yy79: switch(yych){
|
2004-08-13 12:14:23 -04:00
|
|
|
case '-': case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': 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 '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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy78;
|
|
|
|
default: goto yy80;
|
2003-05-19 14:46:57 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy80:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 455 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
|
2003-06-17 12:55:54 -04:00
|
|
|
|
2003-07-04 08:51:42 -04:00
|
|
|
/*
|
|
|
|
* Remove previous anchors of the same name. Since the parser will likely
|
|
|
|
* construct deeper nodes first, we want those nodes to be placed in the
|
|
|
|
* queue for matching at a higher level of indentation.
|
|
|
|
*/
|
2003-07-28 15:27:42 -04:00
|
|
|
syck_hdlr_remove_anchor(parser, sycklval->name);
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_ANCHOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 1036 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy81: ++YYCURSOR;
|
|
|
|
goto yy82;
|
|
|
|
yy82:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 441 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
|
2003-07-28 23:27:01 -04:00
|
|
|
FORCE_NEXT_TOKEN(YAML_IOPEN);
|
2004-08-07 11:34:39 -04:00
|
|
|
if ( *YYCURSOR == '#' || is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCURSOR--;
|
2005-09-20 19:58:18 -04:00
|
|
|
ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq);
|
2003-05-29 19:33:10 -04:00
|
|
|
}
|
2004-08-07 11:34:39 -04:00
|
|
|
else /* spaces followed by content uses the space as indentation */
|
2003-05-29 19:33:10 -04:00
|
|
|
{
|
2005-09-20 19:58:18 -04:00
|
|
|
ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq);
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
return YYTOKEN[0];
|
|
|
|
}
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 1054 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy83: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy84;
|
|
|
|
yy84: switch(yych){
|
|
|
|
case ' ': goto yy83;
|
|
|
|
default: goto yy82;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy85: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy81;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy69;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy86: ++YYCURSOR;
|
|
|
|
goto yy87;
|
|
|
|
yy87:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 436 "token.re"
|
2005-09-20 19:58:18 -04:00
|
|
|
{ if ( *YYTOKEN == ':' && lvl->status != syck_lvl_imap ) lvl->status = syck_lvl_map;
|
|
|
|
YYPOS(1);
|
2003-05-09 17:25:50 -04:00
|
|
|
return YYTOKEN[0];
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1076 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy88: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy89;
|
|
|
|
yy89: switch(yych){
|
|
|
|
case ' ': goto yy88;
|
|
|
|
default: goto yy87;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy90: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy86;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy69;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy91: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
YYMARKER = ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy92;
|
|
|
|
yy92: switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: case ' ': goto yy91;
|
|
|
|
case 0x0D: goto yy93;
|
2004-08-13 12:14:23 -04:00
|
|
|
default: goto yy38;
|
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy93: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy91;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy69;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 501 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Directive:
|
|
|
|
{
|
|
|
|
YYTOKTMP = YYCURSOR;
|
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1117 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy94;
|
2005-09-17 13:22:49 -04:00
|
|
|
++YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
yy94:
|
2003-05-09 17:25:50 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy96;
|
|
|
|
case 0x09: case ' ': goto yy99;
|
2005-09-12 23:58:33 -04:00
|
|
|
case '%': goto yy97;
|
|
|
|
default: goto yy101;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy96: YYCURSOR = YYMARKER;
|
2003-05-09 17:25:50 -04:00
|
|
|
switch(yyaccept){
|
2005-09-12 23:58:33 -04:00
|
|
|
case 0: goto yy98;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy97: yyaccept = 0;
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy104;
|
|
|
|
default: goto yy98;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy98:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 514 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ YYCURSOR = YYTOKTMP;
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_DOCSEP;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1221 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy99: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy103;
|
|
|
|
yy100:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 512 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ goto Directive; }
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1228 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy101: yych = *++YYCURSOR;
|
|
|
|
goto yy98;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy102: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
goto yy103;
|
|
|
|
yy103: switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x09: case ' ': goto yy102;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy100;
|
|
|
|
}
|
|
|
|
yy104: ++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
2005-09-12 23:58:33 -04:00
|
|
|
yych = *YYCURSOR;
|
|
|
|
goto yy105;
|
|
|
|
yy105: switch(yych){
|
2004-08-13 12:14:23 -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 '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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy104;
|
|
|
|
case ':': goto yy106;
|
|
|
|
default: goto yy96;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy106: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy107;
|
|
|
|
default: goto yy96;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy107: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy108;
|
|
|
|
yy108: switch(yych){
|
2004-08-13 12:14:23 -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':
|
2005-09-12 23:58:33 -04:00
|
|
|
case 'z': goto yy107;
|
|
|
|
default: goto yy109;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy109:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 510 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ goto Directive; }
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1484 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 517 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Plain:
|
|
|
|
{
|
2003-05-29 19:33:10 -04:00
|
|
|
int qidx = 0;
|
|
|
|
int qcapa = 100;
|
|
|
|
char *qstr = S_ALLOC_N( char, qcapa );
|
2003-05-09 17:25:50 -04:00
|
|
|
SyckLevel *plvl;
|
|
|
|
int parentIndent;
|
2003-05-29 19:33:10 -04:00
|
|
|
|
2003-05-09 17:25:50 -04:00
|
|
|
YYCURSOR = YYTOKEN;
|
|
|
|
plvl = CURRENT_LEVEL();
|
2003-07-28 23:27:01 -04:00
|
|
|
GET_TRUE_YAML_INDENT(parentIndent);
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
Plain2:
|
2003-11-25 14:51:38 -05:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
Plain3:
|
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1509 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy110;
|
2005-09-17 13:22:49 -04:00
|
|
|
++YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
yy110:
|
2003-06-10 10:15:27 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy124;
|
|
|
|
case 0x09: goto yy126;
|
|
|
|
case 0x0A: goto yy112;
|
|
|
|
case 0x0D: goto yy114;
|
2005-09-12 23:58:33 -04:00
|
|
|
case ' ': goto yy122;
|
2004-08-13 12:14:23 -04:00
|
|
|
case ',': goto yy117;
|
2005-09-12 23:58:33 -04:00
|
|
|
case ':': goto yy116;
|
|
|
|
case ']': goto yy120;
|
|
|
|
case '}': goto yy118;
|
2005-09-17 13:22:49 -04:00
|
|
|
default: goto yy127;
|
2003-09-03 14:58:27 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy112: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy142;
|
2005-09-12 23:58:33 -04:00
|
|
|
yy113:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 540 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ int indt_len, nl_count = 0;
|
2003-05-09 17:25:50 -04:00
|
|
|
SyckLevel *lvl;
|
2003-11-25 14:51:38 -05:00
|
|
|
char *tok = YYTOKEN;
|
2003-07-28 23:27:01 -04:00
|
|
|
GOBBLE_UP_YAML_INDENT( indt_len, tok );
|
2003-05-09 17:25:50 -04:00
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
|
|
|
if ( indt_len <= parentIndent )
|
|
|
|
{
|
2003-05-29 19:33:10 -04:00
|
|
|
RETURN_IMPLICIT();
|
|
|
|
}
|
|
|
|
|
2003-11-25 14:51:38 -05:00
|
|
|
while ( YYTOKEN < YYCURSOR )
|
2003-05-29 19:33:10 -04:00
|
|
|
{
|
2005-09-20 02:50:20 -04:00
|
|
|
int nl_len = newline_len( YYTOKEN++ );
|
|
|
|
if ( nl_len )
|
2004-07-30 16:31:09 -04:00
|
|
|
{
|
2003-05-29 19:33:10 -04:00
|
|
|
nl_count++;
|
2004-07-30 16:31:09 -04:00
|
|
|
YYTOKEN += nl_len - 1;
|
|
|
|
}
|
2003-05-29 19:33:10 -04:00
|
|
|
}
|
|
|
|
if ( nl_count <= 1 )
|
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, ' ');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for ( i = 0; i < nl_count - 1; i++ )
|
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, '\n');
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
goto Plain2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1570 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy114: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy141;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy115;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy115:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 627 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN);
|
2003-05-29 19:33:10 -04:00
|
|
|
goto Plain2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1581 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy116: yyaccept = 1;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy136;
|
|
|
|
case 0x0D: goto yy140;
|
|
|
|
case ' ': goto yy138;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy115;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy117: yyaccept = 1;
|
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy130;
|
|
|
|
case 0x0D: goto yy134;
|
|
|
|
case ' ': goto yy132;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy115;
|
|
|
|
}
|
|
|
|
yy118: ++YYCURSOR;
|
|
|
|
goto yy119;
|
|
|
|
yy119:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 589 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ if ( plvl->status != syck_lvl_imap )
|
2003-05-29 19:33:10 -04:00
|
|
|
{
|
2005-09-12 23:58:33 -04:00
|
|
|
PLAIN_NOT_INL();
|
2003-05-29 19:33:10 -04:00
|
|
|
}
|
2004-08-07 11:34:39 -04:00
|
|
|
else
|
|
|
|
{
|
2005-09-12 23:58:33 -04:00
|
|
|
PLAIN_IS_INL();
|
2004-08-07 11:34:39 -04:00
|
|
|
}
|
2003-05-29 19:33:10 -04:00
|
|
|
RETURN_IMPLICIT();
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1612 "<stdout>"
|
2004-08-13 12:14:23 -04:00
|
|
|
yy120: ++YYCURSOR;
|
|
|
|
goto yy121;
|
2003-09-03 14:58:27 -04:00
|
|
|
yy121:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 600 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ if ( plvl->status != syck_lvl_iseq )
|
|
|
|
{
|
|
|
|
PLAIN_NOT_INL();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
PLAIN_IS_INL();
|
|
|
|
}
|
|
|
|
RETURN_IMPLICIT();
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1627 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy122: ++YYCURSOR;
|
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case '#': goto yy128;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy123;
|
|
|
|
}
|
|
|
|
yy123:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 617 "token.re"
|
2005-09-17 13:22:49 -04:00
|
|
|
{ if ( qidx == 0 )
|
|
|
|
{
|
|
|
|
goto Plain2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
goto Plain3;
|
|
|
|
}
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1644 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy124: ++YYCURSOR;
|
|
|
|
goto yy125;
|
|
|
|
yy125:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 615 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ RETURN_IMPLICIT(); }
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1650 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy126: yych = *++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy123;
|
|
|
|
yy127: yych = *++YYCURSOR;
|
2005-09-12 23:58:33 -04:00
|
|
|
goto yy115;
|
2005-09-17 13:22:49 -04:00
|
|
|
yy128: ++YYCURSOR;
|
|
|
|
goto yy129;
|
|
|
|
yy129:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 611 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ eat_comments( parser );
|
2003-05-29 19:33:10 -04:00
|
|
|
RETURN_IMPLICIT();
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1662 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy130: ++YYCURSOR;
|
|
|
|
goto yy131;
|
|
|
|
yy131:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 578 "token.re"
|
2005-09-12 23:58:33 -04:00
|
|
|
{ if ( plvl->status != syck_lvl_iseq && plvl->status != syck_lvl_imap )
|
|
|
|
{
|
|
|
|
PLAIN_NOT_INL();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
PLAIN_IS_INL();
|
|
|
|
}
|
|
|
|
RETURN_IMPLICIT();
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1677 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy132: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy133;
|
|
|
|
yy133: switch(yych){
|
|
|
|
case ' ': goto yy132;
|
|
|
|
default: goto yy131;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy134: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy130;
|
|
|
|
default: goto yy135;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy135: YYCURSOR = YYMARKER;
|
2003-06-10 10:15:27 -04:00
|
|
|
switch(yyaccept){
|
2005-09-12 23:58:33 -04:00
|
|
|
case 0: goto yy113;
|
|
|
|
case 1: goto yy115;
|
2003-06-10 10:15:27 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy136: ++YYCURSOR;
|
|
|
|
goto yy137;
|
|
|
|
yy137:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 576 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ RETURN_IMPLICIT(); }
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1701 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy138: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy139;
|
|
|
|
yy139: switch(yych){
|
|
|
|
case ' ': goto yy138;
|
|
|
|
default: goto yy137;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy140: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy136;
|
|
|
|
default: goto yy135;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy141: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
YYMARKER = ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy142;
|
|
|
|
yy142: switch(yych){
|
|
|
|
case 0x0A: case ' ': goto yy141;
|
|
|
|
case 0x0D: goto yy143;
|
2005-09-12 23:58:33 -04:00
|
|
|
default: goto yy113;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy143: ++YYCURSOR;
|
2003-06-10 10:15:27 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy141;
|
|
|
|
default: goto yy135;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 631 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SingleQuote:
|
|
|
|
{
|
|
|
|
int qidx = 0;
|
|
|
|
int qcapa = 100;
|
|
|
|
char *qstr = S_ALLOC_N( char, qcapa );
|
|
|
|
|
|
|
|
SingleQuote2:
|
2003-11-25 14:51:38 -05:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1747 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy144;
|
|
|
|
++YYCURSOR;
|
|
|
|
yy144:
|
2003-05-09 17:25:50 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy152;
|
|
|
|
case 0x0A: goto yy146;
|
|
|
|
case 0x0D: goto yy148;
|
|
|
|
case '\'': goto yy150;
|
|
|
|
default: goto yy153;
|
2003-06-10 10:15:27 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy146: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy157;
|
|
|
|
yy147:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 645 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ int indt_len;
|
2003-05-09 17:25:50 -04:00
|
|
|
int nl_count = 0;
|
|
|
|
SyckLevel *lvl;
|
2003-11-25 14:51:38 -05:00
|
|
|
GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
|
2003-05-09 17:25:50 -04:00
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
|
|
|
if ( lvl->status != syck_lvl_str )
|
|
|
|
{
|
|
|
|
ADD_LEVEL( indt_len, syck_lvl_str );
|
|
|
|
}
|
|
|
|
else if ( indt_len < lvl->spaces )
|
|
|
|
{
|
2003-07-04 08:51:42 -04:00
|
|
|
/* Error! */
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
|
2003-11-25 14:51:38 -05:00
|
|
|
while ( YYTOKEN < YYCURSOR )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2005-09-20 02:50:20 -04:00
|
|
|
int nl_len = newline_len( YYTOKEN++ );
|
|
|
|
if ( nl_len )
|
2004-07-30 16:31:09 -04:00
|
|
|
{
|
2003-05-09 17:25:50 -04:00
|
|
|
nl_count++;
|
2004-07-30 16:31:09 -04:00
|
|
|
YYTOKEN += nl_len - 1;
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
if ( nl_count <= 1 )
|
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, ' ');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for ( i = 0; i < nl_count - 1; i++ )
|
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, '\n');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
goto SingleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1807 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy148: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy156;
|
|
|
|
default: goto yy149;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy149:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 712 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
|
2003-06-10 10:15:27 -04:00
|
|
|
goto SingleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1818 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy150: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case '\'': goto yy154;
|
|
|
|
default: goto yy151;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy151:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 689 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ SyckLevel *lvl;
|
2003-05-09 17:25:50 -04:00
|
|
|
SyckNode *n = syck_alloc_str();
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
|
|
|
if ( lvl->status == syck_lvl_str )
|
|
|
|
{
|
|
|
|
POP_LEVEL();
|
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
if ( ((SyckParser *)parser)->taguri_expansion == 1 )
|
|
|
|
{
|
|
|
|
n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
n->type_id = syck_strndup( "str", 3 );
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
n->data.str->ptr = qstr;
|
|
|
|
n->data.str->len = qidx;
|
2004-05-14 23:11:28 -04:00
|
|
|
n->data.str->style = scalar_1quote;
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklval->nodeData = n;
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_PLAIN;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1848 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy152: yych = *++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy151;
|
|
|
|
yy153: yych = *++YYCURSOR;
|
|
|
|
goto yy149;
|
|
|
|
yy154: ++YYCURSOR;
|
|
|
|
goto yy155;
|
|
|
|
yy155:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 685 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ QUOTECAT(qstr, qcapa, qidx, '\'');
|
2003-05-09 17:25:50 -04:00
|
|
|
goto SingleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1860 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy156: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
YYMARKER = ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy157;
|
|
|
|
yy157: switch(yych){
|
|
|
|
case 0x0A: case ' ': goto yy156;
|
|
|
|
case 0x0D: goto yy158;
|
|
|
|
default: goto yy147;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy158: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy156;
|
|
|
|
default: goto yy159;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy159: YYCURSOR = YYMARKER;
|
2003-06-10 10:15:27 -04:00
|
|
|
switch(yyaccept){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0: goto yy147;
|
2003-05-19 14:46:57 -04:00
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 716 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DoubleQuote:
|
|
|
|
{
|
|
|
|
int keep_nl = 1;
|
|
|
|
int qidx = 0;
|
|
|
|
int qcapa = 100;
|
|
|
|
char *qstr = S_ALLOC_N( char, qcapa );
|
|
|
|
|
|
|
|
DoubleQuote2:
|
2003-11-25 14:51:38 -05:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1901 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy160;
|
|
|
|
++YYCURSOR;
|
|
|
|
yy160:
|
2003-05-30 19:09:54 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy167;
|
|
|
|
case 0x0A: goto yy162;
|
|
|
|
case 0x0D: goto yy164;
|
|
|
|
case '"': goto yy169;
|
|
|
|
case '\\': goto yy166;
|
|
|
|
default: goto yy170;
|
|
|
|
}
|
|
|
|
yy162: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy184;
|
|
|
|
yy163:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 734 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ int indt_len;
|
2003-05-09 17:25:50 -04:00
|
|
|
int nl_count = 0;
|
|
|
|
SyckLevel *lvl;
|
2003-11-25 14:51:38 -05:00
|
|
|
GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
|
2003-05-09 17:25:50 -04:00
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
|
|
|
if ( lvl->status != syck_lvl_str )
|
|
|
|
{
|
|
|
|
ADD_LEVEL( indt_len, syck_lvl_str );
|
|
|
|
}
|
|
|
|
else if ( indt_len < lvl->spaces )
|
|
|
|
{
|
2003-07-24 12:30:43 -04:00
|
|
|
/* FIXME */
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( keep_nl == 1 )
|
|
|
|
{
|
2003-11-25 14:51:38 -05:00
|
|
|
while ( YYTOKEN < YYCURSOR )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2005-09-20 02:50:20 -04:00
|
|
|
int nl_len = newline_len( YYTOKEN++ );
|
|
|
|
if ( nl_len )
|
2004-07-30 16:31:09 -04:00
|
|
|
{
|
2003-05-09 17:25:50 -04:00
|
|
|
nl_count++;
|
2004-07-30 16:31:09 -04:00
|
|
|
YYTOKEN += nl_len - 1;
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
if ( nl_count <= 1 )
|
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, ' ');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for ( i = 0; i < nl_count - 1; i++ )
|
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, '\n');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
keep_nl = 1;
|
|
|
|
goto DoubleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1966 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy164: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy183;
|
|
|
|
default: goto yy165;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy165:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 820 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
|
2003-05-09 17:25:50 -04:00
|
|
|
goto DoubleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1977 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy166: yyaccept = 1;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy174;
|
|
|
|
case 0x0D: goto yy176;
|
|
|
|
case ' ': goto yy171;
|
2004-08-13 12:14:23 -04:00
|
|
|
case '"': case '0': case '\\': case 'a':
|
|
|
|
case 'b': case 'e':
|
2005-09-17 13:22:49 -04:00
|
|
|
case 'f': case 'n': case 'r': case 't': case 'v': goto yy178;
|
|
|
|
case 'x': goto yy177;
|
|
|
|
default: goto yy165;
|
|
|
|
}
|
|
|
|
yy167: ++YYCURSOR;
|
|
|
|
goto yy168;
|
|
|
|
yy168:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 797 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ SyckLevel *lvl;
|
2003-05-09 17:25:50 -04:00
|
|
|
SyckNode *n = syck_alloc_str();
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
|
|
|
if ( lvl->status == syck_lvl_str )
|
|
|
|
{
|
|
|
|
POP_LEVEL();
|
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
if ( ((SyckParser *)parser)->taguri_expansion == 1 )
|
|
|
|
{
|
|
|
|
n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
n->type_id = syck_strndup( "str", 3 );
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
n->data.str->ptr = qstr;
|
|
|
|
n->data.str->len = qidx;
|
2004-05-14 23:11:28 -04:00
|
|
|
n->data.str->style = scalar_2quote;
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklval->nodeData = n;
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_PLAIN;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2016 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy169: yych = *++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy168;
|
|
|
|
yy170: yych = *++YYCURSOR;
|
|
|
|
goto yy165;
|
|
|
|
yy171: ++YYCURSOR;
|
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy172;
|
|
|
|
yy172: switch(yych){
|
|
|
|
case 0x0A: goto yy174;
|
|
|
|
case 0x0D: goto yy176;
|
|
|
|
case ' ': goto yy171;
|
|
|
|
default: goto yy173;
|
|
|
|
}
|
|
|
|
yy173: YYCURSOR = YYMARKER;
|
2003-05-09 17:25:50 -04:00
|
|
|
switch(yyaccept){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0: goto yy163;
|
|
|
|
case 1: goto yy165;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy174: ++YYCURSOR;
|
|
|
|
goto yy175;
|
|
|
|
yy175:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 792 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ keep_nl = 0;
|
2003-05-09 17:25:50 -04:00
|
|
|
YYCURSOR--;
|
|
|
|
goto DoubleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2044 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy176: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy174;
|
|
|
|
default: goto yy173;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy177: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
2005-09-17 13:22:49 -04:00
|
|
|
case 'f': goto yy180;
|
|
|
|
default: goto yy173;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy178: ++YYCURSOR;
|
|
|
|
goto yy179;
|
|
|
|
yy179:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 778 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ char ch = *( YYCURSOR - 1 );
|
2004-04-26 19:24:46 -04:00
|
|
|
QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
|
2003-05-09 17:25:50 -04:00
|
|
|
goto DoubleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2082 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy180: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
2005-09-17 13:22:49 -04:00
|
|
|
case 'f': goto yy181;
|
|
|
|
default: goto yy173;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy181: ++YYCURSOR;
|
|
|
|
goto yy182;
|
|
|
|
yy182:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 783 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ long ch;
|
2003-11-25 14:51:38 -05:00
|
|
|
char *chr_text = syck_strndup( YYTOKEN, 4 );
|
2003-05-30 19:09:54 -04:00
|
|
|
chr_text[0] = '0';
|
|
|
|
ch = strtol( chr_text, NULL, 16 );
|
|
|
|
free( chr_text );
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, ch);
|
|
|
|
goto DoubleQuote2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2119 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy183: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
YYMARKER = ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy184;
|
|
|
|
yy184: switch(yych){
|
|
|
|
case 0x0A: case ' ': goto yy183;
|
|
|
|
case 0x0D: goto yy185;
|
|
|
|
default: goto yy163;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy185: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy183;
|
|
|
|
default: goto yy173;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 824 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
TransferMethod:
|
|
|
|
{
|
2003-07-24 12:30:43 -04:00
|
|
|
int qidx = 0;
|
|
|
|
int qcapa = 100;
|
|
|
|
char *qstr = S_ALLOC_N( char, qcapa );
|
|
|
|
|
|
|
|
TransferMethod2:
|
2003-05-09 17:25:50 -04:00
|
|
|
YYTOKTMP = YYCURSOR;
|
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2152 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy186;
|
|
|
|
++YYCURSOR;
|
|
|
|
yy186:
|
2003-07-24 12:30:43 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy188;
|
|
|
|
case 0x0A: goto yy190;
|
|
|
|
case 0x0D: goto yy192;
|
|
|
|
case ' ': goto yy191;
|
|
|
|
case '\\': goto yy194;
|
|
|
|
default: goto yy195;
|
|
|
|
}
|
|
|
|
yy188: ++YYCURSOR;
|
|
|
|
goto yy189;
|
|
|
|
yy189:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 838 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ SyckLevel *lvl;
|
2003-05-09 17:25:50 -04:00
|
|
|
YYCURSOR = YYTOKTMP;
|
|
|
|
if ( YYCURSOR == YYTOKEN + 1 )
|
|
|
|
{
|
2003-07-24 12:30:43 -04:00
|
|
|
free( qstr );
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_ITRANSFER;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
2003-07-04 08:51:42 -04:00
|
|
|
/*
|
|
|
|
* URL Prefixing
|
|
|
|
*/
|
2003-07-24 12:30:43 -04:00
|
|
|
if ( *qstr == '^' )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
|
|
|
|
sycklval->name[0] = '\0';
|
|
|
|
strcat( sycklval->name, lvl->domain );
|
|
|
|
strncat( sycklval->name, qstr + 1, qidx - 1 );
|
2003-07-24 12:30:43 -04:00
|
|
|
free( qstr );
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-07-24 12:30:43 -04:00
|
|
|
char *carat = qstr;
|
|
|
|
char *qend = qstr + qidx;
|
|
|
|
while ( (++carat) < qend )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
if ( *carat == '^' )
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-07-24 12:30:43 -04:00
|
|
|
if ( carat < qend )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2003-05-13 02:34:18 -04:00
|
|
|
free( lvl->domain );
|
2003-07-24 12:30:43 -04:00
|
|
|
lvl->domain = syck_strndup( qstr, carat - qstr );
|
2003-07-28 15:27:42 -04:00
|
|
|
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 );
|
2003-07-24 12:30:43 -04:00
|
|
|
free( qstr );
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-07-28 15:27:42 -04:00
|
|
|
sycklval->name = qstr;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
}
|
2003-05-11 02:32:13 -04:00
|
|
|
|
2003-07-28 23:27:01 -04:00
|
|
|
return YAML_TRANSFER;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2222 "<stdout>"
|
2005-09-12 23:58:33 -04:00
|
|
|
yy190: yych = *++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy189;
|
|
|
|
yy191: yych = *++YYCURSOR;
|
|
|
|
goto yy204;
|
|
|
|
yy192: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy188;
|
|
|
|
default: goto yy193;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy193:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 905 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
|
2003-07-24 12:30:43 -04:00
|
|
|
goto TransferMethod2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2237 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy194: yyaccept = 0;
|
2003-07-24 12:30:43 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '"': case '0': case '\\': case 'a':
|
|
|
|
case 'b': case 'e':
|
2005-09-17 13:22:49 -04:00
|
|
|
case 'f': case 'n': case 'r': case 't': case 'v': goto yy198;
|
|
|
|
case 'x': goto yy196;
|
|
|
|
default: goto yy193;
|
2003-10-17 16:53:39 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy195: yych = *++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy193;
|
|
|
|
yy196: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
2005-09-17 13:22:49 -04:00
|
|
|
case 'f': goto yy200;
|
|
|
|
default: goto yy197;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy197: YYCURSOR = YYMARKER;
|
2005-09-12 23:58:33 -04:00
|
|
|
switch(yyaccept){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0: goto yy193;
|
2005-09-12 23:58:33 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy198: ++YYCURSOR;
|
|
|
|
goto yy199;
|
|
|
|
yy199:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 891 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ char ch = *( YYCURSOR - 1 );
|
2004-04-26 19:24:46 -04:00
|
|
|
QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
|
|
|
|
goto TransferMethod2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2285 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy200: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
case '3':
|
|
|
|
case '4':
|
|
|
|
case '5':
|
|
|
|
case '6':
|
|
|
|
case '7':
|
|
|
|
case '8':
|
|
|
|
case '9': case 'A':
|
|
|
|
case 'B':
|
|
|
|
case 'C':
|
|
|
|
case 'D':
|
|
|
|
case 'E':
|
|
|
|
case 'F': case 'a':
|
|
|
|
case 'b':
|
|
|
|
case 'c':
|
|
|
|
case 'd':
|
|
|
|
case 'e':
|
2005-09-17 13:22:49 -04:00
|
|
|
case 'f': goto yy201;
|
|
|
|
default: goto yy197;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy201: ++YYCURSOR;
|
|
|
|
goto yy202;
|
|
|
|
yy202:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 896 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ long ch;
|
2003-07-24 12:30:43 -04:00
|
|
|
char *chr_text = syck_strndup( YYTOKTMP, 4 );
|
|
|
|
chr_text[0] = '0';
|
|
|
|
ch = strtol( chr_text, NULL, 16 );
|
|
|
|
free( chr_text );
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, ch);
|
|
|
|
goto TransferMethod2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2322 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy203: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy204;
|
|
|
|
yy204: switch(yych){
|
|
|
|
case ' ': goto yy203;
|
|
|
|
default: goto yy189;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 910 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ScalarBlock:
|
|
|
|
{
|
2003-05-29 19:33:10 -04:00
|
|
|
int qidx = 0;
|
|
|
|
int qcapa = 100;
|
|
|
|
char *qstr = S_ALLOC_N( char, qcapa );
|
2003-05-09 17:25:50 -04:00
|
|
|
int blockType = 0;
|
|
|
|
int nlDoWhat = 0;
|
2003-05-29 19:33:10 -04:00
|
|
|
int lastIndent = 0;
|
2003-05-09 17:25:50 -04:00
|
|
|
int forceIndent = -1;
|
|
|
|
char *yyt = YYTOKEN;
|
|
|
|
SyckLevel *lvl = CURRENT_LEVEL();
|
2005-09-20 19:58:18 -04:00
|
|
|
int parentIndent = -1;
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
switch ( *yyt )
|
|
|
|
{
|
|
|
|
case '|': blockType = BLOCK_LIT; break;
|
|
|
|
case '>': blockType = BLOCK_FOLD; break;
|
|
|
|
}
|
|
|
|
|
|
|
|
while ( ++yyt <= YYCURSOR )
|
|
|
|
{
|
|
|
|
if ( *yyt == '-' )
|
|
|
|
{
|
|
|
|
nlDoWhat = NL_CHOMP;
|
|
|
|
}
|
|
|
|
else if ( *yyt == '+' )
|
|
|
|
{
|
|
|
|
nlDoWhat = NL_KEEP;
|
|
|
|
}
|
|
|
|
else if ( isdigit( *yyt ) )
|
|
|
|
{
|
2005-09-20 19:58:18 -04:00
|
|
|
forceIndent = strtol( yyt, NULL, 10 );
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-05-29 19:33:10 -04:00
|
|
|
qstr[0] = '\0';
|
2003-05-09 17:25:50 -04:00
|
|
|
YYTOKEN = YYCURSOR;
|
|
|
|
|
|
|
|
ScalarBlock2:
|
2003-11-25 14:51:38 -05:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 2378 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy205;
|
|
|
|
++YYCURSOR;
|
|
|
|
yy205:
|
2004-04-26 19:24:46 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
|
2003-05-09 17:25:50 -04:00
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy213;
|
|
|
|
case 0x0A: goto yy207;
|
|
|
|
case 0x0D: goto yy209;
|
|
|
|
case '#': goto yy211;
|
|
|
|
case '-': goto yy215;
|
|
|
|
default: goto yy216;
|
|
|
|
}
|
|
|
|
yy207: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy226;
|
|
|
|
yy208:
|
2005-09-20 02:50:20 -04:00
|
|
|
#line 956 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ char *pacer;
|
2003-11-25 14:51:38 -05:00
|
|
|
char *tok = YYTOKEN;
|
2003-06-10 10:15:27 -04:00
|
|
|
int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0;
|
2003-07-28 23:27:01 -04:00
|
|
|
GOBBLE_UP_YAML_INDENT( indt_len, tok );
|
2003-05-09 17:25:50 -04:00
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
|
2005-09-20 19:58:18 -04:00
|
|
|
if ( lvl->status != syck_lvl_block )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2005-09-20 19:58:18 -04:00
|
|
|
GET_TRUE_YAML_INDENT(parentIndent);
|
|
|
|
if ( forceIndent > 0 ) forceIndent += parentIndent;
|
|
|
|
if ( indt_len > parentIndent )
|
|
|
|
{
|
|
|
|
int new_spaces = forceIndent > 0 ? forceIndent : indt_len;
|
|
|
|
ADD_LEVEL( new_spaces, syck_lvl_block );
|
|
|
|
lastIndent = indt_len - new_spaces;
|
|
|
|
nl_begin = 1;
|
|
|
|
lvl = CURRENT_LEVEL();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
YYCURSOR = YYTOKEN;
|
|
|
|
RETURN_YAML_BLOCK();
|
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2003-05-29 19:33:10 -04:00
|
|
|
|
2003-07-04 08:51:42 -04:00
|
|
|
/*
|
|
|
|
* Fold only in the event of two lines being on the leftmost
|
|
|
|
* indentation.
|
|
|
|
*/
|
2003-05-29 19:33:10 -04:00
|
|
|
if ( blockType == BLOCK_FOLD && lastIndent == 0 && ( indt_len - lvl->spaces ) == 0 )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2003-05-29 19:33:10 -04:00
|
|
|
fold_nl = 1;
|
|
|
|
}
|
|
|
|
|
2003-11-25 14:51:38 -05:00
|
|
|
pacer = YYTOKEN;
|
2003-05-29 19:33:10 -04:00
|
|
|
while ( pacer < YYCURSOR )
|
|
|
|
{
|
2005-09-20 02:50:20 -04:00
|
|
|
int nl_len = newline_len( pacer++ );
|
|
|
|
if ( nl_len )
|
2004-07-30 16:31:09 -04:00
|
|
|
{
|
2003-05-29 19:33:10 -04:00
|
|
|
nl_count++;
|
2004-07-30 16:31:09 -04:00
|
|
|
pacer += nl_len - 1;
|
|
|
|
}
|
2003-05-29 19:33:10 -04:00
|
|
|
}
|
|
|
|
|
2003-06-10 10:15:27 -04:00
|
|
|
if ( fold_nl == 1 || nl_begin == 1 )
|
2003-05-29 19:33:10 -04:00
|
|
|
{
|
|
|
|
nl_count--;
|
|
|
|
}
|
|
|
|
|
2003-06-10 10:15:27 -04:00
|
|
|
if ( nl_count < 1 && nl_begin == 0 )
|
2003-05-29 19:33:10 -04:00
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, ' ');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for ( i = 0; i < nl_count; i++ )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
2003-05-29 19:33:10 -04:00
|
|
|
QUOTECAT(qstr, qcapa, qidx, '\n');
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2003-05-29 19:33:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
lastIndent = indt_len - lvl->spaces;
|
|
|
|
YYCURSOR -= lastIndent;
|
|
|
|
|
|
|
|
if ( indt_len < lvl->spaces )
|
|
|
|
{
|
|
|
|
POP_LEVEL();
|
2003-11-25 14:51:38 -05:00
|
|
|
YYCURSOR = YYTOKEN;
|
2003-07-28 23:27:01 -04:00
|
|
|
RETURN_YAML_BLOCK();
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
goto ScalarBlock2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2474 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy209: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy225;
|
|
|
|
default: goto yy210;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy210:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1070 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
|
2003-06-10 10:15:27 -04:00
|
|
|
goto ScalarBlock2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2485 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy211: ++YYCURSOR;
|
|
|
|
goto yy212;
|
|
|
|
yy212:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1032 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ lvl = CURRENT_LEVEL();
|
2003-05-30 19:09:54 -04:00
|
|
|
if ( lvl->status != syck_lvl_block )
|
|
|
|
{
|
|
|
|
eat_comments( parser );
|
2003-11-25 14:51:38 -05:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-05-30 19:09:54 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-11-25 14:51:38 -05:00
|
|
|
QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
|
2003-05-30 19:09:54 -04:00
|
|
|
}
|
|
|
|
goto ScalarBlock2;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2502 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy213: ++YYCURSOR;
|
|
|
|
goto yy214;
|
|
|
|
yy214:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1046 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ YYCURSOR--;
|
2003-05-09 17:25:50 -04:00
|
|
|
POP_LEVEL();
|
2003-07-28 23:27:01 -04:00
|
|
|
RETURN_YAML_BLOCK();
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2511 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy215: yyaccept = 1;
|
2004-04-26 19:24:46 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case '-': goto yy217;
|
|
|
|
default: goto yy210;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-12 23:58:33 -04:00
|
|
|
yy216: yych = *++YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy210;
|
|
|
|
yy217: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case '-': goto yy219;
|
|
|
|
default: goto yy218;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy218: YYCURSOR = YYMARKER;
|
2004-04-26 19:24:46 -04:00
|
|
|
switch(yyaccept){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0: goto yy208;
|
|
|
|
case 1: goto yy210;
|
2004-04-26 19:24:46 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy219: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy220;
|
|
|
|
case 0x0D: goto yy224;
|
|
|
|
case ' ': goto yy222;
|
|
|
|
default: goto yy218;
|
|
|
|
}
|
|
|
|
yy220: ++YYCURSOR;
|
|
|
|
goto yy221;
|
|
|
|
yy221:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1051 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ if ( YYTOKEN == YYLINEPTR )
|
2004-04-26 19:24:46 -04:00
|
|
|
{
|
2004-05-25 10:57:25 -04:00
|
|
|
if ( blockType == BLOCK_FOLD && qidx > 0 )
|
2004-04-26 19:24:46 -04:00
|
|
|
{
|
|
|
|
qidx -= 1;
|
|
|
|
}
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, '\n');
|
|
|
|
POP_LEVEL();
|
|
|
|
YYCURSOR = YYTOKEN;
|
|
|
|
RETURN_YAML_BLOCK();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
|
|
|
|
YYCURSOR = YYTOKEN + 1;
|
|
|
|
goto ScalarBlock2;
|
|
|
|
}
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2559 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy222: ++YYCURSOR;
|
2004-04-26 19:24:46 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy223;
|
|
|
|
yy223: switch(yych){
|
|
|
|
case ' ': goto yy222;
|
|
|
|
default: goto yy221;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy224: yych = *++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy220;
|
|
|
|
default: goto yy218;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy225: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
YYMARKER = ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy226;
|
|
|
|
yy226: switch(yych){
|
|
|
|
case 0x0A: case ' ': goto yy225;
|
|
|
|
case 0x0D: goto yy227;
|
|
|
|
default: goto yy208;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy227: ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy225;
|
|
|
|
default: goto yy218;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1075 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2003-07-28 15:27:42 -04:00
|
|
|
return 0;
|
|
|
|
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
eat_comments( SyckParser *parser )
|
|
|
|
{
|
|
|
|
Comment:
|
|
|
|
{
|
2003-11-25 14:51:38 -05:00
|
|
|
YYTOKEN = YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
|
2004-08-13 12:14:23 -04:00
|
|
|
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2607 "<stdout>"
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
YYCTYPE yych;
|
|
|
|
unsigned int yyaccept;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy228;
|
|
|
|
++YYCURSOR;
|
|
|
|
yy228:
|
2003-05-09 17:25:50 -04:00
|
|
|
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x00: goto yy230;
|
|
|
|
case 0x0A: goto yy232;
|
|
|
|
case 0x0D: goto yy233;
|
|
|
|
default: goto yy235;
|
|
|
|
}
|
|
|
|
yy230: ++YYCURSOR;
|
|
|
|
goto yy231;
|
|
|
|
yy231:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1091 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ YYCURSOR = YYTOKEN;
|
2003-05-09 17:25:50 -04:00
|
|
|
return;
|
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2629 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy232: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
yych = *(YYMARKER = ++YYCURSOR);
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy237;
|
|
|
|
yy233: ++YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch((yych = *YYCURSOR)) {
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy236;
|
|
|
|
default: goto yy234;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy234:
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1095 "token.re"
|
2004-08-13 12:14:23 -04:00
|
|
|
{ goto Comment;
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 2642 "<stdout>"
|
2005-09-17 13:22:49 -04:00
|
|
|
yy235: yych = *++YYCURSOR;
|
|
|
|
goto yy234;
|
|
|
|
yy236: yyaccept = 0;
|
2003-06-10 10:15:27 -04:00
|
|
|
YYMARKER = ++YYCURSOR;
|
2003-05-09 17:25:50 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2005-09-17 13:22:49 -04:00
|
|
|
goto yy237;
|
|
|
|
yy237: switch(yych){
|
|
|
|
case 0x0A: goto yy236;
|
|
|
|
case 0x0D: goto yy238;
|
|
|
|
default: goto yy231;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy238: ++YYCURSOR;
|
2003-06-10 10:15:27 -04:00
|
|
|
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
|
|
|
yych = *YYCURSOR;
|
2004-08-13 12:14:23 -04:00
|
|
|
switch(yych){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0x0A: goto yy236;
|
|
|
|
default: goto yy239;
|
2004-08-13 12:14:23 -04:00
|
|
|
}
|
2005-09-17 13:22:49 -04:00
|
|
|
yy239: YYCURSOR = YYMARKER;
|
2003-06-10 10:15:27 -04:00
|
|
|
switch(yyaccept){
|
2005-09-17 13:22:49 -04:00
|
|
|
case 0: goto yy231;
|
2003-05-19 14:46:57 -04:00
|
|
|
}
|
2003-05-09 17:25:50 -04:00
|
|
|
}
|
2005-09-20 19:58:18 -04:00
|
|
|
#line 1098 "token.re"
|
2003-05-09 17:25:50 -04:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2004-04-26 19:24:46 -04:00
|
|
|
char
|
|
|
|
escape_seq( char ch )
|
|
|
|
{
|
|
|
|
switch ( ch )
|
|
|
|
{
|
|
|
|
case '0': return '\0';
|
|
|
|
case 'a': return 7;
|
|
|
|
case 'b': return '\010';
|
|
|
|
case 'e': return '\033';
|
|
|
|
case 'f': return '\014';
|
|
|
|
case 'n': return '\n';
|
|
|
|
case 'r': return '\015';
|
|
|
|
case 't': return '\t';
|
|
|
|
case 'v': return '\013';
|
|
|
|
default: return ch;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-10 10:15:27 -04:00
|
|
|
int
|
|
|
|
is_newline( char *ptr )
|
2004-07-30 16:31:09 -04:00
|
|
|
{
|
|
|
|
return newline_len( ptr );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
newline_len( char *ptr )
|
2003-06-10 10:15:27 -04:00
|
|
|
{
|
|
|
|
if ( *ptr == '\n' )
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
if ( *ptr == '\r' && *( ptr + 1 ) == '\n' )
|
2004-07-30 16:31:09 -04:00
|
|
|
return 2;
|
2003-06-10 10:15:27 -04:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-05-09 17:25:50 -04:00
|
|
|
int
|
2003-07-28 15:27:42 -04:00
|
|
|
syckwrap()
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2003-07-28 15:27:42 -04:00
|
|
|
syckerror( char *msg )
|
2003-05-09 17:25:50 -04:00
|
|
|
{
|
|
|
|
if ( syck_parser_ptr->error_handler == NULL )
|
|
|
|
syck_parser_ptr->error_handler = syck_default_error_handler;
|
|
|
|
|
2003-05-15 17:46:47 -04:00
|
|
|
syck_parser_ptr->root = syck_parser_ptr->root_on_error;
|
2003-05-09 17:25:50 -04:00
|
|
|
(syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
|
|
|
|
}
|
|
|
|
|