rubysl-yaml 1.0.1 → 1.1.0

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