mkrf 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/MIT-LICENSE +7 -0
- data/README +54 -0
- data/Rakefile +107 -0
- data/lib/mkrf.rb +4 -0
- data/lib/mkrf/availability.rb +219 -0
- data/lib/mkrf/generator.rb +146 -0
- data/test/abstract_unit.rb +4 -0
- data/test/fixtures/down_a_directory/header_down_a_directory.h +1 -0
- data/test/fixtures/stdmkrf.h +1 -0
- data/test/sample_files/libtrivial/Rakefile +31 -0
- data/test/sample_files/libtrivial/extconf.rb +3 -0
- data/test/sample_files/libtrivial/lib/libtrivial.c +5 -0
- data/test/sample_files/libtrivial/lib/libtrivial.o +0 -0
- data/test/sample_files/libtrivial/libtrivial_so.bundle +0 -0
- data/test/sample_files/libtrivial/mkrf.log +1 -0
- data/test/sample_files/libxml-ruby-0.3.8/CHANGELOG +74 -0
- data/test/sample_files/libxml-ruby-0.3.8/LICENSE +22 -0
- data/test/sample_files/libxml-ruby-0.3.8/README +144 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/cbg.c +76 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/extconf.rb +49 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml.c +86 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml.h +82 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml.rb +107 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/mkrf.log +1 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/old_extconf.rb +95 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attr.c +372 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attr.h +21 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attribute.c +224 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attribute.h +21 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_document.c +1159 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_document.h +27 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_dtd.c +168 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_dtd.h +17 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_input_cbg.c +167 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_input_cbg.h +21 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node.c +2139 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node.h +28 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node_set.c +248 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node_set.h +26 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_ns.c +153 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_ns.h +21 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser.c +1417 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser.h +31 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser_context.c +715 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser_context.h +22 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_sax_parser.c +426 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_sax_parser.h +52 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_schema.c +142 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_schema.h +16 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_tree.c +43 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_tree.h +12 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xinclude.c +20 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xinclude.h +13 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath.c +363 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath.h +24 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath_context.c +125 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath_context.h +24 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer.c +100 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer.h +27 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer_context.c +21 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer_context.h +18 -0
- data/test/sample_files/libxml-ruby-0.3.8/ext/xml/sax_parser_callbacks.inc +202 -0
- data/test/sample_files/syck-0.55/CHANGELOG +186 -0
- data/test/sample_files/syck-0.55/COPYING +54 -0
- data/test/sample_files/syck-0.55/Makefile +582 -0
- data/test/sample_files/syck-0.55/Makefile.am +5 -0
- data/test/sample_files/syck-0.55/Makefile.in +582 -0
- data/test/sample_files/syck-0.55/README +105 -0
- data/test/sample_files/syck-0.55/README.BYTECODE +484 -0
- data/test/sample_files/syck-0.55/README.EXT +444 -0
- data/test/sample_files/syck-0.55/RELEASE +123 -0
- data/test/sample_files/syck-0.55/TODO +25 -0
- data/test/sample_files/syck-0.55/aclocal.m4 +883 -0
- data/test/sample_files/syck-0.55/bootstrap +7 -0
- data/test/sample_files/syck-0.55/config.h +79 -0
- data/test/sample_files/syck-0.55/config.h.in +78 -0
- data/test/sample_files/syck-0.55/config.status +1197 -0
- data/test/sample_files/syck-0.55/config/README +14 -0
- data/test/sample_files/syck-0.55/config/depcomp +529 -0
- data/test/sample_files/syck-0.55/config/install-sh +323 -0
- data/test/sample_files/syck-0.55/config/missing +357 -0
- data/test/sample_files/syck-0.55/configure +6728 -0
- data/test/sample_files/syck-0.55/configure.in +36 -0
- data/test/sample_files/syck-0.55/ext/ruby/CHANGELOG +303 -0
- data/test/sample_files/syck-0.55/ext/ruby/README +400 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/MANIFEST +1 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/bytecode.c +1170 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/emitter.c +1224 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/extconf.rb +10 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/gram.c +1894 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/gram.h +79 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/handler.c +174 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/implicit.c +2989 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/mkrf.log +1 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/node.c +407 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/rubyext.c +2385 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/syck.c +504 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/syck.h +458 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/token.c +2707 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/yaml2byte.c +250 -0
- data/test/sample_files/syck-0.55/ext/ruby/ext/syck/yamlbyte.h +170 -0
- data/test/sample_files/syck-0.55/ext/ruby/install.rb +1022 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/okay.rb +161 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/okay/news.rb +69 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/okay/rpc.rb +434 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml.rb +436 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/baseemitter.rb +247 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/basenode.rb +216 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/compat.rb +26 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/constants.rb +45 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/dbm.rb +111 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/emitter.rb +107 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/encoding.rb +33 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/error.rb +34 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/rubytypes.rb +438 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/store.rb +29 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/stream.rb +40 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/stringio.rb +83 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/syck.rb +19 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/tag.rb +86 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/types.rb +188 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/yamlnode.rb +54 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yaml/ypath.rb +52 -0
- data/test/sample_files/syck-0.55/ext/ruby/lib/yod.rb +1168 -0
- data/test/sample_files/syck-0.55/ext/ruby/samples/okayNews-modules.rb +27 -0
- data/test/sample_files/syck-0.55/ext/ruby/samples/okayNews-sample.rb +336 -0
- data/test/sample_files/syck-0.55/ext/ruby/samples/okayNews-validate.rb +341 -0
- data/test/sample_files/syck-0.55/ext/ruby/samples/okayRpc-client.rb +51 -0
- data/test/sample_files/syck-0.55/ext/ruby/samples/okayRpc-server.rb +85 -0
- data/test/sample_files/syck-0.55/ext/ruby/samples/yaml-sortHashKeys.rb +128 -0
- data/test/sample_files/syck-0.55/ext/ruby/tests/basic.rb +1653 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsAnchorAlias.yml +51 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsBasicTests.yml +282 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsBlockMapping.yml +78 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsBlockSequence.yml +0 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml +102 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsErrorTests.yml +23 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsFlowCollections.yml +73 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsFoldedScalars.yml +215 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsMapInSeq.yml +0 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsNullsAndEmpties.yml +66 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsRubyTests.yml +182 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsSpecificationExamples.yml +2699 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsTypeTransfers.yml +265 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/YtsYpath.yml +221 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/cookbook.rb +159 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/index.yml +10 -0
- data/test/sample_files/syck-0.55/ext/ruby/yts/yts.rb +193 -0
- data/test/sample_files/syck-0.55/lib/Makefile +497 -0
- data/test/sample_files/syck-0.55/lib/Makefile.am +27 -0
- data/test/sample_files/syck-0.55/lib/Makefile.in +497 -0
- data/test/sample_files/syck-0.55/lib/bytecode.c +1170 -0
- data/test/sample_files/syck-0.55/lib/bytecode.re +525 -0
- data/test/sample_files/syck-0.55/lib/emitter.c +1224 -0
- data/test/sample_files/syck-0.55/lib/gram.c +1894 -0
- data/test/sample_files/syck-0.55/lib/gram.h +79 -0
- data/test/sample_files/syck-0.55/lib/gram.output +2005 -0
- data/test/sample_files/syck-0.55/lib/gram.y +481 -0
- data/test/sample_files/syck-0.55/lib/handler.c +174 -0
- data/test/sample_files/syck-0.55/lib/implicit.c +2989 -0
- data/test/sample_files/syck-0.55/lib/implicit.re +206 -0
- data/test/sample_files/syck-0.55/lib/node.c +407 -0
- data/test/sample_files/syck-0.55/lib/syck.c +504 -0
- data/test/sample_files/syck-0.55/lib/syck.h +458 -0
- data/test/sample_files/syck-0.55/lib/syck_st.c +577 -0
- data/test/sample_files/syck-0.55/lib/syck_st.h +46 -0
- data/test/sample_files/syck-0.55/lib/token.c +2707 -0
- data/test/sample_files/syck-0.55/lib/token.re +1139 -0
- data/test/sample_files/syck-0.55/lib/yaml2byte.c +250 -0
- data/test/sample_files/syck-0.55/lib/yamlbyte.h +170 -0
- data/test/sample_files/syck-0.55/stamp-h1 +1 -0
- data/test/sample_files/syck-0.55/tests/Basic.c +141 -0
- data/test/sample_files/syck-0.55/tests/CuTest.c +294 -0
- data/test/sample_files/syck-0.55/tests/CuTest.h +84 -0
- data/test/sample_files/syck-0.55/tests/Emit.c +87 -0
- data/test/sample_files/syck-0.55/tests/Makefile +480 -0
- data/test/sample_files/syck-0.55/tests/Makefile.am +13 -0
- data/test/sample_files/syck-0.55/tests/Makefile.in +480 -0
- data/test/sample_files/syck-0.55/tests/Parse.c +208 -0
- data/test/sample_files/syck-0.55/tests/YTS.c +2310 -0
- data/test/sample_files/syck-0.55/tests/YTS.c.erb +326 -0
- data/test/sample_files/syck-0.55/tests/YTS.c.rb +44 -0
- data/test/test_availability.rb +68 -0
- data/test/test_generator.rb +74 -0
- metadata +252 -0
@@ -0,0 +1,1170 @@
|
|
1
|
+
/* Generated by re2c 0.9.3 on Tue Apr 12 20:34:14 2005 */
|
2
|
+
#line 1 "bytecode.re"
|
3
|
+
/*
|
4
|
+
* bytecode.re
|
5
|
+
*
|
6
|
+
* $Author: why $
|
7
|
+
* $Date: 2005/04/13 06:27:54 $
|
8
|
+
*
|
9
|
+
* Copyright (C) 2003 why the lucky stiff
|
10
|
+
*/
|
11
|
+
#include "syck.h"
|
12
|
+
#include "gram.h"
|
13
|
+
|
14
|
+
#define QUOTELEN 128
|
15
|
+
|
16
|
+
/*
|
17
|
+
* They do my bidding...
|
18
|
+
*/
|
19
|
+
#define YYCTYPE char
|
20
|
+
#define YYCURSOR parser->cursor
|
21
|
+
#define YYMARKER parser->marker
|
22
|
+
#define YYLIMIT parser->limit
|
23
|
+
#define YYTOKEN parser->token
|
24
|
+
#define YYTOKTMP parser->toktmp
|
25
|
+
#define YYLINEPTR parser->lineptr
|
26
|
+
#define YYLINECTPTR parser->linectptr
|
27
|
+
#define YYLINE parser->linect
|
28
|
+
#define YYFILL(n) syck_parser_read(parser)
|
29
|
+
|
30
|
+
extern SyckParser *syck_parser_ptr;
|
31
|
+
|
32
|
+
char *get_inline( SyckParser *parser );
|
33
|
+
|
34
|
+
/*
|
35
|
+
* Repositions the cursor at `n' offset from the token start.
|
36
|
+
* Only works in `Header' and `Document' sections.
|
37
|
+
*/
|
38
|
+
#define YYPOS(n) YYCURSOR = YYTOKEN + n
|
39
|
+
|
40
|
+
/*
|
41
|
+
* Track line numbers
|
42
|
+
*/
|
43
|
+
#define CHK_NL(ptr) if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }
|
44
|
+
|
45
|
+
/*
|
46
|
+
* I like seeing the level operations as macros...
|
47
|
+
*/
|
48
|
+
#define ADD_LEVEL(len, status) syck_parser_add_level( parser, len, status )
|
49
|
+
#define POP_LEVEL() syck_parser_pop_level( parser )
|
50
|
+
#define CURRENT_LEVEL() syck_parser_current_level( parser )
|
51
|
+
|
52
|
+
/*
|
53
|
+
* Force a token next time around sycklex()
|
54
|
+
*/
|
55
|
+
#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok;
|
56
|
+
|
57
|
+
/*
|
58
|
+
* Adding levels in bytecode requires us to make sure
|
59
|
+
* we've got all our tokens worked out.
|
60
|
+
*/
|
61
|
+
#define ADD_BYTE_LEVEL(lvl, len, s ) \
|
62
|
+
switch ( lvl->status ) \
|
63
|
+
{ \
|
64
|
+
case syck_lvl_seq: \
|
65
|
+
lvl->ncount++; \
|
66
|
+
ADD_LEVEL(len, syck_lvl_open); \
|
67
|
+
YYPOS(0); \
|
68
|
+
return '-'; \
|
69
|
+
\
|
70
|
+
case syck_lvl_map: \
|
71
|
+
lvl->ncount++; \
|
72
|
+
ADD_LEVEL(len, s); \
|
73
|
+
break; \
|
74
|
+
\
|
75
|
+
case syck_lvl_open: \
|
76
|
+
lvl->status = s; \
|
77
|
+
break; \
|
78
|
+
\
|
79
|
+
default: \
|
80
|
+
ADD_LEVEL(len, s); \
|
81
|
+
break; \
|
82
|
+
}
|
83
|
+
|
84
|
+
/*
|
85
|
+
* Nice little macro to ensure we're YAML_IOPENed to the current level.
|
86
|
+
* * Only use this macro in the "Document" section *
|
87
|
+
*/
|
88
|
+
#define ENSURE_YAML_IOPEN(last_lvl, lvl_type, to_len, reset) \
|
89
|
+
if ( last_lvl->spaces < to_len ) \
|
90
|
+
{ \
|
91
|
+
if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
|
92
|
+
{ \
|
93
|
+
goto Document; \
|
94
|
+
} \
|
95
|
+
else \
|
96
|
+
{ \
|
97
|
+
ADD_LEVEL( to_len, lvl_type ); \
|
98
|
+
if ( reset == 1 ) YYPOS(0); \
|
99
|
+
return YAML_IOPEN; \
|
100
|
+
} \
|
101
|
+
}
|
102
|
+
|
103
|
+
/*
|
104
|
+
* Nice little macro to ensure closure of levels.
|
105
|
+
* * Only use this macro in the "Document" section *
|
106
|
+
*/
|
107
|
+
#define ENSURE_YAML_IEND(last_lvl, to_len) \
|
108
|
+
if ( last_lvl->spaces > to_len ) \
|
109
|
+
{ \
|
110
|
+
syck_parser_pop_level( parser ); \
|
111
|
+
YYPOS(0); \
|
112
|
+
return YAML_IEND; \
|
113
|
+
}
|
114
|
+
|
115
|
+
/*
|
116
|
+
* Concatenates string items and manages allocation
|
117
|
+
* to the string
|
118
|
+
*/
|
119
|
+
#define CAT(s, c, i, l) \
|
120
|
+
{ \
|
121
|
+
if ( i + 1 >= c ) \
|
122
|
+
{ \
|
123
|
+
c += QUOTELEN; \
|
124
|
+
S_REALLOC_N( s, char, c ); \
|
125
|
+
} \
|
126
|
+
s[i++] = l; \
|
127
|
+
s[i] = '\0'; \
|
128
|
+
}
|
129
|
+
|
130
|
+
/*
|
131
|
+
* Parser for standard YAML Bytecode [UTF-8]
|
132
|
+
*/
|
133
|
+
int
|
134
|
+
sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
|
135
|
+
{
|
136
|
+
SyckLevel *lvl;
|
137
|
+
int doc_level = 0;
|
138
|
+
syck_parser_ptr = parser;
|
139
|
+
if ( YYCURSOR == NULL )
|
140
|
+
{
|
141
|
+
syck_parser_read( parser );
|
142
|
+
}
|
143
|
+
|
144
|
+
if ( parser->force_token != 0 )
|
145
|
+
{
|
146
|
+
int t = parser->force_token;
|
147
|
+
parser->force_token = 0;
|
148
|
+
return t;
|
149
|
+
}
|
150
|
+
|
151
|
+
#line 173 "bytecode.re"
|
152
|
+
|
153
|
+
|
154
|
+
lvl = CURRENT_LEVEL();
|
155
|
+
if ( lvl->status == syck_lvl_doc )
|
156
|
+
{
|
157
|
+
goto Document;
|
158
|
+
}
|
159
|
+
|
160
|
+
Header:
|
161
|
+
|
162
|
+
YYTOKEN = YYCURSOR;
|
163
|
+
|
164
|
+
|
165
|
+
#line 7 "<stdout>"
|
166
|
+
{
|
167
|
+
YYCTYPE yych;
|
168
|
+
unsigned int yyaccept;
|
169
|
+
goto yy0;
|
170
|
+
yy1: ++YYCURSOR;
|
171
|
+
yy0:
|
172
|
+
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
173
|
+
yych = *YYCURSOR;
|
174
|
+
switch(yych){
|
175
|
+
case '\000': goto yy2;
|
176
|
+
case 'D': goto yy3;
|
177
|
+
default: goto yy5;
|
178
|
+
}
|
179
|
+
yy2: YYCURSOR = YYMARKER;
|
180
|
+
switch(yyaccept){
|
181
|
+
case 0: goto yy4;
|
182
|
+
}
|
183
|
+
yy3: yyaccept = 0;
|
184
|
+
yych = *(YYMARKER = ++YYCURSOR);
|
185
|
+
switch(yych){
|
186
|
+
case '\n': goto yy6;
|
187
|
+
case '\r': goto yy8;
|
188
|
+
default: goto yy4;
|
189
|
+
}
|
190
|
+
yy4:
|
191
|
+
#line 200 "bytecode.re"
|
192
|
+
{ YYPOS(0);
|
193
|
+
goto Document;
|
194
|
+
}
|
195
|
+
#line 37 "<stdout>"
|
196
|
+
yy5: yych = *++YYCURSOR;
|
197
|
+
goto yy4;
|
198
|
+
yy6: ++YYCURSOR;
|
199
|
+
goto yy7;
|
200
|
+
yy7:
|
201
|
+
#line 187 "bytecode.re"
|
202
|
+
{ if ( lvl->status == syck_lvl_header )
|
203
|
+
{
|
204
|
+
CHK_NL(YYCURSOR);
|
205
|
+
goto Directive;
|
206
|
+
}
|
207
|
+
else
|
208
|
+
{
|
209
|
+
ENSURE_YAML_IEND(lvl, -1);
|
210
|
+
YYPOS(0);
|
211
|
+
return 0;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
#line 56 "<stdout>"
|
215
|
+
yy8: ++YYCURSOR;
|
216
|
+
switch((yych = *YYCURSOR)) {
|
217
|
+
case '\n': goto yy6;
|
218
|
+
default: goto yy2;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
#line 204 "bytecode.re"
|
222
|
+
|
223
|
+
|
224
|
+
Document:
|
225
|
+
{
|
226
|
+
lvl = CURRENT_LEVEL();
|
227
|
+
if ( lvl->status == syck_lvl_header )
|
228
|
+
{
|
229
|
+
lvl->status = syck_lvl_doc;
|
230
|
+
}
|
231
|
+
|
232
|
+
YYTOKEN = YYCURSOR;
|
233
|
+
|
234
|
+
|
235
|
+
#line 65 "<stdout>"
|
236
|
+
{
|
237
|
+
YYCTYPE yych;
|
238
|
+
unsigned int yyaccept;
|
239
|
+
goto yy9;
|
240
|
+
yy10: ++YYCURSOR;
|
241
|
+
yy9:
|
242
|
+
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
243
|
+
yych = *YYCURSOR;
|
244
|
+
switch(yych){
|
245
|
+
case '\000': goto yy30;
|
246
|
+
case '\n': goto yy27;
|
247
|
+
case '\r': goto yy29;
|
248
|
+
case 'A': goto yy19;
|
249
|
+
case 'D': goto yy12;
|
250
|
+
case 'E': goto yy16;
|
251
|
+
case 'M': goto yy14;
|
252
|
+
case 'P': goto yy13;
|
253
|
+
case 'Q': goto yy15;
|
254
|
+
case 'R': goto yy21;
|
255
|
+
case 'S': goto yy17;
|
256
|
+
case 'T': goto yy23;
|
257
|
+
case 'c': goto yy25;
|
258
|
+
default: goto yy11;
|
259
|
+
}
|
260
|
+
yy11:yy12: yych = *++YYCURSOR;
|
261
|
+
switch(yych){
|
262
|
+
case '\n': goto yy41;
|
263
|
+
case '\r': goto yy44;
|
264
|
+
default: goto yy11;
|
265
|
+
}
|
266
|
+
yy13: yych = *++YYCURSOR;
|
267
|
+
switch(yych){
|
268
|
+
case '\n': goto yy41;
|
269
|
+
case '\r': goto yy43;
|
270
|
+
default: goto yy11;
|
271
|
+
}
|
272
|
+
yy14: yych = *++YYCURSOR;
|
273
|
+
switch(yych){
|
274
|
+
case '\n': goto yy38;
|
275
|
+
case '\r': goto yy40;
|
276
|
+
default: goto yy11;
|
277
|
+
}
|
278
|
+
yy15: yych = *++YYCURSOR;
|
279
|
+
switch(yych){
|
280
|
+
case '\n': goto yy35;
|
281
|
+
case '\r': goto yy37;
|
282
|
+
default: goto yy11;
|
283
|
+
}
|
284
|
+
yy16: yych = *++YYCURSOR;
|
285
|
+
switch(yych){
|
286
|
+
case '\n': goto yy32;
|
287
|
+
case '\r': goto yy34;
|
288
|
+
default: goto yy11;
|
289
|
+
}
|
290
|
+
yy17: ++YYCURSOR;
|
291
|
+
goto yy18;
|
292
|
+
yy18:
|
293
|
+
#line 289 "bytecode.re"
|
294
|
+
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
|
295
|
+
goto Scalar;
|
296
|
+
}
|
297
|
+
#line 127 "<stdout>"
|
298
|
+
yy19: ++YYCURSOR;
|
299
|
+
goto yy20;
|
300
|
+
yy20:
|
301
|
+
#line 293 "bytecode.re"
|
302
|
+
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
|
303
|
+
sycklval->name = get_inline( parser );
|
304
|
+
syck_hdlr_remove_anchor( parser, sycklval->name );
|
305
|
+
CHK_NL(YYCURSOR);
|
306
|
+
return YAML_ANCHOR;
|
307
|
+
}
|
308
|
+
#line 138 "<stdout>"
|
309
|
+
yy21: ++YYCURSOR;
|
310
|
+
goto yy22;
|
311
|
+
yy22:
|
312
|
+
#line 300 "bytecode.re"
|
313
|
+
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
|
314
|
+
sycklval->name = get_inline( parser );
|
315
|
+
POP_LEVEL();
|
316
|
+
if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
|
317
|
+
return YAML_ALIAS;
|
318
|
+
}
|
319
|
+
#line 149 "<stdout>"
|
320
|
+
yy23: ++YYCURSOR;
|
321
|
+
goto yy24;
|
322
|
+
yy24:
|
323
|
+
#line 307 "bytecode.re"
|
324
|
+
{ char *qstr;
|
325
|
+
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
|
326
|
+
qstr = get_inline( parser );
|
327
|
+
CHK_NL(YYCURSOR);
|
328
|
+
if ( qstr[0] == '!' )
|
329
|
+
{
|
330
|
+
int qidx = strlen( qstr );
|
331
|
+
if ( qstr[1] == '\0' )
|
332
|
+
{
|
333
|
+
free( qstr );
|
334
|
+
return YAML_ITRANSFER;
|
335
|
+
}
|
336
|
+
|
337
|
+
lvl = CURRENT_LEVEL();
|
338
|
+
|
339
|
+
/*
|
340
|
+
* URL Prefixing
|
341
|
+
*/
|
342
|
+
if ( qstr[1] == '^' )
|
343
|
+
{
|
344
|
+
sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
|
345
|
+
sycklval->name[0] = '\0';
|
346
|
+
strcat( sycklval->name, lvl->domain );
|
347
|
+
strncat( sycklval->name, qstr + 2, qidx - 2 );
|
348
|
+
free( qstr );
|
349
|
+
}
|
350
|
+
else
|
351
|
+
{
|
352
|
+
char *carat = qstr + 1;
|
353
|
+
char *qend = qstr + qidx;
|
354
|
+
while ( (++carat) < qend )
|
355
|
+
{
|
356
|
+
if ( *carat == '^' )
|
357
|
+
break;
|
358
|
+
}
|
359
|
+
|
360
|
+
if ( carat < qend )
|
361
|
+
{
|
362
|
+
free( lvl->domain );
|
363
|
+
lvl->domain = syck_strndup( qstr + 1, carat - ( qstr + 1 ) );
|
364
|
+
sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) );
|
365
|
+
sycklval->name[0] = '\0';
|
366
|
+
strcat( sycklval->name, lvl->domain );
|
367
|
+
strncat( sycklval->name, carat + 1, ( qend - carat ) - 1 );
|
368
|
+
free( qstr );
|
369
|
+
}
|
370
|
+
else
|
371
|
+
{
|
372
|
+
sycklval->name = S_ALLOC_N( char, strlen( qstr ) );
|
373
|
+
sycklval->name[0] = '\0';
|
374
|
+
S_MEMCPY( sycklval->name, qstr + 1, char, strlen( qstr ) );
|
375
|
+
free( qstr );
|
376
|
+
}
|
377
|
+
}
|
378
|
+
return YAML_TRANSFER;
|
379
|
+
}
|
380
|
+
sycklval->name = qstr;
|
381
|
+
return YAML_TAGURI;
|
382
|
+
}
|
383
|
+
#line 213 "<stdout>"
|
384
|
+
yy25: ++YYCURSOR;
|
385
|
+
goto yy26;
|
386
|
+
yy26:
|
387
|
+
#line 367 "bytecode.re"
|
388
|
+
{ goto Comment; }
|
389
|
+
#line 219 "<stdout>"
|
390
|
+
yy27: ++YYCURSOR;
|
391
|
+
goto yy28;
|
392
|
+
yy28:
|
393
|
+
#line 369 "bytecode.re"
|
394
|
+
{ CHK_NL(YYCURSOR);
|
395
|
+
if ( lvl->status == syck_lvl_seq )
|
396
|
+
{
|
397
|
+
return YAML_INDENT;
|
398
|
+
}
|
399
|
+
else if ( lvl->status == syck_lvl_map )
|
400
|
+
{
|
401
|
+
if ( lvl->ncount % 2 == 1 ) return ':';
|
402
|
+
else return YAML_INDENT;
|
403
|
+
}
|
404
|
+
goto Document;
|
405
|
+
}
|
406
|
+
#line 236 "<stdout>"
|
407
|
+
yy29: yych = *++YYCURSOR;
|
408
|
+
switch(yych){
|
409
|
+
case '\n': goto yy27;
|
410
|
+
default: goto yy11;
|
411
|
+
}
|
412
|
+
yy30: ++YYCURSOR;
|
413
|
+
goto yy31;
|
414
|
+
yy31:
|
415
|
+
#line 382 "bytecode.re"
|
416
|
+
{ ENSURE_YAML_IEND(lvl, -1);
|
417
|
+
YYPOS(0);
|
418
|
+
return 0;
|
419
|
+
}
|
420
|
+
#line 250 "<stdout>"
|
421
|
+
yy32: ++YYCURSOR;
|
422
|
+
goto yy33;
|
423
|
+
yy33:
|
424
|
+
#line 253 "bytecode.re"
|
425
|
+
{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
|
426
|
+
{
|
427
|
+
lvl->ncount++;
|
428
|
+
YYPOS(0);
|
429
|
+
FORCE_NEXT_TOKEN( ']' );
|
430
|
+
return '[';
|
431
|
+
}
|
432
|
+
else if ( lvl->status == syck_lvl_map && lvl->ncount == 0 )
|
433
|
+
{
|
434
|
+
lvl->ncount++;
|
435
|
+
YYPOS(0);
|
436
|
+
FORCE_NEXT_TOKEN( '}' );
|
437
|
+
return '{';
|
438
|
+
}
|
439
|
+
|
440
|
+
POP_LEVEL();
|
441
|
+
lvl = CURRENT_LEVEL();
|
442
|
+
if ( lvl->status == syck_lvl_seq )
|
443
|
+
{
|
444
|
+
FORCE_NEXT_TOKEN(YAML_INDENT);
|
445
|
+
}
|
446
|
+
else if ( lvl->status == syck_lvl_map )
|
447
|
+
{
|
448
|
+
if ( lvl->ncount % 2 == 1 )
|
449
|
+
{
|
450
|
+
FORCE_NEXT_TOKEN(':');
|
451
|
+
}
|
452
|
+
else
|
453
|
+
{
|
454
|
+
FORCE_NEXT_TOKEN(YAML_INDENT);
|
455
|
+
}
|
456
|
+
}
|
457
|
+
CHK_NL(YYCURSOR);
|
458
|
+
return YAML_IEND;
|
459
|
+
}
|
460
|
+
#line 290 "<stdout>"
|
461
|
+
yy34: yych = *++YYCURSOR;
|
462
|
+
switch(yych){
|
463
|
+
case '\n': goto yy32;
|
464
|
+
default: goto yy11;
|
465
|
+
}
|
466
|
+
yy35: ++YYCURSOR;
|
467
|
+
goto yy36;
|
468
|
+
yy36:
|
469
|
+
#line 238 "bytecode.re"
|
470
|
+
{ int complex = 0;
|
471
|
+
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
|
472
|
+
{
|
473
|
+
complex = 1;
|
474
|
+
}
|
475
|
+
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_seq);
|
476
|
+
CHK_NL(YYCURSOR);
|
477
|
+
if ( complex )
|
478
|
+
{
|
479
|
+
FORCE_NEXT_TOKEN( YAML_IOPEN );
|
480
|
+
return '?';
|
481
|
+
}
|
482
|
+
return YAML_IOPEN;
|
483
|
+
}
|
484
|
+
#line 314 "<stdout>"
|
485
|
+
yy37: yych = *++YYCURSOR;
|
486
|
+
switch(yych){
|
487
|
+
case '\n': goto yy35;
|
488
|
+
default: goto yy11;
|
489
|
+
}
|
490
|
+
yy38: ++YYCURSOR;
|
491
|
+
goto yy39;
|
492
|
+
yy39:
|
493
|
+
#line 223 "bytecode.re"
|
494
|
+
{ int complex = 0;
|
495
|
+
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
|
496
|
+
{
|
497
|
+
complex = 1;
|
498
|
+
}
|
499
|
+
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map);
|
500
|
+
CHK_NL(YYCURSOR);
|
501
|
+
if ( complex )
|
502
|
+
{
|
503
|
+
FORCE_NEXT_TOKEN( YAML_IOPEN );
|
504
|
+
return '?';
|
505
|
+
}
|
506
|
+
return YAML_IOPEN;
|
507
|
+
}
|
508
|
+
#line 338 "<stdout>"
|
509
|
+
yy40: yych = *++YYCURSOR;
|
510
|
+
switch(yych){
|
511
|
+
case '\n': goto yy38;
|
512
|
+
default: goto yy11;
|
513
|
+
}
|
514
|
+
yy41: ++YYCURSOR;
|
515
|
+
goto yy42;
|
516
|
+
yy42:
|
517
|
+
#line 218 "bytecode.re"
|
518
|
+
{ ENSURE_YAML_IEND(lvl, -1);
|
519
|
+
YYPOS(0);
|
520
|
+
return 0;
|
521
|
+
}
|
522
|
+
#line 352 "<stdout>"
|
523
|
+
yy43: yych = *++YYCURSOR;
|
524
|
+
switch(yych){
|
525
|
+
case '\n': goto yy41;
|
526
|
+
default: goto yy11;
|
527
|
+
}
|
528
|
+
yy44: ++YYCURSOR;
|
529
|
+
switch((yych = *YYCURSOR)) {
|
530
|
+
case '\n': goto yy41;
|
531
|
+
default: goto yy11;
|
532
|
+
}
|
533
|
+
}
|
534
|
+
#line 387 "bytecode.re"
|
535
|
+
|
536
|
+
|
537
|
+
}
|
538
|
+
|
539
|
+
Directive:
|
540
|
+
{
|
541
|
+
YYTOKEN = YYCURSOR;
|
542
|
+
|
543
|
+
|
544
|
+
#line 366 "<stdout>"
|
545
|
+
{
|
546
|
+
YYCTYPE yych;
|
547
|
+
unsigned int yyaccept;
|
548
|
+
goto yy45;
|
549
|
+
yy46: ++YYCURSOR;
|
550
|
+
yy45:
|
551
|
+
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
552
|
+
yych = *YYCURSOR;
|
553
|
+
switch(yych){
|
554
|
+
case '\000': goto yy47;
|
555
|
+
case 'V': goto yy48;
|
556
|
+
default: goto yy50;
|
557
|
+
}
|
558
|
+
yy47: YYCURSOR = YYMARKER;
|
559
|
+
switch(yyaccept){
|
560
|
+
case 0: goto yy49;
|
561
|
+
}
|
562
|
+
yy48: yyaccept = 0;
|
563
|
+
yych = *(YYMARKER = ++YYCURSOR);
|
564
|
+
switch(yych){
|
565
|
+
case '.':
|
566
|
+
case '/':
|
567
|
+
case '0':
|
568
|
+
case '1':
|
569
|
+
case '2':
|
570
|
+
case '3':
|
571
|
+
case '4':
|
572
|
+
case '5':
|
573
|
+
case '6':
|
574
|
+
case '7':
|
575
|
+
case '8':
|
576
|
+
case '9':
|
577
|
+
case ':':
|
578
|
+
case ';':
|
579
|
+
case '<':
|
580
|
+
case '=':
|
581
|
+
case '>':
|
582
|
+
case '?':
|
583
|
+
case '@':
|
584
|
+
case 'A':
|
585
|
+
case 'B':
|
586
|
+
case 'C':
|
587
|
+
case 'D':
|
588
|
+
case 'E':
|
589
|
+
case 'F':
|
590
|
+
case 'G':
|
591
|
+
case 'H':
|
592
|
+
case 'I':
|
593
|
+
case 'J':
|
594
|
+
case 'K':
|
595
|
+
case 'L':
|
596
|
+
case 'M':
|
597
|
+
case 'N':
|
598
|
+
case 'O':
|
599
|
+
case 'P':
|
600
|
+
case 'Q':
|
601
|
+
case 'R':
|
602
|
+
case 'S':
|
603
|
+
case 'T':
|
604
|
+
case 'U':
|
605
|
+
case 'V':
|
606
|
+
case 'W':
|
607
|
+
case 'X':
|
608
|
+
case 'Y':
|
609
|
+
case 'Z':
|
610
|
+
case '[':
|
611
|
+
case '\\':
|
612
|
+
case ']':
|
613
|
+
case '^':
|
614
|
+
case '_': case 'a':
|
615
|
+
case 'b':
|
616
|
+
case 'c':
|
617
|
+
case 'd':
|
618
|
+
case 'e':
|
619
|
+
case 'f':
|
620
|
+
case 'g':
|
621
|
+
case 'h':
|
622
|
+
case 'i':
|
623
|
+
case 'j':
|
624
|
+
case 'k':
|
625
|
+
case 'l':
|
626
|
+
case 'm':
|
627
|
+
case 'n':
|
628
|
+
case 'o':
|
629
|
+
case 'p':
|
630
|
+
case 'q':
|
631
|
+
case 'r':
|
632
|
+
case 's':
|
633
|
+
case 't':
|
634
|
+
case 'u':
|
635
|
+
case 'v':
|
636
|
+
case 'w':
|
637
|
+
case 'x':
|
638
|
+
case 'y':
|
639
|
+
case 'z': goto yy51;
|
640
|
+
default: goto yy49;
|
641
|
+
}
|
642
|
+
yy49:
|
643
|
+
#line 400 "bytecode.re"
|
644
|
+
{ YYCURSOR = YYTOKEN;
|
645
|
+
return YAML_DOCSEP;
|
646
|
+
}
|
647
|
+
#line 469 "<stdout>"
|
648
|
+
yy50: yych = *++YYCURSOR;
|
649
|
+
goto yy49;
|
650
|
+
yy51: ++YYCURSOR;
|
651
|
+
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
652
|
+
yych = *YYCURSOR;
|
653
|
+
goto yy52;
|
654
|
+
yy52: switch(yych){
|
655
|
+
case '.':
|
656
|
+
case '/':
|
657
|
+
case '0':
|
658
|
+
case '1':
|
659
|
+
case '2':
|
660
|
+
case '3':
|
661
|
+
case '4':
|
662
|
+
case '5':
|
663
|
+
case '6':
|
664
|
+
case '7':
|
665
|
+
case '8':
|
666
|
+
case '9': case ';':
|
667
|
+
case '<':
|
668
|
+
case '=':
|
669
|
+
case '>':
|
670
|
+
case '?':
|
671
|
+
case '@':
|
672
|
+
case 'A':
|
673
|
+
case 'B':
|
674
|
+
case 'C':
|
675
|
+
case 'D':
|
676
|
+
case 'E':
|
677
|
+
case 'F':
|
678
|
+
case 'G':
|
679
|
+
case 'H':
|
680
|
+
case 'I':
|
681
|
+
case 'J':
|
682
|
+
case 'K':
|
683
|
+
case 'L':
|
684
|
+
case 'M':
|
685
|
+
case 'N':
|
686
|
+
case 'O':
|
687
|
+
case 'P':
|
688
|
+
case 'Q':
|
689
|
+
case 'R':
|
690
|
+
case 'S':
|
691
|
+
case 'T':
|
692
|
+
case 'U':
|
693
|
+
case 'V':
|
694
|
+
case 'W':
|
695
|
+
case 'X':
|
696
|
+
case 'Y':
|
697
|
+
case 'Z':
|
698
|
+
case '[':
|
699
|
+
case '\\':
|
700
|
+
case ']':
|
701
|
+
case '^':
|
702
|
+
case '_': case 'a':
|
703
|
+
case 'b':
|
704
|
+
case 'c':
|
705
|
+
case 'd':
|
706
|
+
case 'e':
|
707
|
+
case 'f':
|
708
|
+
case 'g':
|
709
|
+
case 'h':
|
710
|
+
case 'i':
|
711
|
+
case 'j':
|
712
|
+
case 'k':
|
713
|
+
case 'l':
|
714
|
+
case 'm':
|
715
|
+
case 'n':
|
716
|
+
case 'o':
|
717
|
+
case 'p':
|
718
|
+
case 'q':
|
719
|
+
case 'r':
|
720
|
+
case 's':
|
721
|
+
case 't':
|
722
|
+
case 'u':
|
723
|
+
case 'v':
|
724
|
+
case 'w':
|
725
|
+
case 'x':
|
726
|
+
case 'y':
|
727
|
+
case 'z': goto yy51;
|
728
|
+
case ':': goto yy53;
|
729
|
+
default: goto yy47;
|
730
|
+
}
|
731
|
+
yy53: yych = *++YYCURSOR;
|
732
|
+
switch(yych){
|
733
|
+
case '.':
|
734
|
+
case '/':
|
735
|
+
case '0':
|
736
|
+
case '1':
|
737
|
+
case '2':
|
738
|
+
case '3':
|
739
|
+
case '4':
|
740
|
+
case '5':
|
741
|
+
case '6':
|
742
|
+
case '7':
|
743
|
+
case '8':
|
744
|
+
case '9':
|
745
|
+
case ':':
|
746
|
+
case ';':
|
747
|
+
case '<':
|
748
|
+
case '=':
|
749
|
+
case '>':
|
750
|
+
case '?':
|
751
|
+
case '@':
|
752
|
+
case 'A':
|
753
|
+
case 'B':
|
754
|
+
case 'C':
|
755
|
+
case 'D':
|
756
|
+
case 'E':
|
757
|
+
case 'F':
|
758
|
+
case 'G':
|
759
|
+
case 'H':
|
760
|
+
case 'I':
|
761
|
+
case 'J':
|
762
|
+
case 'K':
|
763
|
+
case 'L':
|
764
|
+
case 'M':
|
765
|
+
case 'N':
|
766
|
+
case 'O':
|
767
|
+
case 'P':
|
768
|
+
case 'Q':
|
769
|
+
case 'R':
|
770
|
+
case 'S':
|
771
|
+
case 'T':
|
772
|
+
case 'U':
|
773
|
+
case 'V':
|
774
|
+
case 'W':
|
775
|
+
case 'X':
|
776
|
+
case 'Y':
|
777
|
+
case 'Z':
|
778
|
+
case '[':
|
779
|
+
case '\\':
|
780
|
+
case ']':
|
781
|
+
case '^':
|
782
|
+
case '_': case 'a':
|
783
|
+
case 'b':
|
784
|
+
case 'c':
|
785
|
+
case 'd':
|
786
|
+
case 'e':
|
787
|
+
case 'f':
|
788
|
+
case 'g':
|
789
|
+
case 'h':
|
790
|
+
case 'i':
|
791
|
+
case 'j':
|
792
|
+
case 'k':
|
793
|
+
case 'l':
|
794
|
+
case 'm':
|
795
|
+
case 'n':
|
796
|
+
case 'o':
|
797
|
+
case 'p':
|
798
|
+
case 'q':
|
799
|
+
case 'r':
|
800
|
+
case 's':
|
801
|
+
case 't':
|
802
|
+
case 'u':
|
803
|
+
case 'v':
|
804
|
+
case 'w':
|
805
|
+
case 'x':
|
806
|
+
case 'y':
|
807
|
+
case 'z': goto yy54;
|
808
|
+
default: goto yy47;
|
809
|
+
}
|
810
|
+
yy54: ++YYCURSOR;
|
811
|
+
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
812
|
+
yych = *YYCURSOR;
|
813
|
+
goto yy55;
|
814
|
+
yy55: switch(yych){
|
815
|
+
case '\n': goto yy56;
|
816
|
+
case '\r': goto yy58;
|
817
|
+
case '.':
|
818
|
+
case '/':
|
819
|
+
case '0':
|
820
|
+
case '1':
|
821
|
+
case '2':
|
822
|
+
case '3':
|
823
|
+
case '4':
|
824
|
+
case '5':
|
825
|
+
case '6':
|
826
|
+
case '7':
|
827
|
+
case '8':
|
828
|
+
case '9':
|
829
|
+
case ':':
|
830
|
+
case ';':
|
831
|
+
case '<':
|
832
|
+
case '=':
|
833
|
+
case '>':
|
834
|
+
case '?':
|
835
|
+
case '@':
|
836
|
+
case 'A':
|
837
|
+
case 'B':
|
838
|
+
case 'C':
|
839
|
+
case 'D':
|
840
|
+
case 'E':
|
841
|
+
case 'F':
|
842
|
+
case 'G':
|
843
|
+
case 'H':
|
844
|
+
case 'I':
|
845
|
+
case 'J':
|
846
|
+
case 'K':
|
847
|
+
case 'L':
|
848
|
+
case 'M':
|
849
|
+
case 'N':
|
850
|
+
case 'O':
|
851
|
+
case 'P':
|
852
|
+
case 'Q':
|
853
|
+
case 'R':
|
854
|
+
case 'S':
|
855
|
+
case 'T':
|
856
|
+
case 'U':
|
857
|
+
case 'V':
|
858
|
+
case 'W':
|
859
|
+
case 'X':
|
860
|
+
case 'Y':
|
861
|
+
case 'Z':
|
862
|
+
case '[':
|
863
|
+
case '\\':
|
864
|
+
case ']':
|
865
|
+
case '^':
|
866
|
+
case '_': case 'a':
|
867
|
+
case 'b':
|
868
|
+
case 'c':
|
869
|
+
case 'd':
|
870
|
+
case 'e':
|
871
|
+
case 'f':
|
872
|
+
case 'g':
|
873
|
+
case 'h':
|
874
|
+
case 'i':
|
875
|
+
case 'j':
|
876
|
+
case 'k':
|
877
|
+
case 'l':
|
878
|
+
case 'm':
|
879
|
+
case 'n':
|
880
|
+
case 'o':
|
881
|
+
case 'p':
|
882
|
+
case 'q':
|
883
|
+
case 'r':
|
884
|
+
case 's':
|
885
|
+
case 't':
|
886
|
+
case 'u':
|
887
|
+
case 'v':
|
888
|
+
case 'w':
|
889
|
+
case 'x':
|
890
|
+
case 'y':
|
891
|
+
case 'z': goto yy54;
|
892
|
+
default: goto yy47;
|
893
|
+
}
|
894
|
+
yy56: ++YYCURSOR;
|
895
|
+
goto yy57;
|
896
|
+
yy57:
|
897
|
+
#line 397 "bytecode.re"
|
898
|
+
{ CHK_NL(YYCURSOR);
|
899
|
+
goto Directive; }
|
900
|
+
#line 724 "<stdout>"
|
901
|
+
yy58: ++YYCURSOR;
|
902
|
+
switch((yych = *YYCURSOR)) {
|
903
|
+
case '\n': goto yy56;
|
904
|
+
default: goto yy47;
|
905
|
+
}
|
906
|
+
}
|
907
|
+
#line 403 "bytecode.re"
|
908
|
+
|
909
|
+
|
910
|
+
}
|
911
|
+
|
912
|
+
Comment:
|
913
|
+
{
|
914
|
+
YYTOKEN = YYCURSOR;
|
915
|
+
|
916
|
+
|
917
|
+
#line 733 "<stdout>"
|
918
|
+
{
|
919
|
+
YYCTYPE yych;
|
920
|
+
unsigned int yyaccept;
|
921
|
+
goto yy59;
|
922
|
+
yy60: ++YYCURSOR;
|
923
|
+
yy59:
|
924
|
+
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
925
|
+
yych = *YYCURSOR;
|
926
|
+
switch(yych){
|
927
|
+
case '\000': goto yy61;
|
928
|
+
case '\n': goto yy62;
|
929
|
+
case '\r': goto yy64;
|
930
|
+
default: goto yy66;
|
931
|
+
}
|
932
|
+
yy61:yy62: ++YYCURSOR;
|
933
|
+
goto yy63;
|
934
|
+
yy63:
|
935
|
+
#line 413 "bytecode.re"
|
936
|
+
{ CHK_NL(YYCURSOR);
|
937
|
+
goto Document; }
|
938
|
+
#line 754 "<stdout>"
|
939
|
+
yy64: ++YYCURSOR;
|
940
|
+
switch((yych = *YYCURSOR)) {
|
941
|
+
case '\n': goto yy67;
|
942
|
+
default: goto yy65;
|
943
|
+
}
|
944
|
+
yy65:
|
945
|
+
#line 416 "bytecode.re"
|
946
|
+
{ goto Comment; }
|
947
|
+
#line 763 "<stdout>"
|
948
|
+
yy66: yych = *++YYCURSOR;
|
949
|
+
goto yy65;
|
950
|
+
yy67: ++YYCURSOR;
|
951
|
+
yych = *YYCURSOR;
|
952
|
+
goto yy63;
|
953
|
+
}
|
954
|
+
#line 418 "bytecode.re"
|
955
|
+
|
956
|
+
|
957
|
+
}
|
958
|
+
|
959
|
+
Scalar:
|
960
|
+
{
|
961
|
+
int idx = 0;
|
962
|
+
int cap = 100;
|
963
|
+
char *str = S_ALLOC_N( char, cap );
|
964
|
+
char *tok;
|
965
|
+
|
966
|
+
str[0] = '\0';
|
967
|
+
|
968
|
+
Scalar2:
|
969
|
+
tok = YYCURSOR;
|
970
|
+
|
971
|
+
|
972
|
+
#line 771 "<stdout>"
|
973
|
+
{
|
974
|
+
YYCTYPE yych;
|
975
|
+
unsigned int yyaccept;
|
976
|
+
goto yy68;
|
977
|
+
yy69: ++YYCURSOR;
|
978
|
+
yy68:
|
979
|
+
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
980
|
+
yych = *YYCURSOR;
|
981
|
+
switch(yych){
|
982
|
+
case '\000': goto yy74;
|
983
|
+
case '\n': goto yy70;
|
984
|
+
case '\r': goto yy72;
|
985
|
+
default: goto yy76;
|
986
|
+
}
|
987
|
+
yy70: ++YYCURSOR;
|
988
|
+
switch((yych = *YYCURSOR)) {
|
989
|
+
case 'C': goto yy78;
|
990
|
+
case 'N': goto yy80;
|
991
|
+
case 'Z': goto yy83;
|
992
|
+
default: goto yy71;
|
993
|
+
}
|
994
|
+
yy71:
|
995
|
+
#line 462 "bytecode.re"
|
996
|
+
{ YYCURSOR = tok;
|
997
|
+
goto ScalarEnd;
|
998
|
+
}
|
999
|
+
#line 798 "<stdout>"
|
1000
|
+
yy72: ++YYCURSOR;
|
1001
|
+
switch((yych = *YYCURSOR)) {
|
1002
|
+
case '\n': goto yy77;
|
1003
|
+
default: goto yy73;
|
1004
|
+
}
|
1005
|
+
yy73:
|
1006
|
+
#line 470 "bytecode.re"
|
1007
|
+
{ CAT(str, cap, idx, tok[0]);
|
1008
|
+
goto Scalar2;
|
1009
|
+
}
|
1010
|
+
#line 809 "<stdout>"
|
1011
|
+
yy74: ++YYCURSOR;
|
1012
|
+
goto yy75;
|
1013
|
+
yy75:
|
1014
|
+
#line 466 "bytecode.re"
|
1015
|
+
{ YYCURSOR = tok;
|
1016
|
+
goto ScalarEnd;
|
1017
|
+
}
|
1018
|
+
#line 817 "<stdout>"
|
1019
|
+
yy76: yych = *++YYCURSOR;
|
1020
|
+
goto yy73;
|
1021
|
+
yy77: yych = *++YYCURSOR;
|
1022
|
+
switch(yych){
|
1023
|
+
case 'C': goto yy78;
|
1024
|
+
case 'N': goto yy80;
|
1025
|
+
case 'Z': goto yy83;
|
1026
|
+
default: goto yy71;
|
1027
|
+
}
|
1028
|
+
yy78: ++YYCURSOR;
|
1029
|
+
goto yy79;
|
1030
|
+
yy79:
|
1031
|
+
#line 436 "bytecode.re"
|
1032
|
+
{ CHK_NL(tok+1);
|
1033
|
+
goto Scalar2; }
|
1034
|
+
#line 833 "<stdout>"
|
1035
|
+
yy80: ++YYCURSOR;
|
1036
|
+
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
1037
|
+
yych = *YYCURSOR;
|
1038
|
+
goto yy81;
|
1039
|
+
yy81: switch(yych){
|
1040
|
+
case '0':
|
1041
|
+
case '1':
|
1042
|
+
case '2':
|
1043
|
+
case '3':
|
1044
|
+
case '4':
|
1045
|
+
case '5':
|
1046
|
+
case '6':
|
1047
|
+
case '7':
|
1048
|
+
case '8':
|
1049
|
+
case '9': goto yy80;
|
1050
|
+
default: goto yy82;
|
1051
|
+
}
|
1052
|
+
yy82:
|
1053
|
+
#line 439 "bytecode.re"
|
1054
|
+
{ CHK_NL(tok+1);
|
1055
|
+
if ( tok + 2 < YYCURSOR )
|
1056
|
+
{
|
1057
|
+
char *count = tok + 2;
|
1058
|
+
int total = strtod( count, NULL );
|
1059
|
+
int i;
|
1060
|
+
for ( i = 0; i < total; i++ )
|
1061
|
+
{
|
1062
|
+
CAT(str, cap, idx, '\n');
|
1063
|
+
}
|
1064
|
+
}
|
1065
|
+
else
|
1066
|
+
{
|
1067
|
+
CAT(str, cap, idx, '\n');
|
1068
|
+
}
|
1069
|
+
goto Scalar2;
|
1070
|
+
}
|
1071
|
+
#line 871 "<stdout>"
|
1072
|
+
yy83: ++YYCURSOR;
|
1073
|
+
goto yy84;
|
1074
|
+
yy84:
|
1075
|
+
#line 457 "bytecode.re"
|
1076
|
+
{ CHK_NL(tok+1);
|
1077
|
+
CAT(str, cap, idx, '\0');
|
1078
|
+
goto Scalar2;
|
1079
|
+
}
|
1080
|
+
#line 880 "<stdout>"
|
1081
|
+
}
|
1082
|
+
#line 474 "bytecode.re"
|
1083
|
+
|
1084
|
+
|
1085
|
+
ScalarEnd:
|
1086
|
+
{
|
1087
|
+
SyckNode *n = syck_alloc_str();
|
1088
|
+
n->data.str->ptr = str;
|
1089
|
+
n->data.str->len = idx;
|
1090
|
+
sycklval->nodeData = n;
|
1091
|
+
POP_LEVEL();
|
1092
|
+
if ( parser->implicit_typing == 1 )
|
1093
|
+
{
|
1094
|
+
try_tag_implicit( sycklval->nodeData, parser->taguri_expansion );
|
1095
|
+
}
|
1096
|
+
return YAML_PLAIN;
|
1097
|
+
}
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
char *
|
1103
|
+
get_inline( SyckParser *parser )
|
1104
|
+
{
|
1105
|
+
int idx = 0;
|
1106
|
+
int cap = 100;
|
1107
|
+
char *str = S_ALLOC_N( char, cap );
|
1108
|
+
char *tok;
|
1109
|
+
|
1110
|
+
str[0] = '\0';
|
1111
|
+
|
1112
|
+
Inline:
|
1113
|
+
{
|
1114
|
+
tok = YYCURSOR;
|
1115
|
+
|
1116
|
+
|
1117
|
+
#line 884 "<stdout>"
|
1118
|
+
{
|
1119
|
+
YYCTYPE yych;
|
1120
|
+
unsigned int yyaccept;
|
1121
|
+
goto yy85;
|
1122
|
+
yy86: ++YYCURSOR;
|
1123
|
+
yy85:
|
1124
|
+
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
1125
|
+
yych = *YYCURSOR;
|
1126
|
+
switch(yych){
|
1127
|
+
case '\000': goto yy91;
|
1128
|
+
case '\n': goto yy87;
|
1129
|
+
case '\r': goto yy89;
|
1130
|
+
default: goto yy93;
|
1131
|
+
}
|
1132
|
+
yy87: ++YYCURSOR;
|
1133
|
+
goto yy88;
|
1134
|
+
yy88:
|
1135
|
+
#line 509 "bytecode.re"
|
1136
|
+
{ CHK_NL(YYCURSOR);
|
1137
|
+
return str; }
|
1138
|
+
#line 905 "<stdout>"
|
1139
|
+
yy89: ++YYCURSOR;
|
1140
|
+
switch((yych = *YYCURSOR)) {
|
1141
|
+
case '\n': goto yy94;
|
1142
|
+
default: goto yy90;
|
1143
|
+
}
|
1144
|
+
yy90:
|
1145
|
+
#line 516 "bytecode.re"
|
1146
|
+
{ CAT(str, cap, idx, tok[0]);
|
1147
|
+
goto Inline;
|
1148
|
+
}
|
1149
|
+
#line 916 "<stdout>"
|
1150
|
+
yy91: ++YYCURSOR;
|
1151
|
+
goto yy92;
|
1152
|
+
yy92:
|
1153
|
+
#line 512 "bytecode.re"
|
1154
|
+
{ YYCURSOR = tok;
|
1155
|
+
return str;
|
1156
|
+
}
|
1157
|
+
#line 924 "<stdout>"
|
1158
|
+
yy93: yych = *++YYCURSOR;
|
1159
|
+
goto yy90;
|
1160
|
+
yy94: ++YYCURSOR;
|
1161
|
+
yych = *YYCURSOR;
|
1162
|
+
goto yy88;
|
1163
|
+
}
|
1164
|
+
#line 520 "bytecode.re"
|
1165
|
+
|
1166
|
+
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
}
|
1170
|
+
|