slow_blink 0.0.6 → 0.0.7
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_schema_parser/lexer.c +2793 -839
- data/ext/slow_blink/ext_schema_parser/lexer.h +14 -137
- data/ext/slow_blink/ext_schema_parser/parser.c +616 -670
- data/ext/slow_blink/ext_schema_parser/parser.h +6 -4
- data/ext/slow_blink/message/ext_compact_encoder/blink_compact.c +642 -0
- data/ext/slow_blink/message/ext_compact_encoder/blink_compact.h +411 -0
- data/ext/slow_blink/message/ext_compact_encoder/blink_debug.h +46 -0
- data/ext/slow_blink/message/ext_compact_encoder/blink_stream.c +314 -0
- data/ext/slow_blink/message/ext_compact_encoder/blink_stream.h +185 -0
- data/ext/slow_blink/message/ext_compact_encoder/ext_compact_encoder.c +382 -269
- data/lib/slow_blink/definition.rb +18 -53
- data/lib/slow_blink/dynamic_group.rb +8 -0
- data/lib/slow_blink/enum.rb +101 -0
- data/lib/slow_blink/field.rb +63 -33
- data/lib/slow_blink/generate_c/model.rb +89 -0
- data/lib/slow_blink/group.rb +119 -100
- data/lib/slow_blink/message/binary.rb +3 -4
- data/lib/slow_blink/message/boolean.rb +3 -4
- data/lib/slow_blink/message/date.rb +3 -4
- data/lib/slow_blink/message/decimal.rb +3 -5
- data/lib/slow_blink/message/{enumeration.rb → enum.rb} +17 -17
- data/lib/slow_blink/message/field.rb +77 -27
- data/lib/slow_blink/message/fixed.rb +5 -21
- data/lib/slow_blink/message/floating_point.rb +3 -4
- data/lib/slow_blink/message/group.rb +90 -161
- data/lib/slow_blink/message/integer.rb +24 -32
- data/lib/slow_blink/message/model.rb +50 -110
- data/lib/slow_blink/message/string.rb +3 -4
- data/lib/slow_blink/message/time.rb +5 -5
- data/lib/slow_blink/message/time_of_day.rb +5 -12
- data/lib/slow_blink/ref.rb +22 -71
- data/lib/slow_blink/schema.rb +64 -85
- data/lib/slow_blink/schema_buffer.rb +1 -4
- data/lib/slow_blink/static_group.rb +37 -0
- data/lib/slow_blink/string.rb +4 -5
- data/lib/slow_blink/sym.rb +8 -28
- data/lib/slow_blink/type.rb +10 -19
- data/lib/slow_blink/version.rb +1 -1
- data/lib/slow_blink.rb +1 -0
- data/test/tc_compact_encoder.rb +114 -147
- data/test/tc_inputs.rb +2 -4
- data/test/tc_model_string.rb +29 -0
- data/test/tc_schema_new.rb +212 -0
- metadata +17 -26
- data/ext/slow_blink/ext_schema_parser/common.h +0 -27
- data/ext/slow_blink/message/ext_compact_encoder/compact_encoder.c +0 -258
- data/ext/slow_blink/message/ext_compact_encoder/compact_encoder.h +0 -92
- data/lib/slow_blink/annotatable.rb +0 -48
- data/lib/slow_blink/annotation.rb +0 -47
- data/lib/slow_blink/enumeration.rb +0 -90
- data/lib/slow_blink/incremental_annotation.rb +0 -151
- data/lib/slow_blink/log.rb +0 -51
- data/lib/slow_blink/message/sequence.rb +0 -98
- data/lib/slow_blink/name_with_id.rb +0 -49
- data/lib/slow_blink/namespace.rb +0 -143
- data/lib/slow_blink/sequence.rb +0 -57
- data/test/tc_field.rb +0 -94
- data/test/tc_group.rb +0 -114
- data/test/tc_incr_annote.rb +0 -22
- data/test/tc_namespace.rb +0 -8
- data/test/tc_types.rb +0 -218
@@ -3,55 +3,31 @@
|
|
3
3
|
#define yyIN_HEADER 1
|
4
4
|
|
5
5
|
#line 6 "ext/slow_blink/ext_schema_parser/lexer.h"
|
6
|
-
#line 36 "etc/slow_blink/ext_schema_parser/parser.l"
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
#line 14 "ext/slow_blink/ext_schema_parser/lexer.h"
|
7
|
+
#line 8 "ext/slow_blink/ext_schema_parser/lexer.h"
|
14
8
|
|
15
9
|
#define YY_INT_ALIGNED short int
|
16
10
|
|
17
11
|
/* A lexical scanner generated by flex */
|
18
12
|
|
19
|
-
/* %not-for-header */
|
20
|
-
|
21
13
|
#define FLEX_SCANNER
|
22
14
|
#define YY_FLEX_MAJOR_VERSION 2
|
23
|
-
#define YY_FLEX_MINOR_VERSION
|
24
|
-
#define YY_FLEX_SUBMINOR_VERSION
|
15
|
+
#define YY_FLEX_MINOR_VERSION 6
|
16
|
+
#define YY_FLEX_SUBMINOR_VERSION 0
|
25
17
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
26
18
|
#define FLEX_BETA
|
27
19
|
#endif
|
28
20
|
|
29
|
-
/* %if-c++-only */
|
30
|
-
/* %endif */
|
31
|
-
|
32
|
-
/* %if-c-only */
|
33
|
-
|
34
|
-
/* %endif */
|
35
|
-
|
36
|
-
/* %if-c-only */
|
37
|
-
|
38
|
-
/* %endif */
|
39
|
-
|
40
21
|
/* First, we deal with platform-specific or compiler-specific issues. */
|
41
22
|
|
42
23
|
/* begin standard C headers. */
|
43
|
-
/* %if-c-only */
|
44
24
|
#include <stdio.h>
|
45
25
|
#include <string.h>
|
46
26
|
#include <errno.h>
|
47
27
|
#include <stdlib.h>
|
48
|
-
/* %endif */
|
49
28
|
|
50
|
-
/* %if-tables-serialization */
|
51
|
-
/* %endif */
|
52
29
|
/* end standard C headers. */
|
53
30
|
|
54
|
-
/* %if-c-or-c++ */
|
55
31
|
/* flex integer type definitions */
|
56
32
|
|
57
33
|
#ifndef FLEXINT_H
|
@@ -116,11 +92,6 @@ typedef unsigned int flex_uint32_t;
|
|
116
92
|
|
117
93
|
#endif /* ! FLEXINT_H */
|
118
94
|
|
119
|
-
/* %endif */
|
120
|
-
|
121
|
-
/* %if-c++-only */
|
122
|
-
/* %endif */
|
123
|
-
|
124
95
|
#ifdef __cplusplus
|
125
96
|
|
126
97
|
/* The "const" storage-class-modifier is valid. */
|
@@ -142,12 +113,6 @@ typedef unsigned int flex_uint32_t;
|
|
142
113
|
#define yyconst
|
143
114
|
#endif
|
144
115
|
|
145
|
-
/* %not-for-header */
|
146
|
-
|
147
|
-
/* %not-for-header */
|
148
|
-
|
149
|
-
/* %if-reentrant */
|
150
|
-
|
151
116
|
/* An opaque pointer. */
|
152
117
|
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
153
118
|
#define YY_TYPEDEF_YY_SCANNER_T
|
@@ -165,11 +130,6 @@ typedef void* yyscan_t;
|
|
165
130
|
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
|
166
131
|
#define yy_flex_debug yyg->yy_flex_debug_r
|
167
132
|
|
168
|
-
/* %endif */
|
169
|
-
|
170
|
-
/* %if-not-reentrant */
|
171
|
-
/* %endif */
|
172
|
-
|
173
133
|
/* Size of default input buffer. */
|
174
134
|
#ifndef YY_BUF_SIZE
|
175
135
|
#ifdef __ia64__
|
@@ -188,14 +148,6 @@ typedef void* yyscan_t;
|
|
188
148
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
189
149
|
#endif
|
190
150
|
|
191
|
-
/* %if-not-reentrant */
|
192
|
-
/* %endif */
|
193
|
-
|
194
|
-
/* %if-c-only */
|
195
|
-
/* %if-not-reentrant */
|
196
|
-
/* %endif */
|
197
|
-
/* %endif */
|
198
|
-
|
199
151
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
200
152
|
#define YY_TYPEDEF_YY_SIZE_T
|
201
153
|
typedef size_t yy_size_t;
|
@@ -205,12 +157,7 @@ typedef size_t yy_size_t;
|
|
205
157
|
#define YY_STRUCT_YY_BUFFER_STATE
|
206
158
|
struct yy_buffer_state
|
207
159
|
{
|
208
|
-
/* %if-c-only */
|
209
160
|
FILE *yy_input_file;
|
210
|
-
/* %endif */
|
211
|
-
|
212
|
-
/* %if-c++-only */
|
213
|
-
/* %endif */
|
214
161
|
|
215
162
|
char *yy_ch_buf; /* input buffer */
|
216
163
|
char *yy_buf_pos; /* current position in input buffer */
|
@@ -257,18 +204,6 @@ struct yy_buffer_state
|
|
257
204
|
};
|
258
205
|
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
|
259
206
|
|
260
|
-
/* %if-c-only Standard (non-C++) definition */
|
261
|
-
/* %not-for-header */
|
262
|
-
|
263
|
-
/* %endif */
|
264
|
-
|
265
|
-
/* %if-c-only Standard (non-C++) definition */
|
266
|
-
|
267
|
-
/* %if-not-reentrant */
|
268
|
-
/* %not-for-header */
|
269
|
-
|
270
|
-
/* %endif */
|
271
|
-
|
272
207
|
void yyrestart (FILE *input_file ,yyscan_t yyscanner );
|
273
208
|
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
|
274
209
|
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
|
@@ -279,32 +214,21 @@ void yypop_buffer_state (yyscan_t yyscanner );
|
|
279
214
|
|
280
215
|
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
|
281
216
|
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
|
282
|
-
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,
|
283
|
-
|
284
|
-
/* %endif */
|
217
|
+
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
|
285
218
|
|
286
219
|
void *yyalloc (yy_size_t ,yyscan_t yyscanner );
|
287
220
|
void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
|
288
221
|
void yyfree (void * ,yyscan_t yyscanner );
|
289
222
|
|
290
|
-
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
|
291
223
|
/* Begin user sect3 */
|
292
224
|
|
293
|
-
#define yywrap(
|
225
|
+
#define yywrap(yyscanner) (/*CONSTCOND*/1)
|
294
226
|
#define YY_SKIP_YYWRAP
|
295
227
|
|
296
|
-
#define FLEX_DEBUG
|
297
|
-
|
298
228
|
#define yytext_ptr yytext_r
|
299
229
|
|
300
|
-
/* %if-c-only Standard (non-C++) definition */
|
301
|
-
|
302
|
-
/* %endif */
|
303
|
-
|
304
230
|
#ifdef YY_HEADER_EXPORT_START_CONDITIONS
|
305
231
|
#define INITIAL 0
|
306
|
-
#define LITERAL_C 1
|
307
|
-
#define LITERAL_A 2
|
308
232
|
|
309
233
|
#endif
|
310
234
|
|
@@ -313,34 +237,17 @@ void yyfree (void * ,yyscan_t yyscanner );
|
|
313
237
|
* down here because we want the user's section 1 to have been scanned first.
|
314
238
|
* The user has a chance to override it with an option.
|
315
239
|
*/
|
316
|
-
/* %if-c-only */
|
317
240
|
#include <unistd.h>
|
318
|
-
/* %endif */
|
319
|
-
/* %if-c++-only */
|
320
|
-
/* %endif */
|
321
241
|
#endif
|
322
242
|
|
323
243
|
#ifndef YY_EXTRA_TYPE
|
324
244
|
#define YY_EXTRA_TYPE void *
|
325
245
|
#endif
|
326
246
|
|
327
|
-
/* %if-c-only Reentrant structure and macros (non-C++). */
|
328
|
-
/* %if-reentrant */
|
329
|
-
|
330
|
-
/* %if-c-only */
|
331
|
-
|
332
|
-
/* %endif */
|
333
|
-
|
334
|
-
/* %if-reentrant */
|
335
|
-
|
336
247
|
int yylex_init (yyscan_t* scanner);
|
337
248
|
|
338
249
|
int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
|
339
250
|
|
340
|
-
/* %endif */
|
341
|
-
|
342
|
-
/* %endif End reentrant structures and macros. */
|
343
|
-
|
344
251
|
/* Accessor methods to globals.
|
345
252
|
These are made visible to non-reentrant scanners for convenience. */
|
346
253
|
|
@@ -356,21 +263,23 @@ void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
|
|
356
263
|
|
357
264
|
FILE *yyget_in (yyscan_t yyscanner );
|
358
265
|
|
359
|
-
void yyset_in (FILE *
|
266
|
+
void yyset_in (FILE * _in_str ,yyscan_t yyscanner );
|
360
267
|
|
361
268
|
FILE *yyget_out (yyscan_t yyscanner );
|
362
269
|
|
363
|
-
void yyset_out (FILE *
|
270
|
+
void yyset_out (FILE * _out_str ,yyscan_t yyscanner );
|
364
271
|
|
365
|
-
|
272
|
+
yy_size_t yyget_leng (yyscan_t yyscanner );
|
366
273
|
|
367
274
|
char *yyget_text (yyscan_t yyscanner );
|
368
275
|
|
369
276
|
int yyget_lineno (yyscan_t yyscanner );
|
370
277
|
|
371
|
-
void yyset_lineno (int
|
278
|
+
void yyset_lineno (int _line_number ,yyscan_t yyscanner );
|
279
|
+
|
280
|
+
int yyget_column (yyscan_t yyscanner );
|
372
281
|
|
373
|
-
|
282
|
+
void yyset_column (int _column_no ,yyscan_t yyscanner );
|
374
283
|
|
375
284
|
YYSTYPE * yyget_lval (yyscan_t yyscanner );
|
376
285
|
|
@@ -380,8 +289,6 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
|
|
380
289
|
|
381
290
|
void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
|
382
291
|
|
383
|
-
/* %endif */
|
384
|
-
|
385
292
|
/* Macros after this point can all be overridden by user definitions in
|
386
293
|
* section 1.
|
387
294
|
*/
|
@@ -394,10 +301,6 @@ extern int yywrap (yyscan_t yyscanner );
|
|
394
301
|
#endif
|
395
302
|
#endif
|
396
303
|
|
397
|
-
/* %not-for-header */
|
398
|
-
|
399
|
-
/* %endif */
|
400
|
-
|
401
304
|
#ifndef yytext_ptr
|
402
305
|
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
|
403
306
|
#endif
|
@@ -407,16 +310,9 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
|
|
407
310
|
#endif
|
408
311
|
|
409
312
|
#ifndef YY_NO_INPUT
|
410
|
-
/* %if-c-only Standard (non-C++) definition */
|
411
|
-
/* %not-for-header */
|
412
313
|
|
413
|
-
/* %endif */
|
414
314
|
#endif
|
415
315
|
|
416
|
-
/* %if-c-only */
|
417
|
-
|
418
|
-
/* %endif */
|
419
|
-
|
420
316
|
/* Amount of stuff to slurp up with each read. */
|
421
317
|
#ifndef YY_READ_BUF_SIZE
|
422
318
|
#ifdef __ia64__
|
@@ -432,40 +328,21 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
|
|
432
328
|
#define YY_START_STACK_INCR 25
|
433
329
|
#endif
|
434
330
|
|
435
|
-
/* %if-tables-serialization structures and prototypes */
|
436
|
-
/* %not-for-header */
|
437
|
-
|
438
|
-
/* %not-for-header */
|
439
|
-
|
440
331
|
/* Default declaration of generated scanner - a define so the user can
|
441
332
|
* easily add parameters.
|
442
333
|
*/
|
443
334
|
#ifndef YY_DECL
|
444
335
|
#define YY_DECL_IS_OURS 1
|
445
|
-
/* %if-c-only Standard (non-C++) definition */
|
446
336
|
|
447
337
|
extern int yylex \
|
448
338
|
(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
|
449
339
|
|
450
340
|
#define YY_DECL int yylex \
|
451
341
|
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
452
|
-
/* %endif */
|
453
|
-
/* %if-c++-only C++ definition */
|
454
|
-
/* %endif */
|
455
342
|
#endif /* !YY_DECL */
|
456
343
|
|
457
|
-
/* %not-for-header */
|
458
|
-
|
459
|
-
/* %if-c++-only */
|
460
|
-
/* %not-for-header */
|
461
|
-
|
462
|
-
/* %endif */
|
463
|
-
|
464
344
|
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
465
345
|
|
466
|
-
/* %if-c-only */
|
467
|
-
/* %not-for-header */
|
468
|
-
|
469
346
|
#undef YY_NEW_FILE
|
470
347
|
#undef YY_FLUSH_BUFFER
|
471
348
|
#undef yy_set_bol
|
@@ -478,9 +355,9 @@ extern int yylex \
|
|
478
355
|
#undef YY_DECL
|
479
356
|
#endif
|
480
357
|
|
481
|
-
#line
|
358
|
+
#line 86 "etc/slow_blink/ext_schema_parser/parser.l"
|
482
359
|
|
483
360
|
|
484
|
-
#line
|
361
|
+
#line 362 "ext/slow_blink/ext_schema_parser/lexer.h"
|
485
362
|
#undef yyIN_HEADER
|
486
363
|
#endif /* yyHEADER_H */
|