ndtypes 0.2.0dev5 → 0.2.0dev6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +12 -0
- data/Rakefile +8 -0
- data/ext/ruby_ndtypes/GPATH +0 -0
- data/ext/ruby_ndtypes/GRTAGS +0 -0
- data/ext/ruby_ndtypes/GTAGS +0 -0
- data/ext/ruby_ndtypes/extconf.rb +1 -1
- data/ext/ruby_ndtypes/include/ndtypes.h +231 -122
- data/ext/ruby_ndtypes/include/ruby_ndtypes.h +1 -1
- data/ext/ruby_ndtypes/lib/libndtypes.a +0 -0
- data/ext/ruby_ndtypes/lib/libndtypes.so.0.2.0dev3 +0 -0
- data/ext/ruby_ndtypes/ndtypes/Makefile +87 -0
- data/ext/ruby_ndtypes/ndtypes/config.h +68 -0
- data/ext/ruby_ndtypes/ndtypes/config.log +477 -0
- data/ext/ruby_ndtypes/ndtypes/config.status +1027 -0
- data/ext/ruby_ndtypes/ndtypes/doc/_static/style.css +7 -0
- data/ext/ruby_ndtypes/ndtypes/doc/_templates/layout.html +2 -0
- data/ext/ruby_ndtypes/ndtypes/doc/conf.py +40 -4
- data/ext/ruby_ndtypes/ndtypes/doc/images/xndlogo.png +0 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst +1 -1
- data/ext/ruby_ndtypes/ndtypes/doc/requirements.txt +2 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile +287 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in +20 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc +22 -3
- data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile +73 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c +246 -229
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h +15 -11
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y +38 -28
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c +91 -91
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l +4 -3
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c +8 -7
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c +2 -2
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/context.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.c +263 -182
- data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/encodings.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.c +67 -7
- data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c +1112 -1000
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h +69 -58
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y +150 -99
- data/ext/ruby_ndtypes/ndtypes/libndtypes/io.c +185 -15
- data/ext/ruby_ndtypes/ndtypes/libndtypes/io.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c +301 -276
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l +9 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.a +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so +1 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so.0 +1 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so.0.2.0dev3 +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/match.c +729 -228
- data/ext/ruby_ndtypes/ndtypes/libndtypes/match.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c +768 -403
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h +1002 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in +231 -122
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c +176 -84
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h +26 -14
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.c +57 -35
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/primitive.c +420 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/primitive.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.c +8 -8
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile +48 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c +200 -116
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c +46 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c +58 -27
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h +1 -1
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c +3 -5
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h +12 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile +55 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in +8 -8
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc +5 -5
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c +274 -172
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h +24 -4
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c +2 -2
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c +14 -14
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c +32 -30
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c +37 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c +36 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c +16 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c +5 -5
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c +706 -253
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_unify.c +132 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/unify.c +703 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/unify.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/util.c +335 -127
- data/ext/ruby_ndtypes/ndtypes/libndtypes/util.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/values.c +2 -2
- data/ext/ruby_ndtypes/ndtypes/libndtypes/values.o +0 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py +88 -71
- data/ext/ruby_ndtypes/ndtypes/python/ndt_support.py +0 -1
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py +10 -13
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c +395 -314
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.a +0 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so +1 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so.0 +1 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so.0.2.0dev3 +0 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/ndtypes.h +1002 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h +15 -33
- data/ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py +340 -132
- data/ext/ruby_ndtypes/ndtypes/setup.py +11 -2
- data/ext/ruby_ndtypes/ruby_ndtypes.c +364 -241
- data/ext/ruby_ndtypes/ruby_ndtypes.h +1 -1
- data/ext/ruby_ndtypes/ruby_ndtypes_internal.h +0 -1
- data/lib/ndtypes.rb +11 -0
- data/lib/ndtypes/version.rb +2 -2
- data/lib/ruby_ndtypes.so +0 -0
- data/ndtypes.gemspec +3 -0
- data/spec/ndtypes_spec.rb +6 -0
- metadata +98 -4
- data/ext/ruby_ndtypes/gc_guard.c +0 -36
- data/ext/ruby_ndtypes/gc_guard.h +0 -12
|
@@ -58,6 +58,7 @@ ndt_type_keyword(const ndt_t *t)
|
|
|
58
58
|
case FixedDim: return "fixed";
|
|
59
59
|
case VarDim: return "var";
|
|
60
60
|
|
|
61
|
+
case Array: return "array";
|
|
61
62
|
case Ref: return "ref";
|
|
62
63
|
|
|
63
64
|
case ScalarKind: return "ScalarKind";
|
|
@@ -88,18 +89,20 @@ ndt_type_keyword(const ndt_t *t)
|
|
|
88
89
|
case Uint64: return "uint64";
|
|
89
90
|
|
|
90
91
|
case FloatKind: return "FloatKind";
|
|
92
|
+
case BFloat16: return "bfloat16";
|
|
91
93
|
case Float16: return "float16";
|
|
92
94
|
case Float32: return "float32";
|
|
93
95
|
case Float64: return "float64";
|
|
94
96
|
|
|
95
97
|
case ComplexKind: return "ComplexKind";
|
|
98
|
+
case BComplex32: return "bcomplex32";
|
|
96
99
|
case Complex32: return "complex32";
|
|
97
100
|
case Complex64: return "complex64";
|
|
98
101
|
case Complex128: return "complex128";
|
|
99
102
|
|
|
100
103
|
case Module: case Function:
|
|
101
|
-
case SymbolicDim: case EllipsisDim:
|
|
102
|
-
case Tuple: case Record:
|
|
104
|
+
case VarDimElem: case SymbolicDim: case EllipsisDim:
|
|
105
|
+
case Tuple: case Record: case Union:
|
|
103
106
|
case Nominal: case Constr:
|
|
104
107
|
case Typevar:
|
|
105
108
|
return "not a keyword";
|
|
@@ -121,11 +124,14 @@ ndt_type_name(const ndt_t *t)
|
|
|
121
124
|
|
|
122
125
|
case FixedDim: return "FixedDim";
|
|
123
126
|
case VarDim: return "VarDim";
|
|
127
|
+
case VarDimElem: return "VarDimElem";
|
|
124
128
|
case SymbolicDim: return "SymbolicDim";
|
|
125
129
|
case EllipsisDim: return "EllipsisDim";
|
|
126
130
|
|
|
131
|
+
case Array: return "Array";
|
|
127
132
|
case Tuple: return "Tuple";
|
|
128
133
|
case Record: return "Record";
|
|
134
|
+
case Union: return "Union";
|
|
129
135
|
case Ref: return "Ref";
|
|
130
136
|
case Constr: return "Constr";
|
|
131
137
|
case Nominal: return "Nominal";
|
|
@@ -158,11 +164,13 @@ ndt_type_name(const ndt_t *t)
|
|
|
158
164
|
case Uint64: return "Uint64";
|
|
159
165
|
|
|
160
166
|
case FloatKind: return "FloatKind";
|
|
167
|
+
case BFloat16: return "BFloat16";
|
|
161
168
|
case Float16: return "Float16";
|
|
162
169
|
case Float32: return "Float32";
|
|
163
170
|
case Float64: return "Float64";
|
|
164
171
|
|
|
165
172
|
case ComplexKind: return "ComplexKind";
|
|
173
|
+
case BComplex32: return "BComplex32";
|
|
166
174
|
case Complex32: return "Complex32";
|
|
167
175
|
case Complex64: return "Complex64";
|
|
168
176
|
case Complex128: return "Complex128";
|
|
@@ -385,6 +393,39 @@ record_fields(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
|
385
393
|
return 0;
|
|
386
394
|
}
|
|
387
395
|
|
|
396
|
+
static int
|
|
397
|
+
union_fields(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
398
|
+
{
|
|
399
|
+
int64_t i;
|
|
400
|
+
int n;
|
|
401
|
+
|
|
402
|
+
assert(t->tag == Union);
|
|
403
|
+
|
|
404
|
+
for (i = 0; i < t->Union.ntags; i++) {
|
|
405
|
+
if (i >= 1) {
|
|
406
|
+
if (d >= 0) {
|
|
407
|
+
n = ndt_snprintf(ctx, buf, "|\n");
|
|
408
|
+
if (n < 0) return -1;
|
|
409
|
+
|
|
410
|
+
n = indent(ctx, buf, d);
|
|
411
|
+
if (n < 0) return -1;
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
n = ndt_snprintf(ctx, buf, " | ");
|
|
415
|
+
if (n < 0) return -1;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
n = ndt_snprintf(ctx, buf, "%s of ", t->Union.tags[i]);
|
|
420
|
+
if (n < 0) return -1;
|
|
421
|
+
|
|
422
|
+
n = datashape(buf, t->Union.types[i], d, ctx);
|
|
423
|
+
if (n < 0) return -1;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
return 0;
|
|
427
|
+
}
|
|
428
|
+
|
|
388
429
|
static int
|
|
389
430
|
variadic_flag(buf_t *buf, enum ndt_variadic flag, ndt_context_t *ctx)
|
|
390
431
|
{
|
|
@@ -440,7 +481,7 @@ value(buf_t *buf, const ndt_value_t *mem, ndt_context_t *ctx)
|
|
|
440
481
|
}
|
|
441
482
|
|
|
442
483
|
static int
|
|
443
|
-
categorical(buf_t *buf, ndt_value_t *mem, int64_t ntypes, ndt_context_t *ctx)
|
|
484
|
+
categorical(buf_t *buf, const ndt_value_t *mem, int64_t ntypes, ndt_context_t *ctx)
|
|
444
485
|
{
|
|
445
486
|
int64_t i;
|
|
446
487
|
int n;
|
|
@@ -540,6 +581,10 @@ datashape(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
|
540
581
|
return datashape(buf, t->VarDim.type, d, ctx);
|
|
541
582
|
}
|
|
542
583
|
|
|
584
|
+
case VarDimElem: {
|
|
585
|
+
return datashape(buf, t->VarDimElem.type, d, ctx);
|
|
586
|
+
}
|
|
587
|
+
|
|
543
588
|
case SymbolicDim: {
|
|
544
589
|
n = ndt_snprintf(ctx, buf, "%s", t->SymbolicDim.tag==RequireC ? "C[" : "");
|
|
545
590
|
if (n < 0) return -1;
|
|
@@ -563,8 +608,17 @@ datashape(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
|
563
608
|
n = ndt_snprintf(ctx, buf, "%s", t->EllipsisDim.tag==RequireF ? "F[" : "");
|
|
564
609
|
if (n < 0) return -1;
|
|
565
610
|
|
|
566
|
-
|
|
567
|
-
|
|
611
|
+
if (t->EllipsisDim.name) {
|
|
612
|
+
if (strcmp(t->EllipsisDim.name, "array") == 0) {
|
|
613
|
+
n = ndt_snprintf(ctx, buf, "array... of ");
|
|
614
|
+
}
|
|
615
|
+
else {
|
|
616
|
+
n = ndt_snprintf(ctx, buf, "%s... * ", t->EllipsisDim.name);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
n = ndt_snprintf(ctx, buf, "... * ");
|
|
621
|
+
}
|
|
568
622
|
if (n < 0) return -1;
|
|
569
623
|
|
|
570
624
|
n = datashape(buf, t->EllipsisDim.type, d, ctx);
|
|
@@ -573,6 +627,13 @@ datashape(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
|
573
627
|
return ndt_snprintf(ctx, buf, "%s", t->EllipsisDim.tag==RequireNA ? "" : "]");
|
|
574
628
|
}
|
|
575
629
|
|
|
630
|
+
case Array: {
|
|
631
|
+
n = ndt_snprintf(ctx, buf, "array of ");
|
|
632
|
+
if (n < 0) return -1;
|
|
633
|
+
|
|
634
|
+
return datashape(buf, t->Array.type, d, ctx);
|
|
635
|
+
}
|
|
636
|
+
|
|
576
637
|
case Tuple: {
|
|
577
638
|
n = ndt_snprintf(ctx, buf, "(");
|
|
578
639
|
if (n < 0) return -1;
|
|
@@ -626,6 +687,32 @@ datashape(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
|
626
687
|
return ndt_snprintf(ctx, buf, "}");
|
|
627
688
|
}
|
|
628
689
|
|
|
690
|
+
case Union: {
|
|
691
|
+
assert(t->Union.ntags > 0);
|
|
692
|
+
|
|
693
|
+
n = ndt_snprintf(ctx, buf, "[");
|
|
694
|
+
if (n < 0) return -1;
|
|
695
|
+
|
|
696
|
+
if (d >= 0) {
|
|
697
|
+
n = ndt_snprintf(ctx, buf, "\n");
|
|
698
|
+
if (n < 0) return -1;
|
|
699
|
+
n = indent(ctx, buf, d+2);
|
|
700
|
+
if (n < 0) return -1;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
n = union_fields(buf, t, d+2, ctx);
|
|
704
|
+
if (n < 0) return -1;
|
|
705
|
+
|
|
706
|
+
if (d >= 0) {
|
|
707
|
+
n = ndt_snprintf(ctx, buf, "\n");
|
|
708
|
+
if (n < 0) return -1;
|
|
709
|
+
n = indent(ctx, buf, d);
|
|
710
|
+
if (n < 0) return -1;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
return ndt_snprintf(ctx, buf, "]");
|
|
714
|
+
}
|
|
715
|
+
|
|
629
716
|
case Ref: {
|
|
630
717
|
n = ndt_snprintf(ctx, buf, "ref(");
|
|
631
718
|
if (n < 0) return -1;
|
|
@@ -709,9 +796,9 @@ datashape(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
|
709
796
|
case UnsignedKind:
|
|
710
797
|
case Uint8: case Uint16: case Uint32: case Uint64:
|
|
711
798
|
case FloatKind:
|
|
712
|
-
case Float16: case Float32: case Float64:
|
|
799
|
+
case BFloat16: case Float16: case Float32: case Float64:
|
|
713
800
|
case ComplexKind:
|
|
714
|
-
case Complex32: case Complex64: case Complex128:
|
|
801
|
+
case BComplex32: case Complex32: case Complex64: case Complex128:
|
|
715
802
|
case FixedStringKind:
|
|
716
803
|
case FixedBytesKind:
|
|
717
804
|
case String:
|
|
@@ -938,6 +1025,42 @@ ast_record_fields(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
|
938
1025
|
return 0;
|
|
939
1026
|
}
|
|
940
1027
|
|
|
1028
|
+
static int
|
|
1029
|
+
ast_union_fields(buf_t *buf, const ndt_t *t, int d, ndt_context_t *ctx)
|
|
1030
|
+
{
|
|
1031
|
+
int64_t i;
|
|
1032
|
+
int n;
|
|
1033
|
+
|
|
1034
|
+
assert(t->tag == Union);
|
|
1035
|
+
|
|
1036
|
+
for (i = 0; i < t->Union.ntags; i++) {
|
|
1037
|
+
if (i >= 1) {
|
|
1038
|
+
n = ndt_snprintf(ctx, buf, ",\n");
|
|
1039
|
+
if (n < 0) return -1;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
n = ndt_snprintf_d(ctx, buf, d, "UnionMember(\n");
|
|
1043
|
+
if (n < 0) return -1;
|
|
1044
|
+
|
|
1045
|
+
n = ndt_snprintf_d(ctx, buf, d+2, "tag='%s',\n", t->Union.tags[i]);
|
|
1046
|
+
if (n < 0) return -1;
|
|
1047
|
+
|
|
1048
|
+
n = ndt_snprintf_d(ctx, buf, d+2, "type=");
|
|
1049
|
+
if (n < 0) return -1;
|
|
1050
|
+
|
|
1051
|
+
n = ast_datashape(buf, t->Union.types[i], d+5+2, 1, ctx);
|
|
1052
|
+
if (n < 0) return -1;
|
|
1053
|
+
|
|
1054
|
+
n = ndt_snprintf(ctx, buf, "%s\n", ndt_is_concrete(t) ? "," : "");
|
|
1055
|
+
if (n < 0) return -1;
|
|
1056
|
+
|
|
1057
|
+
n = ndt_snprintf_d(ctx, buf, d, ")");
|
|
1058
|
+
if (n < 0) return -1;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
return 0;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
941
1064
|
static int
|
|
942
1065
|
ast_variadic_flag(buf_t *buf, enum ndt_variadic flag, int d, ndt_context_t *ctx)
|
|
943
1066
|
{
|
|
@@ -983,7 +1106,7 @@ ast_value(buf_t *buf, const ndt_value_t *mem, ndt_context_t *ctx)
|
|
|
983
1106
|
}
|
|
984
1107
|
|
|
985
1108
|
static int
|
|
986
|
-
ast_categorical(buf_t *buf, ndt_value_t *mem, int64_t ntypes, ndt_context_t *ctx)
|
|
1109
|
+
ast_categorical(buf_t *buf, const ndt_value_t *mem, int64_t ntypes, ndt_context_t *ctx)
|
|
987
1110
|
{
|
|
988
1111
|
int64_t i;
|
|
989
1112
|
int n;
|
|
@@ -1066,10 +1189,11 @@ ast_datashape(buf_t *buf, const ndt_t *t, int d, int cont, ndt_context_t *ctx)
|
|
|
1066
1189
|
return ndt_snprintf_d(ctx, buf, d, ")");
|
|
1067
1190
|
}
|
|
1068
1191
|
|
|
1069
|
-
case VarDim: {
|
|
1192
|
+
case VarDim: case VarDimElem: {
|
|
1070
1193
|
int i;
|
|
1071
1194
|
|
|
1072
|
-
n = ndt_snprintf_d(ctx, buf, cont ? 0 : d, "
|
|
1195
|
+
n = ndt_snprintf_d(ctx, buf, cont ? 0 : d, "%s(\n",
|
|
1196
|
+
ndt_type_name(t));
|
|
1073
1197
|
if (n < 0) return -1;
|
|
1074
1198
|
|
|
1075
1199
|
n = ast_datashape(buf, t->VarDim.type, d+2, 0, ctx);
|
|
@@ -1079,13 +1203,19 @@ ast_datashape(buf_t *buf, const ndt_t *t, int d, int cont, ndt_context_t *ctx)
|
|
|
1079
1203
|
if (n < 0) return -1;
|
|
1080
1204
|
|
|
1081
1205
|
if (ndt_is_concrete(t)) {
|
|
1206
|
+
if (t->tag == VarDimElem) {
|
|
1207
|
+
n = ndt_snprintf_d(ctx, buf, d+2, "index=%" PRIi64 ",\n",
|
|
1208
|
+
t->VarDimElem.index);
|
|
1209
|
+
if (n < 0) return -1;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1082
1212
|
n = ndt_snprintf_d(ctx, buf, d+2, "offsets=[");
|
|
1083
1213
|
if (n < 0) return -1;
|
|
1084
1214
|
|
|
1085
|
-
for (i = 0; i < t->Concrete.VarDim.
|
|
1215
|
+
for (i = 0; i < t->Concrete.VarDim.offsets->n; i++) {
|
|
1086
1216
|
n = ndt_snprintf(ctx, buf, "%" PRIi32 "%s",
|
|
1087
|
-
t->Concrete.VarDim.offsets[i],
|
|
1088
|
-
i==t->Concrete.VarDim.
|
|
1217
|
+
t->Concrete.VarDim.offsets->v[i],
|
|
1218
|
+
i==t->Concrete.VarDim.offsets->n-1 ? "" : ", ");
|
|
1089
1219
|
if (n < 0) return -1;
|
|
1090
1220
|
}
|
|
1091
1221
|
|
|
@@ -1155,6 +1285,28 @@ ast_datashape(buf_t *buf, const ndt_t *t, int d, int cont, ndt_context_t *ctx)
|
|
|
1155
1285
|
return ndt_snprintf_d(ctx, buf, d, ")");
|
|
1156
1286
|
}
|
|
1157
1287
|
|
|
1288
|
+
case Array: {
|
|
1289
|
+
n = ndt_snprintf_d(ctx, buf, cont ? 0 : d, "Array(\n");
|
|
1290
|
+
if (n < 0) return -1;
|
|
1291
|
+
|
|
1292
|
+
n = ndt_snprintf_d(ctx, buf, d+2, "itemsize=%" PRIi64 ",\n",
|
|
1293
|
+
t->Array.itemsize);
|
|
1294
|
+
|
|
1295
|
+
n = ndt_snprintf_d(ctx, buf, d+2, "type=");
|
|
1296
|
+
if (n < 0) return -1;
|
|
1297
|
+
|
|
1298
|
+
n = ast_datashape(buf, t->Array.type, d+5+2, 1, ctx);
|
|
1299
|
+
if (n < 0) return -1;
|
|
1300
|
+
|
|
1301
|
+
n = ndt_snprintf(ctx, buf, ",\n");
|
|
1302
|
+
if (n < 0) return -1;
|
|
1303
|
+
|
|
1304
|
+
n = ast_common_attributes_with_newline(buf, t, d+2, ctx);
|
|
1305
|
+
if (n < 0) return -1;
|
|
1306
|
+
|
|
1307
|
+
return ndt_snprintf_d(ctx, buf, d, ")");
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1158
1310
|
case Tuple: {
|
|
1159
1311
|
n = ndt_snprintf_d(ctx, buf, cont ? 0 : d, "Tuple(\n");
|
|
1160
1312
|
if (n < 0) return -1;
|
|
@@ -1205,6 +1357,24 @@ ast_datashape(buf_t *buf, const ndt_t *t, int d, int cont, ndt_context_t *ctx)
|
|
|
1205
1357
|
return ndt_snprintf_d(ctx, buf, d, ")");
|
|
1206
1358
|
}
|
|
1207
1359
|
|
|
1360
|
+
case Union: {
|
|
1361
|
+
assert(t->Union.ntags > 0);
|
|
1362
|
+
|
|
1363
|
+
n = ndt_snprintf_d(ctx, buf, cont ? 0 : d, "Union(\n");
|
|
1364
|
+
if (n < 0) return -1;
|
|
1365
|
+
|
|
1366
|
+
n = ast_union_fields(buf, t, d+2, ctx);
|
|
1367
|
+
if (n < 0) return -1;
|
|
1368
|
+
|
|
1369
|
+
n = ndt_snprintf(ctx, buf, ",\n");
|
|
1370
|
+
if (n < 0) return -1;
|
|
1371
|
+
|
|
1372
|
+
n = ast_common_attributes_with_newline(buf, t, d+2, ctx);
|
|
1373
|
+
if (n < 0) return -1;
|
|
1374
|
+
|
|
1375
|
+
return ndt_snprintf_d(ctx, buf, d, ")");
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1208
1378
|
case Ref: {
|
|
1209
1379
|
n = ndt_snprintf_d(ctx, buf, cont ? 0 : d, "Ref(\n");
|
|
1210
1380
|
if (n < 0) return -1;
|
|
@@ -1362,9 +1532,9 @@ ast_datashape(buf_t *buf, const ndt_t *t, int d, int cont, ndt_context_t *ctx)
|
|
|
1362
1532
|
case UnsignedKind:
|
|
1363
1533
|
case Uint8: case Uint16: case Uint32: case Uint64:
|
|
1364
1534
|
case FloatKind:
|
|
1365
|
-
case Float16: case Float32: case Float64:
|
|
1535
|
+
case BFloat16: case Float16: case Float32: case Float64:
|
|
1366
1536
|
case ComplexKind:
|
|
1367
|
-
case Complex32: case Complex64: case Complex128:
|
|
1537
|
+
case BComplex32: case Complex32: case Complex64: case Complex128:
|
|
1368
1538
|
case FixedStringKind: case FixedBytesKind:
|
|
1369
1539
|
case String:
|
|
1370
1540
|
n = ndt_snprintf_d(ctx, buf, cont ? 0 : d, "%s(", ndt_type_name(t));
|
|
Binary file
|
|
@@ -592,8 +592,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
|
|
|
592
592
|
yyg->yy_hold_char = *yy_cp; \
|
|
593
593
|
*yy_cp = '\0'; \
|
|
594
594
|
yyg->yy_c_buf_p = yy_cp;
|
|
595
|
-
#define YY_NUM_RULES
|
|
596
|
-
#define YY_END_OF_BUFFER
|
|
595
|
+
#define YY_NUM_RULES 71
|
|
596
|
+
#define YY_END_OF_BUFFER 72
|
|
597
597
|
/* This struct is not used in this scanner,
|
|
598
598
|
but its presence is necessary. */
|
|
599
599
|
struct yy_trans_info
|
|
@@ -601,33 +601,34 @@ struct yy_trans_info
|
|
|
601
601
|
flex_int32_t yy_verify;
|
|
602
602
|
flex_int32_t yy_nxt;
|
|
603
603
|
};
|
|
604
|
-
static const flex_int16_t yy_accept[
|
|
604
|
+
static const flex_int16_t yy_accept[237] =
|
|
605
605
|
{ 0,
|
|
606
|
-
0, 0,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
0,
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
606
|
+
0, 0, 72, 70, 68, 67, 67, 56, 70, 69,
|
|
607
|
+
70, 57, 70, 47, 48, 53, 45, 70, 70, 65,
|
|
608
|
+
65, 46, 59, 54, 60, 55, 62, 62, 62, 62,
|
|
609
|
+
62, 51, 52, 63, 61, 61, 61, 61, 61, 61,
|
|
610
|
+
61, 61, 61, 61, 61, 49, 58, 50, 0, 64,
|
|
611
|
+
0, 69, 0, 0, 0, 0, 65, 65, 44, 0,
|
|
612
|
+
66, 66, 65, 0, 0, 0, 0, 65, 62, 62,
|
|
613
|
+
62, 37, 62, 63, 61, 61, 61, 61, 61, 61,
|
|
614
|
+
61, 61, 61, 61, 61, 61, 42, 61, 61, 61,
|
|
615
|
+
61, 61, 61, 61, 0, 43, 0, 66, 65, 65,
|
|
616
|
+
|
|
617
|
+
2, 62, 62, 61, 61, 61, 61, 61, 61, 61,
|
|
618
|
+
61, 61, 61, 61, 38, 61, 61, 61, 61, 61,
|
|
619
|
+
40, 61, 0, 62, 62, 61, 61, 61, 5, 61,
|
|
620
|
+
61, 29, 61, 61, 61, 61, 61, 61, 7, 61,
|
|
621
|
+
61, 61, 61, 61, 61, 4, 1, 62, 62, 41,
|
|
622
|
+
61, 61, 31, 61, 61, 39, 16, 8, 9, 10,
|
|
623
|
+
61, 61, 61, 61, 61, 61, 61, 12, 61, 61,
|
|
624
|
+
62, 62, 3, 61, 61, 61, 61, 61, 61, 61,
|
|
625
|
+
61, 26, 6, 28, 30, 13, 14, 15, 61, 61,
|
|
626
|
+
62, 62, 61, 61, 61, 21, 61, 61, 18, 19,
|
|
627
|
+
|
|
628
|
+
20, 27, 61, 62, 62, 61, 17, 61, 61, 61,
|
|
629
|
+
61, 61, 61, 11, 62, 62, 61, 61, 61, 23,
|
|
630
|
+
24, 61, 61, 34, 62, 22, 61, 25, 61, 61,
|
|
631
|
+
32, 36, 35, 61, 33, 0
|
|
631
632
|
} ;
|
|
632
633
|
|
|
633
634
|
static const YY_CHAR yy_ec[256] =
|
|
@@ -638,14 +639,14 @@ static const YY_CHAR yy_ec[256] =
|
|
|
638
639
|
1, 2, 5, 6, 7, 1, 8, 9, 10, 11,
|
|
639
640
|
12, 13, 14, 15, 16, 17, 1, 18, 19, 20,
|
|
640
641
|
21, 22, 23, 24, 23, 25, 26, 27, 1, 28,
|
|
641
|
-
29, 30, 31, 1, 32, 33, 34, 35, 36,
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
52, 53, 54, 55,
|
|
647
|
-
|
|
648
|
-
|
|
642
|
+
29, 30, 31, 1, 32, 33, 34, 34, 35, 36,
|
|
643
|
+
37, 37, 37, 37, 37, 37, 37, 38, 39, 37,
|
|
644
|
+
37, 37, 40, 37, 37, 37, 37, 41, 37, 37,
|
|
645
|
+
42, 43, 44, 1, 45, 1, 46, 47, 48, 49,
|
|
646
|
+
|
|
647
|
+
50, 51, 52, 53, 54, 55, 55, 56, 57, 58,
|
|
648
|
+
59, 60, 55, 61, 62, 63, 64, 65, 55, 66,
|
|
649
|
+
67, 68, 69, 70, 71, 1, 1, 1, 1, 1,
|
|
649
650
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
650
651
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
651
652
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
@@ -662,132 +663,135 @@ static const YY_CHAR yy_ec[256] =
|
|
|
662
663
|
1, 1, 1, 1, 1
|
|
663
664
|
} ;
|
|
664
665
|
|
|
665
|
-
static const YY_CHAR yy_meta[
|
|
666
|
+
static const YY_CHAR yy_meta[72] =
|
|
666
667
|
{ 0,
|
|
667
668
|
1, 1, 2, 3, 1, 1, 1, 1, 1, 1,
|
|
668
669
|
1, 1, 1, 4, 1, 4, 5, 6, 6, 6,
|
|
669
670
|
6, 6, 6, 6, 6, 6, 1, 1, 1, 7,
|
|
670
|
-
1, 8, 8, 8,
|
|
671
|
-
10,
|
|
672
|
-
8,
|
|
673
|
-
10, 10, 10, 10, 10, 10, 10, 10,
|
|
674
|
-
1
|
|
671
|
+
1, 8, 8, 8, 9, 8, 10, 10, 10, 10,
|
|
672
|
+
10, 1, 1, 1, 10, 8, 8, 8, 8, 9,
|
|
673
|
+
8, 10, 10, 10, 10, 10, 10, 10, 10, 10,
|
|
674
|
+
10, 10, 10, 10, 10, 10, 10, 10, 1, 1,
|
|
675
|
+
1
|
|
675
676
|
} ;
|
|
676
677
|
|
|
677
|
-
static const flex_int16_t yy_base[
|
|
678
|
+
static const flex_int16_t yy_base[248] =
|
|
678
679
|
{ 0,
|
|
679
|
-
0, 0,
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
0, 0,
|
|
685
|
-
|
|
686
|
-
299,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
0, 0, 0,
|
|
680
|
+
0, 0, 379, 380, 380, 380, 380, 380, 66, 0,
|
|
681
|
+
330, 380, 63, 380, 380, 380, 380, 57, 59, 93,
|
|
682
|
+
72, 380, 380, 380, 380, 380, 319, 0, 322, 343,
|
|
683
|
+
326, 380, 380, 0, 312, 72, 40, 0, 34, 314,
|
|
684
|
+
320, 320, 37, 38, 49, 380, 380, 380, 92, 380,
|
|
685
|
+
0, 0, 310, 84, 0, 142, 0, 86, 380, 351,
|
|
686
|
+
90, 91, 110, 349, 88, 159, 0, 0, 0, 299,
|
|
687
|
+
299, 0, 318, 0, 0, 302, 303, 305, 301, 296,
|
|
688
|
+
295, 311, 299, 289, 295, 290, 0, 301, 77, 290,
|
|
689
|
+
292, 287, 287, 293, 297, 380, 166, 175, 184, 0,
|
|
690
|
+
|
|
691
|
+
0, 295, 288, 297, 285, 282, 284, 289, 288, 276,
|
|
692
|
+
276, 285, 288, 190, 0, 275, 282, 277, 267, 275,
|
|
693
|
+
0, 279, 277, 277, 279, 257, 263, 276, 0, 257,
|
|
694
|
+
264, 0, 257, 263, 244, 278, 277, 272, 0, 230,
|
|
695
|
+
229, 225, 211, 197, 207, 0, 380, 97, 195, 0,
|
|
696
|
+
199, 191, 0, 194, 202, 206, 123, 0, 0, 0,
|
|
697
|
+
188, 199, 184, 194, 221, 224, 221, 0, 179, 183,
|
|
698
|
+
173, 176, 0, 188, 218, 175, 169, 86, 210, 213,
|
|
699
|
+
210, 0, 0, 0, 0, 0, 0, 0, 170, 180,
|
|
700
|
+
166, 167, 161, 202, 171, 134, 157, 160, 0, 0,
|
|
701
|
+
|
|
702
|
+
0, 0, 171, 169, 163, 192, 0, 164, 190, 155,
|
|
703
|
+
152, 110, 111, 0, 109, 112, 137, 110, 129, 0,
|
|
704
|
+
0, 100, 92, 0, 86, 0, 68, 0, 43, 43,
|
|
705
|
+
0, 0, 0, 45, 0, 380, 257, 267, 277, 283,
|
|
704
706
|
286, 290, 295, 300, 305, 311, 312
|
|
705
707
|
} ;
|
|
706
708
|
|
|
707
|
-
static const flex_int16_t yy_def[
|
|
709
|
+
static const flex_int16_t yy_def[248] =
|
|
708
710
|
{ 0,
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
711
|
+
236, 1, 236, 236, 236, 236, 236, 236, 237, 238,
|
|
712
|
+
236, 236, 239, 236, 236, 236, 236, 240, 236, 236,
|
|
713
|
+
241, 236, 236, 236, 236, 236, 242, 242, 242, 242,
|
|
714
|
+
242, 236, 236, 243, 244, 244, 244, 244, 244, 244,
|
|
715
|
+
244, 244, 244, 244, 244, 236, 236, 236, 237, 236,
|
|
716
|
+
237, 238, 236, 239, 239, 236, 20, 241, 236, 236,
|
|
717
|
+
245, 245, 20, 63, 246, 236, 247, 58, 242, 242,
|
|
718
|
+
242, 242, 242, 243, 244, 244, 244, 244, 244, 244,
|
|
719
|
+
244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
|
|
720
|
+
244, 244, 244, 244, 236, 236, 236, 236, 236, 247,
|
|
721
|
+
|
|
722
|
+
242, 242, 242, 244, 244, 244, 244, 244, 244, 244,
|
|
723
|
+
244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
|
|
724
|
+
244, 244, 236, 242, 242, 244, 244, 244, 244, 244,
|
|
725
|
+
244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
|
|
726
|
+
244, 244, 244, 244, 244, 244, 236, 242, 242, 244,
|
|
727
|
+
244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
|
|
728
|
+
244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
|
|
729
|
+
242, 242, 242, 244, 244, 244, 244, 244, 244, 244,
|
|
730
|
+
244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
|
|
731
|
+
242, 242, 244, 244, 244, 244, 244, 244, 244, 244,
|
|
732
|
+
|
|
733
|
+
244, 244, 244, 242, 242, 244, 244, 244, 244, 244,
|
|
734
|
+
244, 244, 244, 244, 242, 242, 244, 244, 244, 244,
|
|
735
|
+
244, 244, 244, 242, 242, 244, 244, 244, 244, 244,
|
|
736
|
+
242, 244, 244, 244, 244, 0, 236, 236, 236, 236,
|
|
737
|
+
236, 236, 236, 236, 236, 236, 236
|
|
735
738
|
} ;
|
|
736
739
|
|
|
737
|
-
static const flex_int16_t yy_nxt[
|
|
740
|
+
static const flex_int16_t yy_nxt[452] =
|
|
738
741
|
{ 0,
|
|
739
742
|
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
|
740
743
|
14, 15, 16, 4, 17, 18, 19, 20, 21, 21,
|
|
741
744
|
21, 21, 21, 21, 21, 21, 22, 23, 24, 25,
|
|
742
|
-
26, 27, 28,
|
|
743
|
-
32, 33,
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
61, 61, 61, 61, 61,
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
98,
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
49, 49, 49, 49, 49, 49, 49, 52,
|
|
768
|
-
52, 52, 52, 52, 52, 52, 52, 54,
|
|
745
|
+
26, 27, 28, 28, 28, 29, 28, 30, 28, 31,
|
|
746
|
+
28, 32, 4, 33, 34, 35, 36, 37, 38, 38,
|
|
747
|
+
39, 38, 38, 40, 38, 38, 38, 38, 41, 38,
|
|
748
|
+
42, 43, 38, 44, 45, 38, 38, 38, 46, 47,
|
|
749
|
+
48, 50, 50, 56, 57, 60, 61, 61, 61, 61,
|
|
750
|
+
61, 61, 61, 61, 61, 81, 59, 84, 62, 85,
|
|
751
|
+
89, 91, 82, 50, 93, 92, 235, 50, 83, 90,
|
|
752
|
+
|
|
753
|
+
234, 97, 62, 97, 233, 55, 65, 94, 51, 62,
|
|
754
|
+
63, 64, 64, 64, 64, 64, 64, 64, 64, 77,
|
|
755
|
+
65, 65, 78, 232, 65, 65, 55, 65, 116, 171,
|
|
756
|
+
79, 66, 197, 67, 51, 65, 172, 231, 80, 65,
|
|
757
|
+
65, 179, 65, 180, 117, 230, 181, 198, 236, 229,
|
|
758
|
+
236, 66, 209, 228, 210, 227, 226, 211, 67, 61,
|
|
759
|
+
61, 61, 61, 61, 61, 61, 61, 61, 236, 225,
|
|
760
|
+
224, 223, 222, 221, 220, 236, 99, 99, 99, 99,
|
|
761
|
+
99, 99, 99, 98, 98, 98, 98, 98, 98, 98,
|
|
762
|
+
98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
|
|
763
|
+
|
|
764
|
+
98, 99, 99, 99, 99, 99, 99, 99, 136, 219,
|
|
765
|
+
137, 218, 217, 138, 139, 165, 216, 166, 215, 214,
|
|
766
|
+
167, 168, 213, 212, 208, 207, 206, 205, 204, 203,
|
|
767
|
+
202, 201, 200, 199, 196, 195, 194, 193, 192, 191,
|
|
768
|
+
190, 189, 188, 187, 186, 185, 184, 183, 182, 140,
|
|
769
|
+
178, 177, 176, 175, 174, 173, 169, 49, 170, 49,
|
|
770
|
+
49, 49, 49, 49, 49, 49, 49, 52, 164, 163,
|
|
771
|
+
52, 52, 52, 52, 52, 52, 52, 54, 162, 54,
|
|
769
772
|
54, 54, 54, 54, 54, 54, 54, 58, 58, 58,
|
|
770
|
-
68, 68,
|
|
773
|
+
68, 68, 161, 160, 68, 69, 159, 69, 69, 69,
|
|
771
774
|
|
|
772
|
-
|
|
773
|
-
61,
|
|
774
|
-
|
|
775
|
+
74, 158, 74, 74, 74, 75, 157, 75, 75, 75,
|
|
776
|
+
61, 156, 155, 61, 98, 154, 98, 100, 153, 100,
|
|
777
|
+
100, 152, 151, 150, 149, 148, 147, 146, 145, 144,
|
|
778
|
+
143, 142, 141, 135, 134, 133, 132, 131, 130, 129,
|
|
775
779
|
128, 127, 126, 125, 124, 123, 122, 121, 120, 119,
|
|
776
|
-
118,
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
780
|
+
118, 115, 114, 113, 112, 111, 110, 109, 108, 107,
|
|
781
|
+
106, 105, 104, 103, 102, 101, 64, 96, 95, 88,
|
|
782
|
+
87, 86, 76, 73, 72, 71, 70, 53, 236, 3,
|
|
783
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
784
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
785
|
+
|
|
786
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
787
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
788
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
789
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
790
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
791
|
+
236
|
|
788
792
|
} ;
|
|
789
793
|
|
|
790
|
-
static const flex_int16_t yy_chk[
|
|
794
|
+
static const flex_int16_t yy_chk[452] =
|
|
791
795
|
{ 0,
|
|
792
796
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
793
797
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
@@ -796,57 +800,58 @@ static const flex_int16_t yy_chk[446] =
|
|
|
796
800
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
797
801
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
798
802
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
799
|
-
1,
|
|
800
|
-
19, 19, 19, 19, 19,
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
66,
|
|
812
|
-
97, 97,
|
|
813
|
-
|
|
814
|
-
98,
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
803
|
+
1, 9, 13, 18, 18, 19, 19, 19, 19, 19,
|
|
804
|
+
19, 19, 19, 19, 19, 37, 18, 39, 21, 39,
|
|
805
|
+
43, 44, 37, 54, 45, 44, 234, 49, 37, 43,
|
|
806
|
+
|
|
807
|
+
230, 65, 58, 65, 229, 13, 21, 45, 9, 20,
|
|
808
|
+
20, 20, 20, 20, 20, 20, 20, 20, 20, 36,
|
|
809
|
+
58, 21, 36, 227, 61, 62, 54, 20, 89, 148,
|
|
810
|
+
36, 20, 178, 20, 49, 58, 148, 225, 36, 61,
|
|
811
|
+
62, 157, 20, 157, 89, 223, 157, 178, 63, 222,
|
|
812
|
+
63, 20, 196, 219, 196, 218, 217, 196, 20, 56,
|
|
813
|
+
56, 56, 56, 56, 56, 56, 56, 56, 63, 216,
|
|
814
|
+
215, 213, 212, 211, 210, 63, 66, 66, 66, 66,
|
|
815
|
+
66, 66, 66, 97, 97, 97, 97, 97, 97, 97,
|
|
816
|
+
97, 97, 98, 98, 98, 98, 98, 98, 98, 98,
|
|
817
|
+
|
|
818
|
+
98, 99, 99, 99, 99, 99, 99, 99, 114, 209,
|
|
819
|
+
114, 208, 206, 114, 114, 144, 205, 144, 204, 203,
|
|
820
|
+
144, 144, 198, 197, 195, 194, 193, 192, 191, 190,
|
|
821
|
+
189, 181, 180, 179, 177, 176, 175, 174, 172, 171,
|
|
822
|
+
170, 169, 167, 166, 165, 164, 163, 162, 161, 114,
|
|
823
|
+
156, 155, 154, 152, 151, 149, 144, 237, 145, 237,
|
|
824
|
+
237, 237, 237, 237, 237, 237, 237, 238, 143, 142,
|
|
825
|
+
238, 238, 238, 238, 238, 238, 238, 239, 141, 239,
|
|
826
|
+
239, 239, 239, 239, 239, 239, 239, 240, 240, 240,
|
|
827
|
+
241, 241, 140, 138, 241, 242, 137, 242, 242, 242,
|
|
828
|
+
|
|
829
|
+
243, 136, 243, 243, 243, 244, 135, 244, 244, 244,
|
|
830
|
+
245, 134, 133, 245, 246, 131, 246, 247, 130, 247,
|
|
831
|
+
247, 128, 127, 126, 125, 124, 123, 122, 120, 119,
|
|
832
|
+
118, 117, 116, 113, 112, 111, 110, 109, 108, 107,
|
|
833
|
+
106, 105, 104, 103, 102, 95, 94, 93, 92, 91,
|
|
834
|
+
90, 88, 86, 85, 84, 83, 82, 81, 80, 79,
|
|
835
|
+
78, 77, 76, 73, 71, 70, 64, 60, 53, 42,
|
|
836
|
+
41, 40, 35, 31, 30, 29, 27, 11, 3, 236,
|
|
837
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
838
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
839
|
+
|
|
840
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
841
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
842
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
843
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
844
|
+
236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
|
|
845
|
+
236
|
|
841
846
|
} ;
|
|
842
847
|
|
|
843
848
|
/* Table of booleans, true if rule could match eol. */
|
|
844
|
-
static const flex_int32_t yy_rule_can_match_eol[
|
|
849
|
+
static const flex_int32_t yy_rule_can_match_eol[72] =
|
|
845
850
|
{ 0,
|
|
846
851
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
847
852
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
848
853
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
849
|
-
0, 0, 0, 1, 0, 0, 0, 0, };
|
|
854
|
+
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, };
|
|
850
855
|
|
|
851
856
|
/* The intent behind this definition is that it'll catch
|
|
852
857
|
* any uses of REJECT which flex missed.
|
|
@@ -938,9 +943,9 @@ yyfree(void *ptr, yyscan_t yyscanner)
|
|
|
938
943
|
ndt_free(ptr);
|
|
939
944
|
}
|
|
940
945
|
|
|
941
|
-
#line
|
|
946
|
+
#line 946 "lexer.c"
|
|
942
947
|
#define YY_NO_INPUT 1
|
|
943
|
-
#line
|
|
948
|
+
#line 948 "lexer.c"
|
|
944
949
|
|
|
945
950
|
#define INITIAL 0
|
|
946
951
|
|
|
@@ -1223,7 +1228,7 @@ YY_DECL
|
|
|
1223
1228
|
#line 127 "lexer.l"
|
|
1224
1229
|
|
|
1225
1230
|
|
|
1226
|
-
#line
|
|
1231
|
+
#line 1231 "lexer.c"
|
|
1227
1232
|
|
|
1228
1233
|
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
|
1229
1234
|
{
|
|
@@ -1250,13 +1255,13 @@ yy_match:
|
|
|
1250
1255
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
1251
1256
|
{
|
|
1252
1257
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
1253
|
-
if ( yy_current_state >=
|
|
1258
|
+
if ( yy_current_state >= 237 )
|
|
1254
1259
|
yy_c = yy_meta[yy_c];
|
|
1255
1260
|
}
|
|
1256
1261
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
1257
1262
|
++yy_cp;
|
|
1258
1263
|
}
|
|
1259
|
-
while ( yy_current_state !=
|
|
1264
|
+
while ( yy_current_state != 236 );
|
|
1260
1265
|
yy_cp = yyg->yy_last_accepting_cpos;
|
|
1261
1266
|
yy_current_state = yyg->yy_last_accepting_state;
|
|
1262
1267
|
|
|
@@ -1381,260 +1386,280 @@ YY_RULE_SETUP
|
|
|
1381
1386
|
case 17:
|
|
1382
1387
|
YY_RULE_SETUP
|
|
1383
1388
|
#line 160 "lexer.l"
|
|
1384
|
-
{ return
|
|
1389
|
+
{ return BFLOAT16; }
|
|
1385
1390
|
YY_BREAK
|
|
1386
1391
|
case 18:
|
|
1387
1392
|
YY_RULE_SETUP
|
|
1388
1393
|
#line 161 "lexer.l"
|
|
1389
|
-
{ return
|
|
1394
|
+
{ return FLOAT16; }
|
|
1390
1395
|
YY_BREAK
|
|
1391
1396
|
case 19:
|
|
1392
1397
|
YY_RULE_SETUP
|
|
1393
1398
|
#line 162 "lexer.l"
|
|
1394
|
-
{ return
|
|
1399
|
+
{ return FLOAT32; }
|
|
1395
1400
|
YY_BREAK
|
|
1396
1401
|
case 20:
|
|
1397
1402
|
YY_RULE_SETUP
|
|
1398
|
-
#line
|
|
1399
|
-
{ return
|
|
1403
|
+
#line 163 "lexer.l"
|
|
1404
|
+
{ return FLOAT64; }
|
|
1400
1405
|
YY_BREAK
|
|
1401
1406
|
case 21:
|
|
1402
1407
|
YY_RULE_SETUP
|
|
1403
1408
|
#line 165 "lexer.l"
|
|
1404
|
-
{ return
|
|
1409
|
+
{ return COMPLEX_KIND; }
|
|
1405
1410
|
YY_BREAK
|
|
1406
1411
|
case 22:
|
|
1407
1412
|
YY_RULE_SETUP
|
|
1408
1413
|
#line 166 "lexer.l"
|
|
1409
|
-
{ return
|
|
1414
|
+
{ return BCOMPLEX32; }
|
|
1410
1415
|
YY_BREAK
|
|
1411
1416
|
case 23:
|
|
1412
1417
|
YY_RULE_SETUP
|
|
1413
1418
|
#line 167 "lexer.l"
|
|
1414
|
-
{ return
|
|
1419
|
+
{ return COMPLEX32; }
|
|
1415
1420
|
YY_BREAK
|
|
1416
1421
|
case 24:
|
|
1417
1422
|
YY_RULE_SETUP
|
|
1418
|
-
#line
|
|
1419
|
-
{ return
|
|
1423
|
+
#line 168 "lexer.l"
|
|
1424
|
+
{ return COMPLEX64; }
|
|
1420
1425
|
YY_BREAK
|
|
1421
1426
|
case 25:
|
|
1422
1427
|
YY_RULE_SETUP
|
|
1423
|
-
#line
|
|
1424
|
-
{ return
|
|
1428
|
+
#line 169 "lexer.l"
|
|
1429
|
+
{ return COMPLEX128; }
|
|
1425
1430
|
YY_BREAK
|
|
1426
1431
|
case 26:
|
|
1427
1432
|
YY_RULE_SETUP
|
|
1428
1433
|
#line 171 "lexer.l"
|
|
1429
|
-
{ return
|
|
1434
|
+
{ return INTPTR; }
|
|
1430
1435
|
YY_BREAK
|
|
1431
1436
|
case 27:
|
|
1432
1437
|
YY_RULE_SETUP
|
|
1433
1438
|
#line 172 "lexer.l"
|
|
1434
|
-
{ return
|
|
1439
|
+
{ return UINTPTR; }
|
|
1435
1440
|
YY_BREAK
|
|
1436
1441
|
case 28:
|
|
1437
1442
|
YY_RULE_SETUP
|
|
1438
1443
|
#line 173 "lexer.l"
|
|
1439
|
-
{ return
|
|
1444
|
+
{ return SIZE; }
|
|
1440
1445
|
YY_BREAK
|
|
1441
1446
|
case 29:
|
|
1442
1447
|
YY_RULE_SETUP
|
|
1443
1448
|
#line 174 "lexer.l"
|
|
1444
|
-
{ return
|
|
1449
|
+
{ return CHAR; }
|
|
1445
1450
|
YY_BREAK
|
|
1446
1451
|
case 30:
|
|
1447
1452
|
YY_RULE_SETUP
|
|
1448
|
-
#line
|
|
1449
|
-
{ return
|
|
1453
|
+
#line 175 "lexer.l"
|
|
1454
|
+
{ return STRING; }
|
|
1450
1455
|
YY_BREAK
|
|
1451
1456
|
case 31:
|
|
1452
1457
|
YY_RULE_SETUP
|
|
1453
|
-
#line
|
|
1454
|
-
{ return
|
|
1458
|
+
#line 176 "lexer.l"
|
|
1459
|
+
{ return BYTES; }
|
|
1455
1460
|
YY_BREAK
|
|
1456
1461
|
case 32:
|
|
1457
1462
|
YY_RULE_SETUP
|
|
1458
|
-
#line
|
|
1459
|
-
{ return
|
|
1463
|
+
#line 178 "lexer.l"
|
|
1464
|
+
{ return FIXED_STRING_KIND; }
|
|
1460
1465
|
YY_BREAK
|
|
1461
1466
|
case 33:
|
|
1462
1467
|
YY_RULE_SETUP
|
|
1463
|
-
#line
|
|
1464
|
-
{ return
|
|
1468
|
+
#line 179 "lexer.l"
|
|
1469
|
+
{ return FIXED_STRING; }
|
|
1465
1470
|
YY_BREAK
|
|
1466
1471
|
case 34:
|
|
1467
1472
|
YY_RULE_SETUP
|
|
1468
|
-
#line
|
|
1469
|
-
{ return
|
|
1473
|
+
#line 181 "lexer.l"
|
|
1474
|
+
{ return FIXED_BYTES_KIND; }
|
|
1470
1475
|
YY_BREAK
|
|
1471
1476
|
case 35:
|
|
1472
1477
|
YY_RULE_SETUP
|
|
1473
|
-
#line
|
|
1474
|
-
{ return
|
|
1478
|
+
#line 182 "lexer.l"
|
|
1479
|
+
{ return FIXED_BYTES; }
|
|
1475
1480
|
YY_BREAK
|
|
1476
1481
|
case 36:
|
|
1477
1482
|
YY_RULE_SETUP
|
|
1478
|
-
#line
|
|
1479
|
-
{ return
|
|
1483
|
+
#line 184 "lexer.l"
|
|
1484
|
+
{ return CATEGORICAL; }
|
|
1480
1485
|
YY_BREAK
|
|
1481
1486
|
case 37:
|
|
1482
1487
|
YY_RULE_SETUP
|
|
1483
|
-
#line
|
|
1484
|
-
{ return
|
|
1488
|
+
#line 185 "lexer.l"
|
|
1489
|
+
{ return NA; }
|
|
1485
1490
|
YY_BREAK
|
|
1486
1491
|
case 38:
|
|
1487
1492
|
YY_RULE_SETUP
|
|
1488
|
-
#line
|
|
1489
|
-
{ return
|
|
1493
|
+
#line 187 "lexer.l"
|
|
1494
|
+
{ return REF; }
|
|
1490
1495
|
YY_BREAK
|
|
1491
1496
|
case 39:
|
|
1492
1497
|
YY_RULE_SETUP
|
|
1493
|
-
#line
|
|
1494
|
-
{ return
|
|
1498
|
+
#line 189 "lexer.l"
|
|
1499
|
+
{ return FIXED; }
|
|
1495
1500
|
YY_BREAK
|
|
1496
1501
|
case 40:
|
|
1497
1502
|
YY_RULE_SETUP
|
|
1498
|
-
#line
|
|
1499
|
-
{ return
|
|
1503
|
+
#line 190 "lexer.l"
|
|
1504
|
+
{ return VAR; }
|
|
1500
1505
|
YY_BREAK
|
|
1501
1506
|
case 41:
|
|
1502
1507
|
YY_RULE_SETUP
|
|
1503
|
-
#line
|
|
1504
|
-
{ return
|
|
1508
|
+
#line 191 "lexer.l"
|
|
1509
|
+
{ return ARRAY; }
|
|
1505
1510
|
YY_BREAK
|
|
1506
1511
|
case 42:
|
|
1507
1512
|
YY_RULE_SETUP
|
|
1508
1513
|
#line 193 "lexer.l"
|
|
1509
|
-
{ return
|
|
1514
|
+
{ return OF; }
|
|
1510
1515
|
YY_BREAK
|
|
1511
1516
|
case 43:
|
|
1512
1517
|
YY_RULE_SETUP
|
|
1513
|
-
#line
|
|
1514
|
-
{ return
|
|
1518
|
+
#line 195 "lexer.l"
|
|
1519
|
+
{ return ELLIPSIS; }
|
|
1515
1520
|
YY_BREAK
|
|
1516
1521
|
case 44:
|
|
1517
1522
|
YY_RULE_SETUP
|
|
1518
|
-
#line
|
|
1519
|
-
{ return
|
|
1523
|
+
#line 196 "lexer.l"
|
|
1524
|
+
{ return RARROW; }
|
|
1520
1525
|
YY_BREAK
|
|
1521
1526
|
case 45:
|
|
1522
1527
|
YY_RULE_SETUP
|
|
1523
|
-
#line
|
|
1524
|
-
{ return
|
|
1528
|
+
#line 197 "lexer.l"
|
|
1529
|
+
{ return COMMA; }
|
|
1525
1530
|
YY_BREAK
|
|
1526
1531
|
case 46:
|
|
1527
1532
|
YY_RULE_SETUP
|
|
1528
|
-
#line
|
|
1529
|
-
{ return
|
|
1533
|
+
#line 198 "lexer.l"
|
|
1534
|
+
{ return COLON; }
|
|
1530
1535
|
YY_BREAK
|
|
1531
1536
|
case 47:
|
|
1532
1537
|
YY_RULE_SETUP
|
|
1533
|
-
#line
|
|
1534
|
-
{ return
|
|
1538
|
+
#line 199 "lexer.l"
|
|
1539
|
+
{ return LPAREN; }
|
|
1535
1540
|
YY_BREAK
|
|
1536
1541
|
case 48:
|
|
1537
1542
|
YY_RULE_SETUP
|
|
1538
|
-
#line
|
|
1539
|
-
{ return
|
|
1543
|
+
#line 200 "lexer.l"
|
|
1544
|
+
{ return RPAREN; }
|
|
1540
1545
|
YY_BREAK
|
|
1541
1546
|
case 49:
|
|
1542
1547
|
YY_RULE_SETUP
|
|
1543
|
-
#line
|
|
1544
|
-
{ return
|
|
1548
|
+
#line 201 "lexer.l"
|
|
1549
|
+
{ return LBRACE; }
|
|
1545
1550
|
YY_BREAK
|
|
1546
1551
|
case 50:
|
|
1547
1552
|
YY_RULE_SETUP
|
|
1548
|
-
#line
|
|
1549
|
-
{ return
|
|
1553
|
+
#line 202 "lexer.l"
|
|
1554
|
+
{ return RBRACE; }
|
|
1550
1555
|
YY_BREAK
|
|
1551
1556
|
case 51:
|
|
1552
1557
|
YY_RULE_SETUP
|
|
1553
|
-
#line
|
|
1554
|
-
{ return
|
|
1558
|
+
#line 203 "lexer.l"
|
|
1559
|
+
{ return LBRACK; }
|
|
1555
1560
|
YY_BREAK
|
|
1556
1561
|
case 52:
|
|
1557
1562
|
YY_RULE_SETUP
|
|
1558
|
-
#line
|
|
1559
|
-
{ return
|
|
1563
|
+
#line 204 "lexer.l"
|
|
1564
|
+
{ return RBRACK; }
|
|
1560
1565
|
YY_BREAK
|
|
1561
1566
|
case 53:
|
|
1562
1567
|
YY_RULE_SETUP
|
|
1563
|
-
#line
|
|
1564
|
-
{ return
|
|
1568
|
+
#line 205 "lexer.l"
|
|
1569
|
+
{ return STAR; }
|
|
1565
1570
|
YY_BREAK
|
|
1566
1571
|
case 54:
|
|
1567
1572
|
YY_RULE_SETUP
|
|
1568
|
-
#line
|
|
1569
|
-
{ return
|
|
1573
|
+
#line 206 "lexer.l"
|
|
1574
|
+
{ return EQUAL; }
|
|
1570
1575
|
YY_BREAK
|
|
1571
1576
|
case 55:
|
|
1572
1577
|
YY_RULE_SETUP
|
|
1573
|
-
#line
|
|
1574
|
-
{ return
|
|
1578
|
+
#line 207 "lexer.l"
|
|
1579
|
+
{ return QUESTIONMARK; }
|
|
1575
1580
|
YY_BREAK
|
|
1576
1581
|
case 56:
|
|
1577
1582
|
YY_RULE_SETUP
|
|
1578
|
-
#line
|
|
1579
|
-
{ return
|
|
1583
|
+
#line 208 "lexer.l"
|
|
1584
|
+
{ return BANG; }
|
|
1580
1585
|
YY_BREAK
|
|
1581
1586
|
case 57:
|
|
1582
1587
|
YY_RULE_SETUP
|
|
1583
1588
|
#line 209 "lexer.l"
|
|
1584
|
-
{
|
|
1589
|
+
{ return AMPERSAND; }
|
|
1585
1590
|
YY_BREAK
|
|
1586
1591
|
case 58:
|
|
1587
1592
|
YY_RULE_SETUP
|
|
1588
1593
|
#line 210 "lexer.l"
|
|
1589
|
-
{
|
|
1594
|
+
{ return BAR; }
|
|
1590
1595
|
YY_BREAK
|
|
1591
1596
|
case 59:
|
|
1592
1597
|
YY_RULE_SETUP
|
|
1593
1598
|
#line 211 "lexer.l"
|
|
1594
|
-
{
|
|
1599
|
+
{ return LESS; }
|
|
1595
1600
|
YY_BREAK
|
|
1596
1601
|
case 60:
|
|
1597
1602
|
YY_RULE_SETUP
|
|
1598
|
-
#line
|
|
1599
|
-
{
|
|
1603
|
+
#line 212 "lexer.l"
|
|
1604
|
+
{ return GREATER; }
|
|
1600
1605
|
YY_BREAK
|
|
1601
1606
|
case 61:
|
|
1602
1607
|
YY_RULE_SETUP
|
|
1603
1608
|
#line 214 "lexer.l"
|
|
1604
|
-
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return
|
|
1609
|
+
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return NAME_LOWER; }
|
|
1605
1610
|
YY_BREAK
|
|
1606
1611
|
case 62:
|
|
1607
1612
|
YY_RULE_SETUP
|
|
1608
1613
|
#line 215 "lexer.l"
|
|
1609
|
-
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return
|
|
1614
|
+
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return NAME_UPPER; }
|
|
1610
1615
|
YY_BREAK
|
|
1611
1616
|
case 63:
|
|
1612
|
-
/* rule 63 can match eol */
|
|
1613
1617
|
YY_RULE_SETUP
|
|
1614
|
-
#line
|
|
1615
|
-
{
|
|
1618
|
+
#line 216 "lexer.l"
|
|
1619
|
+
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return NAME_OTHER; }
|
|
1616
1620
|
YY_BREAK
|
|
1617
1621
|
case 64:
|
|
1618
1622
|
YY_RULE_SETUP
|
|
1619
1623
|
#line 218 "lexer.l"
|
|
1620
|
-
{
|
|
1624
|
+
{ yylval->string = mk_stringlit(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return STRINGLIT; }
|
|
1621
1625
|
YY_BREAK
|
|
1622
1626
|
case 65:
|
|
1623
1627
|
YY_RULE_SETUP
|
|
1624
1628
|
#line 219 "lexer.l"
|
|
1625
|
-
{
|
|
1629
|
+
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return INTEGER; }
|
|
1626
1630
|
YY_BREAK
|
|
1627
1631
|
case 66:
|
|
1628
1632
|
YY_RULE_SETUP
|
|
1629
1633
|
#line 220 "lexer.l"
|
|
1630
|
-
{ return ERRTOKEN; }
|
|
1634
|
+
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return FLOATNUMBER; }
|
|
1631
1635
|
YY_BREAK
|
|
1632
1636
|
case 67:
|
|
1637
|
+
/* rule 67 can match eol */
|
|
1633
1638
|
YY_RULE_SETUP
|
|
1634
1639
|
#line 222 "lexer.l"
|
|
1640
|
+
{ yycolumn = 1; }
|
|
1641
|
+
YY_BREAK
|
|
1642
|
+
case 68:
|
|
1643
|
+
YY_RULE_SETUP
|
|
1644
|
+
#line 223 "lexer.l"
|
|
1645
|
+
{} /* ignore */
|
|
1646
|
+
YY_BREAK
|
|
1647
|
+
case 69:
|
|
1648
|
+
YY_RULE_SETUP
|
|
1649
|
+
#line 224 "lexer.l"
|
|
1650
|
+
{} /* ignore */
|
|
1651
|
+
YY_BREAK
|
|
1652
|
+
case 70:
|
|
1653
|
+
YY_RULE_SETUP
|
|
1654
|
+
#line 225 "lexer.l"
|
|
1655
|
+
{ return ERRTOKEN; }
|
|
1656
|
+
YY_BREAK
|
|
1657
|
+
case 71:
|
|
1658
|
+
YY_RULE_SETUP
|
|
1659
|
+
#line 227 "lexer.l"
|
|
1635
1660
|
YY_FATAL_ERROR( "flex scanner jammed" );
|
|
1636
1661
|
YY_BREAK
|
|
1637
|
-
#line
|
|
1662
|
+
#line 1662 "lexer.c"
|
|
1638
1663
|
case YY_STATE_EOF(INITIAL):
|
|
1639
1664
|
yyterminate();
|
|
1640
1665
|
|
|
@@ -1934,7 +1959,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
|
|
1934
1959
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
1935
1960
|
{
|
|
1936
1961
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
1937
|
-
if ( yy_current_state >=
|
|
1962
|
+
if ( yy_current_state >= 237 )
|
|
1938
1963
|
yy_c = yy_meta[yy_c];
|
|
1939
1964
|
}
|
|
1940
1965
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
@@ -1963,11 +1988,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
|
|
1963
1988
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
1964
1989
|
{
|
|
1965
1990
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
1966
|
-
if ( yy_current_state >=
|
|
1991
|
+
if ( yy_current_state >= 237 )
|
|
1967
1992
|
yy_c = yy_meta[yy_c];
|
|
1968
1993
|
}
|
|
1969
1994
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
1970
|
-
yy_is_jam = (yy_current_state ==
|
|
1995
|
+
yy_is_jam = (yy_current_state == 236);
|
|
1971
1996
|
|
|
1972
1997
|
(void)yyg;
|
|
1973
1998
|
return yy_is_jam ? 0 : yy_current_state;
|
|
@@ -2768,6 +2793,6 @@ static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
|
|
|
2768
2793
|
|
|
2769
2794
|
#define YYTABLES_NAME "yytables"
|
|
2770
2795
|
|
|
2771
|
-
#line
|
|
2796
|
+
#line 227 "lexer.l"
|
|
2772
2797
|
|
|
2773
2798
|
|