ndtypes 0.2.0dev5 → 0.2.0dev6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +12 -0
  3. data/Rakefile +8 -0
  4. data/ext/ruby_ndtypes/GPATH +0 -0
  5. data/ext/ruby_ndtypes/GRTAGS +0 -0
  6. data/ext/ruby_ndtypes/GTAGS +0 -0
  7. data/ext/ruby_ndtypes/extconf.rb +1 -1
  8. data/ext/ruby_ndtypes/include/ndtypes.h +231 -122
  9. data/ext/ruby_ndtypes/include/ruby_ndtypes.h +1 -1
  10. data/ext/ruby_ndtypes/lib/libndtypes.a +0 -0
  11. data/ext/ruby_ndtypes/lib/libndtypes.so.0.2.0dev3 +0 -0
  12. data/ext/ruby_ndtypes/ndtypes/Makefile +87 -0
  13. data/ext/ruby_ndtypes/ndtypes/config.h +68 -0
  14. data/ext/ruby_ndtypes/ndtypes/config.log +477 -0
  15. data/ext/ruby_ndtypes/ndtypes/config.status +1027 -0
  16. data/ext/ruby_ndtypes/ndtypes/doc/_static/style.css +7 -0
  17. data/ext/ruby_ndtypes/ndtypes/doc/_templates/layout.html +2 -0
  18. data/ext/ruby_ndtypes/ndtypes/doc/conf.py +40 -4
  19. data/ext/ruby_ndtypes/ndtypes/doc/images/xndlogo.png +0 -0
  20. data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst +1 -1
  21. data/ext/ruby_ndtypes/ndtypes/doc/requirements.txt +2 -0
  22. data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile +287 -0
  23. data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in +20 -4
  24. data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc +22 -3
  25. data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c +1 -1
  26. data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.o +0 -0
  27. data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.o +0 -0
  28. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile +73 -0
  29. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c +246 -229
  30. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h +15 -11
  31. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.o +0 -0
  32. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y +38 -28
  33. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c +91 -91
  34. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h +1 -1
  35. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l +4 -3
  36. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.o +0 -0
  37. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c +8 -7
  38. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.o +0 -0
  39. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c +2 -2
  40. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.o +0 -0
  41. data/ext/ruby_ndtypes/ndtypes/libndtypes/context.o +0 -0
  42. data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.c +263 -182
  43. data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.o +0 -0
  44. data/ext/ruby_ndtypes/ndtypes/libndtypes/encodings.o +0 -0
  45. data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.c +67 -7
  46. data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.o +0 -0
  47. data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c +1112 -1000
  48. data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h +69 -58
  49. data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.o +0 -0
  50. data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y +150 -99
  51. data/ext/ruby_ndtypes/ndtypes/libndtypes/io.c +185 -15
  52. data/ext/ruby_ndtypes/ndtypes/libndtypes/io.o +0 -0
  53. data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c +301 -276
  54. data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h +1 -1
  55. data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l +9 -4
  56. data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.o +0 -0
  57. data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.a +0 -0
  58. data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so +1 -0
  59. data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so.0 +1 -0
  60. data/ext/ruby_ndtypes/ndtypes/libndtypes/libndtypes.so.0.2.0dev3 +0 -0
  61. data/ext/ruby_ndtypes/ndtypes/libndtypes/match.c +729 -228
  62. data/ext/ruby_ndtypes/ndtypes/libndtypes/match.o +0 -0
  63. data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c +768 -403
  64. data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h +1002 -0
  65. data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in +231 -122
  66. data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.o +0 -0
  67. data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c +176 -84
  68. data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h +26 -14
  69. data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.o +0 -0
  70. data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.c +57 -35
  71. data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.o +0 -0
  72. data/ext/ruby_ndtypes/ndtypes/libndtypes/primitive.c +420 -0
  73. data/ext/ruby_ndtypes/ndtypes/libndtypes/primitive.o +0 -0
  74. data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.c +8 -8
  75. data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.h +1 -1
  76. data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.o +0 -0
  77. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile +48 -0
  78. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c +200 -116
  79. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.o +0 -0
  80. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c +46 -4
  81. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.o +0 -0
  82. data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c +58 -27
  83. data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h +1 -1
  84. data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.o +0 -0
  85. data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c +3 -5
  86. data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h +12 -4
  87. data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.o +0 -0
  88. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile +55 -0
  89. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in +8 -8
  90. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc +5 -5
  91. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c +274 -172
  92. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h +24 -4
  93. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c +2 -2
  94. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c +14 -14
  95. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c +32 -30
  96. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c +37 -0
  97. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c +36 -0
  98. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c +16 -0
  99. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c +5 -5
  100. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c +706 -253
  101. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_unify.c +132 -0
  102. data/ext/ruby_ndtypes/ndtypes/libndtypes/unify.c +703 -0
  103. data/ext/ruby_ndtypes/ndtypes/libndtypes/unify.o +0 -0
  104. data/ext/ruby_ndtypes/ndtypes/libndtypes/util.c +335 -127
  105. data/ext/ruby_ndtypes/ndtypes/libndtypes/util.o +0 -0
  106. data/ext/ruby_ndtypes/ndtypes/libndtypes/values.c +2 -2
  107. data/ext/ruby_ndtypes/ndtypes/libndtypes/values.o +0 -0
  108. data/ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py +88 -71
  109. data/ext/ruby_ndtypes/ndtypes/python/ndt_support.py +0 -1
  110. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py +10 -13
  111. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c +395 -314
  112. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.a +0 -0
  113. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so +1 -0
  114. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so.0 +1 -0
  115. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/libndtypes.so.0.2.0dev3 +0 -0
  116. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/ndtypes.h +1002 -0
  117. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h +15 -33
  118. data/ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py +340 -132
  119. data/ext/ruby_ndtypes/ndtypes/setup.py +11 -2
  120. data/ext/ruby_ndtypes/ruby_ndtypes.c +364 -241
  121. data/ext/ruby_ndtypes/ruby_ndtypes.h +1 -1
  122. data/ext/ruby_ndtypes/ruby_ndtypes_internal.h +0 -1
  123. data/lib/ndtypes.rb +11 -0
  124. data/lib/ndtypes/version.rb +2 -2
  125. data/lib/ruby_ndtypes.so +0 -0
  126. data/ndtypes.gemspec +3 -0
  127. data/spec/ndtypes_spec.rb +6 -0
  128. metadata +98 -4
  129. data/ext/ruby_ndtypes/gc_guard.c +0 -36
  130. data/ext/ruby_ndtypes/gc_guard.h +0 -12
@@ -122,7 +122,27 @@ record_fields_equal(const ndt_t *t, const ndt_t *u, int64_t shape)
122
122
  }
123
123
 
124
124
  static int
125
- categorical_equal(ndt_value_t *t, ndt_value_t *u, int64_t shape)
125
+ union_fields_equal(const ndt_t *t, const ndt_t *u, int64_t ntags)
126
+ {
127
+ int64_t i;
128
+
129
+ assert(t->tag == Union && u->tag == Union);
130
+
131
+ for (i = 0; i < ntags; i++) {
132
+ if (strcmp(t->Union.tags[i], u->Union.tags[i]) != 0) {
133
+ return 0;
134
+ }
135
+
136
+ if (!ndt_equal(t->Union.types[i], u->Union.types[i])) {
137
+ return 0;
138
+ }
139
+ }
140
+
141
+ return 1;
142
+ }
143
+
144
+ static int
145
+ categorical_equal(const ndt_value_t *t, const ndt_value_t *u, int64_t shape)
126
146
  {
127
147
  int64_t i;
128
148
 
@@ -135,6 +155,24 @@ categorical_equal(ndt_value_t *t, ndt_value_t *u, int64_t shape)
135
155
  return 1;
136
156
  }
137
157
 
158
+ static int
159
+ offsets_equal(const ndt_offsets_t *x, const ndt_offsets_t *y)
160
+ {
161
+ if (x == NULL) {
162
+ return y == NULL;
163
+ }
164
+ if (y == NULL) {
165
+ return x == NULL;
166
+ }
167
+
168
+ if (x->n != y->n) {
169
+ return 0;
170
+ }
171
+
172
+ return memcmp(x->v, y->v, x->n * (sizeof *x->v)) == 0;
173
+ }
174
+
175
+
138
176
  int
139
177
  ndt_equal(const ndt_t *t, const ndt_t *u)
140
178
  {
@@ -166,20 +204,26 @@ ndt_equal(const ndt_t *t, const ndt_t *u)
166
204
  ndt_equal(t->FixedDim.type, u->FixedDim.type);
167
205
  }
168
206
 
207
+ case VarDimElem:
208
+ if (t->VarDimElem.index != u->VarDimElem.index) {
209
+ return 0;
210
+ }
211
+ /* fall through */
169
212
  case VarDim: {
170
213
  if (t->Concrete.VarDim.itemsize != u->Concrete.VarDim.itemsize ||
171
- t->Concrete.VarDim.noffsets != u->Concrete.VarDim.noffsets ||
172
214
  t->Concrete.VarDim.nslices != u->Concrete.VarDim.nslices) {
173
215
  return 0;
174
216
  }
175
217
 
176
- if (memcmp(t->Concrete.VarDim.offsets, u->Concrete.VarDim.offsets,
177
- t->Concrete.VarDim.noffsets * (sizeof *t->Concrete.VarDim.offsets)) ||
178
- memcmp(t->Concrete.VarDim.slices, u->Concrete.VarDim.slices,
218
+ if (memcmp(t->Concrete.VarDim.slices, u->Concrete.VarDim.slices,
179
219
  t->Concrete.VarDim.nslices * (sizeof *t->Concrete.VarDim.slices))) {
180
220
  return 0;
181
221
  }
182
222
 
223
+ if (!offsets_equal(t->Concrete.VarDim.offsets, u->Concrete.VarDim.offsets)) {
224
+ return 0;
225
+ }
226
+
183
227
  return ndt_equal(t->VarDim.type, u->VarDim.type);
184
228
  }
185
229
 
@@ -206,6 +250,14 @@ ndt_equal(const ndt_t *t, const ndt_t *u)
206
250
  return ndt_equal(t->EllipsisDim.type, u->EllipsisDim.type);
207
251
  }
208
252
 
253
+ case Array: {
254
+ if (t->Array.itemsize != u->Array.itemsize) {
255
+ return 0;
256
+ }
257
+
258
+ return ndt_equal(t->Array.type, u->Array.type);
259
+ }
260
+
209
261
  case Tuple: {
210
262
  if (t->Tuple.flag != u->Tuple.flag ||
211
263
  t->Tuple.shape != u->Tuple.shape) {
@@ -224,6 +276,14 @@ ndt_equal(const ndt_t *t, const ndt_t *u)
224
276
  return record_fields_equal(t, u, t->Record.shape);
225
277
  }
226
278
 
279
+ case Union: {
280
+ if (t->Union.ntags != u->Union.ntags) {
281
+ return 0;
282
+ }
283
+
284
+ return union_fields_equal(t, u, t->Union.ntags);
285
+ }
286
+
227
287
  case Ref: {
228
288
  return ndt_equal(t->Ref.type, u->Ref.type);
229
289
  }
@@ -277,8 +337,8 @@ ndt_equal(const ndt_t *t, const ndt_t *u)
277
337
  case Bool:
278
338
  case Int8: case Int16: case Int32: case Int64:
279
339
  case Uint8: case Uint16: case Uint32: case Uint64:
280
- case Float16: case Float32: case Float64:
281
- case Complex32: case Complex64: case Complex128:
340
+ case BFloat16: case Float16: case Float32: case Float64:
341
+ case BComplex32: case Complex32: case Complex64: case Complex128:
282
342
  case String:
283
343
  return 1;
284
344
  }
@@ -1,8 +1,9 @@
1
- /* A Bison parser, made by GNU Bison 3.0.4. */
1
+ /* A Bison parser, made by GNU Bison 3.3. */
2
2
 
3
3
  /* Bison implementation for Yacc-like parsers in C
4
4
 
5
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
5
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6
+ Inc.
6
7
 
7
8
  This program is free software: you can redistribute it and/or modify
8
9
  it under the terms of the GNU General Public License as published by
@@ -40,11 +41,14 @@
40
41
  define necessary library symbols; they are noted "INFRINGES ON
41
42
  USER NAME SPACE" below. */
42
43
 
44
+ /* Undocumented macros, especially those whose name start with YY_,
45
+ are private implementation details. Do not rely on them. */
46
+
43
47
  /* Identify Bison output. */
44
48
  #define YYBISON 1
45
49
 
46
50
  /* Bison version. */
47
- #define YYBISON_VERSION "3.0.4"
51
+ #define YYBISON_VERSION "3.3"
48
52
 
49
53
  /* Skeleton name. */
50
54
  #define YYSKELETON_NAME "yacc.c"
@@ -67,8 +71,8 @@
67
71
  #define yynerrs ndt_yynerrs
68
72
 
69
73
 
70
- /* Copy the first part of user declarations. */
71
- #line 1 "grammar.y" /* yacc.c:339 */
74
+ /* First part of user prologue. */
75
+ #line 1 "grammar.y" /* yacc.c:337 */
72
76
 
73
77
  /*
74
78
  * BSD 3-Clause License
@@ -107,12 +111,11 @@
107
111
 
108
112
 
109
113
  void
110
- yyerror(YYLTYPE *loc, yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta,
111
- ndt_context_t *ctx, const char *msg)
114
+ yyerror(YYLTYPE *loc, yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx,
115
+ const char *msg)
112
116
  {
113
117
  (void)scanner;
114
118
  (void)ast;
115
- (void)meta;
116
119
 
117
120
  ndt_err_format(ctx, NDT_ParseError, "%d:%d: %s", loc->first_line,
118
121
  loc->first_column, msg);
@@ -124,13 +127,16 @@ yylex(YYSTYPE *val, YYLTYPE *loc, yyscan_t scanner, ndt_context_t *ctx)
124
127
  return ndt_yylexfunc(val, loc, scanner, ctx);
125
128
  }
126
129
 
127
- #line 128 "grammar.c" /* yacc.c:339 */
128
-
130
+ #line 131 "grammar.c" /* yacc.c:337 */
129
131
  # ifndef YY_NULLPTR
130
- # if defined __cplusplus && 201103L <= __cplusplus
131
- # define YY_NULLPTR nullptr
132
+ # if defined __cplusplus
133
+ # if 201103L <= __cplusplus
134
+ # define YY_NULLPTR nullptr
135
+ # else
136
+ # define YY_NULLPTR 0
137
+ # endif
132
138
  # else
133
- # define YY_NULLPTR 0
139
+ # define YY_NULLPTR ((void*)0)
134
140
  # endif
135
141
  # endif
136
142
 
@@ -154,7 +160,7 @@ yylex(YYSTYPE *val, YYLTYPE *loc, yyscan_t scanner, ndt_context_t *ctx)
154
160
  extern int ndt_yydebug;
155
161
  #endif
156
162
  /* "%code requires" blocks. */
157
- #line 57 "grammar.y" /* yacc.c:355 */
163
+ #line 56 "grammar.y" /* yacc.c:352 */
158
164
 
159
165
  #include "ndtypes.h"
160
166
  #include "seq.h"
@@ -163,7 +169,7 @@ extern int ndt_yydebug;
163
169
  #define YY_TYPEDEF_YY_SCANNER_T
164
170
  typedef void * yyscan_t;
165
171
 
166
- #line 167 "grammar.c" /* yacc.c:355 */
172
+ #line 173 "grammar.c" /* yacc.c:352 */
167
173
 
168
174
  /* Token type. */
169
175
  #ifndef YYTOKENTYPE
@@ -186,53 +192,58 @@ extern int ndt_yydebug;
186
192
  UINT32 = 270,
187
193
  UINT64 = 271,
188
194
  FLOAT_KIND = 272,
189
- FLOAT16 = 273,
190
- FLOAT32 = 274,
191
- FLOAT64 = 275,
192
- COMPLEX_KIND = 276,
193
- COMPLEX32 = 277,
194
- COMPLEX64 = 278,
195
- COMPLEX128 = 279,
196
- CATEGORICAL = 280,
197
- NA = 281,
198
- INTPTR = 282,
199
- UINTPTR = 283,
200
- SIZE = 284,
201
- CHAR = 285,
202
- STRING = 286,
203
- FIXED_STRING_KIND = 287,
204
- FIXED_STRING = 288,
205
- BYTES = 289,
206
- FIXED_BYTES_KIND = 290,
207
- FIXED_BYTES = 291,
208
- REF = 292,
209
- FIXED = 293,
210
- VAR = 294,
211
- COMMA = 295,
212
- COLON = 296,
213
- LPAREN = 297,
214
- RPAREN = 298,
215
- LBRACE = 299,
216
- RBRACE = 300,
217
- LBRACK = 301,
218
- RBRACK = 302,
219
- STAR = 303,
220
- ELLIPSIS = 304,
221
- RARROW = 305,
222
- EQUAL = 306,
223
- LESS = 307,
224
- GREATER = 308,
225
- QUESTIONMARK = 309,
226
- BANG = 310,
227
- AMPERSAND = 311,
228
- BAR = 312,
229
- ERRTOKEN = 313,
230
- INTEGER = 314,
231
- FLOATNUMBER = 315,
232
- STRINGLIT = 316,
233
- NAME_LOWER = 317,
234
- NAME_UPPER = 318,
235
- NAME_OTHER = 319
195
+ BFLOAT16 = 273,
196
+ FLOAT16 = 274,
197
+ FLOAT32 = 275,
198
+ FLOAT64 = 276,
199
+ COMPLEX_KIND = 277,
200
+ BCOMPLEX32 = 278,
201
+ COMPLEX32 = 279,
202
+ COMPLEX64 = 280,
203
+ COMPLEX128 = 281,
204
+ CATEGORICAL = 282,
205
+ NA = 283,
206
+ INTPTR = 284,
207
+ UINTPTR = 285,
208
+ SIZE = 286,
209
+ CHAR = 287,
210
+ STRING = 288,
211
+ FIXED_STRING_KIND = 289,
212
+ FIXED_STRING = 290,
213
+ BYTES = 291,
214
+ FIXED_BYTES_KIND = 292,
215
+ FIXED_BYTES = 293,
216
+ REF = 294,
217
+ FIXED = 295,
218
+ VAR = 296,
219
+ ARRAY = 297,
220
+ OF = 298,
221
+ COMMA = 299,
222
+ COLON = 300,
223
+ LPAREN = 301,
224
+ RPAREN = 302,
225
+ LBRACE = 303,
226
+ RBRACE = 304,
227
+ LBRACK = 305,
228
+ RBRACK = 306,
229
+ STAR = 307,
230
+ ELLIPSIS = 308,
231
+ RARROW = 309,
232
+ EQUAL = 310,
233
+ LESS = 311,
234
+ GREATER = 312,
235
+ QUESTIONMARK = 313,
236
+ BANG = 314,
237
+ AMPERSAND = 315,
238
+ BAR = 316,
239
+ ERRTOKEN = 317,
240
+ INTEGER = 318,
241
+ FLOATNUMBER = 319,
242
+ STRINGLIT = 320,
243
+ NAME_LOWER = 321,
244
+ NAME_UPPER = 322,
245
+ NAME_OTHER = 323,
246
+ BELOW_BAR = 324
236
247
  };
237
248
  #endif
238
249
 
@@ -241,9 +252,11 @@ extern int ndt_yydebug;
241
252
 
242
253
  union YYSTYPE
243
254
  {
244
- #line 86 "grammar.y" /* yacc.c:355 */
255
+ #line 85 "grammar.y" /* yacc.c:352 */
245
256
 
246
- ndt_t *ndt;
257
+ const ndt_t *ndt;
258
+ enum ndt tag;
259
+ enum ndt_alias alias;
247
260
  ndt_field_t *field;
248
261
  ndt_field_seq_t *field_seq;
249
262
  ndt_value_t *typed_value;
@@ -257,7 +270,7 @@ union YYSTYPE
257
270
  ndt_string_seq_t *string_seq;
258
271
  ndt_type_seq_t *type_seq;
259
272
 
260
- #line 261 "grammar.c" /* yacc.c:355 */
273
+ #line 274 "grammar.c" /* yacc.c:352 */
261
274
  };
262
275
 
263
276
  typedef union YYSTYPE YYSTYPE;
@@ -281,21 +294,19 @@ struct YYLTYPE
281
294
 
282
295
 
283
296
 
284
- int ndt_yyparse (yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta, ndt_context_t *ctx);
297
+ int ndt_yyparse (yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx);
285
298
  /* "%code provides" blocks. */
286
- #line 66 "grammar.y" /* yacc.c:355 */
299
+ #line 65 "grammar.y" /* yacc.c:352 */
287
300
 
288
301
  #define YY_DECL extern int ndt_yylexfunc(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, yyscan_t yyscanner, ndt_context_t *ctx)
289
302
  extern int ndt_yylexfunc(YYSTYPE *, YYLTYPE *, yyscan_t, ndt_context_t *);
290
- void yyerror(YYLTYPE *loc, yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta, ndt_context_t *ctx, const char *msg);
303
+ void yyerror(YYLTYPE *loc, yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx, const char *msg);
291
304
 
292
- #line 293 "grammar.c" /* yacc.c:355 */
305
+ #line 306 "grammar.c" /* yacc.c:352 */
293
306
 
294
307
  #endif /* !YY_NDT_YY_GRAMMAR_H_INCLUDED */
295
308
 
296
- /* Copy the second part of user declarations. */
297
309
 
298
- #line 299 "grammar.c" /* yacc.c:358 */
299
310
 
300
311
  #ifdef short
301
312
  # undef short
@@ -316,13 +327,13 @@ typedef signed char yytype_int8;
316
327
  #ifdef YYTYPE_UINT16
317
328
  typedef YYTYPE_UINT16 yytype_uint16;
318
329
  #else
319
- typedef unsigned short int yytype_uint16;
330
+ typedef unsigned short yytype_uint16;
320
331
  #endif
321
332
 
322
333
  #ifdef YYTYPE_INT16
323
334
  typedef YYTYPE_INT16 yytype_int16;
324
335
  #else
325
- typedef short int yytype_int16;
336
+ typedef short yytype_int16;
326
337
  #endif
327
338
 
328
339
  #ifndef YYSIZE_T
@@ -334,7 +345,7 @@ typedef short int yytype_int16;
334
345
  # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
335
346
  # define YYSIZE_T size_t
336
347
  # else
337
- # define YYSIZE_T unsigned int
348
+ # define YYSIZE_T unsigned
338
349
  # endif
339
350
  #endif
340
351
 
@@ -370,15 +381,6 @@ typedef short int yytype_int16;
370
381
  # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
371
382
  #endif
372
383
 
373
- #if !defined _Noreturn \
374
- && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
375
- # if defined _MSC_VER && 1200 <= _MSC_VER
376
- # define _Noreturn __declspec (noreturn)
377
- # else
378
- # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
379
- # endif
380
- #endif
381
-
382
384
  /* Suppress unused-variable warnings by "using" E. */
383
385
  #if ! defined lint || defined __GNUC__
384
386
  # define YYUSE(E) ((void) (E))
@@ -386,7 +388,7 @@ typedef short int yytype_int16;
386
388
  # define YYUSE(E) /* empty */
387
389
  #endif
388
390
 
389
- #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
391
+ #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
390
392
  /* Suppress an incorrect diagnostic about yylval being uninitialized. */
391
393
  # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
392
394
  _Pragma ("GCC diagnostic push") \
@@ -537,29 +539,29 @@ union yyalloc
537
539
  #endif /* !YYCOPY_NEEDED */
538
540
 
539
541
  /* YYFINAL -- State number of the termination state. */
540
- #define YYFINAL 97
542
+ #define YYFINAL 79
541
543
  /* YYLAST -- Last index in YYTABLE. */
542
- #define YYLAST 743
544
+ #define YYLAST 462
543
545
 
544
546
  /* YYNTOKENS -- Number of terminals. */
545
- #define YYNTOKENS 65
547
+ #define YYNTOKENS 70
546
548
  /* YYNNTS -- Number of nonterminals. */
547
- #define YYNNTS 44
549
+ #define YYNNTS 51
548
550
  /* YYNRULES -- Number of rules. */
549
- #define YYNRULES 132
551
+ #define YYNRULES 154
550
552
  /* YYNSTATES -- Number of states. */
551
- #define YYNSTATES 220
553
+ #define YYNSTATES 269
552
554
 
553
- /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
554
- by yylex, with out-of-bounds checking. */
555
555
  #define YYUNDEFTOK 2
556
- #define YYMAXUTOK 319
556
+ #define YYMAXUTOK 324
557
557
 
558
+ /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
559
+ as returned by yylex, with out-of-bounds checking. */
558
560
  #define YYTRANSLATE(YYX) \
559
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
561
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
560
562
 
561
563
  /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
562
- as returned by yylex, without out-of-bounds checking. */
564
+ as returned by yylex. */
563
565
  static const yytype_uint8 yytranslate[] =
564
566
  {
565
567
  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -593,27 +595,30 @@ static const yytype_uint8 yytranslate[] =
593
595
  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
594
596
  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
595
597
  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
596
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64
598
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
599
+ 65, 66, 67, 68, 69
597
600
  };
598
601
 
599
602
  #if YYDEBUG
600
603
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
601
604
  static const yytype_uint16 yyrline[] =
602
605
  {
603
- 0, 198, 198, 202, 203, 204, 208, 209, 210, 211,
604
- 212, 215, 216, 219, 220, 221, 224, 225, 226, 227,
605
- 230, 231, 232, 233, 236, 237, 238, 241, 242, 243,
606
- 244, 245, 246, 247, 248, 251, 254, 255, 256, 257,
607
- 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
608
- 268, 269, 270, 271, 272, 275, 276, 277, 278, 281,
609
- 282, 283, 284, 287, 288, 289, 292, 293, 294, 298,
610
- 299, 300, 303, 304, 307, 310, 311, 314, 315, 316,
611
- 317, 318, 321, 324, 327, 330, 331, 334, 337, 338,
612
- 341, 342, 343, 344, 347, 348, 351, 352, 353, 356,
613
- 357, 358, 361, 362, 365, 366, 369, 370, 371, 374,
614
- 375, 378, 379, 382, 383, 384, 387, 388, 391, 392,
615
- 395, 396, 399, 400, 403, 404, 405, 406, 409, 412,
616
- 413, 416, 417
606
+ 0, 214, 214, 218, 219, 220, 224, 225, 226, 227,
607
+ 228, 231, 232, 235, 236, 239, 240, 241, 244, 245,
608
+ 246, 247, 248, 252, 253, 256, 257, 258, 259, 260,
609
+ 261, 262, 263, 264, 265, 266, 269, 270, 271, 272,
610
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
611
+ 283, 284, 285, 286, 287, 288, 289, 292, 293, 294,
612
+ 295, 298, 299, 300, 301, 304, 305, 306, 309, 310,
613
+ 311, 315, 316, 317, 320, 321, 324, 327, 328, 331,
614
+ 334, 335, 338, 339, 340, 341, 342, 345, 348, 351,
615
+ 352, 353, 356, 357, 360, 363, 364, 367, 370, 371,
616
+ 374, 375, 376, 377, 380, 381, 384, 385, 386, 389,
617
+ 390, 391, 392, 393, 394, 397, 398, 401, 402, 405,
618
+ 406, 407, 408, 409, 410, 413, 414, 417, 418, 421,
619
+ 422, 423, 426, 427, 428, 429, 432, 433, 436, 439,
620
+ 440, 443, 444, 447, 448, 451, 452, 455, 456, 457,
621
+ 460, 463, 464, 467, 468
617
622
  };
618
623
  #endif
619
624
 
@@ -625,24 +630,27 @@ static const char *const yytname[] =
625
630
  "\"end of file\"", "error", "$undefined", "ANY_KIND", "SCALAR_KIND",
626
631
  "VOID", "BOOL", "SIGNED_KIND", "INT8", "INT16", "INT32", "INT64",
627
632
  "UNSIGNED_KIND", "UINT8", "UINT16", "UINT32", "UINT64", "FLOAT_KIND",
628
- "FLOAT16", "FLOAT32", "FLOAT64", "COMPLEX_KIND", "COMPLEX32",
629
- "COMPLEX64", "COMPLEX128", "CATEGORICAL", "NA", "INTPTR", "UINTPTR",
630
- "SIZE", "CHAR", "STRING", "FIXED_STRING_KIND", "FIXED_STRING", "BYTES",
631
- "FIXED_BYTES_KIND", "FIXED_BYTES", "REF", "FIXED", "VAR", "COMMA",
632
- "COLON", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK",
633
- "STAR", "ELLIPSIS", "RARROW", "EQUAL", "LESS", "GREATER", "QUESTIONMARK",
634
- "BANG", "AMPERSAND", "BAR", "ERRTOKEN", "INTEGER", "FLOATNUMBER",
635
- "STRINGLIT", "NAME_LOWER", "NAME_UPPER", "NAME_OTHER", "$accept",
636
- "input", "datashape_or_module", "datashape_with_ellipsis",
637
- "fixed_ellipsis", "datashape", "dimensions", "dimensions_nooption",
638
- "dimensions_tail", "dtype", "scalar", "signed", "unsigned", "ieee_float",
639
- "ieee_complex", "alias", "character", "string", "fixed_string",
640
- "endian_opt", "encoding", "bytes", "fixed_bytes", "ref", "categorical",
641
- "typed_value_seq", "typed_value", "variadic_flag", "comma_variadic_flag",
642
- "tuple_type", "tuple_field_seq", "tuple_field", "record_type",
643
- "record_field_seq", "record_field", "record_field_name", "arguments_opt",
644
- "attribute_seq", "attribute", "untyped_value_seq", "untyped_value",
645
- "function_type", "type_seq_or_void", "type_seq", YY_NULLPTR
633
+ "BFLOAT16", "FLOAT16", "FLOAT32", "FLOAT64", "COMPLEX_KIND",
634
+ "BCOMPLEX32", "COMPLEX32", "COMPLEX64", "COMPLEX128", "CATEGORICAL",
635
+ "NA", "INTPTR", "UINTPTR", "SIZE", "CHAR", "STRING", "FIXED_STRING_KIND",
636
+ "FIXED_STRING", "BYTES", "FIXED_BYTES_KIND", "FIXED_BYTES", "REF",
637
+ "FIXED", "VAR", "ARRAY", "OF", "COMMA", "COLON", "LPAREN", "RPAREN",
638
+ "LBRACE", "RBRACE", "LBRACK", "RBRACK", "STAR", "ELLIPSIS", "RARROW",
639
+ "EQUAL", "LESS", "GREATER", "QUESTIONMARK", "BANG", "AMPERSAND", "BAR",
640
+ "ERRTOKEN", "INTEGER", "FLOATNUMBER", "STRINGLIT", "NAME_LOWER",
641
+ "NAME_UPPER", "NAME_OTHER", "BELOW_BAR", "$accept", "input",
642
+ "datashape_or_module", "datashape_with_ellipsis", "fixed_ellipsis",
643
+ "datashape", "dimensions", "dimensions_nooption", "dimensions_tail",
644
+ "dtype", "scalar", "signed", "unsigned", "ieee_float", "ieee_complex",
645
+ "alias", "character", "string", "fixed_string", "flags_opt",
646
+ "option_opt", "endian_opt", "encoding", "bytes", "array_dimensions",
647
+ "array", "fixed_bytes", "ref", "categorical", "typed_value_seq",
648
+ "typed_value", "variadic_flag", "comma_variadic_flag", "tuple_type",
649
+ "tuple_field_seq", "tuple_field", "record_type", "record_field_seq",
650
+ "record_field", "field_name_or_tag", "union_type", "union_member_seq",
651
+ "union_member", "arguments_opt", "attribute_seq", "attribute",
652
+ "untyped_value_seq", "untyped_value", "function_type",
653
+ "type_seq_or_void", "type_seq", YY_NULLPTR
646
654
  };
647
655
  #endif
648
656
 
@@ -657,16 +665,16 @@ static const yytype_uint16 yytoknum[] =
657
665
  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
658
666
  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
659
667
  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
660
- 315, 316, 317, 318, 319
668
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324
661
669
  };
662
670
  # endif
663
671
 
664
- #define YYPACT_NINF -192
672
+ #define YYPACT_NINF -215
665
673
 
666
674
  #define yypact_value_is_default(Yystate) \
667
- (!!((Yystate) == (-192)))
675
+ (!!((Yystate) == (-215)))
668
676
 
669
- #define YYTABLE_NINF -98
677
+ #define YYTABLE_NINF -131
670
678
 
671
679
  #define yytable_value_is_error(Yytable_value) \
672
680
  0
@@ -675,28 +683,33 @@ static const yytype_uint16 yytoknum[] =
675
683
  STATE-NUM. */
676
684
  static const yytype_int16 yypact[] =
677
685
  {
678
- 134, -192, -192, -192, -192, -192, -192, -192, -16, 5,
679
- -192, -192, 14, 23, -192, 27, 32, 36, -22, 191,
680
- 52, 34, -192, -192, -192, 594, -9, 423, -192, 39,
681
- -192, -27, 96, 100, 111, -192, -192, -192, -192, -192,
682
- -192, -192, -192, -192, -192, -192, -192, -192, -192, 75,
683
- -192, -192, -192, -192, -192, -192, -192, 67, 79, -20,
684
- 63, 76, 64, -192, 64, 423, 64, 80, 92, 23,
685
- -192, 81, 90, 110, 122, -192, -192, -192, -192, 129,
686
- 135, -192, 136, 480, 25, -192, -192, -15, -11, -192,
687
- -192, 480, 138, 537, -21, 480, 144, -192, -192, -192,
688
- -192, -192, -192, -192, -192, -192, -192, -192, -192, -192,
689
- -192, -192, -192, -192, -192, -192, -192, 252, 366, -192,
690
- -192, -192, -192, 109, -192, -192, 157, 118, 154, 120,
691
- -192, 141, 164, 159, 637, 480, -9, 64, -192, 309,
692
- 167, -192, 69, 168, 423, 594, -192, -192, -192, 163,
693
- -192, 366, 154, 171, 161, 108, 170, 172, -192, 480,
694
- 13, -192, -192, -192, -20, -192, -192, 63, -192, 46,
695
- 64, -192, -192, -192, 183, 680, 173, -192, -192, -8,
696
- -192, -192, 166, -192, 154, -192, -29, -192, 175, -192,
697
- -192, -192, -192, -192, -192, -192, -192, 177, 83, -192,
698
- -192, -192, -192, -192, -192, 480, -192, -192, -192, -192,
699
- 64, -192, 17, -192, -192, -4, 83, -192, -192, -192
686
+ 51, -215, -20, 2, 272, -31, 153, -9, -8, 116,
687
+ 17, 4, 392, -215, 79, 96, 102, -215, -215, -215,
688
+ -215, -215, -215, -215, -215, -215, 397, 204, -215, -215,
689
+ -215, -215, -215, -215, -215, -215, 8, -215, 55, -215,
690
+ -215, 58, 77, 61, 61, 76, 86, 97, -215, 38,
691
+ 81, 254, 103, 108, -215, -215, -215, 114, 129, -215,
692
+ 145, -22, 334, 97, 272, -31, 153, 4, 132, 55,
693
+ 148, 35, -215, 334, 158, 334, 95, 334, 141, -215,
694
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
695
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
696
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
697
+ -215, -215, 151, 160, -215, -215, 164, 97, -215, 165,
698
+ 172, -12, -215, -215, -215, 334, -215, -215, 334, 153,
699
+ 146, 320, 170, -17, -215, 5, 383, 334, 116, 61,
700
+ -215, 296, 180, -215, 27, 183, 334, -215, -215, -215,
701
+ -215, 177, 186, 190, 198, 191, 3, 334, -215, 320,
702
+ 201, 72, 199, 200, -215, 334, -19, 184, 189, -215,
703
+ 61, 334, 334, 210, -215, -215, -215, 409, -215, -215,
704
+ -215, 152, 61, 202, -215, 99, 43, -215, -215, -33,
705
+ -215, -23, -215, 90, -215, 170, -215, 64, -215, 194,
706
+ 334, -215, 296, 209, -215, 27, 213, -215, 216, -215,
707
+ -215, -215, -215, -215, -215, -215, -215, -215, 124, -215,
708
+ -215, 219, 133, 138, 220, -215, 241, -215, 334, 159,
709
+ -215, -215, -215, -215, -215, 334, -215, -215, -215, 61,
710
+ -215, 144, -215, 71, -215, -215, -19, -215, -215, 184,
711
+ -215, -215, -215, 226, -215, -215, 19, -215, -215, -27,
712
+ -215, -215, -215, 223, 159, -215, -215, -215, -215
700
713
  };
701
714
 
702
715
  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -704,48 +717,55 @@ static const yytype_int16 yypact[] =
704
717
  means the default is an error. */
705
718
  static const yytype_uint8 yydefact[] =
706
719
  {
707
- 77, 27, 28, 130, 37, 39, 41, 43, 0, 72,
708
- 74, 48, 0, 116, 51, 0, 0, 0, 116, 77,
709
- 94, 0, 78, 79, 80, 77, 0, 77, 81, 0,
710
- 32, 35, 0, 0, 131, 7, 6, 13, 16, 14,
711
- 29, 38, 40, 42, 44, 45, 46, 47, 49, 0,
712
- 50, 52, 54, 53, 30, 31, 4, 0, 129, 0,
713
- 0, 0, 0, 83, 0, 77, 0, 0, 0, 116,
714
- 95, 35, 104, 0, 96, 102, 113, 114, 115, 0,
715
- 96, 109, 0, 77, 35, 17, 15, 0, 0, 19,
716
- 86, 77, 0, 77, 0, 77, 0, 1, 2, 36,
717
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
718
- 65, 66, 67, 68, 69, 70, 71, 77, 77, 93,
719
- 90, 91, 92, 0, 88, 82, 0, 0, 0, 0,
720
- 118, 0, 0, 0, 77, 77, 0, 0, 99, 77,
721
- 0, 106, 97, 0, 77, 77, 26, 11, 24, 0,
722
- 20, 77, 32, 0, 0, 0, 0, 0, 22, 77,
723
- 35, 131, 128, 132, 0, 87, 73, 0, 75, 0,
724
- 0, 117, 84, 85, 0, 77, 35, 9, 23, 0,
725
- 98, 103, 0, 100, 113, 110, 0, 107, 111, 25,
726
- 5, 33, 34, 8, 18, 12, 89, 0, 0, 125,
727
- 126, 127, 124, 120, 119, 77, 10, 105, 101, 108,
728
- 0, 76, 0, 122, 21, 0, 0, 121, 112, 123
720
+ 80, 152, 0, 139, 80, 104, 0, 0, 81, 0,
721
+ 0, 31, 35, 131, 0, 0, 153, 7, 6, 13,
722
+ 15, 14, 27, 48, 49, 51, 0, 82, 52, 10,
723
+ 89, 54, 56, 55, 28, 29, 0, 30, 132, 136,
724
+ 4, 0, 151, 0, 0, 0, 0, 139, 105, 35,
725
+ 117, 82, 0, 106, 115, 129, 130, 0, 106, 125,
726
+ 0, 0, 80, 139, 80, 104, 0, 32, 130, 134,
727
+ 0, 0, 17, 80, 0, 80, 0, 80, 0, 1,
728
+ 2, 36, 37, 57, 58, 59, 60, 39, 61, 62,
729
+ 63, 64, 41, 42, 65, 66, 67, 44, 45, 68,
730
+ 69, 70, 71, 72, 73, 38, 40, 43, 46, 47,
731
+ 25, 26, 0, 74, 76, 50, 0, 139, 53, 0,
732
+ 0, 0, 83, 84, 85, 80, 86, 79, 80, 0,
733
+ 80, 80, 0, 0, 141, 0, 80, 80, 0, 0,
734
+ 109, 80, 0, 119, 107, 0, 80, 133, 24, 11,
735
+ 23, 0, 0, 106, 0, 106, 0, 80, 18, 80,
736
+ 0, 0, 0, 0, 20, 80, 0, 0, 0, 88,
737
+ 0, 80, 80, 0, 96, 138, 137, 35, 153, 150,
738
+ 154, 0, 0, 0, 140, 81, 35, 9, 21, 0,
739
+ 108, 31, 116, 0, 110, 129, 126, 0, 120, 127,
740
+ 80, 112, 80, 0, 122, 107, 0, 135, 0, 5,
741
+ 33, 8, 16, 12, 103, 100, 101, 102, 0, 98,
742
+ 87, 0, 0, 0, 0, 92, 82, 93, 80, 0,
743
+ 147, 148, 149, 143, 142, 80, 118, 111, 121, 0,
744
+ 22, 0, 113, 0, 123, 34, 0, 97, 75, 0,
745
+ 77, 94, 95, 0, 90, 91, 0, 145, 19, 0,
746
+ 114, 124, 99, 0, 0, 144, 128, 78, 146
729
747
  };
730
748
 
731
749
  /* YYPGOTO[NTERM-NUM]. */
732
750
  static const yytype_int16 yypgoto[] =
733
751
  {
734
- -192, -192, -192, -108, 124, -14, -23, -24, -83, -25,
735
- -192, -192, -192, -192, -192, -192, -192, -192, -192, -192,
736
- 70, -192, -192, -192, -192, -192, 72, 218, 169, -192,
737
- -192, 102, -192, -192, 97, -192, 238, -62, 82, -192,
738
- -191, -192, 143, -192
752
+ -215, -215, -215, -106, 195, -2, -5, -215, -59, -54,
753
+ -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
754
+ 0, -215, 23, -215, -215, -151, -215, -215, -215, -215,
755
+ 36, 11, -48, -215, 221, -135, -215, 229, -131, -4,
756
+ -215, -1, 155, -51, -41, 113, -215, -214, -215, 169,
757
+ -215
739
758
  };
740
759
 
741
760
  /* YYDEFGOTO[NTERM-NUM]. */
742
761
  static const yytype_int16 yydefgoto[] =
743
762
  {
744
- -1, 32, 33, 34, 35, 36, 37, 38, 147, 39,
745
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
746
- 126, 50, 51, 52, 53, 123, 124, 73, 140, 54,
747
- 74, 75, 55, 80, 81, 82, 68, 129, 130, 212,
748
- 203, 56, 57, 58
763
+ -1, 14, 15, 16, 17, 18, 19, 20, 149, 21,
764
+ 22, 105, 106, 107, 108, 109, 23, 24, 25, 26,
765
+ 51, 127, 221, 28, 29, 30, 31, 32, 33, 218,
766
+ 219, 52, 142, 34, 53, 54, 35, 58, 59, 36,
767
+ 37, 38, 39, 46, 133, 134, 256, 233, 40, 41,
768
+ 42
749
769
  };
750
770
 
751
771
  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -753,226 +773,179 @@ static const yytype_int16 yydefgoto[] =
753
773
  number is the opposite. If YYTABLE_NINF, syntax error. */
754
774
  static const yytype_int16 yytable[] =
755
775
  {
756
- 86, 85, 131, 89, 133, 72, 119, 213, 150, 161,
757
- 163, 170, 158, 90, 92, 93, 209, 17, 69, 94,
758
- 62, 95, 96, 17, 69, 219, 59, 67, 21, 17,
759
- 69, 154, 170, 87, 26, 136, 170, 95, 29, 120,
760
- 121, 122, 155, 190, 29, 87, 26, 60, 149, 207,
761
- 29, 132, 178, 218, 88, 93, 61, 216, 148, 94,
762
- 146, 95, 96, 85, 217, 62, 148, 93, 146, 64,
763
- 148, 157, 146, 95, 65, 179, 195, 182, 66, 153,
764
- 186, 99, 83, 100, 101, 102, 103, 91, 104, 105,
765
- 106, 107, 198, 108, 109, 110, 97, 111, 112, 113,
766
- 98, 70, 114, 115, 116, 199, 200, 201, 202, 177,
767
- 148, -3, 146, 157, 76, 77, 78, 117, 180, 118,
768
- 189, 85, 214, 93, 125, 72, 128, 136, 134, 95,
769
- 188, 184, 77, 78, 148, 127, 146, 1, 2, 3,
770
- 135, 4, 199, 200, 201, 202, 5, 137, 215, 164,
771
- 206, 6, 165, 138, 136, 7, 95, 96, 167, 8,
772
- 170, 168, 139, 171, 9, 10, 11, 12, 13, 14,
773
- 15, 16, 17, 18, 141, 142, 19, 144, 20, 151,
774
- 148, 170, 146, 21, 172, 22, 23, 24, 25, 26,
775
- 27, 28, 159, 29, 1, 2, 30, 31, 4, 170,
776
- 166, 170, 174, 5, 192, 169, 170, 173, 6, 208,
777
- 183, 95, 7, 187, 191, 93, 8, 193, 156, 194,
778
- 211, 9, 10, 11, 12, 13, 14, 15, 16, 17,
779
- 69, 205, 210, 19, -94, 20, 196, 197, 79, 185,
780
- 70, 181, 22, 23, 24, 25, 26, 27, 28, 143,
781
- 29, 63, 204, 30, 71, 1, 2, 3, 0, 4,
782
- 162, 0, 0, 0, 5, 0, 0, 0, 0, 6,
783
- 0, 0, 0, 7, 0, 0, 0, 8, 0, 0,
784
- 0, 0, 9, 10, 11, 12, 13, 14, 15, 16,
785
- 17, 18, 0, 0, 19, 0, 20, 0, 0, 0,
786
- 0, 21, 0, 22, 23, 24, 25, 26, 27, 28,
787
- 0, 29, 1, 2, 30, 160, 4, 0, 0, 0,
788
- 0, 5, 0, 0, 0, 0, 6, 0, 0, 0,
789
- 7, 0, 0, 0, 8, 0, 0, 0, 0, 9,
790
- 10, 11, 12, 13, 14, 15, 16, 17, 69, 0,
791
- 0, 19, -97, 20, 0, 0, 0, 0, 180, 0,
792
- 22, 23, 24, 25, 26, 27, 28, 0, 29, 1,
793
- 2, 152, 71, 4, 0, 0, 0, 0, 5, 0,
794
- 0, 0, 0, 6, 0, 0, 0, 7, 0, 0,
795
- 0, 8, 0, 0, 0, 0, 9, 10, 11, 12,
796
- 13, 14, 15, 16, 17, 18, 0, 0, 19, 0,
797
- 20, 0, 0, 0, 0, 21, 0, 22, 23, 24,
798
- 25, 26, 27, 28, 0, 29, 1, 2, 30, 160,
799
- 4, 0, 0, 0, 0, 5, 0, 0, 0, 0,
800
- 6, 0, 0, 0, 7, 0, 0, 0, 8, 0,
801
- 0, 0, 0, 9, 10, 11, 12, 13, 14, 15,
802
- 16, 17, 69, 0, 0, 19, 0, 20, 0, 0,
803
- 0, 0, 0, 0, 22, 23, 24, 25, 26, 27,
804
- 28, 0, 29, 1, 2, 30, 71, 4, 0, 0,
805
- 0, 0, 5, 0, 0, 0, 0, 6, 0, 0,
806
- 0, 7, 0, 0, 0, 8, 0, 0, 0, 0,
807
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 69,
808
- 0, 0, 19, 0, 20, 0, 0, 0, 0, 0,
809
- 0, 22, 23, 24, 145, 26, 27, 28, 0, 29,
810
- 1, 2, 30, 71, 4, 0, 0, 0, 0, 5,
811
- 0, 0, 0, 0, 6, 0, 0, 0, 7, 0,
812
- 0, 0, 8, 0, 0, 0, 0, 9, 10, 11,
813
- 12, 13, 14, 15, 16, 17, 69, 0, 0, 19,
814
- 0, 20, 0, 0, 0, 0, 0, 0, 22, 23,
815
- 24, 25, 26, 27, 28, 0, 29, 1, 2, 152,
816
- 71, 4, 0, 0, 0, 0, 5, 0, 0, 0,
817
- 0, 6, 0, 0, 0, 7, 0, 0, 0, 8,
818
- 0, 0, 0, 0, 9, 10, 11, 12, 13, 14,
819
- 15, 16, 17, 69, 0, 0, 19, 0, 20, 0,
820
- 1, 2, 0, 0, 4, 22, 23, 24, 0, 5,
821
- 27, 28, 0, 29, 6, 0, 30, 84, 7, 0,
822
- 0, 0, 8, 0, 0, 0, 0, 9, 10, 11,
823
- 12, 13, 14, 15, 16, 0, 0, 0, 0, 19,
824
- 0, 20, 0, 1, 2, 0, 0, 4, 22, 23,
825
- 24, 175, 5, 27, 28, 0, 0, 6, 0, 30,
826
- 176, 7, 0, 0, 0, 8, 0, 0, 0, 0,
827
- 9, 10, 11, 12, 13, 14, 15, 16, 0, 0,
828
- 0, 0, 19, 0, 20, 0, 0, 0, 0, 0,
829
- 0, 22, 23, 24, 0, 0, 27, 28, 0, 0,
830
- 0, 0, 30, 176
776
+ 27, 60, 50, 135, 72, 61, 192, 69, 150, 214,
777
+ 145, 182, 151, 196, 158, 257, 57, 182, 164, 150,
778
+ -129, 227, 48, 150, 178, 180, 43, 182, 236, 147,
779
+ 183, 172, 181, 63, 266, 55, 56, 13, 64, 129,
780
+ 65, 173, 66, 62, 215, 216, 217, -129, 44, 182,
781
+ 268, 128, 184, 209, 207, 45, 1, 148, 67, 68,
782
+ 13, 60, 50, 264, 129, 156, 169, 192, 148, 73,
783
+ 265, 163, 148, 160, 196, 152, 154, 255, 188, 79,
784
+ 190, -130, 187, 150, 75, 138, -130, 77, 138, 75,
785
+ 77, 2, 3, 195, 56, 13, 80, 4, 189, 5,
786
+ 193, 6, -3, 197, 7, 203, 213, 206, 182, 8,
787
+ 9, 150, 130, 238, 10, 182, 129, 11, 12, 13,
788
+ 261, 131, 138, 174, 77, 78, 175, 132, 136, 223,
789
+ 27, 27, 148, 163, 182, 2, 47, 237, 137, 50,
790
+ 60, 240, 139, 44, 199, 64, 150, 65, 7, 66,
791
+ 140, 1, 141, 70, 9, 208, 2, 47, 10, 27,
792
+ 148, 241, 161, 143, 243, 67, 68, 13, 246, 224,
793
+ 225, 247, 226, 144, 70, 9, 258, 249, 157, 10,
794
+ 250, 150, 182, 71, 69, 251, 2, 3, 182, 63,
795
+ 146, 260, 4, 165, 5, 148, 6, 166, 259, 7,
796
+ 50, 60, 229, 159, 8, 9, 167, 110, 111, 10,
797
+ 168, 170, 11, 177, 13, 230, 231, 232, 171, 55,
798
+ 56, 13, 230, 231, 232, 181, 254, 194, 226, 200,
799
+ 148, 112, 198, 201, 202, 205, 113, 114, 115, 116,
800
+ 117, 118, 119, 120, 110, 111, 121, 204, 210, 220,
801
+ 211, 212, 222, 228, 235, 239, 242, 110, 111, 122,
802
+ 123, 124, 244, 245, 125, 126, 248, 252, 112, 172,
803
+ 267, 162, 263, 113, 114, 115, 116, 117, 118, 119,
804
+ 120, 112, 262, 253, 176, 153, 113, 114, 115, 116,
805
+ 117, 118, 119, 120, 155, 234, 122, 123, 124, 179,
806
+ 0, 125, 126, 0, 0, 0, 0, 0, 0, 122,
807
+ 123, 124, 2, 47, 125, 126, 0, 0, 4, -104,
808
+ 5, 0, 6, 0, 0, 48, 0, 0, 0, 0,
809
+ 8, 9, 0, 0, 0, 10, 2, 47, 11, 49,
810
+ 13, 0, 4, -107, 5, 0, 6, 0, 0, 190,
811
+ 0, 0, 0, 0, 8, 9, 0, 0, 0, 10,
812
+ 2, 3, 191, 49, 13, 0, 4, 0, 5, 0,
813
+ 6, 0, 0, 7, 2, 47, 0, 0, 8, 9,
814
+ 4, 0, 5, 10, 6, 0, 11, 177, 13, 0,
815
+ 0, 0, 8, 9, 0, 0, 0, 10, 0, 0,
816
+ 11, 49, 13, 81, 82, 83, 84, 85, 86, 87,
817
+ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
818
+ 98, 99, 100, 101, 0, 0, 102, 103, 104, 4,
819
+ 0, 5, 0, 6, 0, -130, 0, 74, 75, 0,
820
+ 0, 185, 76, 0, 77, 78, 0, 0, 0, 11,
821
+ 186, 13, -130, 0, 0, 75, 0, 0, 0, 76,
822
+ 0, 77, 78
831
823
  };
832
824
 
833
825
  static const yytype_int16 yycheck[] =
834
826
  {
835
- 25, 25, 64, 26, 66, 19, 26, 198, 91, 117,
836
- 118, 40, 95, 27, 41, 42, 45, 38, 39, 46,
837
- 42, 48, 49, 38, 39, 216, 42, 49, 49, 38,
838
- 39, 93, 40, 54, 55, 46, 40, 48, 59, 59,
839
- 60, 61, 63, 151, 59, 54, 55, 42, 63, 57,
840
- 59, 65, 135, 57, 63, 42, 42, 40, 83, 46,
841
- 83, 48, 49, 87, 47, 42, 91, 42, 91, 42,
842
- 95, 94, 95, 48, 42, 137, 159, 139, 42, 93,
843
- 142, 6, 48, 8, 9, 10, 11, 48, 13, 14,
844
- 15, 16, 46, 18, 19, 20, 0, 22, 23, 24,
845
- 0, 49, 27, 28, 29, 59, 60, 61, 62, 134,
846
- 135, 0, 135, 136, 62, 63, 64, 50, 49, 40,
847
- 145, 145, 205, 42, 61, 139, 62, 46, 48, 48,
848
- 144, 62, 63, 64, 159, 59, 159, 3, 4, 5,
849
- 48, 7, 59, 60, 61, 62, 12, 57, 210, 40,
850
- 175, 17, 43, 43, 46, 21, 48, 49, 40, 25,
851
- 40, 43, 40, 43, 30, 31, 32, 33, 34, 35,
852
- 36, 37, 38, 39, 45, 40, 42, 41, 44, 41,
853
- 205, 40, 205, 49, 43, 51, 52, 53, 54, 55,
854
- 56, 57, 48, 59, 3, 4, 62, 63, 7, 40,
855
- 43, 40, 43, 12, 43, 51, 40, 43, 17, 43,
856
- 43, 48, 21, 45, 43, 42, 25, 47, 94, 47,
857
- 43, 30, 31, 32, 33, 34, 35, 36, 37, 38,
858
- 39, 48, 57, 42, 43, 44, 164, 167, 20, 142,
859
- 49, 139, 51, 52, 53, 54, 55, 56, 57, 80,
860
- 59, 13, 170, 62, 63, 3, 4, 5, -1, 7,
861
- 117, -1, -1, -1, 12, -1, -1, -1, -1, 17,
862
- -1, -1, -1, 21, -1, -1, -1, 25, -1, -1,
863
- -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
864
- 38, 39, -1, -1, 42, -1, 44, -1, -1, -1,
865
- -1, 49, -1, 51, 52, 53, 54, 55, 56, 57,
866
- -1, 59, 3, 4, 62, 63, 7, -1, -1, -1,
867
- -1, 12, -1, -1, -1, -1, 17, -1, -1, -1,
868
- 21, -1, -1, -1, 25, -1, -1, -1, -1, 30,
869
- 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
870
- -1, 42, 43, 44, -1, -1, -1, -1, 49, -1,
871
- 51, 52, 53, 54, 55, 56, 57, -1, 59, 3,
872
- 4, 62, 63, 7, -1, -1, -1, -1, 12, -1,
873
- -1, -1, -1, 17, -1, -1, -1, 21, -1, -1,
874
- -1, 25, -1, -1, -1, -1, 30, 31, 32, 33,
875
- 34, 35, 36, 37, 38, 39, -1, -1, 42, -1,
876
- 44, -1, -1, -1, -1, 49, -1, 51, 52, 53,
877
- 54, 55, 56, 57, -1, 59, 3, 4, 62, 63,
878
- 7, -1, -1, -1, -1, 12, -1, -1, -1, -1,
879
- 17, -1, -1, -1, 21, -1, -1, -1, 25, -1,
880
- -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
881
- 37, 38, 39, -1, -1, 42, -1, 44, -1, -1,
882
- -1, -1, -1, -1, 51, 52, 53, 54, 55, 56,
883
- 57, -1, 59, 3, 4, 62, 63, 7, -1, -1,
884
- -1, -1, 12, -1, -1, -1, -1, 17, -1, -1,
885
- -1, 21, -1, -1, -1, 25, -1, -1, -1, -1,
886
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
887
- -1, -1, 42, -1, 44, -1, -1, -1, -1, -1,
888
- -1, 51, 52, 53, 54, 55, 56, 57, -1, 59,
889
- 3, 4, 62, 63, 7, -1, -1, -1, -1, 12,
890
- -1, -1, -1, -1, 17, -1, -1, -1, 21, -1,
891
- -1, -1, 25, -1, -1, -1, -1, 30, 31, 32,
892
- 33, 34, 35, 36, 37, 38, 39, -1, -1, 42,
893
- -1, 44, -1, -1, -1, -1, -1, -1, 51, 52,
894
- 53, 54, 55, 56, 57, -1, 59, 3, 4, 62,
895
- 63, 7, -1, -1, -1, -1, 12, -1, -1, -1,
896
- -1, 17, -1, -1, -1, 21, -1, -1, -1, 25,
897
- -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
898
- 36, 37, 38, 39, -1, -1, 42, -1, 44, -1,
899
- 3, 4, -1, -1, 7, 51, 52, 53, -1, 12,
900
- 56, 57, -1, 59, 17, -1, 62, 63, 21, -1,
901
- -1, -1, 25, -1, -1, -1, -1, 30, 31, 32,
902
- 33, 34, 35, 36, 37, -1, -1, -1, -1, 42,
903
- -1, 44, -1, 3, 4, -1, -1, 7, 51, 52,
904
- 53, 54, 12, 56, 57, -1, -1, 17, -1, 62,
905
- 63, 21, -1, -1, -1, 25, -1, -1, -1, -1,
906
- 30, 31, 32, 33, 34, 35, 36, 37, -1, -1,
907
- -1, -1, 42, -1, 44, -1, -1, -1, -1, -1,
908
- -1, 51, 52, 53, -1, -1, 56, 57, -1, -1,
909
- -1, -1, 62, 63
827
+ 0, 5, 4, 44, 9, 6, 141, 8, 62, 28,
828
+ 58, 44, 63, 144, 73, 229, 5, 44, 77, 73,
829
+ 43, 172, 53, 77, 130, 131, 46, 44, 61, 51,
830
+ 47, 43, 55, 41, 61, 66, 67, 68, 46, 61,
831
+ 48, 53, 50, 52, 63, 64, 65, 43, 46, 44,
832
+ 264, 43, 47, 159, 51, 53, 5, 62, 66, 67,
833
+ 68, 65, 64, 44, 61, 66, 117, 202, 73, 52,
834
+ 51, 76, 77, 75, 205, 64, 65, 228, 137, 0,
835
+ 53, 43, 136, 137, 46, 50, 43, 52, 50, 46,
836
+ 52, 40, 41, 66, 67, 68, 0, 46, 139, 48,
837
+ 141, 50, 0, 144, 53, 153, 165, 155, 44, 58,
838
+ 59, 165, 54, 49, 63, 44, 61, 66, 67, 68,
839
+ 49, 44, 50, 125, 52, 53, 128, 66, 52, 170,
840
+ 130, 131, 137, 138, 44, 40, 41, 47, 52, 141,
841
+ 144, 200, 61, 46, 146, 46, 200, 48, 53, 50,
842
+ 47, 5, 44, 58, 59, 157, 40, 41, 63, 159,
843
+ 165, 202, 67, 49, 205, 66, 67, 68, 44, 171,
844
+ 172, 47, 172, 44, 58, 59, 235, 44, 46, 63,
845
+ 47, 235, 44, 67, 185, 47, 40, 41, 44, 41,
846
+ 45, 47, 46, 52, 48, 200, 50, 46, 239, 53,
847
+ 202, 205, 50, 45, 58, 59, 46, 3, 4, 63,
848
+ 46, 46, 66, 67, 68, 63, 64, 65, 46, 66,
849
+ 67, 68, 63, 64, 65, 55, 228, 47, 228, 52,
850
+ 235, 27, 49, 47, 44, 44, 32, 33, 34, 35,
851
+ 36, 37, 38, 39, 3, 4, 42, 49, 47, 65,
852
+ 51, 51, 63, 43, 52, 61, 47, 3, 4, 55,
853
+ 56, 57, 49, 47, 60, 61, 47, 47, 27, 43,
854
+ 47, 76, 249, 32, 33, 34, 35, 36, 37, 38,
855
+ 39, 27, 246, 42, 129, 64, 32, 33, 34, 35,
856
+ 36, 37, 38, 39, 65, 182, 55, 56, 57, 130,
857
+ -1, 60, 61, -1, -1, -1, -1, -1, -1, 55,
858
+ 56, 57, 40, 41, 60, 61, -1, -1, 46, 47,
859
+ 48, -1, 50, -1, -1, 53, -1, -1, -1, -1,
860
+ 58, 59, -1, -1, -1, 63, 40, 41, 66, 67,
861
+ 68, -1, 46, 47, 48, -1, 50, -1, -1, 53,
862
+ -1, -1, -1, -1, 58, 59, -1, -1, -1, 63,
863
+ 40, 41, 66, 67, 68, -1, 46, -1, 48, -1,
864
+ 50, -1, -1, 53, 40, 41, -1, -1, 58, 59,
865
+ 46, -1, 48, 63, 50, -1, 66, 67, 68, -1,
866
+ -1, -1, 58, 59, -1, -1, -1, 63, -1, -1,
867
+ 66, 67, 68, 6, 7, 8, 9, 10, 11, 12,
868
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
869
+ 23, 24, 25, 26, -1, -1, 29, 30, 31, 46,
870
+ -1, 48, -1, 50, -1, 43, -1, 45, 46, -1,
871
+ -1, 58, 50, -1, 52, 53, -1, -1, -1, 66,
872
+ 67, 68, 43, -1, -1, 46, -1, -1, -1, 50,
873
+ -1, 52, 53
910
874
  };
911
875
 
912
876
  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
913
877
  symbol of state STATE-NUM. */
914
878
  static const yytype_uint8 yystos[] =
915
879
  {
916
- 0, 3, 4, 5, 7, 12, 17, 21, 25, 30,
917
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 42,
918
- 44, 49, 51, 52, 53, 54, 55, 56, 57, 59,
919
- 62, 63, 66, 67, 68, 69, 70, 71, 72, 74,
920
- 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
921
- 86, 87, 88, 89, 94, 97, 106, 107, 108, 42,
922
- 42, 42, 42, 101, 42, 42, 42, 49, 101, 39,
923
- 49, 63, 70, 92, 95, 96, 62, 63, 64, 92,
924
- 98, 99, 100, 48, 63, 72, 74, 54, 63, 71,
925
- 70, 48, 41, 42, 46, 48, 49, 0, 0, 6,
926
- 8, 9, 10, 11, 13, 14, 15, 16, 18, 19,
927
- 20, 22, 23, 24, 27, 28, 29, 50, 40, 26,
928
- 59, 60, 61, 90, 91, 61, 85, 59, 62, 102,
929
- 103, 102, 70, 102, 48, 48, 46, 57, 43, 40,
930
- 93, 45, 40, 93, 41, 54, 71, 73, 74, 63,
931
- 73, 41, 62, 70, 102, 63, 69, 71, 73, 48,
932
- 63, 68, 107, 68, 40, 43, 43, 40, 43, 51,
933
- 40, 43, 43, 43, 43, 54, 63, 74, 73, 102,
934
- 49, 96, 102, 43, 62, 99, 102, 45, 70, 74,
935
- 68, 43, 43, 47, 47, 73, 91, 85, 46, 59,
936
- 60, 61, 62, 105, 103, 48, 74, 57, 43, 45,
937
- 57, 43, 104, 105, 73, 102, 40, 47, 57, 105
880
+ 0, 5, 40, 41, 46, 48, 50, 53, 58, 59,
881
+ 63, 66, 67, 68, 71, 72, 73, 74, 75, 76,
882
+ 77, 79, 80, 86, 87, 88, 89, 90, 93, 94,
883
+ 95, 96, 97, 98, 103, 106, 109, 110, 111, 112,
884
+ 118, 119, 120, 46, 46, 53, 113, 41, 53, 67,
885
+ 75, 90, 101, 104, 105, 66, 67, 101, 107, 108,
886
+ 109, 111, 52, 41, 46, 48, 50, 66, 67, 111,
887
+ 58, 67, 76, 52, 45, 46, 50, 52, 53, 0,
888
+ 0, 6, 7, 8, 9, 10, 11, 12, 13, 14,
889
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
890
+ 25, 26, 29, 30, 31, 81, 82, 83, 84, 85,
891
+ 3, 4, 27, 32, 33, 34, 35, 36, 37, 38,
892
+ 39, 42, 55, 56, 57, 60, 61, 91, 43, 61,
893
+ 54, 44, 66, 114, 115, 114, 52, 52, 50, 61,
894
+ 47, 44, 102, 49, 44, 102, 45, 51, 76, 78,
895
+ 79, 113, 101, 104, 101, 107, 111, 46, 78, 45,
896
+ 75, 67, 74, 76, 78, 52, 46, 46, 46, 113,
897
+ 46, 46, 43, 53, 75, 75, 112, 67, 73, 119,
898
+ 73, 55, 44, 47, 47, 58, 67, 79, 78, 114,
899
+ 53, 66, 105, 114, 47, 66, 108, 114, 49, 75,
900
+ 52, 47, 44, 102, 49, 44, 102, 51, 75, 73,
901
+ 47, 51, 51, 78, 28, 63, 64, 65, 99, 100,
902
+ 65, 92, 63, 114, 75, 75, 90, 95, 43, 50,
903
+ 63, 64, 65, 117, 115, 52, 61, 47, 49, 61,
904
+ 78, 114, 47, 114, 49, 47, 44, 47, 47, 44,
905
+ 47, 47, 47, 42, 75, 95, 116, 117, 78, 114,
906
+ 47, 49, 100, 92, 44, 51, 61, 47, 117
938
907
  };
939
908
 
940
909
  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
941
910
  static const yytype_uint8 yyr1[] =
942
911
  {
943
- 0, 65, 66, 67, 67, 67, 68, 68, 68, 68,
944
- 68, 69, 69, 70, 70, 70, 71, 71, 71, 71,
945
- 72, 72, 72, 72, 73, 73, 73, 74, 74, 74,
946
- 74, 74, 74, 74, 74, 74, 75, 75, 75, 75,
947
- 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
948
- 75, 75, 75, 75, 75, 76, 76, 76, 76, 77,
949
- 77, 77, 77, 78, 78, 78, 79, 79, 79, 80,
950
- 80, 80, 81, 81, 82, 83, 83, 84, 84, 84,
951
- 84, 84, 85, 86, 87, 88, 88, 89, 90, 90,
952
- 91, 91, 91, 91, 92, 92, 93, 93, 93, 94,
953
- 94, 94, 95, 95, 96, 96, 97, 97, 97, 98,
954
- 98, 99, 99, 100, 100, 100, 101, 101, 102, 102,
955
- 103, 103, 104, 104, 105, 105, 105, 105, 106, 107,
956
- 107, 108, 108
912
+ 0, 70, 71, 72, 72, 72, 73, 73, 73, 73,
913
+ 73, 74, 74, 75, 75, 76, 76, 76, 77, 77,
914
+ 77, 77, 77, 78, 78, 79, 79, 79, 79, 79,
915
+ 79, 79, 79, 79, 79, 79, 80, 80, 80, 80,
916
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
917
+ 80, 80, 80, 80, 80, 80, 80, 81, 81, 81,
918
+ 81, 82, 82, 82, 82, 83, 83, 83, 84, 84,
919
+ 84, 85, 85, 85, 86, 86, 87, 88, 88, 89,
920
+ 90, 90, 91, 91, 91, 91, 91, 92, 93, 94,
921
+ 94, 94, 95, 95, 96, 97, 97, 98, 99, 99,
922
+ 100, 100, 100, 100, 101, 101, 102, 102, 102, 103,
923
+ 103, 103, 103, 103, 103, 104, 104, 105, 105, 106,
924
+ 106, 106, 106, 106, 106, 107, 107, 108, 108, 109,
925
+ 109, 109, 110, 110, 110, 110, 111, 111, 112, 113,
926
+ 113, 114, 114, 115, 115, 116, 116, 117, 117, 117,
927
+ 118, 119, 119, 120, 120
957
928
  };
958
929
 
959
930
  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
960
931
  static const yytype_uint8 yyr2[] =
961
932
  {
962
933
  0, 2, 2, 1, 1, 4, 1, 1, 4, 4,
963
- 5, 3, 4, 1, 1, 2, 1, 2, 4, 2,
964
- 3, 6, 3, 4, 1, 2, 1, 1, 1, 1,
965
- 1, 1, 1, 4, 4, 1, 2, 1, 1, 1,
934
+ 1, 3, 4, 1, 1, 1, 4, 2, 3, 6,
935
+ 3, 4, 5, 1, 1, 2, 2, 1, 1, 1,
936
+ 1, 1, 2, 4, 5, 1, 2, 2, 2, 2,
937
+ 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
938
+ 2, 1, 1, 2, 1, 1, 1, 1, 1, 1,
966
939
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
967
- 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
968
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
969
- 2, 2, 1, 4, 1, 4, 6, 0, 1, 1,
970
- 1, 1, 1, 2, 4, 4, 2, 4, 1, 3,
940
+ 1, 1, 1, 1, 2, 5, 2, 5, 7, 2,
941
+ 0, 1, 0, 1, 1, 1, 1, 1, 3, 1,
942
+ 5, 5, 4, 4, 5, 5, 3, 5, 1, 3,
971
943
  1, 1, 1, 1, 0, 1, 0, 1, 2, 3,
972
- 4, 5, 1, 3, 1, 4, 3, 4, 5, 1,
973
- 3, 3, 6, 1, 1, 1, 0, 3, 1, 3,
974
- 3, 5, 1, 3, 1, 1, 1, 1, 3, 1,
975
- 1, 1, 3
944
+ 4, 5, 4, 5, 6, 1, 3, 1, 4, 3,
945
+ 4, 5, 4, 5, 6, 1, 3, 3, 6, 1,
946
+ 1, 1, 1, 3, 2, 4, 1, 3, 3, 0,
947
+ 3, 1, 3, 3, 5, 1, 3, 1, 1, 1,
948
+ 3, 1, 1, 1, 3
976
949
  };
977
950
 
978
951
 
@@ -988,22 +961,22 @@ static const yytype_uint8 yyr2[] =
988
961
 
989
962
  #define YYRECOVERING() (!!yyerrstatus)
990
963
 
991
- #define YYBACKUP(Token, Value) \
992
- do \
993
- if (yychar == YYEMPTY) \
994
- { \
995
- yychar = (Token); \
996
- yylval = (Value); \
997
- YYPOPSTACK (yylen); \
998
- yystate = *yyssp; \
999
- goto yybackup; \
1000
- } \
1001
- else \
1002
- { \
1003
- yyerror (&yylloc, scanner, ast, meta, ctx, YY_("syntax error: cannot back up")); \
1004
- YYERROR; \
1005
- } \
1006
- while (0)
964
+ #define YYBACKUP(Token, Value) \
965
+ do \
966
+ if (yychar == YYEMPTY) \
967
+ { \
968
+ yychar = (Token); \
969
+ yylval = (Value); \
970
+ YYPOPSTACK (yylen); \
971
+ yystate = *yyssp; \
972
+ goto yybackup; \
973
+ } \
974
+ else \
975
+ { \
976
+ yyerror (&yylloc, scanner, ast, ctx, YY_("syntax error: cannot back up")); \
977
+ YYERROR; \
978
+ } \
979
+ while (0)
1007
980
 
1008
981
  /* Error token number */
1009
982
  #define YYTERROR 1
@@ -1062,10 +1035,10 @@ do { \
1062
1035
  /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1063
1036
 
1064
1037
  YY_ATTRIBUTE_UNUSED
1065
- static unsigned
1038
+ static int
1066
1039
  yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1067
1040
  {
1068
- unsigned res = 0;
1041
+ int res = 0;
1069
1042
  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1070
1043
  if (0 <= yylocp->first_line)
1071
1044
  {
@@ -1102,50 +1075,49 @@ do { \
1102
1075
  { \
1103
1076
  YYFPRINTF (stderr, "%s ", Title); \
1104
1077
  yy_symbol_print (stderr, \
1105
- Type, Value, Location, scanner, ast, meta, ctx); \
1078
+ Type, Value, Location, scanner, ast, ctx); \
1106
1079
  YYFPRINTF (stderr, "\n"); \
1107
1080
  } \
1108
1081
  } while (0)
1109
1082
 
1110
1083
 
1111
- /*----------------------------------------.
1112
- | Print this symbol's value on YYOUTPUT. |
1113
- `----------------------------------------*/
1084
+ /*-----------------------------------.
1085
+ | Print this symbol's value on YYO. |
1086
+ `-----------------------------------*/
1114
1087
 
1115
1088
  static void
1116
- yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta, ndt_context_t *ctx)
1089
+ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx)
1117
1090
  {
1118
- FILE *yyo = yyoutput;
1119
- YYUSE (yyo);
1091
+ FILE *yyoutput = yyo;
1092
+ YYUSE (yyoutput);
1120
1093
  YYUSE (yylocationp);
1121
1094
  YYUSE (scanner);
1122
1095
  YYUSE (ast);
1123
- YYUSE (meta);
1124
1096
  YYUSE (ctx);
1125
1097
  if (!yyvaluep)
1126
1098
  return;
1127
1099
  # ifdef YYPRINT
1128
1100
  if (yytype < YYNTOKENS)
1129
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1101
+ YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1130
1102
  # endif
1131
1103
  YYUSE (yytype);
1132
1104
  }
1133
1105
 
1134
1106
 
1135
- /*--------------------------------.
1136
- | Print this symbol on YYOUTPUT. |
1137
- `--------------------------------*/
1107
+ /*---------------------------.
1108
+ | Print this symbol on YYO. |
1109
+ `---------------------------*/
1138
1110
 
1139
1111
  static void
1140
- yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta, ndt_context_t *ctx)
1112
+ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx)
1141
1113
  {
1142
- YYFPRINTF (yyoutput, "%s %s (",
1114
+ YYFPRINTF (yyo, "%s %s (",
1143
1115
  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1144
1116
 
1145
- YY_LOCATION_PRINT (yyoutput, *yylocationp);
1146
- YYFPRINTF (yyoutput, ": ");
1147
- yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, scanner, ast, meta, ctx);
1148
- YYFPRINTF (yyoutput, ")");
1117
+ YY_LOCATION_PRINT (yyo, *yylocationp);
1118
+ YYFPRINTF (yyo, ": ");
1119
+ yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, scanner, ast, ctx);
1120
+ YYFPRINTF (yyo, ")");
1149
1121
  }
1150
1122
 
1151
1123
  /*------------------------------------------------------------------.
@@ -1177,9 +1149,9 @@ do { \
1177
1149
  `------------------------------------------------*/
1178
1150
 
1179
1151
  static void
1180
- yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta, ndt_context_t *ctx)
1152
+ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx)
1181
1153
  {
1182
- unsigned long int yylno = yyrline[yyrule];
1154
+ unsigned long yylno = yyrline[yyrule];
1183
1155
  int yynrhs = yyr2[yyrule];
1184
1156
  int yyi;
1185
1157
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
@@ -1190,8 +1162,8 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule
1190
1162
  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1191
1163
  yy_symbol_print (stderr,
1192
1164
  yystos[yyssp[yyi + 1 - yynrhs]],
1193
- &(yyvsp[(yyi + 1) - (yynrhs)])
1194
- , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner, ast, meta, ctx);
1165
+ &yyvsp[(yyi + 1) - (yynrhs)]
1166
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner, ast, ctx);
1195
1167
  YYFPRINTF (stderr, "\n");
1196
1168
  }
1197
1169
  }
@@ -1199,7 +1171,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule
1199
1171
  # define YY_REDUCE_PRINT(Rule) \
1200
1172
  do { \
1201
1173
  if (yydebug) \
1202
- yy_reduce_print (yyssp, yyvsp, yylsp, Rule, scanner, ast, meta, ctx); \
1174
+ yy_reduce_print (yyssp, yyvsp, yylsp, Rule, scanner, ast, ctx); \
1203
1175
  } while (0)
1204
1176
 
1205
1177
  /* Nonzero means print parse trace. It is left uninitialized so that
@@ -1294,7 +1266,10 @@ yytnamerr (char *yyres, const char *yystr)
1294
1266
  case '\\':
1295
1267
  if (*++yyp != '\\')
1296
1268
  goto do_not_strip_quotes;
1297
- /* Fall through. */
1269
+ else
1270
+ goto append;
1271
+
1272
+ append:
1298
1273
  default:
1299
1274
  if (yyres)
1300
1275
  yyres[yyn] = *yyp;
@@ -1312,7 +1287,7 @@ yytnamerr (char *yyres, const char *yystr)
1312
1287
  if (! yyres)
1313
1288
  return yystrlen (yystr);
1314
1289
 
1315
- return yystpcpy (yyres, yystr) - yyres;
1290
+ return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1316
1291
  }
1317
1292
  # endif
1318
1293
 
@@ -1390,10 +1365,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1390
1365
  yyarg[yycount++] = yytname[yyx];
1391
1366
  {
1392
1367
  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1393
- if (! (yysize <= yysize1
1394
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1368
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1369
+ yysize = yysize1;
1370
+ else
1395
1371
  return 2;
1396
- yysize = yysize1;
1397
1372
  }
1398
1373
  }
1399
1374
  }
@@ -1405,6 +1380,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1405
1380
  case N: \
1406
1381
  yyformat = S; \
1407
1382
  break
1383
+ default: /* Avoid compiler warnings. */
1408
1384
  YYCASE_(0, YY_("syntax error"));
1409
1385
  YYCASE_(1, YY_("syntax error, unexpected %s"));
1410
1386
  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1416,9 +1392,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1416
1392
 
1417
1393
  {
1418
1394
  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1419
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1395
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1396
+ yysize = yysize1;
1397
+ else
1420
1398
  return 2;
1421
- yysize = yysize1;
1422
1399
  }
1423
1400
 
1424
1401
  if (*yymsg_alloc < yysize)
@@ -1457,13 +1434,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1457
1434
  `-----------------------------------------------*/
1458
1435
 
1459
1436
  static void
1460
- yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta, ndt_context_t *ctx)
1437
+ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx)
1461
1438
  {
1462
1439
  YYUSE (yyvaluep);
1463
1440
  YYUSE (yylocationp);
1464
1441
  YYUSE (scanner);
1465
1442
  YYUSE (ast);
1466
- YYUSE (meta);
1467
1443
  YYUSE (ctx);
1468
1444
  if (!yymsg)
1469
1445
  yymsg = "Deleting";
@@ -1472,277 +1448,276 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio
1472
1448
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1473
1449
  switch (yytype)
1474
1450
  {
1475
- case 59: /* INTEGER */
1476
- #line 191 "grammar.y" /* yacc.c:1257 */
1451
+ case 63: /* INTEGER */
1452
+ #line 203 "grammar.y" /* yacc.c:1257 */
1453
+ { ndt_free(((*yyvaluep).string)); }
1454
+ #line 1455 "grammar.c" /* yacc.c:1257 */
1455
+ break;
1456
+
1457
+ case 64: /* FLOATNUMBER */
1458
+ #line 203 "grammar.y" /* yacc.c:1257 */
1459
+ { ndt_free(((*yyvaluep).string)); }
1460
+ #line 1461 "grammar.c" /* yacc.c:1257 */
1461
+ break;
1462
+
1463
+ case 65: /* STRINGLIT */
1464
+ #line 203 "grammar.y" /* yacc.c:1257 */
1465
+ { ndt_free(((*yyvaluep).string)); }
1466
+ #line 1467 "grammar.c" /* yacc.c:1257 */
1467
+ break;
1468
+
1469
+ case 66: /* NAME_LOWER */
1470
+ #line 203 "grammar.y" /* yacc.c:1257 */
1471
+ { ndt_free(((*yyvaluep).string)); }
1472
+ #line 1473 "grammar.c" /* yacc.c:1257 */
1473
+ break;
1474
+
1475
+ case 67: /* NAME_UPPER */
1476
+ #line 203 "grammar.y" /* yacc.c:1257 */
1477
1477
  { ndt_free(((*yyvaluep).string)); }
1478
1478
  #line 1479 "grammar.c" /* yacc.c:1257 */
1479
1479
  break;
1480
1480
 
1481
- case 60: /* FLOATNUMBER */
1482
- #line 191 "grammar.y" /* yacc.c:1257 */
1481
+ case 68: /* NAME_OTHER */
1482
+ #line 203 "grammar.y" /* yacc.c:1257 */
1483
1483
  { ndt_free(((*yyvaluep).string)); }
1484
1484
  #line 1485 "grammar.c" /* yacc.c:1257 */
1485
1485
  break;
1486
1486
 
1487
- case 61: /* STRINGLIT */
1488
- #line 191 "grammar.y" /* yacc.c:1257 */
1489
- { ndt_free(((*yyvaluep).string)); }
1487
+ case 71: /* input */
1488
+ #line 196 "grammar.y" /* yacc.c:1257 */
1489
+ { ndt_decref(((*yyvaluep).ndt)); }
1490
1490
  #line 1491 "grammar.c" /* yacc.c:1257 */
1491
1491
  break;
1492
1492
 
1493
- case 62: /* NAME_LOWER */
1494
- #line 191 "grammar.y" /* yacc.c:1257 */
1495
- { ndt_free(((*yyvaluep).string)); }
1493
+ case 72: /* datashape_or_module */
1494
+ #line 196 "grammar.y" /* yacc.c:1257 */
1495
+ { ndt_decref(((*yyvaluep).ndt)); }
1496
1496
  #line 1497 "grammar.c" /* yacc.c:1257 */
1497
1497
  break;
1498
1498
 
1499
- case 63: /* NAME_UPPER */
1500
- #line 191 "grammar.y" /* yacc.c:1257 */
1501
- { ndt_free(((*yyvaluep).string)); }
1499
+ case 73: /* datashape_with_ellipsis */
1500
+ #line 196 "grammar.y" /* yacc.c:1257 */
1501
+ { ndt_decref(((*yyvaluep).ndt)); }
1502
1502
  #line 1503 "grammar.c" /* yacc.c:1257 */
1503
1503
  break;
1504
1504
 
1505
- case 64: /* NAME_OTHER */
1506
- #line 191 "grammar.y" /* yacc.c:1257 */
1507
- { ndt_free(((*yyvaluep).string)); }
1505
+ case 74: /* fixed_ellipsis */
1506
+ #line 196 "grammar.y" /* yacc.c:1257 */
1507
+ { ndt_decref(((*yyvaluep).ndt)); }
1508
1508
  #line 1509 "grammar.c" /* yacc.c:1257 */
1509
1509
  break;
1510
1510
 
1511
- case 66: /* input */
1512
- #line 184 "grammar.y" /* yacc.c:1257 */
1513
- { ndt_del(((*yyvaluep).ndt)); }
1511
+ case 75: /* datashape */
1512
+ #line 196 "grammar.y" /* yacc.c:1257 */
1513
+ { ndt_decref(((*yyvaluep).ndt)); }
1514
1514
  #line 1515 "grammar.c" /* yacc.c:1257 */
1515
1515
  break;
1516
1516
 
1517
- case 67: /* datashape_or_module */
1518
- #line 184 "grammar.y" /* yacc.c:1257 */
1519
- { ndt_del(((*yyvaluep).ndt)); }
1517
+ case 76: /* dimensions */
1518
+ #line 196 "grammar.y" /* yacc.c:1257 */
1519
+ { ndt_decref(((*yyvaluep).ndt)); }
1520
1520
  #line 1521 "grammar.c" /* yacc.c:1257 */
1521
1521
  break;
1522
1522
 
1523
- case 68: /* datashape_with_ellipsis */
1524
- #line 184 "grammar.y" /* yacc.c:1257 */
1525
- { ndt_del(((*yyvaluep).ndt)); }
1523
+ case 77: /* dimensions_nooption */
1524
+ #line 196 "grammar.y" /* yacc.c:1257 */
1525
+ { ndt_decref(((*yyvaluep).ndt)); }
1526
1526
  #line 1527 "grammar.c" /* yacc.c:1257 */
1527
1527
  break;
1528
1528
 
1529
- case 69: /* fixed_ellipsis */
1530
- #line 184 "grammar.y" /* yacc.c:1257 */
1531
- { ndt_del(((*yyvaluep).ndt)); }
1529
+ case 78: /* dimensions_tail */
1530
+ #line 196 "grammar.y" /* yacc.c:1257 */
1531
+ { ndt_decref(((*yyvaluep).ndt)); }
1532
1532
  #line 1533 "grammar.c" /* yacc.c:1257 */
1533
1533
  break;
1534
1534
 
1535
- case 70: /* datashape */
1536
- #line 184 "grammar.y" /* yacc.c:1257 */
1537
- { ndt_del(((*yyvaluep).ndt)); }
1535
+ case 79: /* dtype */
1536
+ #line 196 "grammar.y" /* yacc.c:1257 */
1537
+ { ndt_decref(((*yyvaluep).ndt)); }
1538
1538
  #line 1539 "grammar.c" /* yacc.c:1257 */
1539
1539
  break;
1540
1540
 
1541
- case 71: /* dimensions */
1542
- #line 184 "grammar.y" /* yacc.c:1257 */
1543
- { ndt_del(((*yyvaluep).ndt)); }
1541
+ case 80: /* scalar */
1542
+ #line 196 "grammar.y" /* yacc.c:1257 */
1543
+ { ndt_decref(((*yyvaluep).ndt)); }
1544
1544
  #line 1545 "grammar.c" /* yacc.c:1257 */
1545
1545
  break;
1546
1546
 
1547
- case 72: /* dimensions_nooption */
1548
- #line 184 "grammar.y" /* yacc.c:1257 */
1549
- { ndt_del(((*yyvaluep).ndt)); }
1547
+ case 86: /* character */
1548
+ #line 196 "grammar.y" /* yacc.c:1257 */
1549
+ { ndt_decref(((*yyvaluep).ndt)); }
1550
1550
  #line 1551 "grammar.c" /* yacc.c:1257 */
1551
1551
  break;
1552
1552
 
1553
- case 73: /* dimensions_tail */
1554
- #line 184 "grammar.y" /* yacc.c:1257 */
1555
- { ndt_del(((*yyvaluep).ndt)); }
1553
+ case 87: /* string */
1554
+ #line 196 "grammar.y" /* yacc.c:1257 */
1555
+ { ndt_decref(((*yyvaluep).ndt)); }
1556
1556
  #line 1557 "grammar.c" /* yacc.c:1257 */
1557
1557
  break;
1558
1558
 
1559
- case 74: /* dtype */
1560
- #line 184 "grammar.y" /* yacc.c:1257 */
1561
- { ndt_del(((*yyvaluep).ndt)); }
1559
+ case 88: /* fixed_string */
1560
+ #line 196 "grammar.y" /* yacc.c:1257 */
1561
+ { ndt_decref(((*yyvaluep).ndt)); }
1562
1562
  #line 1563 "grammar.c" /* yacc.c:1257 */
1563
1563
  break;
1564
1564
 
1565
- case 75: /* scalar */
1566
- #line 184 "grammar.y" /* yacc.c:1257 */
1567
- { ndt_del(((*yyvaluep).ndt)); }
1565
+ case 93: /* bytes */
1566
+ #line 196 "grammar.y" /* yacc.c:1257 */
1567
+ { ndt_decref(((*yyvaluep).ndt)); }
1568
1568
  #line 1569 "grammar.c" /* yacc.c:1257 */
1569
1569
  break;
1570
1570
 
1571
- case 76: /* signed */
1572
- #line 184 "grammar.y" /* yacc.c:1257 */
1573
- { ndt_del(((*yyvaluep).ndt)); }
1571
+ case 94: /* array_dimensions */
1572
+ #line 196 "grammar.y" /* yacc.c:1257 */
1573
+ { ndt_decref(((*yyvaluep).ndt)); }
1574
1574
  #line 1575 "grammar.c" /* yacc.c:1257 */
1575
1575
  break;
1576
1576
 
1577
- case 77: /* unsigned */
1578
- #line 184 "grammar.y" /* yacc.c:1257 */
1579
- { ndt_del(((*yyvaluep).ndt)); }
1577
+ case 95: /* array */
1578
+ #line 196 "grammar.y" /* yacc.c:1257 */
1579
+ { ndt_decref(((*yyvaluep).ndt)); }
1580
1580
  #line 1581 "grammar.c" /* yacc.c:1257 */
1581
1581
  break;
1582
1582
 
1583
- case 78: /* ieee_float */
1584
- #line 184 "grammar.y" /* yacc.c:1257 */
1585
- { ndt_del(((*yyvaluep).ndt)); }
1583
+ case 96: /* fixed_bytes */
1584
+ #line 196 "grammar.y" /* yacc.c:1257 */
1585
+ { ndt_decref(((*yyvaluep).ndt)); }
1586
1586
  #line 1587 "grammar.c" /* yacc.c:1257 */
1587
1587
  break;
1588
1588
 
1589
- case 79: /* ieee_complex */
1590
- #line 184 "grammar.y" /* yacc.c:1257 */
1591
- { ndt_del(((*yyvaluep).ndt)); }
1589
+ case 97: /* ref */
1590
+ #line 196 "grammar.y" /* yacc.c:1257 */
1591
+ { ndt_decref(((*yyvaluep).ndt)); }
1592
1592
  #line 1593 "grammar.c" /* yacc.c:1257 */
1593
1593
  break;
1594
1594
 
1595
- case 80: /* alias */
1596
- #line 184 "grammar.y" /* yacc.c:1257 */
1597
- { ndt_del(((*yyvaluep).ndt)); }
1595
+ case 98: /* categorical */
1596
+ #line 196 "grammar.y" /* yacc.c:1257 */
1597
+ { ndt_decref(((*yyvaluep).ndt)); }
1598
1598
  #line 1599 "grammar.c" /* yacc.c:1257 */
1599
1599
  break;
1600
1600
 
1601
- case 81: /* character */
1602
- #line 184 "grammar.y" /* yacc.c:1257 */
1603
- { ndt_del(((*yyvaluep).ndt)); }
1601
+ case 99: /* typed_value_seq */
1602
+ #line 200 "grammar.y" /* yacc.c:1257 */
1603
+ { ndt_value_seq_del(((*yyvaluep).typed_value_seq)); }
1604
1604
  #line 1605 "grammar.c" /* yacc.c:1257 */
1605
1605
  break;
1606
1606
 
1607
- case 82: /* string */
1608
- #line 184 "grammar.y" /* yacc.c:1257 */
1609
- { ndt_del(((*yyvaluep).ndt)); }
1607
+ case 100: /* typed_value */
1608
+ #line 199 "grammar.y" /* yacc.c:1257 */
1609
+ { ndt_value_del(((*yyvaluep).typed_value)); }
1610
1610
  #line 1611 "grammar.c" /* yacc.c:1257 */
1611
1611
  break;
1612
1612
 
1613
- case 83: /* fixed_string */
1614
- #line 184 "grammar.y" /* yacc.c:1257 */
1615
- { ndt_del(((*yyvaluep).ndt)); }
1613
+ case 103: /* tuple_type */
1614
+ #line 196 "grammar.y" /* yacc.c:1257 */
1615
+ { ndt_decref(((*yyvaluep).ndt)); }
1616
1616
  #line 1617 "grammar.c" /* yacc.c:1257 */
1617
1617
  break;
1618
1618
 
1619
- case 86: /* bytes */
1620
- #line 184 "grammar.y" /* yacc.c:1257 */
1621
- { ndt_del(((*yyvaluep).ndt)); }
1619
+ case 104: /* tuple_field_seq */
1620
+ #line 198 "grammar.y" /* yacc.c:1257 */
1621
+ { ndt_field_seq_del(((*yyvaluep).field_seq)); }
1622
1622
  #line 1623 "grammar.c" /* yacc.c:1257 */
1623
1623
  break;
1624
1624
 
1625
- case 87: /* fixed_bytes */
1626
- #line 184 "grammar.y" /* yacc.c:1257 */
1627
- { ndt_del(((*yyvaluep).ndt)); }
1625
+ case 105: /* tuple_field */
1626
+ #line 197 "grammar.y" /* yacc.c:1257 */
1627
+ { ndt_field_del(((*yyvaluep).field)); }
1628
1628
  #line 1629 "grammar.c" /* yacc.c:1257 */
1629
1629
  break;
1630
1630
 
1631
- case 88: /* ref */
1632
- #line 184 "grammar.y" /* yacc.c:1257 */
1633
- { ndt_del(((*yyvaluep).ndt)); }
1631
+ case 106: /* record_type */
1632
+ #line 196 "grammar.y" /* yacc.c:1257 */
1633
+ { ndt_decref(((*yyvaluep).ndt)); }
1634
1634
  #line 1635 "grammar.c" /* yacc.c:1257 */
1635
1635
  break;
1636
1636
 
1637
- case 89: /* categorical */
1638
- #line 184 "grammar.y" /* yacc.c:1257 */
1639
- { ndt_del(((*yyvaluep).ndt)); }
1637
+ case 107: /* record_field_seq */
1638
+ #line 198 "grammar.y" /* yacc.c:1257 */
1639
+ { ndt_field_seq_del(((*yyvaluep).field_seq)); }
1640
1640
  #line 1641 "grammar.c" /* yacc.c:1257 */
1641
1641
  break;
1642
1642
 
1643
- case 90: /* typed_value_seq */
1644
- #line 188 "grammar.y" /* yacc.c:1257 */
1645
- { ndt_value_seq_del(((*yyvaluep).typed_value_seq)); }
1643
+ case 108: /* record_field */
1644
+ #line 197 "grammar.y" /* yacc.c:1257 */
1645
+ { ndt_field_del(((*yyvaluep).field)); }
1646
1646
  #line 1647 "grammar.c" /* yacc.c:1257 */
1647
1647
  break;
1648
1648
 
1649
- case 91: /* typed_value */
1650
- #line 187 "grammar.y" /* yacc.c:1257 */
1651
- { ndt_value_del(((*yyvaluep).typed_value)); }
1649
+ case 109: /* field_name_or_tag */
1650
+ #line 203 "grammar.y" /* yacc.c:1257 */
1651
+ { ndt_free(((*yyvaluep).string)); }
1652
1652
  #line 1653 "grammar.c" /* yacc.c:1257 */
1653
1653
  break;
1654
1654
 
1655
- case 94: /* tuple_type */
1656
- #line 184 "grammar.y" /* yacc.c:1257 */
1657
- { ndt_del(((*yyvaluep).ndt)); }
1655
+ case 110: /* union_type */
1656
+ #line 196 "grammar.y" /* yacc.c:1257 */
1657
+ { ndt_decref(((*yyvaluep).ndt)); }
1658
1658
  #line 1659 "grammar.c" /* yacc.c:1257 */
1659
1659
  break;
1660
1660
 
1661
- case 95: /* tuple_field_seq */
1662
- #line 186 "grammar.y" /* yacc.c:1257 */
1661
+ case 111: /* union_member_seq */
1662
+ #line 198 "grammar.y" /* yacc.c:1257 */
1663
1663
  { ndt_field_seq_del(((*yyvaluep).field_seq)); }
1664
1664
  #line 1665 "grammar.c" /* yacc.c:1257 */
1665
1665
  break;
1666
1666
 
1667
- case 96: /* tuple_field */
1668
- #line 185 "grammar.y" /* yacc.c:1257 */
1667
+ case 112: /* union_member */
1668
+ #line 197 "grammar.y" /* yacc.c:1257 */
1669
1669
  { ndt_field_del(((*yyvaluep).field)); }
1670
1670
  #line 1671 "grammar.c" /* yacc.c:1257 */
1671
1671
  break;
1672
1672
 
1673
- case 97: /* record_type */
1674
- #line 184 "grammar.y" /* yacc.c:1257 */
1675
- { ndt_del(((*yyvaluep).ndt)); }
1673
+ case 113: /* arguments_opt */
1674
+ #line 202 "grammar.y" /* yacc.c:1257 */
1675
+ { ndt_attr_seq_del(((*yyvaluep).attribute_seq)); }
1676
1676
  #line 1677 "grammar.c" /* yacc.c:1257 */
1677
1677
  break;
1678
1678
 
1679
- case 98: /* record_field_seq */
1680
- #line 186 "grammar.y" /* yacc.c:1257 */
1681
- { ndt_field_seq_del(((*yyvaluep).field_seq)); }
1679
+ case 114: /* attribute_seq */
1680
+ #line 202 "grammar.y" /* yacc.c:1257 */
1681
+ { ndt_attr_seq_del(((*yyvaluep).attribute_seq)); }
1682
1682
  #line 1683 "grammar.c" /* yacc.c:1257 */
1683
1683
  break;
1684
1684
 
1685
- case 99: /* record_field */
1686
- #line 185 "grammar.y" /* yacc.c:1257 */
1687
- { ndt_field_del(((*yyvaluep).field)); }
1685
+ case 115: /* attribute */
1686
+ #line 201 "grammar.y" /* yacc.c:1257 */
1687
+ { ndt_attr_del(((*yyvaluep).attribute)); }
1688
1688
  #line 1689 "grammar.c" /* yacc.c:1257 */
1689
1689
  break;
1690
1690
 
1691
- case 100: /* record_field_name */
1692
- #line 191 "grammar.y" /* yacc.c:1257 */
1693
- { ndt_free(((*yyvaluep).string)); }
1691
+ case 116: /* untyped_value_seq */
1692
+ #line 204 "grammar.y" /* yacc.c:1257 */
1693
+ { ndt_string_seq_del(((*yyvaluep).string_seq)); }
1694
1694
  #line 1695 "grammar.c" /* yacc.c:1257 */
1695
1695
  break;
1696
1696
 
1697
- case 101: /* arguments_opt */
1698
- #line 190 "grammar.y" /* yacc.c:1257 */
1699
- { ndt_attr_seq_del(((*yyvaluep).attribute_seq)); }
1697
+ case 117: /* untyped_value */
1698
+ #line 203 "grammar.y" /* yacc.c:1257 */
1699
+ { ndt_free(((*yyvaluep).string)); }
1700
1700
  #line 1701 "grammar.c" /* yacc.c:1257 */
1701
1701
  break;
1702
1702
 
1703
- case 102: /* attribute_seq */
1704
- #line 190 "grammar.y" /* yacc.c:1257 */
1705
- { ndt_attr_seq_del(((*yyvaluep).attribute_seq)); }
1703
+ case 118: /* function_type */
1704
+ #line 196 "grammar.y" /* yacc.c:1257 */
1705
+ { ndt_decref(((*yyvaluep).ndt)); }
1706
1706
  #line 1707 "grammar.c" /* yacc.c:1257 */
1707
1707
  break;
1708
1708
 
1709
- case 103: /* attribute */
1710
- #line 189 "grammar.y" /* yacc.c:1257 */
1711
- { ndt_attr_del(((*yyvaluep).attribute)); }
1712
- #line 1713 "grammar.c" /* yacc.c:1257 */
1713
- break;
1714
-
1715
- case 104: /* untyped_value_seq */
1716
- #line 192 "grammar.y" /* yacc.c:1257 */
1717
- { ndt_string_seq_del(((*yyvaluep).string_seq)); }
1718
- #line 1719 "grammar.c" /* yacc.c:1257 */
1719
- break;
1720
-
1721
- case 105: /* untyped_value */
1722
- #line 191 "grammar.y" /* yacc.c:1257 */
1723
- { ndt_free(((*yyvaluep).string)); }
1724
- #line 1725 "grammar.c" /* yacc.c:1257 */
1725
- break;
1726
-
1727
- case 106: /* function_type */
1728
- #line 184 "grammar.y" /* yacc.c:1257 */
1729
- { ndt_del(((*yyvaluep).ndt)); }
1730
- #line 1731 "grammar.c" /* yacc.c:1257 */
1731
- break;
1732
-
1733
- case 107: /* type_seq_or_void */
1734
- #line 193 "grammar.y" /* yacc.c:1257 */
1709
+ case 119: /* type_seq_or_void */
1710
+ #line 205 "grammar.y" /* yacc.c:1257 */
1735
1711
  { ndt_type_seq_del(((*yyvaluep).type_seq)); }
1736
- #line 1737 "grammar.c" /* yacc.c:1257 */
1712
+ #line 1713 "grammar.c" /* yacc.c:1257 */
1737
1713
  break;
1738
1714
 
1739
- case 108: /* type_seq */
1740
- #line 193 "grammar.y" /* yacc.c:1257 */
1715
+ case 120: /* type_seq */
1716
+ #line 205 "grammar.y" /* yacc.c:1257 */
1741
1717
  { ndt_type_seq_del(((*yyvaluep).type_seq)); }
1742
- #line 1743 "grammar.c" /* yacc.c:1257 */
1718
+ #line 1719 "grammar.c" /* yacc.c:1257 */
1743
1719
  break;
1744
1720
 
1745
-
1746
1721
  default:
1747
1722
  break;
1748
1723
  }
@@ -1757,7 +1732,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio
1757
1732
  `----------*/
1758
1733
 
1759
1734
  int
1760
- yyparse (yyscan_t scanner, ndt_t **ast, ndt_meta_t *meta, ndt_context_t *ctx)
1735
+ yyparse (yyscan_t scanner, const ndt_t **ast, ndt_context_t *ctx)
1761
1736
  {
1762
1737
  /* The lookahead symbol. */
1763
1738
  int yychar;
@@ -1847,7 +1822,7 @@ YYLTYPE yylloc = yyloc_default;
1847
1822
  yychar = YYEMPTY; /* Cause a token to be read. */
1848
1823
 
1849
1824
  /* User initialization code. */
1850
- #line 76 "grammar.y" /* yacc.c:1429 */
1825
+ #line 75 "grammar.y" /* yacc.c:1431 */
1851
1826
  {
1852
1827
  yylloc.first_line = 1;
1853
1828
  yylloc.first_column = 1;
@@ -1855,27 +1830,35 @@ YYLTYPE yylloc = yyloc_default;
1855
1830
  yylloc.last_column = 1;
1856
1831
  }
1857
1832
 
1858
- #line 1859 "grammar.c" /* yacc.c:1429 */
1833
+ #line 1834 "grammar.c" /* yacc.c:1431 */
1859
1834
  yylsp[0] = yylloc;
1860
1835
  goto yysetstate;
1861
1836
 
1837
+
1862
1838
  /*------------------------------------------------------------.
1863
- | yynewstate -- Push a new state, which is found in yystate. |
1839
+ | yynewstate -- push a new state, which is found in yystate. |
1864
1840
  `------------------------------------------------------------*/
1865
- yynewstate:
1841
+ yynewstate:
1866
1842
  /* In all cases, when you get here, the value and location stacks
1867
1843
  have just been pushed. So pushing a state here evens the stacks. */
1868
1844
  yyssp++;
1869
1845
 
1870
- yysetstate:
1871
- *yyssp = yystate;
1846
+
1847
+ /*--------------------------------------------------------------------.
1848
+ | yynewstate -- set current state (the top of the stack) to yystate. |
1849
+ `--------------------------------------------------------------------*/
1850
+ yysetstate:
1851
+ *yyssp = (yytype_int16) yystate;
1872
1852
 
1873
1853
  if (yyss + yystacksize - 1 <= yyssp)
1854
+ #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1855
+ goto yyexhaustedlab;
1856
+ #else
1874
1857
  {
1875
1858
  /* Get the current used size of the three stacks, in elements. */
1876
- YYSIZE_T yysize = yyssp - yyss + 1;
1859
+ YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1877
1860
 
1878
- #ifdef yyoverflow
1861
+ # if defined yyoverflow
1879
1862
  {
1880
1863
  /* Give user a chance to reallocate the stack. Use copies of
1881
1864
  these so that the &'s don't force the real ones into
@@ -1893,15 +1876,11 @@ YYLTYPE yylloc = yyloc_default;
1893
1876
  &yyvs1, yysize * sizeof (*yyvsp),
1894
1877
  &yyls1, yysize * sizeof (*yylsp),
1895
1878
  &yystacksize);
1896
-
1897
- yyls = yyls1;
1898
1879
  yyss = yyss1;
1899
1880
  yyvs = yyvs1;
1881
+ yyls = yyls1;
1900
1882
  }
1901
- #else /* no yyoverflow */
1902
- # ifndef YYSTACK_RELOCATE
1903
- goto yyexhaustedlab;
1904
- # else
1883
+ # else /* defined YYSTACK_RELOCATE */
1905
1884
  /* Extend the stack our own way. */
1906
1885
  if (YYMAXDEPTH <= yystacksize)
1907
1886
  goto yyexhaustedlab;
@@ -1918,23 +1897,23 @@ YYLTYPE yylloc = yyloc_default;
1918
1897
  YYSTACK_RELOCATE (yyss_alloc, yyss);
1919
1898
  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1920
1899
  YYSTACK_RELOCATE (yyls_alloc, yyls);
1921
- # undef YYSTACK_RELOCATE
1900
+ # undef YYSTACK_RELOCATE
1922
1901
  if (yyss1 != yyssa)
1923
1902
  YYSTACK_FREE (yyss1);
1924
1903
  }
1925
1904
  # endif
1926
- #endif /* no yyoverflow */
1927
1905
 
1928
1906
  yyssp = yyss + yysize - 1;
1929
1907
  yyvsp = yyvs + yysize - 1;
1930
1908
  yylsp = yyls + yysize - 1;
1931
1909
 
1932
1910
  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1933
- (unsigned long int) yystacksize));
1911
+ (unsigned long) yystacksize));
1934
1912
 
1935
1913
  if (yyss + yystacksize - 1 <= yyssp)
1936
1914
  YYABORT;
1937
1915
  }
1916
+ #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1938
1917
 
1939
1918
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1940
1919
 
@@ -1943,11 +1922,11 @@ YYLTYPE yylloc = yyloc_default;
1943
1922
 
1944
1923
  goto yybackup;
1945
1924
 
1925
+
1946
1926
  /*-----------.
1947
1927
  | yybackup. |
1948
1928
  `-----------*/
1949
1929
  yybackup:
1950
-
1951
1930
  /* Do appropriate processing given the current state. Read a
1952
1931
  lookahead token if we need one and don't already have one. */
1953
1932
 
@@ -2020,7 +1999,7 @@ yydefault:
2020
1999
 
2021
2000
 
2022
2001
  /*-----------------------------.
2023
- | yyreduce -- Do a reduction. |
2002
+ | yyreduce -- do a reduction. |
2024
2003
  `-----------------------------*/
2025
2004
  yyreduce:
2026
2005
  /* yyn is the number of a rule to reduce with. */
@@ -2036,801 +2015,932 @@ yyreduce:
2036
2015
  GCC warning that YYVAL may be used uninitialized. */
2037
2016
  yyval = yyvsp[1-yylen];
2038
2017
 
2039
- /* Default location. */
2018
+ /* Default location. */
2040
2019
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2020
+ yyerror_range[1] = yyloc;
2041
2021
  YY_REDUCE_PRINT (yyn);
2042
2022
  switch (yyn)
2043
2023
  {
2044
2024
  case 2:
2045
- #line 198 "grammar.y" /* yacc.c:1646 */
2025
+ #line 214 "grammar.y" /* yacc.c:1652 */
2046
2026
  { (yyval.ndt) = (yyvsp[-1].ndt); *ast = (yyval.ndt); YYACCEPT; }
2047
- #line 2048 "grammar.c" /* yacc.c:1646 */
2027
+ #line 2028 "grammar.c" /* yacc.c:1652 */
2048
2028
  break;
2049
2029
 
2050
2030
  case 3:
2051
- #line 202 "grammar.y" /* yacc.c:1646 */
2031
+ #line 218 "grammar.y" /* yacc.c:1652 */
2052
2032
  { (yyval.ndt) = (yyvsp[0].ndt); }
2053
- #line 2054 "grammar.c" /* yacc.c:1646 */
2033
+ #line 2034 "grammar.c" /* yacc.c:1652 */
2054
2034
  break;
2055
2035
 
2056
2036
  case 4:
2057
- #line 203 "grammar.y" /* yacc.c:1646 */
2037
+ #line 219 "grammar.y" /* yacc.c:1652 */
2058
2038
  { (yyval.ndt) = (yyvsp[0].ndt); }
2059
- #line 2060 "grammar.c" /* yacc.c:1646 */
2039
+ #line 2040 "grammar.c" /* yacc.c:1652 */
2060
2040
  break;
2061
2041
 
2062
2042
  case 5:
2063
- #line 204 "grammar.y" /* yacc.c:1646 */
2064
- { (yyval.ndt) = ndt_module((yyvsp[-3].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2065
- #line 2066 "grammar.c" /* yacc.c:1646 */
2043
+ #line 220 "grammar.y" /* yacc.c:1652 */
2044
+ { (yyval.ndt) = mk_module((yyvsp[-3].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2045
+ #line 2046 "grammar.c" /* yacc.c:1652 */
2066
2046
  break;
2067
2047
 
2068
2048
  case 6:
2069
- #line 208 "grammar.y" /* yacc.c:1646 */
2049
+ #line 224 "grammar.y" /* yacc.c:1652 */
2070
2050
  { (yyval.ndt) = (yyvsp[0].ndt); }
2071
- #line 2072 "grammar.c" /* yacc.c:1646 */
2051
+ #line 2052 "grammar.c" /* yacc.c:1652 */
2072
2052
  break;
2073
2053
 
2074
2054
  case 7:
2075
- #line 209 "grammar.y" /* yacc.c:1646 */
2055
+ #line 225 "grammar.y" /* yacc.c:1652 */
2076
2056
  { (yyval.ndt) = (yyvsp[0].ndt); }
2077
- #line 2078 "grammar.c" /* yacc.c:1646 */
2057
+ #line 2058 "grammar.c" /* yacc.c:1652 */
2078
2058
  break;
2079
2059
 
2080
2060
  case 8:
2081
- #line 210 "grammar.y" /* yacc.c:1646 */
2082
- { (yyval.ndt) = mk_contig((yyvsp[-3].string), (yyvsp[-1].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2083
- #line 2084 "grammar.c" /* yacc.c:1646 */
2061
+ #line 226 "grammar.y" /* yacc.c:1652 */
2062
+ { (yyval.ndt) = mk_contig((yyvsp[-3].string), (ndt_t *)(yyvsp[-1].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2063
+ #line 2064 "grammar.c" /* yacc.c:1652 */
2084
2064
  break;
2085
2065
 
2086
2066
  case 9:
2087
- #line 211 "grammar.y" /* yacc.c:1646 */
2067
+ #line 227 "grammar.y" /* yacc.c:1652 */
2088
2068
  { (yyval.ndt) = mk_var_ellipsis((yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2089
- #line 2090 "grammar.c" /* yacc.c:1646 */
2069
+ #line 2070 "grammar.c" /* yacc.c:1652 */
2090
2070
  break;
2091
2071
 
2092
2072
  case 10:
2093
- #line 212 "grammar.y" /* yacc.c:1646 */
2094
- { (yyval.ndt) = mk_var_ellipsis(ndt_option((yyvsp[0].ndt)), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2095
- #line 2096 "grammar.c" /* yacc.c:1646 */
2073
+ #line 228 "grammar.y" /* yacc.c:1652 */
2074
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2075
+ #line 2076 "grammar.c" /* yacc.c:1652 */
2096
2076
  break;
2097
2077
 
2098
2078
  case 11:
2099
- #line 215 "grammar.y" /* yacc.c:1646 */
2100
- { (yyval.ndt) = ndt_ellipsis_dim(NULL, (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2101
- #line 2102 "grammar.c" /* yacc.c:1646 */
2079
+ #line 231 "grammar.y" /* yacc.c:1652 */
2080
+ { (yyval.ndt) = mk_ellipsis_dim(NULL, (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2081
+ #line 2082 "grammar.c" /* yacc.c:1652 */
2102
2082
  break;
2103
2083
 
2104
2084
  case 12:
2105
- #line 216 "grammar.y" /* yacc.c:1646 */
2106
- { (yyval.ndt) = ndt_ellipsis_dim((yyvsp[-3].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2107
- #line 2108 "grammar.c" /* yacc.c:1646 */
2085
+ #line 232 "grammar.y" /* yacc.c:1652 */
2086
+ { (yyval.ndt) = mk_ellipsis_dim((yyvsp[-3].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2087
+ #line 2088 "grammar.c" /* yacc.c:1652 */
2108
2088
  break;
2109
2089
 
2110
2090
  case 13:
2111
- #line 219 "grammar.y" /* yacc.c:1646 */
2091
+ #line 235 "grammar.y" /* yacc.c:1652 */
2112
2092
  { (yyval.ndt) = (yyvsp[0].ndt); }
2113
- #line 2114 "grammar.c" /* yacc.c:1646 */
2093
+ #line 2094 "grammar.c" /* yacc.c:1652 */
2114
2094
  break;
2115
2095
 
2116
2096
  case 14:
2117
- #line 220 "grammar.y" /* yacc.c:1646 */
2097
+ #line 236 "grammar.y" /* yacc.c:1652 */
2118
2098
  { (yyval.ndt) = (yyvsp[0].ndt); }
2119
- #line 2120 "grammar.c" /* yacc.c:1646 */
2099
+ #line 2100 "grammar.c" /* yacc.c:1652 */
2120
2100
  break;
2121
2101
 
2122
2102
  case 15:
2123
- #line 221 "grammar.y" /* yacc.c:1646 */
2124
- { (yyval.ndt) = ndt_option((yyvsp[0].ndt)); if ((yyval.ndt) == NULL) YYABORT; }
2125
- #line 2126 "grammar.c" /* yacc.c:1646 */
2103
+ #line 239 "grammar.y" /* yacc.c:1652 */
2104
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2105
+ #line 2106 "grammar.c" /* yacc.c:1652 */
2126
2106
  break;
2127
2107
 
2128
2108
  case 16:
2129
- #line 224 "grammar.y" /* yacc.c:1646 */
2130
- { (yyval.ndt) = (yyvsp[0].ndt); }
2131
- #line 2132 "grammar.c" /* yacc.c:1646 */
2109
+ #line 240 "grammar.y" /* yacc.c:1652 */
2110
+ { (yyval.ndt) = mk_contig((yyvsp[-3].string), (ndt_t *)(yyvsp[-1].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2111
+ #line 2112 "grammar.c" /* yacc.c:1652 */
2132
2112
  break;
2133
2113
 
2134
2114
  case 17:
2135
- #line 225 "grammar.y" /* yacc.c:1646 */
2136
- { (yyval.ndt) = ndt_option((yyvsp[0].ndt)); if ((yyval.ndt) == NULL) YYABORT; }
2137
- #line 2138 "grammar.c" /* yacc.c:1646 */
2115
+ #line 241 "grammar.y" /* yacc.c:1652 */
2116
+ { (yyval.ndt) = mk_fortran((yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2117
+ #line 2118 "grammar.c" /* yacc.c:1652 */
2138
2118
  break;
2139
2119
 
2140
2120
  case 18:
2141
- #line 226 "grammar.y" /* yacc.c:1646 */
2142
- { (yyval.ndt) = mk_contig((yyvsp[-3].string), (yyvsp[-1].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2143
- #line 2144 "grammar.c" /* yacc.c:1646 */
2121
+ #line 244 "grammar.y" /* yacc.c:1652 */
2122
+ { (yyval.ndt) = mk_fixed_dim_from_shape((yyvsp[-2].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2123
+ #line 2124 "grammar.c" /* yacc.c:1652 */
2144
2124
  break;
2145
2125
 
2146
2126
  case 19:
2147
- #line 227 "grammar.y" /* yacc.c:1646 */
2148
- { (yyval.ndt) = mk_fortran((yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2149
- #line 2150 "grammar.c" /* yacc.c:1646 */
2127
+ #line 245 "grammar.y" /* yacc.c:1652 */
2128
+ { (yyval.ndt) = mk_fixed_dim_from_attrs((yyvsp[-3].attribute_seq), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2129
+ #line 2130 "grammar.c" /* yacc.c:1652 */
2150
2130
  break;
2151
2131
 
2152
2132
  case 20:
2153
- #line 230 "grammar.y" /* yacc.c:1646 */
2154
- { (yyval.ndt) = mk_fixed_dim_from_shape((yyvsp[-2].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2155
- #line 2156 "grammar.c" /* yacc.c:1646 */
2133
+ #line 246 "grammar.y" /* yacc.c:1652 */
2134
+ { (yyval.ndt) = mk_symbolic_dim((yyvsp[-2].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2135
+ #line 2136 "grammar.c" /* yacc.c:1652 */
2156
2136
  break;
2157
2137
 
2158
2138
  case 21:
2159
- #line 231 "grammar.y" /* yacc.c:1646 */
2160
- { (yyval.ndt) = mk_fixed_dim_from_attrs((yyvsp[-3].attribute_seq), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2161
- #line 2162 "grammar.c" /* yacc.c:1646 */
2139
+ #line 247 "grammar.y" /* yacc.c:1652 */
2140
+ { (yyval.ndt) = mk_var_dim((yyvsp[-2].attribute_seq), (yyvsp[0].ndt), false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2141
+ #line 2142 "grammar.c" /* yacc.c:1652 */
2162
2142
  break;
2163
2143
 
2164
2144
  case 22:
2165
- #line 232 "grammar.y" /* yacc.c:1646 */
2166
- { (yyval.ndt) = ndt_symbolic_dim((yyvsp[-2].string), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2167
- #line 2168 "grammar.c" /* yacc.c:1646 */
2145
+ #line 248 "grammar.y" /* yacc.c:1652 */
2146
+ { (yyval.ndt) = mk_var_dim((yyvsp[-2].attribute_seq), (yyvsp[0].ndt), true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2147
+ #line 2148 "grammar.c" /* yacc.c:1652 */
2168
2148
  break;
2169
2149
 
2170
2150
  case 23:
2171
- #line 233 "grammar.y" /* yacc.c:1646 */
2172
- { (yyval.ndt) = mk_var_dim(meta, (yyvsp[-2].attribute_seq), (yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2173
- #line 2174 "grammar.c" /* yacc.c:1646 */
2151
+ #line 252 "grammar.y" /* yacc.c:1652 */
2152
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2153
+ #line 2154 "grammar.c" /* yacc.c:1652 */
2174
2154
  break;
2175
2155
 
2176
2156
  case 24:
2177
- #line 236 "grammar.y" /* yacc.c:1646 */
2157
+ #line 253 "grammar.y" /* yacc.c:1652 */
2178
2158
  { (yyval.ndt) = (yyvsp[0].ndt); }
2179
- #line 2180 "grammar.c" /* yacc.c:1646 */
2159
+ #line 2160 "grammar.c" /* yacc.c:1652 */
2180
2160
  break;
2181
2161
 
2182
2162
  case 25:
2183
- #line 237 "grammar.y" /* yacc.c:1646 */
2184
- { (yyval.ndt) = ndt_option((yyvsp[0].ndt)); if ((yyval.ndt) == NULL) YYABORT; }
2185
- #line 2186 "grammar.c" /* yacc.c:1646 */
2163
+ #line 256 "grammar.y" /* yacc.c:1652 */
2164
+ { (yyval.ndt) = ndt_any_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2165
+ #line 2166 "grammar.c" /* yacc.c:1652 */
2186
2166
  break;
2187
2167
 
2188
2168
  case 26:
2189
- #line 238 "grammar.y" /* yacc.c:1646 */
2190
- { (yyval.ndt) = (yyvsp[0].ndt); }
2191
- #line 2192 "grammar.c" /* yacc.c:1646 */
2169
+ #line 257 "grammar.y" /* yacc.c:1652 */
2170
+ { (yyval.ndt) = ndt_scalar_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2171
+ #line 2172 "grammar.c" /* yacc.c:1652 */
2192
2172
  break;
2193
2173
 
2194
2174
  case 27:
2195
- #line 241 "grammar.y" /* yacc.c:1646 */
2196
- { (yyval.ndt) = ndt_any_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2197
- #line 2198 "grammar.c" /* yacc.c:1646 */
2175
+ #line 258 "grammar.y" /* yacc.c:1652 */
2176
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2177
+ #line 2178 "grammar.c" /* yacc.c:1652 */
2198
2178
  break;
2199
2179
 
2200
2180
  case 28:
2201
- #line 242 "grammar.y" /* yacc.c:1646 */
2202
- { (yyval.ndt) = ndt_scalar_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2203
- #line 2204 "grammar.c" /* yacc.c:1646 */
2181
+ #line 259 "grammar.y" /* yacc.c:1652 */
2182
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2183
+ #line 2184 "grammar.c" /* yacc.c:1652 */
2204
2184
  break;
2205
2185
 
2206
2186
  case 29:
2207
- #line 243 "grammar.y" /* yacc.c:1646 */
2187
+ #line 260 "grammar.y" /* yacc.c:1652 */
2208
2188
  { (yyval.ndt) = (yyvsp[0].ndt); }
2209
- #line 2210 "grammar.c" /* yacc.c:1646 */
2189
+ #line 2190 "grammar.c" /* yacc.c:1652 */
2210
2190
  break;
2211
2191
 
2212
2192
  case 30:
2213
- #line 244 "grammar.y" /* yacc.c:1646 */
2193
+ #line 261 "grammar.y" /* yacc.c:1652 */
2214
2194
  { (yyval.ndt) = (yyvsp[0].ndt); }
2215
- #line 2216 "grammar.c" /* yacc.c:1646 */
2195
+ #line 2196 "grammar.c" /* yacc.c:1652 */
2216
2196
  break;
2217
2197
 
2218
2198
  case 31:
2219
- #line 245 "grammar.y" /* yacc.c:1646 */
2220
- { (yyval.ndt) = (yyvsp[0].ndt); }
2221
- #line 2222 "grammar.c" /* yacc.c:1646 */
2199
+ #line 262 "grammar.y" /* yacc.c:1652 */
2200
+ { (yyval.ndt) = ndt_nominal((yyvsp[0].string), NULL, false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2201
+ #line 2202 "grammar.c" /* yacc.c:1652 */
2222
2202
  break;
2223
2203
 
2224
2204
  case 32:
2225
- #line 246 "grammar.y" /* yacc.c:1646 */
2226
- { (yyval.ndt) = ndt_nominal((yyvsp[0].string), NULL, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2227
- #line 2228 "grammar.c" /* yacc.c:1646 */
2205
+ #line 263 "grammar.y" /* yacc.c:1652 */
2206
+ { (yyval.ndt) = ndt_nominal((yyvsp[0].string), NULL, true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2207
+ #line 2208 "grammar.c" /* yacc.c:1652 */
2228
2208
  break;
2229
2209
 
2230
2210
  case 33:
2231
- #line 247 "grammar.y" /* yacc.c:1646 */
2232
- { (yyval.ndt) = ndt_constr((yyvsp[-3].string), (yyvsp[-1].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2233
- #line 2234 "grammar.c" /* yacc.c:1646 */
2211
+ #line 264 "grammar.y" /* yacc.c:1652 */
2212
+ { (yyval.ndt) = mk_constr((yyvsp[-3].string), (yyvsp[-1].ndt), false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2213
+ #line 2214 "grammar.c" /* yacc.c:1652 */
2234
2214
  break;
2235
2215
 
2236
2216
  case 34:
2237
- #line 248 "grammar.y" /* yacc.c:1646 */
2238
- { (void)(yyvsp[-3].string); (void)(yyvsp[-1].attribute_seq); ndt_free((yyvsp[-3].string)); ndt_attr_seq_del((yyvsp[-1].attribute_seq)); (yyval.ndt) = NULL;
2239
- ndt_err_format(ctx, NDT_NotImplementedError, "general attributes are not implemented");
2240
- YYABORT; }
2241
- #line 2242 "grammar.c" /* yacc.c:1646 */
2217
+ #line 265 "grammar.y" /* yacc.c:1652 */
2218
+ { (yyval.ndt) = mk_constr((yyvsp[-3].string), (yyvsp[-1].ndt), true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2219
+ #line 2220 "grammar.c" /* yacc.c:1652 */
2242
2220
  break;
2243
2221
 
2244
2222
  case 35:
2245
- #line 251 "grammar.y" /* yacc.c:1646 */
2223
+ #line 266 "grammar.y" /* yacc.c:1652 */
2246
2224
  { (yyval.ndt) = ndt_typevar((yyvsp[0].string), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2247
- #line 2248 "grammar.c" /* yacc.c:1646 */
2225
+ #line 2226 "grammar.c" /* yacc.c:1652 */
2248
2226
  break;
2249
2227
 
2250
2228
  case 36:
2251
- #line 254 "grammar.y" /* yacc.c:1646 */
2229
+ #line 269 "grammar.y" /* yacc.c:1652 */
2252
2230
  { (yyval.ndt) = ndt_primitive(Bool, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2253
- #line 2254 "grammar.c" /* yacc.c:1646 */
2231
+ #line 2232 "grammar.c" /* yacc.c:1652 */
2254
2232
  break;
2255
2233
 
2256
2234
  case 37:
2257
- #line 255 "grammar.y" /* yacc.c:1646 */
2258
- { (yyval.ndt) = ndt_signed_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2259
- #line 2260 "grammar.c" /* yacc.c:1646 */
2235
+ #line 270 "grammar.y" /* yacc.c:1652 */
2236
+ { (yyval.ndt) = ndt_signed_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2237
+ #line 2238 "grammar.c" /* yacc.c:1652 */
2260
2238
  break;
2261
2239
 
2262
2240
  case 38:
2263
- #line 256 "grammar.y" /* yacc.c:1646 */
2264
- { (yyval.ndt) = (yyvsp[0].ndt); }
2265
- #line 2266 "grammar.c" /* yacc.c:1646 */
2241
+ #line 271 "grammar.y" /* yacc.c:1652 */
2242
+ { (yyval.ndt) = ndt_primitive((yyvsp[0].tag), (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2243
+ #line 2244 "grammar.c" /* yacc.c:1652 */
2266
2244
  break;
2267
2245
 
2268
2246
  case 39:
2269
- #line 257 "grammar.y" /* yacc.c:1646 */
2270
- { (yyval.ndt) = ndt_unsigned_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2271
- #line 2272 "grammar.c" /* yacc.c:1646 */
2247
+ #line 272 "grammar.y" /* yacc.c:1652 */
2248
+ { (yyval.ndt) = ndt_unsigned_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2249
+ #line 2250 "grammar.c" /* yacc.c:1652 */
2272
2250
  break;
2273
2251
 
2274
2252
  case 40:
2275
- #line 258 "grammar.y" /* yacc.c:1646 */
2276
- { (yyval.ndt) = (yyvsp[0].ndt); }
2277
- #line 2278 "grammar.c" /* yacc.c:1646 */
2253
+ #line 273 "grammar.y" /* yacc.c:1652 */
2254
+ { (yyval.ndt) = ndt_primitive((yyvsp[0].tag), (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2255
+ #line 2256 "grammar.c" /* yacc.c:1652 */
2278
2256
  break;
2279
2257
 
2280
2258
  case 41:
2281
- #line 259 "grammar.y" /* yacc.c:1646 */
2282
- { (yyval.ndt) = ndt_float_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2283
- #line 2284 "grammar.c" /* yacc.c:1646 */
2259
+ #line 274 "grammar.y" /* yacc.c:1652 */
2260
+ { (yyval.ndt) = ndt_float_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2261
+ #line 2262 "grammar.c" /* yacc.c:1652 */
2284
2262
  break;
2285
2263
 
2286
2264
  case 42:
2287
- #line 260 "grammar.y" /* yacc.c:1646 */
2288
- { (yyval.ndt) = (yyvsp[0].ndt); }
2289
- #line 2290 "grammar.c" /* yacc.c:1646 */
2265
+ #line 275 "grammar.y" /* yacc.c:1652 */
2266
+ { (yyval.ndt) = ndt_primitive(BFloat16, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2267
+ #line 2268 "grammar.c" /* yacc.c:1652 */
2290
2268
  break;
2291
2269
 
2292
2270
  case 43:
2293
- #line 261 "grammar.y" /* yacc.c:1646 */
2294
- { (yyval.ndt) = ndt_complex_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2295
- #line 2296 "grammar.c" /* yacc.c:1646 */
2271
+ #line 276 "grammar.y" /* yacc.c:1652 */
2272
+ { (yyval.ndt) = ndt_primitive((yyvsp[0].tag), (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2273
+ #line 2274 "grammar.c" /* yacc.c:1652 */
2296
2274
  break;
2297
2275
 
2298
2276
  case 44:
2299
- #line 262 "grammar.y" /* yacc.c:1646 */
2300
- { (yyval.ndt) = (yyvsp[0].ndt); }
2301
- #line 2302 "grammar.c" /* yacc.c:1646 */
2277
+ #line 277 "grammar.y" /* yacc.c:1652 */
2278
+ { (yyval.ndt) = ndt_complex_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2279
+ #line 2280 "grammar.c" /* yacc.c:1652 */
2302
2280
  break;
2303
2281
 
2304
2282
  case 45:
2305
- #line 263 "grammar.y" /* yacc.c:1646 */
2306
- { (yyval.ndt) = (yyvsp[0].ndt); }
2307
- #line 2308 "grammar.c" /* yacc.c:1646 */
2283
+ #line 278 "grammar.y" /* yacc.c:1652 */
2284
+ { (yyval.ndt) = ndt_primitive(BComplex32, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2285
+ #line 2286 "grammar.c" /* yacc.c:1652 */
2308
2286
  break;
2309
2287
 
2310
2288
  case 46:
2311
- #line 264 "grammar.y" /* yacc.c:1646 */
2312
- { (yyval.ndt) = (yyvsp[0].ndt); }
2313
- #line 2314 "grammar.c" /* yacc.c:1646 */
2289
+ #line 279 "grammar.y" /* yacc.c:1652 */
2290
+ { (yyval.ndt) = ndt_primitive((yyvsp[0].tag), (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2291
+ #line 2292 "grammar.c" /* yacc.c:1652 */
2314
2292
  break;
2315
2293
 
2316
2294
  case 47:
2317
- #line 265 "grammar.y" /* yacc.c:1646 */
2318
- { (yyval.ndt) = (yyvsp[0].ndt); }
2319
- #line 2320 "grammar.c" /* yacc.c:1646 */
2295
+ #line 280 "grammar.y" /* yacc.c:1652 */
2296
+ { (yyval.ndt) = ndt_from_alias((yyvsp[0].alias), (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2297
+ #line 2298 "grammar.c" /* yacc.c:1652 */
2320
2298
  break;
2321
2299
 
2322
2300
  case 48:
2323
- #line 266 "grammar.y" /* yacc.c:1646 */
2324
- { (yyval.ndt) = ndt_fixed_string_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2325
- #line 2326 "grammar.c" /* yacc.c:1646 */
2301
+ #line 281 "grammar.y" /* yacc.c:1652 */
2302
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2303
+ #line 2304 "grammar.c" /* yacc.c:1652 */
2326
2304
  break;
2327
2305
 
2328
2306
  case 49:
2329
- #line 267 "grammar.y" /* yacc.c:1646 */
2307
+ #line 282 "grammar.y" /* yacc.c:1652 */
2330
2308
  { (yyval.ndt) = (yyvsp[0].ndt); }
2331
- #line 2332 "grammar.c" /* yacc.c:1646 */
2309
+ #line 2310 "grammar.c" /* yacc.c:1652 */
2332
2310
  break;
2333
2311
 
2334
2312
  case 50:
2335
- #line 268 "grammar.y" /* yacc.c:1646 */
2336
- { (yyval.ndt) = (yyvsp[0].ndt); }
2337
- #line 2338 "grammar.c" /* yacc.c:1646 */
2313
+ #line 283 "grammar.y" /* yacc.c:1652 */
2314
+ { (yyval.ndt) = ndt_fixed_string_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2315
+ #line 2316 "grammar.c" /* yacc.c:1652 */
2338
2316
  break;
2339
2317
 
2340
2318
  case 51:
2341
- #line 269 "grammar.y" /* yacc.c:1646 */
2342
- { (yyval.ndt) = ndt_fixed_bytes_kind(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2343
- #line 2344 "grammar.c" /* yacc.c:1646 */
2319
+ #line 284 "grammar.y" /* yacc.c:1652 */
2320
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2321
+ #line 2322 "grammar.c" /* yacc.c:1652 */
2344
2322
  break;
2345
2323
 
2346
2324
  case 52:
2347
- #line 270 "grammar.y" /* yacc.c:1646 */
2325
+ #line 285 "grammar.y" /* yacc.c:1652 */
2348
2326
  { (yyval.ndt) = (yyvsp[0].ndt); }
2349
- #line 2350 "grammar.c" /* yacc.c:1646 */
2327
+ #line 2328 "grammar.c" /* yacc.c:1652 */
2350
2328
  break;
2351
2329
 
2352
2330
  case 53:
2353
- #line 271 "grammar.y" /* yacc.c:1646 */
2354
- { (yyval.ndt) = (yyvsp[0].ndt); }
2355
- #line 2356 "grammar.c" /* yacc.c:1646 */
2331
+ #line 286 "grammar.y" /* yacc.c:1652 */
2332
+ { (yyval.ndt) = ndt_fixed_bytes_kind((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2333
+ #line 2334 "grammar.c" /* yacc.c:1652 */
2356
2334
  break;
2357
2335
 
2358
2336
  case 54:
2359
- #line 272 "grammar.y" /* yacc.c:1646 */
2337
+ #line 287 "grammar.y" /* yacc.c:1652 */
2360
2338
  { (yyval.ndt) = (yyvsp[0].ndt); }
2361
- #line 2362 "grammar.c" /* yacc.c:1646 */
2339
+ #line 2340 "grammar.c" /* yacc.c:1652 */
2362
2340
  break;
2363
2341
 
2364
2342
  case 55:
2365
- #line 275 "grammar.y" /* yacc.c:1646 */
2366
- { (yyval.ndt) = ndt_primitive(Int8, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2367
- #line 2368 "grammar.c" /* yacc.c:1646 */
2343
+ #line 288 "grammar.y" /* yacc.c:1652 */
2344
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2345
+ #line 2346 "grammar.c" /* yacc.c:1652 */
2368
2346
  break;
2369
2347
 
2370
2348
  case 56:
2371
- #line 276 "grammar.y" /* yacc.c:1646 */
2372
- { (yyval.ndt) = ndt_primitive(Int16, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2373
- #line 2374 "grammar.c" /* yacc.c:1646 */
2349
+ #line 289 "grammar.y" /* yacc.c:1652 */
2350
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2351
+ #line 2352 "grammar.c" /* yacc.c:1652 */
2374
2352
  break;
2375
2353
 
2376
2354
  case 57:
2377
- #line 277 "grammar.y" /* yacc.c:1646 */
2378
- { (yyval.ndt) = ndt_primitive(Int32, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2379
- #line 2380 "grammar.c" /* yacc.c:1646 */
2355
+ #line 292 "grammar.y" /* yacc.c:1652 */
2356
+ { (yyval.tag) = Int8; }
2357
+ #line 2358 "grammar.c" /* yacc.c:1652 */
2380
2358
  break;
2381
2359
 
2382
2360
  case 58:
2383
- #line 278 "grammar.y" /* yacc.c:1646 */
2384
- { (yyval.ndt) = ndt_primitive(Int64, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2385
- #line 2386 "grammar.c" /* yacc.c:1646 */
2361
+ #line 293 "grammar.y" /* yacc.c:1652 */
2362
+ { (yyval.tag) = Int16; }
2363
+ #line 2364 "grammar.c" /* yacc.c:1652 */
2386
2364
  break;
2387
2365
 
2388
2366
  case 59:
2389
- #line 281 "grammar.y" /* yacc.c:1646 */
2390
- { (yyval.ndt) = ndt_primitive(Uint8, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2391
- #line 2392 "grammar.c" /* yacc.c:1646 */
2367
+ #line 294 "grammar.y" /* yacc.c:1652 */
2368
+ { (yyval.tag) = Int32; }
2369
+ #line 2370 "grammar.c" /* yacc.c:1652 */
2392
2370
  break;
2393
2371
 
2394
2372
  case 60:
2395
- #line 282 "grammar.y" /* yacc.c:1646 */
2396
- { (yyval.ndt) = ndt_primitive(Uint16, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2397
- #line 2398 "grammar.c" /* yacc.c:1646 */
2373
+ #line 295 "grammar.y" /* yacc.c:1652 */
2374
+ { (yyval.tag) = Int64; }
2375
+ #line 2376 "grammar.c" /* yacc.c:1652 */
2398
2376
  break;
2399
2377
 
2400
2378
  case 61:
2401
- #line 283 "grammar.y" /* yacc.c:1646 */
2402
- { (yyval.ndt) = ndt_primitive(Uint32, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2403
- #line 2404 "grammar.c" /* yacc.c:1646 */
2379
+ #line 298 "grammar.y" /* yacc.c:1652 */
2380
+ { (yyval.tag) = Uint8; }
2381
+ #line 2382 "grammar.c" /* yacc.c:1652 */
2404
2382
  break;
2405
2383
 
2406
2384
  case 62:
2407
- #line 284 "grammar.y" /* yacc.c:1646 */
2408
- { (yyval.ndt) = ndt_primitive(Uint64, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2409
- #line 2410 "grammar.c" /* yacc.c:1646 */
2385
+ #line 299 "grammar.y" /* yacc.c:1652 */
2386
+ { (yyval.tag) = Uint16; }
2387
+ #line 2388 "grammar.c" /* yacc.c:1652 */
2410
2388
  break;
2411
2389
 
2412
2390
  case 63:
2413
- #line 287 "grammar.y" /* yacc.c:1646 */
2414
- { (yyval.ndt) = ndt_primitive(Float16, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2415
- #line 2416 "grammar.c" /* yacc.c:1646 */
2391
+ #line 300 "grammar.y" /* yacc.c:1652 */
2392
+ { (yyval.tag) = Uint32; }
2393
+ #line 2394 "grammar.c" /* yacc.c:1652 */
2416
2394
  break;
2417
2395
 
2418
2396
  case 64:
2419
- #line 288 "grammar.y" /* yacc.c:1646 */
2420
- { (yyval.ndt) = ndt_primitive(Float32, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2421
- #line 2422 "grammar.c" /* yacc.c:1646 */
2397
+ #line 301 "grammar.y" /* yacc.c:1652 */
2398
+ { (yyval.tag) = Uint64; }
2399
+ #line 2400 "grammar.c" /* yacc.c:1652 */
2422
2400
  break;
2423
2401
 
2424
2402
  case 65:
2425
- #line 289 "grammar.y" /* yacc.c:1646 */
2426
- { (yyval.ndt) = ndt_primitive(Float64, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2427
- #line 2428 "grammar.c" /* yacc.c:1646 */
2403
+ #line 304 "grammar.y" /* yacc.c:1652 */
2404
+ { (yyval.tag) = Float16; }
2405
+ #line 2406 "grammar.c" /* yacc.c:1652 */
2428
2406
  break;
2429
2407
 
2430
2408
  case 66:
2431
- #line 292 "grammar.y" /* yacc.c:1646 */
2432
- { (yyval.ndt) = ndt_primitive(Complex32, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2433
- #line 2434 "grammar.c" /* yacc.c:1646 */
2409
+ #line 305 "grammar.y" /* yacc.c:1652 */
2410
+ { (yyval.tag) = Float32; }
2411
+ #line 2412 "grammar.c" /* yacc.c:1652 */
2434
2412
  break;
2435
2413
 
2436
2414
  case 67:
2437
- #line 293 "grammar.y" /* yacc.c:1646 */
2438
- { (yyval.ndt) = ndt_primitive(Complex64, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2439
- #line 2440 "grammar.c" /* yacc.c:1646 */
2415
+ #line 306 "grammar.y" /* yacc.c:1652 */
2416
+ { (yyval.tag) = Float64; }
2417
+ #line 2418 "grammar.c" /* yacc.c:1652 */
2440
2418
  break;
2441
2419
 
2442
2420
  case 68:
2443
- #line 294 "grammar.y" /* yacc.c:1646 */
2444
- { (yyval.ndt) = ndt_primitive(Complex128, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2445
- #line 2446 "grammar.c" /* yacc.c:1646 */
2421
+ #line 309 "grammar.y" /* yacc.c:1652 */
2422
+ { (yyval.tag) = Complex32; }
2423
+ #line 2424 "grammar.c" /* yacc.c:1652 */
2446
2424
  break;
2447
2425
 
2448
2426
  case 69:
2449
- #line 298 "grammar.y" /* yacc.c:1646 */
2450
- { (yyval.ndt) = ndt_from_alias(Intptr, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2451
- #line 2452 "grammar.c" /* yacc.c:1646 */
2427
+ #line 310 "grammar.y" /* yacc.c:1652 */
2428
+ { (yyval.tag) = Complex64; }
2429
+ #line 2430 "grammar.c" /* yacc.c:1652 */
2452
2430
  break;
2453
2431
 
2454
2432
  case 70:
2455
- #line 299 "grammar.y" /* yacc.c:1646 */
2456
- { (yyval.ndt) = ndt_from_alias(Uintptr, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2457
- #line 2458 "grammar.c" /* yacc.c:1646 */
2433
+ #line 311 "grammar.y" /* yacc.c:1652 */
2434
+ { (yyval.tag) = Complex128; }
2435
+ #line 2436 "grammar.c" /* yacc.c:1652 */
2458
2436
  break;
2459
2437
 
2460
2438
  case 71:
2461
- #line 300 "grammar.y" /* yacc.c:1646 */
2462
- { (yyval.ndt) = ndt_from_alias(Size, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2463
- #line 2464 "grammar.c" /* yacc.c:1646 */
2439
+ #line 315 "grammar.y" /* yacc.c:1652 */
2440
+ { (yyval.alias) = Intptr; }
2441
+ #line 2442 "grammar.c" /* yacc.c:1652 */
2464
2442
  break;
2465
2443
 
2466
2444
  case 72:
2467
- #line 303 "grammar.y" /* yacc.c:1646 */
2468
- { (yyval.ndt) = ndt_char(Utf32, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2469
- #line 2470 "grammar.c" /* yacc.c:1646 */
2445
+ #line 316 "grammar.y" /* yacc.c:1652 */
2446
+ { (yyval.alias) = Uintptr; }
2447
+ #line 2448 "grammar.c" /* yacc.c:1652 */
2470
2448
  break;
2471
2449
 
2472
2450
  case 73:
2473
- #line 304 "grammar.y" /* yacc.c:1646 */
2474
- { (yyval.ndt) = ndt_char((yyvsp[-1].encoding), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2475
- #line 2476 "grammar.c" /* yacc.c:1646 */
2451
+ #line 317 "grammar.y" /* yacc.c:1652 */
2452
+ { (yyval.alias) = Size; }
2453
+ #line 2454 "grammar.c" /* yacc.c:1652 */
2476
2454
  break;
2477
2455
 
2478
2456
  case 74:
2479
- #line 307 "grammar.y" /* yacc.c:1646 */
2480
- { (yyval.ndt) = ndt_string(ctx); if ((yyval.ndt) == NULL) YYABORT; }
2481
- #line 2482 "grammar.c" /* yacc.c:1646 */
2457
+ #line 320 "grammar.y" /* yacc.c:1652 */
2458
+ { (yyval.ndt) = ndt_char(Utf32, (yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2459
+ #line 2460 "grammar.c" /* yacc.c:1652 */
2482
2460
  break;
2483
2461
 
2484
2462
  case 75:
2485
- #line 310 "grammar.y" /* yacc.c:1646 */
2486
- { (yyval.ndt) = mk_fixed_string((yyvsp[-1].string), Utf8, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2487
- #line 2488 "grammar.c" /* yacc.c:1646 */
2463
+ #line 321 "grammar.y" /* yacc.c:1652 */
2464
+ { (yyval.ndt) = ndt_char((yyvsp[-1].encoding), (yyvsp[-4].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2465
+ #line 2466 "grammar.c" /* yacc.c:1652 */
2488
2466
  break;
2489
2467
 
2490
2468
  case 76:
2491
- #line 311 "grammar.y" /* yacc.c:1646 */
2492
- { (yyval.ndt) = mk_fixed_string((yyvsp[-3].string), (yyvsp[-1].encoding), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2493
- #line 2494 "grammar.c" /* yacc.c:1646 */
2469
+ #line 324 "grammar.y" /* yacc.c:1652 */
2470
+ { (yyval.ndt) = ndt_string((yyvsp[-1].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2471
+ #line 2472 "grammar.c" /* yacc.c:1652 */
2494
2472
  break;
2495
2473
 
2496
2474
  case 77:
2497
- #line 314 "grammar.y" /* yacc.c:1646 */
2498
- { (yyval.uint32) = 0; }
2499
- #line 2500 "grammar.c" /* yacc.c:1646 */
2475
+ #line 327 "grammar.y" /* yacc.c:1652 */
2476
+ { (yyval.ndt) = mk_fixed_string((yyvsp[-1].string), Utf8, (yyvsp[-4].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2477
+ #line 2478 "grammar.c" /* yacc.c:1652 */
2500
2478
  break;
2501
2479
 
2502
2480
  case 78:
2503
- #line 315 "grammar.y" /* yacc.c:1646 */
2504
- { (yyval.uint32) = NDT_SYS_BIG_ENDIAN ? NDT_BIG_ENDIAN : NDT_LITTLE_ENDIAN; }
2505
- #line 2506 "grammar.c" /* yacc.c:1646 */
2481
+ #line 328 "grammar.y" /* yacc.c:1652 */
2482
+ { (yyval.ndt) = mk_fixed_string((yyvsp[-3].string), (yyvsp[-1].encoding), (yyvsp[-6].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2483
+ #line 2484 "grammar.c" /* yacc.c:1652 */
2506
2484
  break;
2507
2485
 
2508
2486
  case 79:
2509
- #line 316 "grammar.y" /* yacc.c:1646 */
2510
- { (yyval.uint32) = NDT_LITTLE_ENDIAN; }
2511
- #line 2512 "grammar.c" /* yacc.c:1646 */
2487
+ #line 331 "grammar.y" /* yacc.c:1652 */
2488
+ { (yyval.uint32) = (yyvsp[-1].uint32) | (yyvsp[0].uint32); }
2489
+ #line 2490 "grammar.c" /* yacc.c:1652 */
2512
2490
  break;
2513
2491
 
2514
2492
  case 80:
2515
- #line 317 "grammar.y" /* yacc.c:1646 */
2516
- { (yyval.uint32) = NDT_BIG_ENDIAN; }
2517
- #line 2518 "grammar.c" /* yacc.c:1646 */
2493
+ #line 334 "grammar.y" /* yacc.c:1652 */
2494
+ { (yyval.uint32) = 0; }
2495
+ #line 2496 "grammar.c" /* yacc.c:1652 */
2518
2496
  break;
2519
2497
 
2520
2498
  case 81:
2521
- #line 318 "grammar.y" /* yacc.c:1646 */
2522
- { (yyval.uint32) = 0; }
2523
- #line 2524 "grammar.c" /* yacc.c:1646 */
2499
+ #line 335 "grammar.y" /* yacc.c:1652 */
2500
+ { (yyval.uint32) = NDT_OPTION; }
2501
+ #line 2502 "grammar.c" /* yacc.c:1652 */
2524
2502
  break;
2525
2503
 
2526
2504
  case 82:
2527
- #line 321 "grammar.y" /* yacc.c:1646 */
2528
- { (yyval.encoding) = encoding_from_string((yyvsp[0].string), ctx); if (ndt_err_occurred(ctx)) YYABORT; }
2529
- #line 2530 "grammar.c" /* yacc.c:1646 */
2505
+ #line 338 "grammar.y" /* yacc.c:1652 */
2506
+ { (yyval.uint32) = 0; }
2507
+ #line 2508 "grammar.c" /* yacc.c:1652 */
2530
2508
  break;
2531
2509
 
2532
2510
  case 83:
2533
- #line 324 "grammar.y" /* yacc.c:1646 */
2534
- { (yyval.ndt) = mk_bytes((yyvsp[0].attribute_seq), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2535
- #line 2536 "grammar.c" /* yacc.c:1646 */
2511
+ #line 339 "grammar.y" /* yacc.c:1652 */
2512
+ { (yyval.uint32) = NDT_SYS_BIG_ENDIAN ? NDT_BIG_ENDIAN : NDT_LITTLE_ENDIAN; }
2513
+ #line 2514 "grammar.c" /* yacc.c:1652 */
2536
2514
  break;
2537
2515
 
2538
2516
  case 84:
2539
- #line 327 "grammar.y" /* yacc.c:1646 */
2540
- { (yyval.ndt) = mk_fixed_bytes((yyvsp[-1].attribute_seq), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2541
- #line 2542 "grammar.c" /* yacc.c:1646 */
2517
+ #line 340 "grammar.y" /* yacc.c:1652 */
2518
+ { (yyval.uint32) = NDT_LITTLE_ENDIAN; }
2519
+ #line 2520 "grammar.c" /* yacc.c:1652 */
2542
2520
  break;
2543
2521
 
2544
2522
  case 85:
2545
- #line 330 "grammar.y" /* yacc.c:1646 */
2546
- { (yyval.ndt) = ndt_ref((yyvsp[-1].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2547
- #line 2548 "grammar.c" /* yacc.c:1646 */
2523
+ #line 341 "grammar.y" /* yacc.c:1652 */
2524
+ { (yyval.uint32) = NDT_BIG_ENDIAN; }
2525
+ #line 2526 "grammar.c" /* yacc.c:1652 */
2548
2526
  break;
2549
2527
 
2550
2528
  case 86:
2551
- #line 331 "grammar.y" /* yacc.c:1646 */
2552
- { (yyval.ndt) = ndt_ref((yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2553
- #line 2554 "grammar.c" /* yacc.c:1646 */
2529
+ #line 342 "grammar.y" /* yacc.c:1652 */
2530
+ { (yyval.uint32) = 0; }
2531
+ #line 2532 "grammar.c" /* yacc.c:1652 */
2554
2532
  break;
2555
2533
 
2556
2534
  case 87:
2557
- #line 334 "grammar.y" /* yacc.c:1646 */
2558
- { (yyval.ndt) = mk_categorical((yyvsp[-1].typed_value_seq), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2559
- #line 2560 "grammar.c" /* yacc.c:1646 */
2535
+ #line 345 "grammar.y" /* yacc.c:1652 */
2536
+ { (yyval.encoding) = encoding_from_string((yyvsp[0].string), ctx); if (ndt_err_occurred(ctx)) YYABORT; }
2537
+ #line 2538 "grammar.c" /* yacc.c:1652 */
2560
2538
  break;
2561
2539
 
2562
2540
  case 88:
2563
- #line 337 "grammar.y" /* yacc.c:1646 */
2564
- { (yyval.typed_value_seq) = ndt_value_seq_new((yyvsp[0].typed_value), ctx); if ((yyval.typed_value_seq) == NULL) YYABORT; }
2565
- #line 2566 "grammar.c" /* yacc.c:1646 */
2541
+ #line 348 "grammar.y" /* yacc.c:1652 */
2542
+ { (yyval.ndt) = mk_bytes((yyvsp[0].attribute_seq), (yyvsp[-2].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2543
+ #line 2544 "grammar.c" /* yacc.c:1652 */
2566
2544
  break;
2567
2545
 
2568
2546
  case 89:
2569
- #line 338 "grammar.y" /* yacc.c:1646 */
2570
- { (yyval.typed_value_seq) = ndt_value_seq_append((yyvsp[-2].typed_value_seq), (yyvsp[0].typed_value), ctx); if ((yyval.typed_value_seq) == NULL) YYABORT; }
2571
- #line 2572 "grammar.c" /* yacc.c:1646 */
2547
+ #line 351 "grammar.y" /* yacc.c:1652 */
2548
+ { (yyval.ndt) = (yyvsp[0].ndt); }
2549
+ #line 2550 "grammar.c" /* yacc.c:1652 */
2572
2550
  break;
2573
2551
 
2574
2552
  case 90:
2575
- #line 341 "grammar.y" /* yacc.c:1646 */
2576
- { (yyval.typed_value) = ndt_value_from_number(ValInt64, (yyvsp[0].string), ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2577
- #line 2578 "grammar.c" /* yacc.c:1646 */
2553
+ #line 352 "grammar.y" /* yacc.c:1652 */
2554
+ { (yyval.ndt) = mk_array_ellipsis((yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2555
+ #line 2556 "grammar.c" /* yacc.c:1652 */
2578
2556
  break;
2579
2557
 
2580
2558
  case 91:
2581
- #line 342 "grammar.y" /* yacc.c:1646 */
2582
- { (yyval.typed_value) = ndt_value_from_number(ValFloat64, (yyvsp[0].string), ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2583
- #line 2584 "grammar.c" /* yacc.c:1646 */
2559
+ #line 353 "grammar.y" /* yacc.c:1652 */
2560
+ { (yyval.ndt) = mk_array_ellipsis((yyvsp[0].ndt), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2561
+ #line 2562 "grammar.c" /* yacc.c:1652 */
2584
2562
  break;
2585
2563
 
2586
2564
  case 92:
2587
- #line 343 "grammar.y" /* yacc.c:1646 */
2588
- { (yyval.typed_value) = ndt_value_from_string((yyvsp[0].string), ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2589
- #line 2590 "grammar.c" /* yacc.c:1646 */
2565
+ #line 356 "grammar.y" /* yacc.c:1652 */
2566
+ { (yyval.ndt) = mk_array((yyvsp[0].ndt), (yyvsp[-3].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2567
+ #line 2568 "grammar.c" /* yacc.c:1652 */
2590
2568
  break;
2591
2569
 
2592
2570
  case 93:
2593
- #line 344 "grammar.y" /* yacc.c:1646 */
2594
- { (yyval.typed_value) = ndt_value_na(ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2595
- #line 2596 "grammar.c" /* yacc.c:1646 */
2571
+ #line 357 "grammar.y" /* yacc.c:1652 */
2572
+ { (yyval.ndt) = mk_array((yyvsp[0].ndt), (yyvsp[-3].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2573
+ #line 2574 "grammar.c" /* yacc.c:1652 */
2596
2574
  break;
2597
2575
 
2598
2576
  case 94:
2599
- #line 347 "grammar.y" /* yacc.c:1646 */
2600
- { (yyval.variadic_flag) = Nonvariadic; }
2601
- #line 2602 "grammar.c" /* yacc.c:1646 */
2577
+ #line 360 "grammar.y" /* yacc.c:1652 */
2578
+ { (yyval.ndt) = mk_fixed_bytes((yyvsp[-1].attribute_seq), (yyvsp[-4].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2579
+ #line 2580 "grammar.c" /* yacc.c:1652 */
2602
2580
  break;
2603
2581
 
2604
2582
  case 95:
2605
- #line 348 "grammar.y" /* yacc.c:1646 */
2606
- { (yyval.variadic_flag) = Variadic; }
2607
- #line 2608 "grammar.c" /* yacc.c:1646 */
2583
+ #line 363 "grammar.y" /* yacc.c:1652 */
2584
+ { (yyval.ndt) = mk_ref((yyvsp[-1].ndt), (yyvsp[-4].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2585
+ #line 2586 "grammar.c" /* yacc.c:1652 */
2608
2586
  break;
2609
2587
 
2610
2588
  case 96:
2611
- #line 351 "grammar.y" /* yacc.c:1646 */
2612
- { (yyval.variadic_flag) = Nonvariadic; }
2613
- #line 2614 "grammar.c" /* yacc.c:1646 */
2589
+ #line 364 "grammar.y" /* yacc.c:1652 */
2590
+ { (yyval.ndt) = mk_ref((yyvsp[0].ndt), (yyvsp[-2].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2591
+ #line 2592 "grammar.c" /* yacc.c:1652 */
2614
2592
  break;
2615
2593
 
2616
2594
  case 97:
2617
- #line 352 "grammar.y" /* yacc.c:1646 */
2618
- { (yyval.variadic_flag) = Nonvariadic; }
2619
- #line 2620 "grammar.c" /* yacc.c:1646 */
2595
+ #line 367 "grammar.y" /* yacc.c:1652 */
2596
+ { (yyval.ndt) = mk_categorical((yyvsp[-1].typed_value_seq), (yyvsp[-4].uint32), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2597
+ #line 2598 "grammar.c" /* yacc.c:1652 */
2620
2598
  break;
2621
2599
 
2622
2600
  case 98:
2623
- #line 353 "grammar.y" /* yacc.c:1646 */
2624
- { (yyval.variadic_flag) = Variadic; }
2625
- #line 2626 "grammar.c" /* yacc.c:1646 */
2601
+ #line 370 "grammar.y" /* yacc.c:1652 */
2602
+ { (yyval.typed_value_seq) = ndt_value_seq_new((yyvsp[0].typed_value), ctx); if ((yyval.typed_value_seq) == NULL) YYABORT; }
2603
+ #line 2604 "grammar.c" /* yacc.c:1652 */
2626
2604
  break;
2627
2605
 
2628
2606
  case 99:
2629
- #line 356 "grammar.y" /* yacc.c:1646 */
2630
- { (yyval.ndt) = mk_tuple((yyvsp[-1].variadic_flag), NULL, NULL, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2631
- #line 2632 "grammar.c" /* yacc.c:1646 */
2607
+ #line 371 "grammar.y" /* yacc.c:1652 */
2608
+ { (yyval.typed_value_seq) = ndt_value_seq_append((yyvsp[-2].typed_value_seq), (yyvsp[0].typed_value), ctx); if ((yyval.typed_value_seq) == NULL) YYABORT; }
2609
+ #line 2610 "grammar.c" /* yacc.c:1652 */
2632
2610
  break;
2633
2611
 
2634
2612
  case 100:
2635
- #line 357 "grammar.y" /* yacc.c:1646 */
2636
- { (yyval.ndt) = mk_tuple((yyvsp[-1].variadic_flag), (yyvsp[-2].field_seq), NULL, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2637
- #line 2638 "grammar.c" /* yacc.c:1646 */
2613
+ #line 374 "grammar.y" /* yacc.c:1652 */
2614
+ { (yyval.typed_value) = ndt_value_from_number(ValInt64, (yyvsp[0].string), ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2615
+ #line 2616 "grammar.c" /* yacc.c:1652 */
2638
2616
  break;
2639
2617
 
2640
2618
  case 101:
2641
- #line 358 "grammar.y" /* yacc.c:1646 */
2642
- { (yyval.ndt) = mk_tuple(Nonvariadic, (yyvsp[-3].field_seq), (yyvsp[-1].attribute_seq), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2643
- #line 2644 "grammar.c" /* yacc.c:1646 */
2619
+ #line 375 "grammar.y" /* yacc.c:1652 */
2620
+ { (yyval.typed_value) = ndt_value_from_number(ValFloat64, (yyvsp[0].string), ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2621
+ #line 2622 "grammar.c" /* yacc.c:1652 */
2644
2622
  break;
2645
2623
 
2646
2624
  case 102:
2647
- #line 361 "grammar.y" /* yacc.c:1646 */
2648
- { (yyval.field_seq) = ndt_field_seq_new((yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2649
- #line 2650 "grammar.c" /* yacc.c:1646 */
2625
+ #line 376 "grammar.y" /* yacc.c:1652 */
2626
+ { (yyval.typed_value) = ndt_value_from_string((yyvsp[0].string), ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2627
+ #line 2628 "grammar.c" /* yacc.c:1652 */
2650
2628
  break;
2651
2629
 
2652
2630
  case 103:
2653
- #line 362 "grammar.y" /* yacc.c:1646 */
2654
- { (yyval.field_seq) = ndt_field_seq_append((yyvsp[-2].field_seq), (yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2655
- #line 2656 "grammar.c" /* yacc.c:1646 */
2631
+ #line 377 "grammar.y" /* yacc.c:1652 */
2632
+ { (yyval.typed_value) = ndt_value_na(ctx); if ((yyval.typed_value) == NULL) YYABORT; }
2633
+ #line 2634 "grammar.c" /* yacc.c:1652 */
2656
2634
  break;
2657
2635
 
2658
2636
  case 104:
2659
- #line 365 "grammar.y" /* yacc.c:1646 */
2660
- { (yyval.field) = mk_field(NULL, (yyvsp[0].ndt), NULL, ctx); if ((yyval.field) == NULL) YYABORT; }
2661
- #line 2662 "grammar.c" /* yacc.c:1646 */
2637
+ #line 380 "grammar.y" /* yacc.c:1652 */
2638
+ { (yyval.variadic_flag) = Nonvariadic; }
2639
+ #line 2640 "grammar.c" /* yacc.c:1652 */
2662
2640
  break;
2663
2641
 
2664
2642
  case 105:
2665
- #line 366 "grammar.y" /* yacc.c:1646 */
2666
- { (yyval.field) = mk_field(NULL, (yyvsp[-3].ndt), (yyvsp[-1].attribute_seq), ctx); if ((yyval.field) == NULL) YYABORT; }
2667
- #line 2668 "grammar.c" /* yacc.c:1646 */
2643
+ #line 381 "grammar.y" /* yacc.c:1652 */
2644
+ { (yyval.variadic_flag) = Variadic; }
2645
+ #line 2646 "grammar.c" /* yacc.c:1652 */
2668
2646
  break;
2669
2647
 
2670
2648
  case 106:
2671
- #line 369 "grammar.y" /* yacc.c:1646 */
2672
- { (yyval.ndt) = mk_record((yyvsp[-1].variadic_flag), NULL, NULL, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2673
- #line 2674 "grammar.c" /* yacc.c:1646 */
2649
+ #line 384 "grammar.y" /* yacc.c:1652 */
2650
+ { (yyval.variadic_flag) = Nonvariadic; }
2651
+ #line 2652 "grammar.c" /* yacc.c:1652 */
2674
2652
  break;
2675
2653
 
2676
2654
  case 107:
2677
- #line 370 "grammar.y" /* yacc.c:1646 */
2678
- { (yyval.ndt) = mk_record((yyvsp[-1].variadic_flag), (yyvsp[-2].field_seq), NULL, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2679
- #line 2680 "grammar.c" /* yacc.c:1646 */
2655
+ #line 385 "grammar.y" /* yacc.c:1652 */
2656
+ { (yyval.variadic_flag) = Nonvariadic; }
2657
+ #line 2658 "grammar.c" /* yacc.c:1652 */
2680
2658
  break;
2681
2659
 
2682
2660
  case 108:
2683
- #line 371 "grammar.y" /* yacc.c:1646 */
2684
- { (yyval.ndt) = mk_record(Nonvariadic, (yyvsp[-3].field_seq), (yyvsp[-1].attribute_seq), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2685
- #line 2686 "grammar.c" /* yacc.c:1646 */
2661
+ #line 386 "grammar.y" /* yacc.c:1652 */
2662
+ { (yyval.variadic_flag) = Variadic; }
2663
+ #line 2664 "grammar.c" /* yacc.c:1652 */
2686
2664
  break;
2687
2665
 
2688
2666
  case 109:
2689
- #line 374 "grammar.y" /* yacc.c:1646 */
2690
- { (yyval.field_seq) = ndt_field_seq_new((yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2691
- #line 2692 "grammar.c" /* yacc.c:1646 */
2667
+ #line 389 "grammar.y" /* yacc.c:1652 */
2668
+ { (yyval.ndt) = mk_tuple((yyvsp[-1].variadic_flag), NULL, NULL, false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2669
+ #line 2670 "grammar.c" /* yacc.c:1652 */
2692
2670
  break;
2693
2671
 
2694
2672
  case 110:
2695
- #line 375 "grammar.y" /* yacc.c:1646 */
2696
- { (yyval.field_seq) = ndt_field_seq_append((yyvsp[-2].field_seq), (yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2697
- #line 2698 "grammar.c" /* yacc.c:1646 */
2673
+ #line 390 "grammar.y" /* yacc.c:1652 */
2674
+ { (yyval.ndt) = mk_tuple((yyvsp[-1].variadic_flag), (yyvsp[-2].field_seq), NULL, false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2675
+ #line 2676 "grammar.c" /* yacc.c:1652 */
2698
2676
  break;
2699
2677
 
2700
2678
  case 111:
2701
- #line 378 "grammar.y" /* yacc.c:1646 */
2702
- { (yyval.field) = mk_field((yyvsp[-2].string), (yyvsp[0].ndt), NULL, ctx); if ((yyval.field) == NULL) YYABORT; }
2703
- #line 2704 "grammar.c" /* yacc.c:1646 */
2679
+ #line 391 "grammar.y" /* yacc.c:1652 */
2680
+ { (yyval.ndt) = mk_tuple(Nonvariadic, (yyvsp[-3].field_seq), (yyvsp[-1].attribute_seq), false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2681
+ #line 2682 "grammar.c" /* yacc.c:1652 */
2704
2682
  break;
2705
2683
 
2706
2684
  case 112:
2707
- #line 379 "grammar.y" /* yacc.c:1646 */
2708
- { (yyval.field) = mk_field((yyvsp[-5].string), (yyvsp[-3].ndt), (yyvsp[-1].attribute_seq), ctx); if ((yyval.field) == NULL) YYABORT; }
2709
- #line 2710 "grammar.c" /* yacc.c:1646 */
2685
+ #line 392 "grammar.y" /* yacc.c:1652 */
2686
+ { (yyval.ndt) = mk_tuple((yyvsp[-1].variadic_flag), NULL, NULL, true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2687
+ #line 2688 "grammar.c" /* yacc.c:1652 */
2710
2688
  break;
2711
2689
 
2712
2690
  case 113:
2713
- #line 382 "grammar.y" /* yacc.c:1646 */
2714
- { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2715
- #line 2716 "grammar.c" /* yacc.c:1646 */
2691
+ #line 393 "grammar.y" /* yacc.c:1652 */
2692
+ { (yyval.ndt) = mk_tuple((yyvsp[-1].variadic_flag), (yyvsp[-2].field_seq), NULL, true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2693
+ #line 2694 "grammar.c" /* yacc.c:1652 */
2716
2694
  break;
2717
2695
 
2718
2696
  case 114:
2719
- #line 383 "grammar.y" /* yacc.c:1646 */
2720
- { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2721
- #line 2722 "grammar.c" /* yacc.c:1646 */
2697
+ #line 394 "grammar.y" /* yacc.c:1652 */
2698
+ { (yyval.ndt) = mk_tuple(Nonvariadic, (yyvsp[-3].field_seq), (yyvsp[-1].attribute_seq), true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2699
+ #line 2700 "grammar.c" /* yacc.c:1652 */
2722
2700
  break;
2723
2701
 
2724
2702
  case 115:
2725
- #line 384 "grammar.y" /* yacc.c:1646 */
2726
- { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2727
- #line 2728 "grammar.c" /* yacc.c:1646 */
2703
+ #line 397 "grammar.y" /* yacc.c:1652 */
2704
+ { (yyval.field_seq) = ndt_field_seq_new((yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2705
+ #line 2706 "grammar.c" /* yacc.c:1652 */
2728
2706
  break;
2729
2707
 
2730
2708
  case 116:
2731
- #line 387 "grammar.y" /* yacc.c:1646 */
2732
- { (yyval.attribute_seq) = NULL; }
2733
- #line 2734 "grammar.c" /* yacc.c:1646 */
2709
+ #line 398 "grammar.y" /* yacc.c:1652 */
2710
+ { (yyval.field_seq) = ndt_field_seq_append((yyvsp[-2].field_seq), (yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2711
+ #line 2712 "grammar.c" /* yacc.c:1652 */
2734
2712
  break;
2735
2713
 
2736
2714
  case 117:
2737
- #line 388 "grammar.y" /* yacc.c:1646 */
2738
- { (yyval.attribute_seq) = (yyvsp[-1].attribute_seq); if ((yyval.attribute_seq) == NULL) YYABORT; }
2739
- #line 2740 "grammar.c" /* yacc.c:1646 */
2715
+ #line 401 "grammar.y" /* yacc.c:1652 */
2716
+ { (yyval.field) = mk_field(NULL, (yyvsp[0].ndt), NULL, ctx); if ((yyval.field) == NULL) YYABORT; }
2717
+ #line 2718 "grammar.c" /* yacc.c:1652 */
2740
2718
  break;
2741
2719
 
2742
2720
  case 118:
2743
- #line 391 "grammar.y" /* yacc.c:1646 */
2744
- { (yyval.attribute_seq) = ndt_attr_seq_new((yyvsp[0].attribute), ctx); if ((yyval.attribute_seq) == NULL) YYABORT; }
2745
- #line 2746 "grammar.c" /* yacc.c:1646 */
2721
+ #line 402 "grammar.y" /* yacc.c:1652 */
2722
+ { (yyval.field) = mk_field(NULL, (yyvsp[-3].ndt), (yyvsp[-1].attribute_seq), ctx); if ((yyval.field) == NULL) YYABORT; }
2723
+ #line 2724 "grammar.c" /* yacc.c:1652 */
2746
2724
  break;
2747
2725
 
2748
2726
  case 119:
2749
- #line 392 "grammar.y" /* yacc.c:1646 */
2750
- { (yyval.attribute_seq) = ndt_attr_seq_append((yyvsp[-2].attribute_seq), (yyvsp[0].attribute), ctx); if ((yyval.attribute_seq) == NULL) YYABORT; }
2751
- #line 2752 "grammar.c" /* yacc.c:1646 */
2727
+ #line 405 "grammar.y" /* yacc.c:1652 */
2728
+ { (yyval.ndt) = mk_record((yyvsp[-1].variadic_flag), NULL, NULL, false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2729
+ #line 2730 "grammar.c" /* yacc.c:1652 */
2752
2730
  break;
2753
2731
 
2754
2732
  case 120:
2755
- #line 395 "grammar.y" /* yacc.c:1646 */
2756
- { (yyval.attribute) = mk_attr((yyvsp[-2].string), (yyvsp[0].string), ctx); if ((yyval.attribute) == NULL) YYABORT; }
2757
- #line 2758 "grammar.c" /* yacc.c:1646 */
2733
+ #line 406 "grammar.y" /* yacc.c:1652 */
2734
+ { (yyval.ndt) = mk_record((yyvsp[-1].variadic_flag), (yyvsp[-2].field_seq), NULL, false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2735
+ #line 2736 "grammar.c" /* yacc.c:1652 */
2758
2736
  break;
2759
2737
 
2760
2738
  case 121:
2761
- #line 396 "grammar.y" /* yacc.c:1646 */
2762
- { (yyval.attribute) = mk_attr_from_seq((yyvsp[-4].string), (yyvsp[-1].string_seq), ctx); if ((yyval.attribute) == NULL) YYABORT; }
2763
- #line 2764 "grammar.c" /* yacc.c:1646 */
2739
+ #line 407 "grammar.y" /* yacc.c:1652 */
2740
+ { (yyval.ndt) = mk_record(Nonvariadic, (yyvsp[-3].field_seq), (yyvsp[-1].attribute_seq), false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2741
+ #line 2742 "grammar.c" /* yacc.c:1652 */
2764
2742
  break;
2765
2743
 
2766
2744
  case 122:
2767
- #line 399 "grammar.y" /* yacc.c:1646 */
2768
- { (yyval.string_seq) = ndt_string_seq_new((yyvsp[0].string), ctx); if ((yyval.string_seq) == NULL) YYABORT; }
2769
- #line 2770 "grammar.c" /* yacc.c:1646 */
2745
+ #line 408 "grammar.y" /* yacc.c:1652 */
2746
+ { (yyval.ndt) = mk_record((yyvsp[-1].variadic_flag), NULL, NULL, true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2747
+ #line 2748 "grammar.c" /* yacc.c:1652 */
2770
2748
  break;
2771
2749
 
2772
2750
  case 123:
2773
- #line 400 "grammar.y" /* yacc.c:1646 */
2774
- { (yyval.string_seq) = ndt_string_seq_append((yyvsp[-2].string_seq), (yyvsp[0].string), ctx); if ((yyval.string_seq) == NULL) YYABORT; }
2775
- #line 2776 "grammar.c" /* yacc.c:1646 */
2751
+ #line 409 "grammar.y" /* yacc.c:1652 */
2752
+ { (yyval.ndt) = mk_record((yyvsp[-1].variadic_flag), (yyvsp[-2].field_seq), NULL, true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2753
+ #line 2754 "grammar.c" /* yacc.c:1652 */
2776
2754
  break;
2777
2755
 
2778
2756
  case 124:
2779
- #line 403 "grammar.y" /* yacc.c:1646 */
2780
- { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2781
- #line 2782 "grammar.c" /* yacc.c:1646 */
2757
+ #line 410 "grammar.y" /* yacc.c:1652 */
2758
+ { (yyval.ndt) = mk_record(Nonvariadic, (yyvsp[-3].field_seq), (yyvsp[-1].attribute_seq), true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2759
+ #line 2760 "grammar.c" /* yacc.c:1652 */
2782
2760
  break;
2783
2761
 
2784
2762
  case 125:
2785
- #line 404 "grammar.y" /* yacc.c:1646 */
2786
- { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2787
- #line 2788 "grammar.c" /* yacc.c:1646 */
2763
+ #line 413 "grammar.y" /* yacc.c:1652 */
2764
+ { (yyval.field_seq) = ndt_field_seq_new((yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2765
+ #line 2766 "grammar.c" /* yacc.c:1652 */
2788
2766
  break;
2789
2767
 
2790
2768
  case 126:
2791
- #line 405 "grammar.y" /* yacc.c:1646 */
2792
- { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2793
- #line 2794 "grammar.c" /* yacc.c:1646 */
2769
+ #line 414 "grammar.y" /* yacc.c:1652 */
2770
+ { (yyval.field_seq) = ndt_field_seq_append((yyvsp[-2].field_seq), (yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2771
+ #line 2772 "grammar.c" /* yacc.c:1652 */
2794
2772
  break;
2795
2773
 
2796
2774
  case 127:
2797
- #line 406 "grammar.y" /* yacc.c:1646 */
2798
- { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2799
- #line 2800 "grammar.c" /* yacc.c:1646 */
2775
+ #line 417 "grammar.y" /* yacc.c:1652 */
2776
+ { (yyval.field) = mk_field((yyvsp[-2].string), (yyvsp[0].ndt), NULL, ctx); if ((yyval.field) == NULL) YYABORT; }
2777
+ #line 2778 "grammar.c" /* yacc.c:1652 */
2800
2778
  break;
2801
2779
 
2802
2780
  case 128:
2803
- #line 409 "grammar.y" /* yacc.c:1646 */
2804
- { (yyval.ndt) = mk_function((yyvsp[-2].type_seq), (yyvsp[0].type_seq), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2805
- #line 2806 "grammar.c" /* yacc.c:1646 */
2781
+ #line 418 "grammar.y" /* yacc.c:1652 */
2782
+ { (yyval.field) = mk_field((yyvsp[-5].string), (yyvsp[-3].ndt), (yyvsp[-1].attribute_seq), ctx); if ((yyval.field) == NULL) YYABORT; }
2783
+ #line 2784 "grammar.c" /* yacc.c:1652 */
2806
2784
  break;
2807
2785
 
2808
2786
  case 129:
2809
- #line 412 "grammar.y" /* yacc.c:1646 */
2810
- { (yyval.type_seq) = (yyvsp[0].type_seq); if ((yyval.type_seq) == NULL) YYABORT; }
2811
- #line 2812 "grammar.c" /* yacc.c:1646 */
2787
+ #line 421 "grammar.y" /* yacc.c:1652 */
2788
+ { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2789
+ #line 2790 "grammar.c" /* yacc.c:1652 */
2812
2790
  break;
2813
2791
 
2814
2792
  case 130:
2815
- #line 413 "grammar.y" /* yacc.c:1646 */
2816
- { (yyval.type_seq) = ndt_type_seq_empty(ctx); if ((yyval.type_seq) == NULL) YYABORT; }
2817
- #line 2818 "grammar.c" /* yacc.c:1646 */
2793
+ #line 422 "grammar.y" /* yacc.c:1652 */
2794
+ { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2795
+ #line 2796 "grammar.c" /* yacc.c:1652 */
2818
2796
  break;
2819
2797
 
2820
2798
  case 131:
2821
- #line 416 "grammar.y" /* yacc.c:1646 */
2822
- { (yyval.type_seq) = ndt_type_seq_new((yyvsp[0].ndt), ctx); if ((yyval.type_seq) == NULL) YYABORT; }
2823
- #line 2824 "grammar.c" /* yacc.c:1646 */
2799
+ #line 423 "grammar.y" /* yacc.c:1652 */
2800
+ { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2801
+ #line 2802 "grammar.c" /* yacc.c:1652 */
2824
2802
  break;
2825
2803
 
2826
2804
  case 132:
2827
- #line 417 "grammar.y" /* yacc.c:1646 */
2828
- { (yyval.type_seq) = ndt_type_seq_append((yyvsp[-2].type_seq), (yyvsp[0].ndt), ctx); if ((yyval.type_seq) == NULL) YYABORT; }
2829
- #line 2830 "grammar.c" /* yacc.c:1646 */
2805
+ #line 426 "grammar.y" /* yacc.c:1652 */
2806
+ { (yyval.ndt) = mk_union((yyvsp[0].field_seq), false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2807
+ #line 2808 "grammar.c" /* yacc.c:1652 */
2808
+ break;
2809
+
2810
+ case 133:
2811
+ #line 427 "grammar.y" /* yacc.c:1652 */
2812
+ { (yyval.ndt) = mk_union((yyvsp[-1].field_seq), false, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2813
+ #line 2814 "grammar.c" /* yacc.c:1652 */
2814
+ break;
2815
+
2816
+ case 134:
2817
+ #line 428 "grammar.y" /* yacc.c:1652 */
2818
+ { (yyval.ndt) = mk_union((yyvsp[0].field_seq), true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2819
+ #line 2820 "grammar.c" /* yacc.c:1652 */
2820
+ break;
2821
+
2822
+ case 135:
2823
+ #line 429 "grammar.y" /* yacc.c:1652 */
2824
+ { (yyval.ndt) = mk_union((yyvsp[-1].field_seq), true, ctx); if ((yyval.ndt) == NULL) YYABORT; }
2825
+ #line 2826 "grammar.c" /* yacc.c:1652 */
2826
+ break;
2827
+
2828
+ case 136:
2829
+ #line 432 "grammar.y" /* yacc.c:1652 */
2830
+ { (yyval.field_seq) = ndt_field_seq_new((yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2831
+ #line 2832 "grammar.c" /* yacc.c:1652 */
2832
+ break;
2833
+
2834
+ case 137:
2835
+ #line 433 "grammar.y" /* yacc.c:1652 */
2836
+ { (yyval.field_seq) = ndt_field_seq_append((yyvsp[-2].field_seq), (yyvsp[0].field), ctx); if ((yyval.field_seq) == NULL) YYABORT; }
2837
+ #line 2838 "grammar.c" /* yacc.c:1652 */
2838
+ break;
2839
+
2840
+ case 138:
2841
+ #line 436 "grammar.y" /* yacc.c:1652 */
2842
+ { (yyval.field) = mk_field((yyvsp[-2].string), (yyvsp[0].ndt), NULL, ctx); if ((yyval.field) == NULL) YYABORT; }
2843
+ #line 2844 "grammar.c" /* yacc.c:1652 */
2844
+ break;
2845
+
2846
+ case 139:
2847
+ #line 439 "grammar.y" /* yacc.c:1652 */
2848
+ { (yyval.attribute_seq) = NULL; }
2849
+ #line 2850 "grammar.c" /* yacc.c:1652 */
2850
+ break;
2851
+
2852
+ case 140:
2853
+ #line 440 "grammar.y" /* yacc.c:1652 */
2854
+ { (yyval.attribute_seq) = (yyvsp[-1].attribute_seq); if ((yyval.attribute_seq) == NULL) YYABORT; }
2855
+ #line 2856 "grammar.c" /* yacc.c:1652 */
2830
2856
  break;
2831
2857
 
2858
+ case 141:
2859
+ #line 443 "grammar.y" /* yacc.c:1652 */
2860
+ { (yyval.attribute_seq) = ndt_attr_seq_new((yyvsp[0].attribute), ctx); if ((yyval.attribute_seq) == NULL) YYABORT; }
2861
+ #line 2862 "grammar.c" /* yacc.c:1652 */
2862
+ break;
2832
2863
 
2833
- #line 2834 "grammar.c" /* yacc.c:1646 */
2864
+ case 142:
2865
+ #line 444 "grammar.y" /* yacc.c:1652 */
2866
+ { (yyval.attribute_seq) = ndt_attr_seq_append((yyvsp[-2].attribute_seq), (yyvsp[0].attribute), ctx); if ((yyval.attribute_seq) == NULL) YYABORT; }
2867
+ #line 2868 "grammar.c" /* yacc.c:1652 */
2868
+ break;
2869
+
2870
+ case 143:
2871
+ #line 447 "grammar.y" /* yacc.c:1652 */
2872
+ { (yyval.attribute) = mk_attr((yyvsp[-2].string), (yyvsp[0].string), ctx); if ((yyval.attribute) == NULL) YYABORT; }
2873
+ #line 2874 "grammar.c" /* yacc.c:1652 */
2874
+ break;
2875
+
2876
+ case 144:
2877
+ #line 448 "grammar.y" /* yacc.c:1652 */
2878
+ { (yyval.attribute) = mk_attr_from_seq((yyvsp[-4].string), (yyvsp[-1].string_seq), ctx); if ((yyval.attribute) == NULL) YYABORT; }
2879
+ #line 2880 "grammar.c" /* yacc.c:1652 */
2880
+ break;
2881
+
2882
+ case 145:
2883
+ #line 451 "grammar.y" /* yacc.c:1652 */
2884
+ { (yyval.string_seq) = ndt_string_seq_new((yyvsp[0].string), ctx); if ((yyval.string_seq) == NULL) YYABORT; }
2885
+ #line 2886 "grammar.c" /* yacc.c:1652 */
2886
+ break;
2887
+
2888
+ case 146:
2889
+ #line 452 "grammar.y" /* yacc.c:1652 */
2890
+ { (yyval.string_seq) = ndt_string_seq_append((yyvsp[-2].string_seq), (yyvsp[0].string), ctx); if ((yyval.string_seq) == NULL) YYABORT; }
2891
+ #line 2892 "grammar.c" /* yacc.c:1652 */
2892
+ break;
2893
+
2894
+ case 147:
2895
+ #line 455 "grammar.y" /* yacc.c:1652 */
2896
+ { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2897
+ #line 2898 "grammar.c" /* yacc.c:1652 */
2898
+ break;
2899
+
2900
+ case 148:
2901
+ #line 456 "grammar.y" /* yacc.c:1652 */
2902
+ { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2903
+ #line 2904 "grammar.c" /* yacc.c:1652 */
2904
+ break;
2905
+
2906
+ case 149:
2907
+ #line 457 "grammar.y" /* yacc.c:1652 */
2908
+ { (yyval.string) = (yyvsp[0].string); if ((yyval.string) == NULL) YYABORT; }
2909
+ #line 2910 "grammar.c" /* yacc.c:1652 */
2910
+ break;
2911
+
2912
+ case 150:
2913
+ #line 460 "grammar.y" /* yacc.c:1652 */
2914
+ { (yyval.ndt) = mk_function((yyvsp[-2].type_seq), (yyvsp[0].type_seq), ctx); if ((yyval.ndt) == NULL) YYABORT; }
2915
+ #line 2916 "grammar.c" /* yacc.c:1652 */
2916
+ break;
2917
+
2918
+ case 151:
2919
+ #line 463 "grammar.y" /* yacc.c:1652 */
2920
+ { (yyval.type_seq) = (yyvsp[0].type_seq); }
2921
+ #line 2922 "grammar.c" /* yacc.c:1652 */
2922
+ break;
2923
+
2924
+ case 152:
2925
+ #line 464 "grammar.y" /* yacc.c:1652 */
2926
+ { (yyval.type_seq) = ndt_type_seq_empty(ctx); if ((yyval.type_seq) == NULL) YYABORT; }
2927
+ #line 2928 "grammar.c" /* yacc.c:1652 */
2928
+ break;
2929
+
2930
+ case 153:
2931
+ #line 467 "grammar.y" /* yacc.c:1652 */
2932
+ { (yyval.type_seq) = ndt_type_seq_new((ndt_t *)(yyvsp[0].ndt), ctx); if ((yyval.type_seq) == NULL) YYABORT; }
2933
+ #line 2934 "grammar.c" /* yacc.c:1652 */
2934
+ break;
2935
+
2936
+ case 154:
2937
+ #line 468 "grammar.y" /* yacc.c:1652 */
2938
+ { (yyval.type_seq) = ndt_type_seq_append((yyvsp[-2].type_seq), (ndt_t *)(yyvsp[0].ndt), ctx); if ((yyval.type_seq) == NULL) YYABORT; }
2939
+ #line 2940 "grammar.c" /* yacc.c:1652 */
2940
+ break;
2941
+
2942
+
2943
+ #line 2944 "grammar.c" /* yacc.c:1652 */
2834
2944
  default: break;
2835
2945
  }
2836
2946
  /* User semantic actions sometimes alter yychar, and that requires
@@ -2856,14 +2966,13 @@ yyreduce:
2856
2966
  /* Now 'shift' the result of the reduction. Determine what state
2857
2967
  that goes to, based on the state we popped back to and the rule
2858
2968
  number reduced by. */
2859
-
2860
- yyn = yyr1[yyn];
2861
-
2862
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2863
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2864
- yystate = yytable[yystate];
2865
- else
2866
- yystate = yydefgoto[yyn - YYNTOKENS];
2969
+ {
2970
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
2971
+ const int yyi = yypgoto[yylhs] + *yyssp;
2972
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2973
+ ? yytable[yyi]
2974
+ : yydefgoto[yylhs]);
2975
+ }
2867
2976
 
2868
2977
  goto yynewstate;
2869
2978
 
@@ -2881,7 +2990,7 @@ yyerrlab:
2881
2990
  {
2882
2991
  ++yynerrs;
2883
2992
  #if ! YYERROR_VERBOSE
2884
- yyerror (&yylloc, scanner, ast, meta, ctx, YY_("syntax error"));
2993
+ yyerror (&yylloc, scanner, ast, ctx, YY_("syntax error"));
2885
2994
  #else
2886
2995
  # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2887
2996
  yyssp, yytoken)
@@ -2908,7 +3017,7 @@ yyerrlab:
2908
3017
  yymsgp = yymsg;
2909
3018
  }
2910
3019
  }
2911
- yyerror (&yylloc, scanner, ast, meta, ctx, yymsgp);
3020
+ yyerror (&yylloc, scanner, ast, ctx, yymsgp);
2912
3021
  if (yysyntax_error_status == 2)
2913
3022
  goto yyexhaustedlab;
2914
3023
  }
@@ -2932,7 +3041,7 @@ yyerrlab:
2932
3041
  else
2933
3042
  {
2934
3043
  yydestruct ("Error: discarding",
2935
- yytoken, &yylval, &yylloc, scanner, ast, meta, ctx);
3044
+ yytoken, &yylval, &yylloc, scanner, ast, ctx);
2936
3045
  yychar = YYEMPTY;
2937
3046
  }
2938
3047
  }
@@ -2946,14 +3055,11 @@ yyerrlab:
2946
3055
  | yyerrorlab -- error raised explicitly by YYERROR. |
2947
3056
  `---------------------------------------------------*/
2948
3057
  yyerrorlab:
3058
+ /* Pacify compilers when the user code never invokes YYERROR and the
3059
+ label yyerrorlab therefore never appears in user code. */
3060
+ if (0)
3061
+ YYERROR;
2949
3062
 
2950
- /* Pacify compilers like GCC when the user code never invokes
2951
- YYERROR and the label yyerrorlab therefore never appears in user
2952
- code. */
2953
- if (/*CONSTCOND*/ 0)
2954
- goto yyerrorlab;
2955
-
2956
- yyerror_range[1] = yylsp[1-yylen];
2957
3063
  /* Do not reclaim the symbols of the rule whose action triggered
2958
3064
  this YYERROR. */
2959
3065
  YYPOPSTACK (yylen);
@@ -2989,7 +3095,7 @@ yyerrlab1:
2989
3095
 
2990
3096
  yyerror_range[1] = *yylsp;
2991
3097
  yydestruct ("Error: popping",
2992
- yystos[yystate], yyvsp, yylsp, scanner, ast, meta, ctx);
3098
+ yystos[yystate], yyvsp, yylsp, scanner, ast, ctx);
2993
3099
  YYPOPSTACK (1);
2994
3100
  yystate = *yyssp;
2995
3101
  YY_STACK_PRINT (yyss, yyssp);
@@ -3019,6 +3125,7 @@ yyacceptlab:
3019
3125
  yyresult = 0;
3020
3126
  goto yyreturn;
3021
3127
 
3128
+
3022
3129
  /*-----------------------------------.
3023
3130
  | yyabortlab -- YYABORT comes here. |
3024
3131
  `-----------------------------------*/
@@ -3026,16 +3133,21 @@ yyabortlab:
3026
3133
  yyresult = 1;
3027
3134
  goto yyreturn;
3028
3135
 
3136
+
3029
3137
  #if !defined yyoverflow || YYERROR_VERBOSE
3030
3138
  /*-------------------------------------------------.
3031
3139
  | yyexhaustedlab -- memory exhaustion comes here. |
3032
3140
  `-------------------------------------------------*/
3033
3141
  yyexhaustedlab:
3034
- yyerror (&yylloc, scanner, ast, meta, ctx, YY_("memory exhausted"));
3142
+ yyerror (&yylloc, scanner, ast, ctx, YY_("memory exhausted"));
3035
3143
  yyresult = 2;
3036
3144
  /* Fall through. */
3037
3145
  #endif
3038
3146
 
3147
+
3148
+ /*-----------------------------------------------------.
3149
+ | yyreturn -- parsing is finished, return the result. |
3150
+ `-----------------------------------------------------*/
3039
3151
  yyreturn:
3040
3152
  if (yychar != YYEMPTY)
3041
3153
  {
@@ -3043,7 +3155,7 @@ yyreturn:
3043
3155
  user semantic actions for why this is necessary. */
3044
3156
  yytoken = YYTRANSLATE (yychar);
3045
3157
  yydestruct ("Cleanup: discarding lookahead",
3046
- yytoken, &yylval, &yylloc, scanner, ast, meta, ctx);
3158
+ yytoken, &yylval, &yylloc, scanner, ast, ctx);
3047
3159
  }
3048
3160
  /* Do not reclaim the symbols of the rule whose action triggered
3049
3161
  this YYABORT or YYACCEPT. */
@@ -3052,7 +3164,7 @@ yyreturn:
3052
3164
  while (yyssp != yyss)
3053
3165
  {
3054
3166
  yydestruct ("Cleanup: popping",
3055
- yystos[*yyssp], yyvsp, yylsp, scanner, ast, meta, ctx);
3167
+ yystos[*yyssp], yyvsp, yylsp, scanner, ast, ctx);
3056
3168
  YYPOPSTACK (1);
3057
3169
  }
3058
3170
  #ifndef yyoverflow