slow_blink 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/slow_blink/ext_compact_encoder/compact_encoder.c +258 -0
- data/ext/slow_blink/ext_compact_encoder/compact_encoder.h +92 -0
- data/ext/slow_blink/ext_compact_encoder/ext_compact_encoder.c +555 -0
- data/ext/slow_blink/ext_compact_encoder/extconf.rb +4 -0
- data/ext/slow_blink/ext_schema_parser/lexer.c +59 -59
- data/ext/slow_blink/ext_schema_parser/lexer.h +2 -2
- data/ext/slow_blink/ext_schema_parser/parser.c +380 -367
- data/ext/slow_blink/ext_schema_parser/parser.h +1 -1
- data/lib/slow_blink/annotatable.rb +1 -1
- data/lib/slow_blink/annotation.rb +5 -5
- data/lib/slow_blink/binary.rb +26 -0
- data/lib/slow_blink/boolean.rb +26 -0
- data/lib/slow_blink/compact_encoder.rb +45 -71
- data/lib/slow_blink/date.rb +25 -0
- data/lib/slow_blink/decimal.rb +26 -0
- data/lib/slow_blink/definition.rb +19 -10
- data/lib/slow_blink/enumeration.rb +14 -36
- data/lib/slow_blink/error.rb +19 -0
- data/lib/slow_blink/field.rb +3 -16
- data/lib/slow_blink/fixed.rb +26 -0
- data/lib/slow_blink/floating_point.rb +27 -0
- data/lib/slow_blink/group.rb +30 -43
- data/lib/slow_blink/incremental_annotation.rb +75 -21
- data/lib/slow_blink/integer.rb +65 -0
- data/lib/slow_blink/message/binary.rb +87 -0
- data/lib/slow_blink/message/boolean.rb +68 -0
- data/lib/slow_blink/message/date.rb +33 -0
- data/lib/slow_blink/message/decimal.rb +25 -0
- data/lib/slow_blink/message/enumeration.rb +69 -0
- data/lib/slow_blink/message/field.rb +73 -0
- data/lib/slow_blink/message/fixed.rb +84 -0
- data/lib/slow_blink/message/floating_point.rb +68 -0
- data/lib/slow_blink/message/group.rb +260 -0
- data/lib/slow_blink/message/integer.rb +217 -0
- data/lib/slow_blink/message/model.rb +202 -0
- data/lib/slow_blink/message/sequence.rb +85 -0
- data/lib/slow_blink/message/string.rb +95 -0
- data/lib/slow_blink/message/time.rb +78 -0
- data/lib/slow_blink/message/time_of_day.rb +132 -0
- data/lib/slow_blink/name_with_id.rb +2 -1
- data/lib/slow_blink/namespace.rb +140 -0
- data/lib/slow_blink/object.rb +29 -0
- data/lib/slow_blink/ref.rb +93 -0
- data/lib/slow_blink/schema.rb +94 -68
- data/lib/slow_blink/{component_reference.rb → schema_buffer.rb} +11 -22
- data/lib/slow_blink/sequence.rb +58 -0
- data/lib/slow_blink/string.rb +40 -0
- data/lib/slow_blink/sym.rb +4 -0
- data/lib/slow_blink/time.rb +30 -0
- data/lib/slow_blink/time_of_day.rb +30 -0
- data/lib/slow_blink/type.rb +7 -402
- data/lib/slow_blink/version.rb +1 -1
- data/lib/slow_blink.rb +1 -0
- data/rakefile +14 -3
- data/test/{integration/capture_stderr.rb → capture_stderr.rb} +0 -0
- data/test/tc_compact_encoder.rb +341 -0
- data/test/tc_field.rb +53 -0
- data/test/tc_group.rb +122 -0
- data/test/tc_incr_annote.rb +27 -0
- data/test/{integration/tc_inputs.rb → tc_inputs.rb} +7 -11
- data/test/tc_model.rb +65 -0
- data/test/tc_model_encode.rb +63 -0
- data/test/tc_namespace.rb +8 -0
- data/test/tc_types.rb +198 -0
- metadata +58 -11
- data/ext/slow_blink/ext_schema_parser/parser.l +0 -139
- data/ext/slow_blink/ext_schema_parser/parser.y +0 -932
- data/lib/slow_blink/message.rb +0 -43
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
|
52
52
|
/* First part of user declarations. */
|
53
|
-
#line 6 "
|
53
|
+
#line 6 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:207 */
|
54
54
|
|
55
55
|
|
56
56
|
/* includes ***********************************************************/
|
@@ -78,14 +78,14 @@ static VALUE cSlowBlink;
|
|
78
78
|
|
79
79
|
static VALUE cNameWithID;
|
80
80
|
|
81
|
-
static VALUE
|
81
|
+
static VALUE cNamespace;
|
82
82
|
static VALUE cGroup;
|
83
83
|
static VALUE cField;
|
84
84
|
static VALUE cAnnotation;
|
85
85
|
static VALUE cIncrementalAnnotation;
|
86
86
|
|
87
87
|
static VALUE cDefinition;
|
88
|
-
static VALUE
|
88
|
+
static VALUE cENUMERATION;
|
89
89
|
static VALUE cSym;
|
90
90
|
|
91
91
|
static VALUE cI8;
|
@@ -96,7 +96,7 @@ static VALUE cU8;
|
|
96
96
|
static VALUE cU16;
|
97
97
|
static VALUE cU32;
|
98
98
|
static VALUE cU64;
|
99
|
-
static VALUE
|
99
|
+
static VALUE cFLOATING_POINT;
|
100
100
|
static VALUE cDECIMAL;
|
101
101
|
static VALUE cFIXED;
|
102
102
|
static VALUE cSEQUENCE;
|
@@ -261,7 +261,7 @@ static YYLTYPE yyloc_default
|
|
261
261
|
/* YYFINAL -- State number of the termination state. */
|
262
262
|
#define YYFINAL 49
|
263
263
|
/* YYLAST -- Last index in YYTABLE. */
|
264
|
-
#define YYLAST
|
264
|
+
#define YYLAST 198
|
265
265
|
|
266
266
|
/* YYNTOKENS -- Number of terminals. */
|
267
267
|
#define YYNTOKENS 50
|
@@ -323,19 +323,19 @@ static const unsigned char yytranslate[] =
|
|
323
323
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
324
324
|
static const unsigned short int yyrline[] =
|
325
325
|
{
|
326
|
-
0,
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
326
|
+
0, 127, 127, 134, 140, 148, 153, 157, 163, 170,
|
327
|
+
176, 182, 186, 193, 201, 207, 215, 223, 231, 237,
|
328
|
+
244, 255, 260, 267, 269, 273, 275, 277, 279, 281,
|
329
|
+
283, 285, 291, 299, 307, 313, 321, 327, 335, 343,
|
330
|
+
348, 355, 361, 369, 375, 381, 387, 393, 399, 405,
|
331
|
+
411, 417, 423, 431, 437, 443, 449, 455, 464, 470,
|
332
|
+
477, 483, 490, 499, 501, 506, 513, 518, 522, 528,
|
333
|
+
534, 542, 544, 551, 559, 561, 566, 573, 581, 586,
|
334
|
+
592, 598, 604, 612, 618, 625, 627, 629, 631, 635,
|
335
|
+
637, 641, 643, 647, 652, 657, 662, 667, 672, 677,
|
336
|
+
682, 687, 692, 697, 702, 707, 712, 717, 722, 727,
|
337
|
+
732, 737, 742, 747, 752, 757, 764, 768, 770, 774,
|
338
|
+
781, 785, 787, 791, 795, 799
|
339
339
|
};
|
340
340
|
#endif
|
341
341
|
|
@@ -353,7 +353,7 @@ static const char *const yytname[] =
|
|
353
353
|
"\"int\"", "\"name\"", "\"ncName\"", "\"\\\\ncName\"", "\"cName\"",
|
354
354
|
"\"\\\"<annotation>\\\" or '<annotation>'\"", "'='", "':'", "','", "'?'",
|
355
355
|
"'['", "']'", "'('", "')'", "'*'", "'|'", "'/'", "'@'", "'.'", "$accept",
|
356
|
-
"top", "
|
356
|
+
"top", "namespace", "defs", "defList", "def", "define", "groupDef",
|
357
357
|
"fields", "field", "opt", "type", "single", "sequence", "string",
|
358
358
|
"binary", "fixed", "size", "ref", "number", "time", "enum", "symList",
|
359
359
|
"sym", "val", "annots", "annotList", "annot", "literal", "nameWithId",
|
@@ -363,29 +363,29 @@ static const char *const yytname[] =
|
|
363
363
|
};
|
364
364
|
#endif
|
365
365
|
|
366
|
-
#define YYPACT_NINF -
|
367
|
-
#define YYTABLE_NINF -
|
366
|
+
#define YYPACT_NINF -89
|
367
|
+
#define YYTABLE_NINF -62
|
368
368
|
|
369
369
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
370
370
|
STATE-NUM. */
|
371
371
|
static const short int yypact[] =
|
372
372
|
{
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
-
|
377
|
-
-
|
378
|
-
-
|
379
|
-
|
380
|
-
-
|
381
|
-
|
382
|
-
-
|
383
|
-
|
384
|
-
-
|
385
|
-
-
|
386
|
-
-
|
387
|
-
|
388
|
-
-
|
373
|
+
79, -18, -89, -89, -89, -89, 18, 48, -89, -89,
|
374
|
+
84, -89, -18, -29, -89, -89, 23, 5, -89, -89,
|
375
|
+
150, 64, -89, -89, -89, -89, -89, -89, -89, -89,
|
376
|
+
-89, -89, -89, -89, -89, -89, -89, -89, -89, -89,
|
377
|
+
-89, -89, -89, -89, -89, -89, -89, 33, -89, -89,
|
378
|
+
-89, -89, -89, -89, 19, 24, -89, 67, 45, -16,
|
379
|
+
-89, 37, -29, 75, -26, 32, -89, -89, -89, -89,
|
380
|
+
-89, -89, -89, 67, -89, 26, -89, 37, -89, 65,
|
381
|
+
-89, 146, -89, -89, -89, -89, -89, -89, -89, -89,
|
382
|
+
-89, -89, -89, -89, -89, -89, -89, -89, 60, -89,
|
383
|
+
60, 60, -29, -89, 70, -89, -89, -89, -89, -89,
|
384
|
+
-89, -89, -89, 59, -89, -18, 61, 92, -89, -89,
|
385
|
+
-89, -89, -89, 100, -89, -29, -29, 32, -89, -89,
|
386
|
+
-89, -89, 82, -29, 78, -89, -29, -89, -89, -18,
|
387
|
+
85, 86, -89, 80, -19, -89, -89, 65, 88, -89,
|
388
|
+
-89, -89, -89, -89, -89, -89, -89, -89
|
389
389
|
};
|
390
390
|
|
391
391
|
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
|
@@ -398,37 +398,37 @@ static const unsigned char yydefact[] =
|
|
398
398
|
125, 66, 119, 93, 94, 95, 96, 97, 98, 99,
|
399
399
|
100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
|
400
400
|
112, 113, 114, 115, 110, 111, 91, 0, 92, 1,
|
401
|
-
8, 66, 9, 10, 14, 125, 69, 0, 0,
|
402
|
-
0, 125, 0, 0, 0, 73, 74, 87, 86,
|
403
|
-
|
404
|
-
|
405
|
-
52, 53, 54, 55, 56, 57, 31, 34, 32,
|
406
|
-
|
407
|
-
26, 12,
|
408
|
-
76,
|
409
|
-
58, 0, 125, 125, 42, 125,
|
410
|
-
0, 0, 33,
|
401
|
+
8, 66, 9, 10, 14, 125, 69, 0, 77, 0,
|
402
|
+
4, 0, 125, 0, 0, 0, 73, 74, 87, 86,
|
403
|
+
85, 88, 83, 0, 80, 81, 120, 70, 71, 17,
|
404
|
+
18, 0, 43, 44, 45, 46, 47, 48, 49, 50,
|
405
|
+
51, 52, 53, 54, 55, 56, 57, 31, 34, 32,
|
406
|
+
36, 0, 125, 13, 23, 24, 28, 29, 30, 25,
|
407
|
+
27, 26, 12, 0, 60, 0, 41, 15, 124, 123,
|
408
|
+
75, 76, 84, 0, 72, 125, 125, 0, 35, 37,
|
409
|
+
38, 58, 0, 125, 125, 42, 125, 82, 19, 0,
|
410
|
+
0, 0, 33, 59, 0, 62, 63, 16, 125, 39,
|
411
411
|
40, 122, 121, 64, 65, 22, 20, 21
|
412
412
|
};
|
413
413
|
|
414
414
|
/* YYPGOTO[NTERM-NUM]. */
|
415
415
|
static const signed char yypgoto[] =
|
416
416
|
{
|
417
|
-
-
|
418
|
-
-
|
419
|
-
-
|
420
|
-
-
|
421
|
-
-
|
417
|
+
-89, -89, -89, 111, -89, 123, -89, -89, -1, 11,
|
418
|
+
-89, 56, -89, -89, -89, -89, -89, -32, -89, -89,
|
419
|
+
-89, -89, -89, -88, -89, -59, -89, -8, -89, 2,
|
420
|
+
-89, -89, -89, -89, 66, -5, -89, -89, -89, 1,
|
421
|
+
-89, 68, -89, 15, -81, 0
|
422
422
|
};
|
423
423
|
|
424
424
|
/* YYDEFGOTO[NTERM-NUM]. */
|
425
425
|
static const short int yydefgoto[] =
|
426
426
|
{
|
427
|
-
-1, 7, 8, 9, 10, 11, 52, 53,
|
428
|
-
156,
|
429
|
-
|
430
|
-
|
431
|
-
20,
|
427
|
+
-1, 7, 8, 9, 10, 11, 52, 53, 79, 80,
|
428
|
+
156, 103, 104, 105, 106, 107, 108, 128, 109, 110,
|
429
|
+
111, 112, 113, 114, 145, 12, 13, 14, 77, 54,
|
430
|
+
66, 15, 16, 58, 72, 17, 47, 48, 18, 19,
|
431
|
+
20, 78, 153, 120, 121, 51
|
432
432
|
};
|
433
433
|
|
434
434
|
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
|
@@ -436,52 +436,50 @@ static const short int yydefgoto[] =
|
|
436
436
|
number is the opposite. If YYTABLE_NINF, syntax error. */
|
437
437
|
static const short int yytable[] =
|
438
438
|
{
|
439
|
-
21,
|
440
|
-
|
439
|
+
21, 46, 22, 81, 115, 56, 74, 3, 4, 5,
|
440
|
+
118, 151, 152, 55, 131, 3, 4, 3, 4, 6,
|
441
441
|
21, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
442
442
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
|
443
|
-
42, 43, 44,
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
3, 4, 5,
|
451
|
-
|
452
|
-
|
453
|
-
55,
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
4, 5, 0, 3, 4, 5,
|
458
|
-
0, 0, 0, 0, 0, 0, 0, 0, 6
|
459
|
-
0, 6
|
443
|
+
42, 43, 44, 115, 45, 143, 141, 62, 49, 71,
|
444
|
+
57, 3, 4, 5, 59, 67, 63, 64, 116, 117,
|
445
|
+
75, 118, 119, 154, -5, 71, 81, 139, 129, 130,
|
446
|
+
61, 65, 73, 76, 115, 123, 116, 81, 82, 83,
|
447
|
+
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
|
448
|
+
94, 95, 96, 97, 98, 99, 68, 69, 70, 100,
|
449
|
+
1, 101, 2, 127, 125, 133, 135, 2, 3, 4,
|
450
|
+
5, 132, 3, 4, 5, 6, 134, 3, 4, 5,
|
451
|
+
136, 102, 137, 6, 142, 144, -61, 6, 155, 149,
|
452
|
+
150, 60, 6, 50, 146, 147, 138, 126, 0, 122,
|
453
|
+
55, 148, 140, 0, 0, 124, 0, 0, 157, 82,
|
454
|
+
83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
|
455
|
+
93, 94, 95, 96, 97, 98, 99, 0, 0, 0,
|
456
|
+
100, 0, 101, 2, 0, 0, 0, 0, 0, 3,
|
457
|
+
4, 5, 0, 3, 4, 5, 0, 0, 0, 0,
|
458
|
+
0, 0, 0, 0, 0, 0, 0, 0, 6
|
460
459
|
};
|
461
460
|
|
462
461
|
static const short int yycheck[] =
|
463
462
|
{
|
464
|
-
0,
|
465
|
-
29, 30, 31, 12,
|
463
|
+
0, 6, 1, 62, 63, 13, 22, 33, 34, 35,
|
464
|
+
29, 30, 31, 12, 102, 33, 34, 33, 34, 48,
|
466
465
|
20, 3, 4, 5, 6, 7, 8, 9, 10, 11,
|
467
466
|
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
|
468
|
-
22, 23, 24,
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
33, 34, 35,
|
476
|
-
|
477
|
-
|
478
|
-
139,
|
467
|
+
22, 23, 24, 102, 26, 133, 127, 28, 0, 57,
|
468
|
+
27, 33, 34, 35, 49, 55, 37, 38, 63, 64,
|
469
|
+
59, 29, 30, 144, 0, 73, 125, 126, 100, 101,
|
470
|
+
37, 47, 27, 36, 133, 49, 81, 136, 3, 4,
|
471
|
+
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
472
|
+
15, 16, 17, 18, 19, 20, 29, 30, 31, 24,
|
473
|
+
21, 26, 23, 43, 39, 46, 45, 23, 33, 34,
|
474
|
+
35, 41, 33, 34, 35, 48, 115, 33, 34, 35,
|
475
|
+
28, 46, 22, 48, 42, 47, 46, 48, 40, 44,
|
476
|
+
44, 20, 48, 10, 134, 136, 125, 81, -1, 73,
|
477
|
+
139, 139, 127, -1, -1, 77, -1, -1, 148, 3,
|
479
478
|
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
480
479
|
14, 15, 16, 17, 18, 19, 20, -1, -1, -1,
|
481
|
-
24, -1, 26, 23, -1, -1,
|
482
|
-
34, 35, -1, 33, 34, 35,
|
483
|
-
-1, -1, -1, -1, -1, -1, -1, -1, 48
|
484
|
-
-1, 48
|
480
|
+
24, -1, 26, 23, -1, -1, -1, -1, -1, 33,
|
481
|
+
34, 35, -1, 33, 34, 35, -1, -1, -1, -1,
|
482
|
+
-1, -1, -1, -1, -1, -1, -1, -1, 48
|
485
483
|
};
|
486
484
|
|
487
485
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
@@ -493,15 +491,15 @@ static const unsigned char yystos[] =
|
|
493
491
|
90, 95, 89, 3, 4, 5, 6, 7, 8, 9,
|
494
492
|
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
495
493
|
20, 21, 22, 23, 24, 26, 85, 86, 87, 0,
|
496
|
-
55, 95, 56, 57, 79, 89, 77, 27,
|
497
|
-
37, 28, 37, 38, 47, 80, 95, 29, 30,
|
498
|
-
|
499
|
-
75, 3, 4, 5, 6, 7, 8, 9, 10,
|
500
|
-
12, 13, 14, 15, 16, 17, 18, 19, 20,
|
501
|
-
26, 46, 61, 62, 63, 64, 65, 66, 68,
|
502
|
-
70, 71, 72, 73, 75, 85, 85, 29, 30,
|
503
|
-
94,
|
504
|
-
73, 41, 46, 89, 45, 28,
|
494
|
+
55, 95, 56, 57, 79, 89, 77, 27, 83, 49,
|
495
|
+
53, 37, 28, 37, 38, 47, 80, 95, 29, 30,
|
496
|
+
31, 77, 84, 27, 22, 89, 36, 78, 91, 58,
|
497
|
+
59, 75, 3, 4, 5, 6, 7, 8, 9, 10,
|
498
|
+
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
499
|
+
24, 26, 46, 61, 62, 63, 64, 65, 66, 68,
|
500
|
+
69, 70, 71, 72, 73, 75, 85, 85, 29, 30,
|
501
|
+
93, 94, 84, 49, 91, 39, 61, 43, 67, 67,
|
502
|
+
67, 73, 41, 46, 89, 45, 28, 22, 59, 75,
|
505
503
|
93, 94, 42, 73, 47, 74, 95, 58, 79, 44,
|
506
504
|
44, 30, 31, 92, 94, 40, 60, 95
|
507
505
|
};
|
@@ -532,10 +530,10 @@ static const unsigned char yyr2[] =
|
|
532
530
|
5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
533
531
|
1, 1, 1, 3, 1, 2, 1, 2, 2, 3,
|
534
532
|
3, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
535
|
-
1, 1, 1, 1, 1, 1, 1, 1, 2,
|
533
|
+
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
536
534
|
1, 3, 3, 1, 2, 2, 1, 1, 1, 2,
|
537
|
-
4, 1, 2, 2, 1, 2, 2,
|
538
|
-
3, 3, 5,
|
535
|
+
4, 1, 2, 2, 1, 2, 2, 2, 1, 1,
|
536
|
+
3, 3, 5, 2, 3, 1, 1, 1, 1, 1,
|
539
537
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
540
538
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
541
539
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
|
@@ -614,17 +612,16 @@ static const unsigned char yyconflp[] =
|
|
614
612
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
615
613
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
616
614
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
617
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
618
|
-
|
619
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
615
|
+
0, 0, 0, 0, 0, 0, 0, 0, 13, 15,
|
616
|
+
0, 0, 1, 3, 0, 0, 0, 5, 7, 0,
|
620
617
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
621
618
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
622
619
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
623
620
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
624
621
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
625
|
-
0, 0, 0, 5, 7, 0, 9, 11, 0, 0,
|
626
622
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
627
|
-
0, 0
|
623
|
+
0, 0, 0, 9, 11, 0, 0, 0, 0, 0,
|
624
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0
|
628
625
|
};
|
629
626
|
|
630
627
|
/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
|
@@ -1137,804 +1134,818 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp,
|
|
1137
1134
|
switch (yyn)
|
1138
1135
|
{
|
1139
1136
|
case 2:
|
1140
|
-
#line
|
1137
|
+
#line 128 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1141
1138
|
{
|
1142
1139
|
*tree = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1143
1140
|
}
|
1144
|
-
#line
|
1141
|
+
#line 1142 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1145
1142
|
break;
|
1146
1143
|
|
1147
1144
|
case 3:
|
1148
|
-
#line
|
1145
|
+
#line 135 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1149
1146
|
{
|
1150
|
-
VALUE args[] = {Qnil, (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1151
|
-
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args,
|
1147
|
+
VALUE args[] = {filename, Qnil, (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1148
|
+
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cNamespace);
|
1152
1149
|
}
|
1153
|
-
#line
|
1150
|
+
#line 1151 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1154
1151
|
break;
|
1155
1152
|
|
1156
1153
|
case 4:
|
1157
|
-
#line
|
1154
|
+
#line 141 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1158
1155
|
{
|
1159
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1160
|
-
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args,
|
1156
|
+
VALUE args[] = {filename, (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1157
|
+
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cNamespace);
|
1161
1158
|
}
|
1162
|
-
#line
|
1159
|
+
#line 1160 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1163
1160
|
break;
|
1164
1161
|
|
1165
1162
|
case 5:
|
1166
|
-
#line
|
1163
|
+
#line 149 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1167
1164
|
{
|
1168
1165
|
((*yyvalp)) = rb_ary_new();
|
1169
1166
|
}
|
1170
|
-
#line
|
1167
|
+
#line 1168 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1171
1168
|
break;
|
1172
1169
|
|
1173
1170
|
case 7:
|
1174
|
-
#line
|
1171
|
+
#line 158 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1175
1172
|
{
|
1176
|
-
((*yyvalp)) =
|
1173
|
+
((*yyvalp)) = rb_ary_new();
|
1174
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1177
1175
|
}
|
1178
|
-
#line
|
1176
|
+
#line 1177 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1179
1177
|
break;
|
1180
1178
|
|
1181
1179
|
case 8:
|
1182
|
-
#line
|
1180
|
+
#line 164 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1183
1181
|
{
|
1184
1182
|
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1185
1183
|
}
|
1186
|
-
#line
|
1184
|
+
#line 1185 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1187
1185
|
break;
|
1188
1186
|
|
1189
1187
|
case 9:
|
1190
|
-
#line
|
1188
|
+
#line 171 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1191
1189
|
{
|
1192
1190
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1193
1191
|
rb_funcall(((*yyvalp)), rb_intern("annote"), 1, (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval));
|
1194
1192
|
}
|
1195
|
-
#line
|
1193
|
+
#line 1194 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1196
1194
|
break;
|
1197
1195
|
|
1198
1196
|
case 10:
|
1199
|
-
#line
|
1197
|
+
#line 177 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1200
1198
|
{
|
1201
1199
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1202
1200
|
rb_funcall(((*yyvalp)), rb_intern("annote"), 1, (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval));
|
1203
1201
|
}
|
1204
|
-
#line
|
1202
|
+
#line 1203 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1205
1203
|
break;
|
1206
1204
|
|
1207
1205
|
case 12:
|
1208
|
-
#line
|
1206
|
+
#line 187 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1209
1207
|
{
|
1210
1208
|
VALUE enumArgs[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1211
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), rb_class_new_instance(sizeof(enumArgs)/sizeof(*enumArgs),enumArgs,
|
1209
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), rb_class_new_instance(sizeof(enumArgs)/sizeof(*enumArgs),enumArgs, cENUMERATION), newLocation(filename, &(*yylocp))};
|
1212
1210
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cDefinition);
|
1213
1211
|
}
|
1214
|
-
#line
|
1212
|
+
#line 1213 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1215
1213
|
break;
|
1216
1214
|
|
1217
1215
|
case 13:
|
1218
|
-
#line
|
1216
|
+
#line 194 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1219
1217
|
{
|
1220
1218
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*yylocp))};
|
1221
1219
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cDefinition);
|
1222
1220
|
}
|
1223
|
-
#line
|
1221
|
+
#line 1222 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1224
1222
|
break;
|
1225
1223
|
|
1226
1224
|
case 14:
|
1227
|
-
#line
|
1225
|
+
#line 202 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1228
1226
|
{
|
1229
1227
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), Qnil, rb_ary_new(), newLocation(filename, &(*yylocp))};
|
1230
1228
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cGroup);
|
1231
1229
|
}
|
1232
|
-
#line
|
1230
|
+
#line 1231 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1233
1231
|
break;
|
1234
1232
|
|
1235
1233
|
case 15:
|
1236
|
-
#line
|
1234
|
+
#line 208 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1237
1235
|
{
|
1238
1236
|
VALUE refArgs[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), Qfalse, newLocation(filename, &(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yyloc))};
|
1239
|
-
VALUE
|
1237
|
+
VALUE ref = rb_class_new_instance(sizeof(refArgs)/sizeof(*refArgs),refArgs, cREF);
|
1238
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), ref, rb_ary_new(), newLocation(filename, &(*yylocp))};
|
1240
1239
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cGroup);
|
1241
1240
|
}
|
1242
|
-
#line
|
1241
|
+
#line 1242 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1243
1242
|
break;
|
1244
1243
|
|
1245
1244
|
case 16:
|
1246
|
-
#line
|
1245
|
+
#line 216 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1247
1246
|
{
|
1248
1247
|
VALUE refArgs[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), Qfalse, newLocation(filename, &(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc))};
|
1249
|
-
VALUE
|
1248
|
+
VALUE ref = rb_class_new_instance(sizeof(refArgs)/sizeof(*refArgs),refArgs, cREF);
|
1249
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval), ref, (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*yylocp))};
|
1250
1250
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cGroup);
|
1251
1251
|
}
|
1252
1252
|
#line 1253 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1253
1253
|
break;
|
1254
1254
|
|
1255
1255
|
case 17:
|
1256
|
-
#line
|
1256
|
+
#line 224 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1257
1257
|
{
|
1258
1258
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), Qnil, (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*yylocp))};
|
1259
|
-
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cGroup);
|
1259
|
+
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cGroup);
|
1260
1260
|
}
|
1261
1261
|
#line 1262 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1262
1262
|
break;
|
1263
1263
|
|
1264
1264
|
case 18:
|
1265
|
-
#line
|
1265
|
+
#line 232 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1266
1266
|
{
|
1267
|
-
((*yyvalp)) =
|
1267
|
+
((*yyvalp)) = rb_ary_new();
|
1268
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1268
1269
|
}
|
1269
|
-
#line
|
1270
|
+
#line 1271 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1270
1271
|
break;
|
1271
1272
|
|
1272
1273
|
case 19:
|
1273
|
-
#line
|
1274
|
+
#line 238 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1274
1275
|
{
|
1275
1276
|
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1276
1277
|
}
|
1277
|
-
#line
|
1278
|
+
#line 1279 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1278
1279
|
break;
|
1279
1280
|
|
1280
1281
|
case 20:
|
1281
|
-
#line
|
1282
|
+
#line 245 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1282
1283
|
{
|
1283
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval),
|
1284
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yyloc))};
|
1284
1285
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args),args, cField);
|
1285
1286
|
|
1286
1287
|
rb_funcall(((*yyvalp)), rb_intern("annote"), 1, (((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval));
|
1287
1288
|
rb_funcall((((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), rb_intern("annote"), 1, (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval));
|
1288
1289
|
}
|
1289
|
-
#line
|
1290
|
+
#line 1291 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1290
1291
|
break;
|
1291
1292
|
|
1292
1293
|
case 21:
|
1293
|
-
#line
|
1294
|
+
#line 256 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1294
1295
|
{
|
1295
1296
|
((*yyvalp)) = Qfalse;
|
1296
1297
|
}
|
1297
|
-
#line
|
1298
|
+
#line 1299 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1298
1299
|
break;
|
1299
1300
|
|
1300
1301
|
case 22:
|
1301
|
-
#line
|
1302
|
+
#line 261 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1302
1303
|
{
|
1303
1304
|
((*yyvalp)) = Qtrue;
|
1304
1305
|
}
|
1305
|
-
#line
|
1306
|
+
#line 1307 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1306
1307
|
break;
|
1307
1308
|
|
1308
1309
|
case 31:
|
1309
|
-
#line
|
1310
|
+
#line 286 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1310
1311
|
{
|
1311
|
-
VALUE args[] = {
|
1312
|
+
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1312
1313
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cBOOLEAN);
|
1313
1314
|
}
|
1314
|
-
#line
|
1315
|
+
#line 1316 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1315
1316
|
break;
|
1316
1317
|
|
1317
1318
|
case 32:
|
1318
|
-
#line
|
1319
|
+
#line 292 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1319
1320
|
{
|
1320
|
-
VALUE args[] = {
|
1321
|
+
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1321
1322
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cOBJECT);
|
1322
1323
|
}
|
1323
|
-
#line
|
1324
|
+
#line 1325 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1324
1325
|
break;
|
1325
1326
|
|
1326
1327
|
case 33:
|
1327
|
-
#line
|
1328
|
+
#line 300 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1328
1329
|
{
|
1329
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval),
|
1330
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), newLocation(filename, &(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc))};
|
1330
1331
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cSEQUENCE);
|
1331
1332
|
}
|
1332
|
-
#line
|
1333
|
+
#line 1334 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1333
1334
|
break;
|
1334
1335
|
|
1335
1336
|
case 34:
|
1336
|
-
#line
|
1337
|
+
#line 308 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1337
1338
|
{
|
1338
1339
|
VALUE args[] = {Qnil, newLocation(filename, &(*yylocp))};
|
1339
1340
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cSTRING);
|
1340
1341
|
}
|
1341
|
-
#line
|
1342
|
+
#line 1343 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1342
1343
|
break;
|
1343
1344
|
|
1344
1345
|
case 35:
|
1345
|
-
#line
|
1346
|
+
#line 314 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1346
1347
|
{
|
1347
1348
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*yylocp))};
|
1348
1349
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cSTRING);
|
1349
1350
|
}
|
1350
|
-
#line
|
1351
|
+
#line 1352 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1351
1352
|
break;
|
1352
1353
|
|
1353
1354
|
case 36:
|
1354
|
-
#line
|
1355
|
+
#line 322 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1355
1356
|
{
|
1356
1357
|
VALUE args[] = {Qnil, newLocation(filename, &(*yylocp))};
|
1357
1358
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cBINARY);
|
1358
1359
|
}
|
1359
|
-
#line
|
1360
|
+
#line 1361 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1360
1361
|
break;
|
1361
1362
|
|
1362
1363
|
case 37:
|
1363
|
-
#line
|
1364
|
+
#line 328 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1364
1365
|
{
|
1365
1366
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*yylocp))};
|
1366
1367
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cBINARY);
|
1367
1368
|
}
|
1368
|
-
#line
|
1369
|
+
#line 1370 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1369
1370
|
break;
|
1370
1371
|
|
1371
1372
|
case 38:
|
1372
|
-
#line
|
1373
|
+
#line 336 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1373
1374
|
{
|
1374
1375
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*yylocp))};
|
1375
1376
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cFIXED);
|
1376
1377
|
}
|
1377
|
-
#line
|
1378
|
+
#line 1379 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1378
1379
|
break;
|
1379
1380
|
|
1380
1381
|
case 39:
|
1381
|
-
#line
|
1382
|
+
#line 344 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1382
1383
|
{
|
1383
1384
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval);
|
1384
1385
|
}
|
1385
|
-
#line
|
1386
|
+
#line 1387 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1386
1387
|
break;
|
1387
1388
|
|
1388
1389
|
case 40:
|
1389
|
-
#line
|
1390
|
+
#line 349 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1390
1391
|
{
|
1391
1392
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval);
|
1392
1393
|
}
|
1393
|
-
#line
|
1394
|
+
#line 1395 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1394
1395
|
break;
|
1395
1396
|
|
1396
1397
|
case 41:
|
1397
|
-
#line
|
1398
|
+
#line 356 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1398
1399
|
{
|
1399
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), Qfalse};
|
1400
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), Qfalse, newLocation(filename, &(*yylocp))};
|
1400
1401
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cREF);
|
1401
1402
|
}
|
1402
|
-
#line
|
1403
|
+
#line 1404 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1403
1404
|
break;
|
1404
1405
|
|
1405
1406
|
case 42:
|
1406
|
-
#line
|
1407
|
+
#line 362 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1407
1408
|
{
|
1408
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), Qtrue};
|
1409
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), Qtrue, newLocation(filename, &(*yylocp))};
|
1409
1410
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cREF);
|
1410
1411
|
}
|
1411
|
-
#line
|
1412
|
+
#line 1413 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1412
1413
|
break;
|
1413
1414
|
|
1414
1415
|
case 43:
|
1415
|
-
#line
|
1416
|
+
#line 370 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1416
1417
|
{
|
1417
1418
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1418
1419
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cI8);
|
1419
1420
|
}
|
1420
|
-
#line
|
1421
|
+
#line 1422 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1421
1422
|
break;
|
1422
1423
|
|
1423
1424
|
case 44:
|
1424
|
-
#line
|
1425
|
+
#line 376 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1425
1426
|
{
|
1426
1427
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1427
1428
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cI16);
|
1428
1429
|
}
|
1429
|
-
#line
|
1430
|
+
#line 1431 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1430
1431
|
break;
|
1431
1432
|
|
1432
1433
|
case 45:
|
1433
|
-
#line
|
1434
|
+
#line 382 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1434
1435
|
{
|
1435
1436
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1436
1437
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cI32);
|
1437
1438
|
}
|
1438
|
-
#line
|
1439
|
+
#line 1440 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1439
1440
|
break;
|
1440
1441
|
|
1441
1442
|
case 46:
|
1442
|
-
#line
|
1443
|
+
#line 388 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1443
1444
|
{
|
1444
1445
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1445
1446
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cI64);
|
1446
1447
|
}
|
1447
|
-
#line
|
1448
|
+
#line 1449 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1448
1449
|
break;
|
1449
1450
|
|
1450
1451
|
case 47:
|
1451
|
-
#line
|
1452
|
+
#line 394 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1452
1453
|
{
|
1453
1454
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1454
1455
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cU8);
|
1455
1456
|
}
|
1456
|
-
#line
|
1457
|
+
#line 1458 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1457
1458
|
break;
|
1458
1459
|
|
1459
1460
|
case 48:
|
1460
|
-
#line
|
1461
|
+
#line 400 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1461
1462
|
{
|
1462
1463
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1463
1464
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cU16);
|
1464
1465
|
}
|
1465
|
-
#line
|
1466
|
+
#line 1467 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1466
1467
|
break;
|
1467
1468
|
|
1468
1469
|
case 49:
|
1469
|
-
#line
|
1470
|
+
#line 406 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1470
1471
|
{
|
1471
1472
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1472
1473
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cU32);
|
1473
1474
|
}
|
1474
|
-
#line
|
1475
|
+
#line 1476 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1475
1476
|
break;
|
1476
1477
|
|
1477
1478
|
case 50:
|
1478
|
-
#line
|
1479
|
+
#line 412 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1479
1480
|
{
|
1480
1481
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1481
1482
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cU64);
|
1482
1483
|
}
|
1483
|
-
#line
|
1484
|
+
#line 1485 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1484
1485
|
break;
|
1485
1486
|
|
1486
1487
|
case 51:
|
1487
|
-
#line
|
1488
|
+
#line 418 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1488
1489
|
{
|
1489
1490
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1490
|
-
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args,
|
1491
|
+
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cFLOATING_POINT);
|
1491
1492
|
}
|
1492
|
-
#line
|
1493
|
+
#line 1494 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1493
1494
|
break;
|
1494
1495
|
|
1495
1496
|
case 52:
|
1496
|
-
#line
|
1497
|
+
#line 424 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1497
1498
|
{
|
1498
1499
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1499
1500
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cDECIMAL);
|
1500
1501
|
}
|
1501
|
-
#line
|
1502
|
+
#line 1503 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1502
1503
|
break;
|
1503
1504
|
|
1504
1505
|
case 53:
|
1505
|
-
#line
|
1506
|
+
#line 432 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1506
1507
|
{
|
1507
1508
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1508
1509
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cDATE);
|
1509
1510
|
}
|
1510
|
-
#line
|
1511
|
+
#line 1512 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1511
1512
|
break;
|
1512
1513
|
|
1513
1514
|
case 54:
|
1514
|
-
#line
|
1515
|
+
#line 438 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1515
1516
|
{
|
1516
1517
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1517
1518
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cTIME_OF_DAY_MILLI);
|
1518
1519
|
}
|
1519
|
-
#line
|
1520
|
+
#line 1521 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1520
1521
|
break;
|
1521
1522
|
|
1522
1523
|
case 55:
|
1523
|
-
#line
|
1524
|
+
#line 444 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1524
1525
|
{
|
1525
1526
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1526
1527
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cTIME_OF_DAY_NANO);
|
1527
1528
|
}
|
1528
|
-
#line
|
1529
|
+
#line 1530 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1529
1530
|
break;
|
1530
1531
|
|
1531
1532
|
case 56:
|
1532
|
-
#line
|
1533
|
+
#line 450 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1533
1534
|
{
|
1534
1535
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1535
1536
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cNANO_TIME);
|
1536
1537
|
}
|
1537
|
-
#line
|
1538
|
+
#line 1539 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1538
1539
|
break;
|
1539
1540
|
|
1540
1541
|
case 57:
|
1541
|
-
#line
|
1542
|
+
#line 456 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1542
1543
|
{
|
1543
1544
|
VALUE args[] = {newLocation(filename, &(*yylocp))};
|
1544
1545
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cMILLI_TIME);
|
1545
1546
|
}
|
1546
|
-
#line
|
1547
|
+
#line 1548 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1547
1548
|
break;
|
1548
1549
|
|
1549
1550
|
case 58:
|
1550
|
-
#line
|
1551
|
+
#line 465 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1551
1552
|
{
|
1552
|
-
((*yyvalp)) =
|
1553
|
+
((*yyvalp)) = rb_ary_new();
|
1554
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1553
1555
|
}
|
1554
|
-
#line
|
1556
|
+
#line 1557 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1557
|
+
break;
|
1558
|
+
|
1559
|
+
case 59:
|
1560
|
+
#line 471 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1561
|
+
{
|
1562
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1563
|
+
}
|
1564
|
+
#line 1565 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1555
1565
|
break;
|
1556
1566
|
|
1557
1567
|
case 60:
|
1558
|
-
#line
|
1568
|
+
#line 478 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1559
1569
|
{
|
1560
|
-
((*yyvalp)) =
|
1570
|
+
((*yyvalp)) = rb_ary_new();
|
1571
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1561
1572
|
}
|
1562
|
-
#line
|
1573
|
+
#line 1574 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1563
1574
|
break;
|
1564
1575
|
|
1565
1576
|
case 61:
|
1566
|
-
#line
|
1577
|
+
#line 484 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1567
1578
|
{
|
1568
1579
|
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1569
1580
|
}
|
1570
|
-
#line
|
1581
|
+
#line 1582 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1571
1582
|
break;
|
1572
1583
|
|
1573
1584
|
case 62:
|
1574
|
-
#line
|
1585
|
+
#line 491 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1575
1586
|
{
|
1576
1587
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yyloc))};
|
1577
1588
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cSym);
|
1578
1589
|
rb_funcall(((*yyvalp)), rb_intern("annote"), 1, (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval));
|
1579
1590
|
}
|
1580
|
-
#line
|
1591
|
+
#line 1592 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1581
1592
|
break;
|
1582
1593
|
|
1583
1594
|
case 64:
|
1584
|
-
#line
|
1595
|
+
#line 502 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1585
1596
|
{
|
1586
1597
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1587
1598
|
}
|
1588
|
-
#line
|
1599
|
+
#line 1600 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1589
1600
|
break;
|
1590
1601
|
|
1591
1602
|
case 65:
|
1592
|
-
#line
|
1603
|
+
#line 507 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1593
1604
|
{
|
1594
1605
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1595
1606
|
}
|
1596
|
-
#line
|
1607
|
+
#line 1608 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1597
1608
|
break;
|
1598
1609
|
|
1599
1610
|
case 66:
|
1600
|
-
#line
|
1611
|
+
#line 514 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1601
1612
|
{
|
1602
1613
|
((*yyvalp)) = rb_ary_new();
|
1603
1614
|
}
|
1604
|
-
#line
|
1615
|
+
#line 1616 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1605
1616
|
break;
|
1606
1617
|
|
1607
1618
|
case 68:
|
1608
|
-
#line
|
1619
|
+
#line 523 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1609
1620
|
{
|
1610
|
-
((*yyvalp)) =
|
1621
|
+
((*yyvalp)) = rb_ary_new();
|
1622
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1611
1623
|
}
|
1612
|
-
#line
|
1624
|
+
#line 1625 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1613
1625
|
break;
|
1614
1626
|
|
1615
1627
|
case 69:
|
1616
|
-
#line
|
1628
|
+
#line 529 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1617
1629
|
{
|
1618
1630
|
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1619
1631
|
}
|
1620
|
-
#line
|
1632
|
+
#line 1633 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1621
1633
|
break;
|
1622
1634
|
|
1623
1635
|
case 70:
|
1624
|
-
#line
|
1636
|
+
#line 535 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1625
1637
|
{
|
1626
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*
|
1638
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yyloc))};
|
1627
1639
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cAnnotation);
|
1628
1640
|
}
|
1629
|
-
#line
|
1641
|
+
#line 1642 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1630
1642
|
break;
|
1631
1643
|
|
1632
1644
|
case 72:
|
1633
|
-
#line
|
1645
|
+
#line 545 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1634
1646
|
{
|
1635
1647
|
rb_str_append(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1636
1648
|
}
|
1637
|
-
#line
|
1649
|
+
#line 1650 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1638
1650
|
break;
|
1639
1651
|
|
1640
1652
|
case 73:
|
1641
|
-
#line
|
1653
|
+
#line 552 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1642
1654
|
{
|
1643
1655
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1644
1656
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cNameWithID);
|
1645
1657
|
}
|
1646
|
-
#line
|
1658
|
+
#line 1659 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1647
1659
|
break;
|
1648
1660
|
|
1649
1661
|
case 75:
|
1650
|
-
#line
|
1662
|
+
#line 562 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1651
1663
|
{
|
1652
1664
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1653
1665
|
}
|
1654
|
-
#line
|
1666
|
+
#line 1667 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1655
1667
|
break;
|
1656
1668
|
|
1657
1669
|
case 76:
|
1658
|
-
#line
|
1670
|
+
#line 567 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1659
1671
|
{
|
1660
1672
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1661
1673
|
}
|
1662
|
-
#line
|
1674
|
+
#line 1675 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1663
1675
|
break;
|
1664
1676
|
|
1665
1677
|
case 77:
|
1666
|
-
#line
|
1678
|
+
#line 574 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1667
1679
|
{
|
1668
|
-
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-
|
1680
|
+
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval), newLocation(filename, &(*yylocp))};
|
1669
1681
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cIncrementalAnnotation);
|
1670
1682
|
}
|
1671
|
-
#line
|
1683
|
+
#line 1684 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1672
1684
|
break;
|
1673
1685
|
|
1674
1686
|
case 78:
|
1675
|
-
#line
|
1687
|
+
#line 582 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1676
1688
|
{
|
1677
|
-
|
1678
|
-
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cSchemaRef);
|
1689
|
+
((*yyvalp)) = rb_class_new_instance(0, NULL, cSchemaRef);
|
1679
1690
|
}
|
1680
|
-
#line
|
1691
|
+
#line 1692 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1681
1692
|
break;
|
1682
1693
|
|
1683
1694
|
case 79:
|
1684
|
-
#line
|
1695
|
+
#line 587 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1685
1696
|
{
|
1686
1697
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1687
1698
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cDefinitionRef);
|
1688
1699
|
}
|
1689
|
-
#line
|
1700
|
+
#line 1701 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1690
1701
|
break;
|
1691
1702
|
|
1692
1703
|
case 80:
|
1693
|
-
#line
|
1704
|
+
#line 593 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1694
1705
|
{
|
1695
1706
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)};
|
1696
1707
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cDefinitionTypeRef);
|
1697
1708
|
}
|
1698
|
-
#line
|
1709
|
+
#line 1710 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1699
1710
|
break;
|
1700
1711
|
|
1701
1712
|
case 81:
|
1702
|
-
#line
|
1713
|
+
#line 599 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1703
1714
|
{
|
1704
1715
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval)};
|
1705
1716
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cFieldRef);
|
1706
1717
|
}
|
1707
|
-
#line
|
1718
|
+
#line 1719 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1708
1719
|
break;
|
1709
1720
|
|
1710
1721
|
case 82:
|
1711
|
-
#line
|
1722
|
+
#line 605 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1712
1723
|
{
|
1713
1724
|
VALUE args[] = {(((yyGLRStackItem const *)yyvsp)[YYFILL (-4)].yystate.yysemantics.yysval), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval)};
|
1714
1725
|
((*yyvalp)) = rb_class_new_instance(sizeof(args)/sizeof(*args), args, cFieldTypeRef);
|
1715
1726
|
}
|
1716
|
-
#line
|
1727
|
+
#line 1728 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1717
1728
|
break;
|
1718
1729
|
|
1719
1730
|
case 83:
|
1720
|
-
#line
|
1731
|
+
#line 613 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1721
1732
|
{
|
1722
|
-
((*yyvalp)) =
|
1733
|
+
((*yyvalp)) = rb_ary_new();
|
1734
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1723
1735
|
}
|
1724
|
-
#line
|
1736
|
+
#line 1737 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1725
1737
|
break;
|
1726
1738
|
|
1727
1739
|
case 84:
|
1728
|
-
#line
|
1740
|
+
#line 619 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1729
1741
|
{
|
1730
|
-
((*yyvalp))
|
1731
|
-
rb_ary_unshift(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (-2)].yystate.yysemantics.yysval));
|
1742
|
+
rb_ary_push(((*yyvalp)), (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval));
|
1732
1743
|
}
|
1733
|
-
#line
|
1744
|
+
#line 1745 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1734
1745
|
break;
|
1735
1746
|
|
1736
1747
|
case 93:
|
1737
|
-
#line
|
1748
|
+
#line 648 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1738
1749
|
{
|
1739
|
-
((*yyvalp)) =
|
1750
|
+
((*yyvalp)) = rb_str_new2("i8");
|
1740
1751
|
}
|
1741
|
-
#line
|
1752
|
+
#line 1753 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1742
1753
|
break;
|
1743
1754
|
|
1744
1755
|
case 94:
|
1745
|
-
#line
|
1756
|
+
#line 653 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1746
1757
|
{
|
1747
|
-
((*yyvalp)) =
|
1758
|
+
((*yyvalp)) = rb_str_new2("i16");
|
1748
1759
|
}
|
1749
|
-
#line
|
1760
|
+
#line 1761 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1750
1761
|
break;
|
1751
1762
|
|
1752
1763
|
case 95:
|
1753
|
-
#line
|
1764
|
+
#line 658 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1754
1765
|
{
|
1755
|
-
((*yyvalp)) =
|
1766
|
+
((*yyvalp)) = rb_str_new2("i32");
|
1756
1767
|
}
|
1757
|
-
#line
|
1768
|
+
#line 1769 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1758
1769
|
break;
|
1759
1770
|
|
1760
1771
|
case 96:
|
1761
|
-
#line
|
1772
|
+
#line 663 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1762
1773
|
{
|
1763
|
-
((*yyvalp)) =
|
1774
|
+
((*yyvalp)) = rb_str_new2("i64");
|
1764
1775
|
}
|
1765
|
-
#line
|
1776
|
+
#line 1777 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1766
1777
|
break;
|
1767
1778
|
|
1768
1779
|
case 97:
|
1769
|
-
#line
|
1780
|
+
#line 668 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1770
1781
|
{
|
1771
|
-
((*yyvalp)) =
|
1782
|
+
((*yyvalp)) = rb_str_new2("u8");
|
1772
1783
|
}
|
1773
|
-
#line
|
1784
|
+
#line 1785 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1774
1785
|
break;
|
1775
1786
|
|
1776
1787
|
case 98:
|
1777
|
-
#line
|
1788
|
+
#line 673 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1778
1789
|
{
|
1779
|
-
((*yyvalp)) =
|
1790
|
+
((*yyvalp)) = rb_str_new2("u16");
|
1780
1791
|
}
|
1781
|
-
#line
|
1792
|
+
#line 1793 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1782
1793
|
break;
|
1783
1794
|
|
1784
1795
|
case 99:
|
1785
|
-
#line
|
1796
|
+
#line 678 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1786
1797
|
{
|
1787
|
-
((*yyvalp)) =
|
1798
|
+
((*yyvalp)) = rb_str_new2("u32");
|
1788
1799
|
}
|
1789
|
-
#line
|
1800
|
+
#line 1801 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1790
1801
|
break;
|
1791
1802
|
|
1792
1803
|
case 100:
|
1793
|
-
#line
|
1804
|
+
#line 683 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1794
1805
|
{
|
1795
|
-
((*yyvalp)) =
|
1806
|
+
((*yyvalp)) = rb_str_new2("u64");
|
1796
1807
|
}
|
1797
|
-
#line
|
1808
|
+
#line 1809 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1798
1809
|
break;
|
1799
1810
|
|
1800
1811
|
case 101:
|
1801
|
-
#line
|
1812
|
+
#line 688 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1802
1813
|
{
|
1803
|
-
((*yyvalp)) =
|
1814
|
+
((*yyvalp)) = rb_str_new2("f64");
|
1804
1815
|
}
|
1805
|
-
#line
|
1816
|
+
#line 1817 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1806
1817
|
break;
|
1807
1818
|
|
1808
1819
|
case 102:
|
1809
|
-
#line
|
1820
|
+
#line 693 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1810
1821
|
{
|
1811
|
-
((*yyvalp)) =
|
1822
|
+
((*yyvalp)) = rb_str_new2("decimal");
|
1812
1823
|
}
|
1813
|
-
#line
|
1824
|
+
#line 1825 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1814
1825
|
break;
|
1815
1826
|
|
1816
1827
|
case 103:
|
1817
|
-
#line
|
1828
|
+
#line 698 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1818
1829
|
{
|
1819
|
-
((*yyvalp)) =
|
1830
|
+
((*yyvalp)) = rb_str_new2("date");
|
1820
1831
|
}
|
1821
|
-
#line
|
1832
|
+
#line 1833 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1822
1833
|
break;
|
1823
1834
|
|
1824
1835
|
case 104:
|
1825
|
-
#line
|
1836
|
+
#line 703 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1826
1837
|
{
|
1827
|
-
((*yyvalp)) =
|
1838
|
+
((*yyvalp)) = rb_str_new2("timeOfDayMilli");
|
1828
1839
|
}
|
1829
|
-
#line
|
1840
|
+
#line 1841 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1830
1841
|
break;
|
1831
1842
|
|
1832
1843
|
case 105:
|
1833
|
-
#line
|
1844
|
+
#line 708 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1834
1845
|
{
|
1835
|
-
((*yyvalp)) =
|
1846
|
+
((*yyvalp)) = rb_str_new2("timeOfDayNano");
|
1836
1847
|
}
|
1837
|
-
#line
|
1848
|
+
#line 1849 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1838
1849
|
break;
|
1839
1850
|
|
1840
1851
|
case 106:
|
1841
|
-
#line
|
1852
|
+
#line 713 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1842
1853
|
{
|
1843
|
-
((*yyvalp)) =
|
1854
|
+
((*yyvalp)) = rb_str_new2("nanoTime");
|
1844
1855
|
}
|
1845
|
-
#line
|
1856
|
+
#line 1857 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1846
1857
|
break;
|
1847
1858
|
|
1848
1859
|
case 107:
|
1849
|
-
#line
|
1860
|
+
#line 718 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1850
1861
|
{
|
1851
|
-
((*yyvalp)) =
|
1862
|
+
((*yyvalp)) = rb_str_new2("milliTime");
|
1852
1863
|
}
|
1853
|
-
#line
|
1864
|
+
#line 1865 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1854
1865
|
break;
|
1855
1866
|
|
1856
1867
|
case 108:
|
1857
|
-
#line
|
1868
|
+
#line 723 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1858
1869
|
{
|
1859
|
-
((*yyvalp)) =
|
1870
|
+
((*yyvalp)) = rb_str_new2("boolean");
|
1860
1871
|
}
|
1861
|
-
#line
|
1872
|
+
#line 1873 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1862
1873
|
break;
|
1863
1874
|
|
1864
1875
|
case 109:
|
1865
|
-
#line
|
1876
|
+
#line 728 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1866
1877
|
{
|
1867
|
-
((*yyvalp)) =
|
1878
|
+
((*yyvalp)) = rb_str_new2("string");
|
1868
1879
|
}
|
1869
|
-
#line
|
1880
|
+
#line 1881 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1870
1881
|
break;
|
1871
1882
|
|
1872
1883
|
case 110:
|
1873
|
-
#line
|
1884
|
+
#line 733 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1874
1885
|
{
|
1875
|
-
((*yyvalp)) =
|
1886
|
+
((*yyvalp)) = rb_str_new2("binary");
|
1876
1887
|
}
|
1877
|
-
#line
|
1888
|
+
#line 1889 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1878
1889
|
break;
|
1879
1890
|
|
1880
1891
|
case 111:
|
1881
|
-
#line
|
1892
|
+
#line 738 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1882
1893
|
{
|
1883
|
-
((*yyvalp)) =
|
1894
|
+
((*yyvalp)) = rb_str_new2("fixed");
|
1884
1895
|
}
|
1885
|
-
#line
|
1896
|
+
#line 1897 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1886
1897
|
break;
|
1887
1898
|
|
1888
1899
|
case 112:
|
1889
|
-
#line
|
1900
|
+
#line 743 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1890
1901
|
{
|
1891
|
-
((*yyvalp)) =
|
1902
|
+
((*yyvalp)) = rb_str_new2("object");
|
1892
1903
|
}
|
1893
|
-
#line
|
1904
|
+
#line 1905 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1894
1905
|
break;
|
1895
1906
|
|
1896
1907
|
case 113:
|
1897
|
-
#line
|
1908
|
+
#line 748 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1898
1909
|
{
|
1899
|
-
((*yyvalp)) =
|
1910
|
+
((*yyvalp)) = rb_str_new2("namespace");
|
1900
1911
|
}
|
1901
|
-
#line
|
1912
|
+
#line 1913 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1902
1913
|
break;
|
1903
1914
|
|
1904
1915
|
case 114:
|
1905
|
-
#line
|
1916
|
+
#line 753 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1906
1917
|
{
|
1907
|
-
((*yyvalp)) =
|
1918
|
+
((*yyvalp)) = rb_str_new2("type");
|
1908
1919
|
}
|
1909
|
-
#line
|
1920
|
+
#line 1921 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1910
1921
|
break;
|
1911
1922
|
|
1912
1923
|
case 115:
|
1913
|
-
#line
|
1924
|
+
#line 758 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1914
1925
|
{
|
1915
|
-
((*yyvalp)) =
|
1926
|
+
((*yyvalp)) = rb_str_new2("schema");
|
1916
1927
|
}
|
1917
|
-
#line
|
1928
|
+
#line 1929 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1918
1929
|
break;
|
1919
1930
|
|
1920
1931
|
case 119:
|
1921
|
-
#line
|
1932
|
+
#line 775 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1922
1933
|
{
|
1923
1934
|
((*yyvalp)) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval);
|
1924
1935
|
}
|
1925
|
-
#line
|
1936
|
+
#line 1937 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1926
1937
|
break;
|
1927
1938
|
|
1928
1939
|
case 125:
|
1929
|
-
#line
|
1940
|
+
#line 800 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:783 */
|
1930
1941
|
{
|
1931
1942
|
((*yyvalp)) = Qnil;
|
1932
1943
|
}
|
1933
|
-
#line
|
1944
|
+
#line 1945 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1934
1945
|
break;
|
1935
1946
|
|
1936
1947
|
|
1937
|
-
#line
|
1948
|
+
#line 1949 "ext/slow_blink/ext_schema_parser/parser.c" /* glr.c:783 */
|
1938
1949
|
default: break;
|
1939
1950
|
}
|
1940
1951
|
|
@@ -2032,7 +2043,7 @@ yylhsNonterm (yyRuleNum yyrule)
|
|
2032
2043
|
}
|
2033
2044
|
|
2034
2045
|
#define yypact_value_is_default(Yystate) \
|
2035
|
-
(!!((Yystate) == (-
|
2046
|
+
(!!((Yystate) == (-89)))
|
2036
2047
|
|
2037
2048
|
/** True iff LR state YYSTATE has only a default reduction (regardless
|
2038
2049
|
* of token). */
|
@@ -3707,7 +3718,7 @@ yypdumpstack (yyGLRStack* yystackp)
|
|
3707
3718
|
|
3708
3719
|
|
3709
3720
|
|
3710
|
-
#line
|
3721
|
+
#line 805 "etc/slow_blink/ext_schema_parser/parser.y" /* glr.c:2551 */
|
3711
3722
|
|
3712
3723
|
|
3713
3724
|
/* functions **********************************************************/
|
@@ -3717,18 +3728,17 @@ void Init_ext_schema_parser(void)
|
|
3717
3728
|
{
|
3718
3729
|
cSlowBlink = rb_define_module("SlowBlink");
|
3719
3730
|
|
3720
|
-
|
3721
|
-
|
3722
|
-
cSchema = rb_const_get(cSlowBlink, rb_intern("Schema"));
|
3731
|
+
cNamespace = rb_const_get(cSlowBlink, rb_intern("Namespace"));
|
3723
3732
|
cGroup = rb_const_get(cSlowBlink, rb_intern("Group"));
|
3724
3733
|
cField = rb_const_get(cSlowBlink, rb_intern("Field"));
|
3725
|
-
cDefinition = rb_const_get(cSlowBlink, rb_intern("
|
3734
|
+
cDefinition = rb_const_get(cSlowBlink, rb_intern("Definition"));
|
3726
3735
|
|
3736
|
+
cNameWithID = rb_const_get(cSlowBlink, rb_intern("NameWithID"));
|
3737
|
+
|
3727
3738
|
cAnnotation = rb_const_get(cSlowBlink, rb_intern("Annotation"));
|
3728
3739
|
cIncrementalAnnotation = rb_const_get(cSlowBlink, rb_intern("IncrementalAnnotation"));
|
3729
3740
|
|
3730
|
-
|
3731
|
-
cEnumeration = rb_const_get(cSlowBlink, rb_intern("Enumeration"));
|
3741
|
+
cENUMERATION = rb_const_get(cSlowBlink, rb_intern("ENUMERATION"));
|
3732
3742
|
cSym = rb_const_get(cSlowBlink, rb_intern("Sym"));
|
3733
3743
|
|
3734
3744
|
cU8 = rb_const_get(cSlowBlink, rb_intern("U8"));
|
@@ -3739,7 +3749,7 @@ void Init_ext_schema_parser(void)
|
|
3739
3749
|
cI16 = rb_const_get(cSlowBlink, rb_intern("I16"));
|
3740
3750
|
cI32 = rb_const_get(cSlowBlink, rb_intern("I32"));
|
3741
3751
|
cI64 = rb_const_get(cSlowBlink, rb_intern("I64"));
|
3742
|
-
|
3752
|
+
cFLOATING_POINT = rb_const_get(cSlowBlink, rb_intern("FLOATING_POINT"));
|
3743
3753
|
cDECIMAL = rb_const_get(cSlowBlink, rb_intern("DECIMAL"));
|
3744
3754
|
cFIXED = rb_const_get(cSlowBlink, rb_intern("FIXED"));
|
3745
3755
|
cBINARY = rb_const_get(cSlowBlink, rb_intern("BINARY"));
|
@@ -3760,7 +3770,7 @@ void Init_ext_schema_parser(void)
|
|
3760
3770
|
cFieldRef = rb_const_get(cSlowBlink, rb_intern("FieldRef"));
|
3761
3771
|
cFieldTypeRef = rb_const_get(cSlowBlink, rb_intern("FieldTypeRef"));
|
3762
3772
|
|
3763
|
-
rb_define_singleton_method(
|
3773
|
+
rb_define_singleton_method(cNamespace, "parse", parseFileBuffer, -1);
|
3764
3774
|
}
|
3765
3775
|
|
3766
3776
|
void yyerror(YYLTYPE *locp, yyscan_t scanner, VALUE filename, VALUE *tree, char const *msg, ... )
|
@@ -3770,8 +3780,15 @@ void yyerror(YYLTYPE *locp, yyscan_t scanner, VALUE filename, VALUE *tree, char
|
|
3770
3780
|
char error[500];
|
3771
3781
|
|
3772
3782
|
int hdrLen;
|
3783
|
+
|
3784
|
+
if(filename != Qnil){
|
3773
3785
|
|
3774
|
-
|
3786
|
+
hdrLen = snprintf(error, sizeof(error), "%s:%i:%i: error: ", (const char *)RSTRING_PTR(filename), locp->first_line, locp->first_column);
|
3787
|
+
}
|
3788
|
+
else{
|
3789
|
+
|
3790
|
+
hdrLen = snprintf(error, sizeof(error), "%i:%i: error: ", locp->first_line, locp->first_column);
|
3791
|
+
}
|
3775
3792
|
|
3776
3793
|
if((hdrLen > 0) && (hdrLen <= sizeof(error))){
|
3777
3794
|
|
@@ -3828,21 +3845,17 @@ static VALUE parseFileBuffer(int argc, VALUE* argv, VALUE self)
|
|
3828
3845
|
|
3829
3846
|
static VALUE newLocation(VALUE filename, const YYLTYPE *location)
|
3830
3847
|
{
|
3831
|
-
char msg[500];
|
3832
|
-
int
|
3848
|
+
char msg[500];
|
3849
|
+
int len = 0;
|
3833
3850
|
|
3834
3851
|
if(filename != Qnil){
|
3835
3852
|
|
3836
|
-
|
3837
|
-
memcpy(msg, RSTRING_PTR(filename), RSTRING_LEN(filename));
|
3838
|
-
pos = RSTRING_LEN(filename);
|
3839
|
-
}
|
3840
|
-
else{
|
3841
|
-
return rb_str_new("...", strlen("..."));
|
3842
|
-
}
|
3853
|
+
len = snprintf(msg, sizeof(msg), "%s:%i:%i", (const char *)RSTRING_PTR(filename), location->first_line, location->first_column);
|
3843
3854
|
}
|
3844
|
-
|
3845
|
-
int len = snprintf(&msg[pos], sizeof(msg) - pos, ":%i:%i:", location->first_line, location->first_column);
|
3855
|
+
else{
|
3846
3856
|
|
3857
|
+
len = snprintf(msg, sizeof(msg), "%i:%i", location->first_line, location->first_column);
|
3858
|
+
}
|
3859
|
+
|
3847
3860
|
return rb_str_new(msg, len);
|
3848
3861
|
}
|