@algosail/tree-sitter 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/grammar.js +107 -60
- package/package.json +9 -22
- package/src/grammar.json +610 -78
- package/src/node-types.json +497 -68
- package/src/parser.c +3726 -1704
- package/src/tree_sitter/alloc.h +4 -4
- package/src/tree_sitter/array.h +112 -72
- package/src/tree_sitter/parser.h +28 -7
- package/tree-sitter-sail.wasm +0 -0
- package/binding.gyp +0 -30
- package/bindings/node/binding.cc +0 -20
- package/bindings/node/index.d.ts +0 -28
- package/bindings/node/index.js +0 -7
package/src/grammar.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
|
|
2
3
|
"name": "sail",
|
|
3
4
|
"rules": {
|
|
4
5
|
"source_file": {
|
|
@@ -15,10 +16,6 @@
|
|
|
15
16
|
"type": "SYMBOL",
|
|
16
17
|
"name": "comment"
|
|
17
18
|
},
|
|
18
|
-
{
|
|
19
|
-
"type": "SYMBOL",
|
|
20
|
-
"name": "module_def"
|
|
21
|
-
},
|
|
22
19
|
{
|
|
23
20
|
"type": "SYMBOL",
|
|
24
21
|
"name": "import_decl"
|
|
@@ -63,21 +60,21 @@
|
|
|
63
60
|
]
|
|
64
61
|
},
|
|
65
62
|
"comment_content": {
|
|
66
|
-
"type": "
|
|
67
|
-
"value": "[^()]+"
|
|
68
|
-
},
|
|
69
|
-
"module_def": {
|
|
70
|
-
"type": "FIELD",
|
|
71
|
-
"name": "name",
|
|
63
|
+
"type": "REPEAT1",
|
|
72
64
|
"content": {
|
|
73
|
-
"type": "
|
|
74
|
-
"
|
|
65
|
+
"type": "CHOICE",
|
|
66
|
+
"members": [
|
|
67
|
+
{
|
|
68
|
+
"type": "PATTERN",
|
|
69
|
+
"value": "[^()]+"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "SYMBOL",
|
|
73
|
+
"name": "comment"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
75
76
|
}
|
|
76
77
|
},
|
|
77
|
-
"module_name": {
|
|
78
|
-
"type": "PATTERN",
|
|
79
|
-
"value": "![A-Z][a-zA-Z0-9_]*"
|
|
80
|
-
},
|
|
81
78
|
"import_decl": {
|
|
82
79
|
"type": "SEQ",
|
|
83
80
|
"members": [
|
|
@@ -100,19 +97,55 @@
|
|
|
100
97
|
]
|
|
101
98
|
},
|
|
102
99
|
"import_path": {
|
|
103
|
-
"type": "
|
|
104
|
-
"
|
|
100
|
+
"type": "SEQ",
|
|
101
|
+
"members": [
|
|
102
|
+
{
|
|
103
|
+
"type": "STRING",
|
|
104
|
+
"value": "+"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "FIELD",
|
|
108
|
+
"name": "url",
|
|
109
|
+
"content": {
|
|
110
|
+
"type": "ALIAS",
|
|
111
|
+
"content": {
|
|
112
|
+
"type": "PATTERN",
|
|
113
|
+
"value": "[^\\s]+"
|
|
114
|
+
},
|
|
115
|
+
"named": true,
|
|
116
|
+
"value": "url"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
105
120
|
},
|
|
106
121
|
"module_alias": {
|
|
107
|
-
"type": "
|
|
108
|
-
"
|
|
122
|
+
"type": "SEQ",
|
|
123
|
+
"members": [
|
|
124
|
+
{
|
|
125
|
+
"type": "STRING",
|
|
126
|
+
"value": "~"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "FIELD",
|
|
130
|
+
"name": "module",
|
|
131
|
+
"content": {
|
|
132
|
+
"type": "ALIAS",
|
|
133
|
+
"content": {
|
|
134
|
+
"type": "PATTERN",
|
|
135
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
136
|
+
},
|
|
137
|
+
"named": true,
|
|
138
|
+
"value": "module_ref"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
109
142
|
},
|
|
110
143
|
"tag_group": {
|
|
111
144
|
"type": "SEQ",
|
|
112
145
|
"members": [
|
|
113
146
|
{
|
|
114
147
|
"type": "FIELD",
|
|
115
|
-
"name": "
|
|
148
|
+
"name": "name_def",
|
|
116
149
|
"content": {
|
|
117
150
|
"type": "SYMBOL",
|
|
118
151
|
"name": "tag_group_name"
|
|
@@ -125,6 +158,22 @@
|
|
|
125
158
|
"name": "type_variable"
|
|
126
159
|
}
|
|
127
160
|
},
|
|
161
|
+
{
|
|
162
|
+
"type": "CHOICE",
|
|
163
|
+
"members": [
|
|
164
|
+
{
|
|
165
|
+
"type": "FIELD",
|
|
166
|
+
"name": "doc",
|
|
167
|
+
"content": {
|
|
168
|
+
"type": "SYMBOL",
|
|
169
|
+
"name": "comment"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"type": "BLANK"
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
128
177
|
{
|
|
129
178
|
"type": "REPEAT",
|
|
130
179
|
"content": {
|
|
@@ -135,44 +184,121 @@
|
|
|
135
184
|
]
|
|
136
185
|
},
|
|
137
186
|
"tag_group_name": {
|
|
138
|
-
"type": "
|
|
139
|
-
"
|
|
187
|
+
"type": "SEQ",
|
|
188
|
+
"members": [
|
|
189
|
+
{
|
|
190
|
+
"type": "STRING",
|
|
191
|
+
"value": "&"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "FIELD",
|
|
195
|
+
"name": "name",
|
|
196
|
+
"content": {
|
|
197
|
+
"type": "ALIAS",
|
|
198
|
+
"content": {
|
|
199
|
+
"type": "PATTERN",
|
|
200
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
201
|
+
},
|
|
202
|
+
"named": true,
|
|
203
|
+
"value": "group_ref"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
]
|
|
140
207
|
},
|
|
141
208
|
"tag_def": {
|
|
142
209
|
"type": "SEQ",
|
|
143
210
|
"members": [
|
|
144
211
|
{
|
|
145
212
|
"type": "FIELD",
|
|
146
|
-
"name": "
|
|
213
|
+
"name": "name_def",
|
|
147
214
|
"content": {
|
|
148
215
|
"type": "SYMBOL",
|
|
149
216
|
"name": "tag_name"
|
|
150
217
|
}
|
|
151
218
|
},
|
|
152
219
|
{
|
|
153
|
-
"type": "
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
220
|
+
"type": "CHOICE",
|
|
221
|
+
"members": [
|
|
222
|
+
{
|
|
223
|
+
"type": "FIELD",
|
|
224
|
+
"name": "type_param",
|
|
225
|
+
"content": {
|
|
226
|
+
"type": "SYMBOL",
|
|
227
|
+
"name": "type_variable"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "BLANK"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"type": "CHOICE",
|
|
237
|
+
"members": [
|
|
238
|
+
{
|
|
239
|
+
"type": "FIELD",
|
|
240
|
+
"name": "doc",
|
|
241
|
+
"content": {
|
|
242
|
+
"type": "SYMBOL",
|
|
243
|
+
"name": "comment"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "BLANK"
|
|
248
|
+
}
|
|
249
|
+
]
|
|
158
250
|
}
|
|
159
251
|
]
|
|
160
252
|
},
|
|
161
253
|
"tag_name": {
|
|
162
|
-
"type": "
|
|
163
|
-
"
|
|
254
|
+
"type": "SEQ",
|
|
255
|
+
"members": [
|
|
256
|
+
{
|
|
257
|
+
"type": "STRING",
|
|
258
|
+
"value": "#"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "FIELD",
|
|
262
|
+
"name": "name",
|
|
263
|
+
"content": {
|
|
264
|
+
"type": "ALIAS",
|
|
265
|
+
"content": {
|
|
266
|
+
"type": "PATTERN",
|
|
267
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
268
|
+
},
|
|
269
|
+
"named": true,
|
|
270
|
+
"value": "tag_ref"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
]
|
|
164
274
|
},
|
|
165
275
|
"map_def": {
|
|
166
276
|
"type": "SEQ",
|
|
167
277
|
"members": [
|
|
168
278
|
{
|
|
169
279
|
"type": "FIELD",
|
|
170
|
-
"name": "
|
|
280
|
+
"name": "name_def",
|
|
171
281
|
"content": {
|
|
172
282
|
"type": "SYMBOL",
|
|
173
283
|
"name": "map_name"
|
|
174
284
|
}
|
|
175
285
|
},
|
|
286
|
+
{
|
|
287
|
+
"type": "CHOICE",
|
|
288
|
+
"members": [
|
|
289
|
+
{
|
|
290
|
+
"type": "FIELD",
|
|
291
|
+
"name": "doc",
|
|
292
|
+
"content": {
|
|
293
|
+
"type": "SYMBOL",
|
|
294
|
+
"name": "comment"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "BLANK"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
176
302
|
{
|
|
177
303
|
"type": "REPEAT",
|
|
178
304
|
"content": {
|
|
@@ -183,8 +309,26 @@
|
|
|
183
309
|
]
|
|
184
310
|
},
|
|
185
311
|
"map_name": {
|
|
186
|
-
"type": "
|
|
187
|
-
"
|
|
312
|
+
"type": "SEQ",
|
|
313
|
+
"members": [
|
|
314
|
+
{
|
|
315
|
+
"type": "STRING",
|
|
316
|
+
"value": "$"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"type": "FIELD",
|
|
320
|
+
"name": "name",
|
|
321
|
+
"content": {
|
|
322
|
+
"type": "ALIAS",
|
|
323
|
+
"content": {
|
|
324
|
+
"type": "PATTERN",
|
|
325
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
326
|
+
},
|
|
327
|
+
"named": true,
|
|
328
|
+
"value": "map_ref"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
]
|
|
188
332
|
},
|
|
189
333
|
"map_field": {
|
|
190
334
|
"type": "SEQ",
|
|
@@ -204,12 +348,46 @@
|
|
|
204
348
|
"type": "SYMBOL",
|
|
205
349
|
"name": "type_name"
|
|
206
350
|
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"type": "CHOICE",
|
|
354
|
+
"members": [
|
|
355
|
+
{
|
|
356
|
+
"type": "FIELD",
|
|
357
|
+
"name": "doc",
|
|
358
|
+
"content": {
|
|
359
|
+
"type": "SYMBOL",
|
|
360
|
+
"name": "comment"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"type": "BLANK"
|
|
365
|
+
}
|
|
366
|
+
]
|
|
207
367
|
}
|
|
208
368
|
]
|
|
209
369
|
},
|
|
210
370
|
"map_field_name": {
|
|
211
|
-
"type": "
|
|
212
|
-
"
|
|
371
|
+
"type": "SEQ",
|
|
372
|
+
"members": [
|
|
373
|
+
{
|
|
374
|
+
"type": "STRING",
|
|
375
|
+
"value": "."
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"type": "FIELD",
|
|
379
|
+
"name": "name",
|
|
380
|
+
"content": {
|
|
381
|
+
"type": "ALIAS",
|
|
382
|
+
"content": {
|
|
383
|
+
"type": "PATTERN",
|
|
384
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
385
|
+
},
|
|
386
|
+
"named": true,
|
|
387
|
+
"value": "field_ref"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
]
|
|
213
391
|
},
|
|
214
392
|
"word_def": {
|
|
215
393
|
"type": "PREC_RIGHT",
|
|
@@ -219,7 +397,7 @@
|
|
|
219
397
|
"members": [
|
|
220
398
|
{
|
|
221
399
|
"type": "FIELD",
|
|
222
|
-
"name": "
|
|
400
|
+
"name": "name_def",
|
|
223
401
|
"content": {
|
|
224
402
|
"type": "SYMBOL",
|
|
225
403
|
"name": "word_name"
|
|
@@ -244,8 +422,26 @@
|
|
|
244
422
|
}
|
|
245
423
|
},
|
|
246
424
|
"word_name": {
|
|
247
|
-
"type": "
|
|
248
|
-
"
|
|
425
|
+
"type": "SEQ",
|
|
426
|
+
"members": [
|
|
427
|
+
{
|
|
428
|
+
"type": "STRING",
|
|
429
|
+
"value": "@"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"type": "FIELD",
|
|
433
|
+
"name": "name",
|
|
434
|
+
"content": {
|
|
435
|
+
"type": "ALIAS",
|
|
436
|
+
"content": {
|
|
437
|
+
"type": "PATTERN",
|
|
438
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
439
|
+
},
|
|
440
|
+
"named": true,
|
|
441
|
+
"value": "word_ref"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
]
|
|
249
445
|
},
|
|
250
446
|
"signature": {
|
|
251
447
|
"type": "SEQ",
|
|
@@ -370,16 +566,70 @@
|
|
|
370
566
|
]
|
|
371
567
|
},
|
|
372
568
|
"effect_add": {
|
|
373
|
-
"type": "
|
|
374
|
-
"
|
|
569
|
+
"type": "SEQ",
|
|
570
|
+
"members": [
|
|
571
|
+
{
|
|
572
|
+
"type": "STRING",
|
|
573
|
+
"value": "+"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"type": "FIELD",
|
|
577
|
+
"name": "name",
|
|
578
|
+
"content": {
|
|
579
|
+
"type": "ALIAS",
|
|
580
|
+
"content": {
|
|
581
|
+
"type": "PATTERN",
|
|
582
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
583
|
+
},
|
|
584
|
+
"named": true,
|
|
585
|
+
"value": "effect_ref"
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
]
|
|
375
589
|
},
|
|
376
590
|
"effect_remove": {
|
|
377
|
-
"type": "
|
|
378
|
-
"
|
|
591
|
+
"type": "SEQ",
|
|
592
|
+
"members": [
|
|
593
|
+
{
|
|
594
|
+
"type": "STRING",
|
|
595
|
+
"value": "-"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"type": "FIELD",
|
|
599
|
+
"name": "name",
|
|
600
|
+
"content": {
|
|
601
|
+
"type": "ALIAS",
|
|
602
|
+
"content": {
|
|
603
|
+
"type": "PATTERN",
|
|
604
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
605
|
+
},
|
|
606
|
+
"named": true,
|
|
607
|
+
"value": "effect_ref"
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
]
|
|
379
611
|
},
|
|
380
612
|
"spread": {
|
|
381
|
-
"type": "
|
|
382
|
-
"
|
|
613
|
+
"type": "SEQ",
|
|
614
|
+
"members": [
|
|
615
|
+
{
|
|
616
|
+
"type": "STRING",
|
|
617
|
+
"value": ".."
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"type": "FIELD",
|
|
621
|
+
"name": "name",
|
|
622
|
+
"content": {
|
|
623
|
+
"type": "ALIAS",
|
|
624
|
+
"content": {
|
|
625
|
+
"type": "PATTERN",
|
|
626
|
+
"value": "[a-zA-Z][a-zA-Z0-9_]*"
|
|
627
|
+
},
|
|
628
|
+
"named": true,
|
|
629
|
+
"value": "spread_ref"
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
]
|
|
383
633
|
},
|
|
384
634
|
"type_name": {
|
|
385
635
|
"type": "PATTERN",
|
|
@@ -410,7 +660,15 @@
|
|
|
410
660
|
},
|
|
411
661
|
{
|
|
412
662
|
"type": "SYMBOL",
|
|
413
|
-
"name": "
|
|
663
|
+
"name": "module_word_call"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"type": "SYMBOL",
|
|
667
|
+
"name": "module_tag_constructor"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"type": "SYMBOL",
|
|
671
|
+
"name": "module_map_access"
|
|
414
672
|
},
|
|
415
673
|
{
|
|
416
674
|
"type": "SYMBOL",
|
|
@@ -426,23 +684,23 @@
|
|
|
426
684
|
},
|
|
427
685
|
{
|
|
428
686
|
"type": "SYMBOL",
|
|
429
|
-
"name": "
|
|
687
|
+
"name": "default_pattern"
|
|
430
688
|
},
|
|
431
689
|
{
|
|
432
690
|
"type": "SYMBOL",
|
|
433
|
-
"name": "
|
|
691
|
+
"name": "slot_push"
|
|
434
692
|
},
|
|
435
693
|
{
|
|
436
694
|
"type": "SYMBOL",
|
|
437
|
-
"name": "
|
|
695
|
+
"name": "slot_pop"
|
|
438
696
|
},
|
|
439
697
|
{
|
|
440
698
|
"type": "SYMBOL",
|
|
441
|
-
"name": "
|
|
699
|
+
"name": "raw_string"
|
|
442
700
|
},
|
|
443
701
|
{
|
|
444
702
|
"type": "SYMBOL",
|
|
445
|
-
"name": "
|
|
703
|
+
"name": "raw_value"
|
|
446
704
|
}
|
|
447
705
|
]
|
|
448
706
|
},
|
|
@@ -559,44 +817,309 @@
|
|
|
559
817
|
}
|
|
560
818
|
},
|
|
561
819
|
"word_call": {
|
|
562
|
-
"type": "
|
|
563
|
-
"
|
|
820
|
+
"type": "SEQ",
|
|
821
|
+
"members": [
|
|
822
|
+
{
|
|
823
|
+
"type": "STRING",
|
|
824
|
+
"value": "/"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"type": "FIELD",
|
|
828
|
+
"name": "word",
|
|
829
|
+
"content": {
|
|
830
|
+
"type": "ALIAS",
|
|
831
|
+
"content": {
|
|
832
|
+
"type": "PATTERN",
|
|
833
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
834
|
+
},
|
|
835
|
+
"named": true,
|
|
836
|
+
"value": "word_ref"
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
]
|
|
564
840
|
},
|
|
565
|
-
"
|
|
566
|
-
"type": "
|
|
567
|
-
"
|
|
841
|
+
"module_word_call": {
|
|
842
|
+
"type": "SEQ",
|
|
843
|
+
"members": [
|
|
844
|
+
{
|
|
845
|
+
"type": "STRING",
|
|
846
|
+
"value": "~"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"type": "FIELD",
|
|
850
|
+
"name": "module",
|
|
851
|
+
"content": {
|
|
852
|
+
"type": "ALIAS",
|
|
853
|
+
"content": {
|
|
854
|
+
"type": "PATTERN",
|
|
855
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
856
|
+
},
|
|
857
|
+
"named": true,
|
|
858
|
+
"value": "module_ref"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"type": "STRING",
|
|
863
|
+
"value": "/"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"type": "FIELD",
|
|
867
|
+
"name": "word",
|
|
868
|
+
"content": {
|
|
869
|
+
"type": "ALIAS",
|
|
870
|
+
"content": {
|
|
871
|
+
"type": "PATTERN",
|
|
872
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
873
|
+
},
|
|
874
|
+
"named": true,
|
|
875
|
+
"value": "word_ref"
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
]
|
|
879
|
+
},
|
|
880
|
+
"module_tag_constructor": {
|
|
881
|
+
"type": "SEQ",
|
|
882
|
+
"members": [
|
|
883
|
+
{
|
|
884
|
+
"type": "STRING",
|
|
885
|
+
"value": "~"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"type": "FIELD",
|
|
889
|
+
"name": "module",
|
|
890
|
+
"content": {
|
|
891
|
+
"type": "ALIAS",
|
|
892
|
+
"content": {
|
|
893
|
+
"type": "PATTERN",
|
|
894
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
895
|
+
},
|
|
896
|
+
"named": true,
|
|
897
|
+
"value": "module_ref"
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
"type": "STRING",
|
|
902
|
+
"value": "#"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"type": "FIELD",
|
|
906
|
+
"name": "tag",
|
|
907
|
+
"content": {
|
|
908
|
+
"type": "ALIAS",
|
|
909
|
+
"content": {
|
|
910
|
+
"type": "PATTERN",
|
|
911
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
912
|
+
},
|
|
913
|
+
"named": true,
|
|
914
|
+
"value": "tag_ref"
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
]
|
|
918
|
+
},
|
|
919
|
+
"module_map_access": {
|
|
920
|
+
"type": "SEQ",
|
|
921
|
+
"members": [
|
|
922
|
+
{
|
|
923
|
+
"type": "STRING",
|
|
924
|
+
"value": "~"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"type": "FIELD",
|
|
928
|
+
"name": "module",
|
|
929
|
+
"content": {
|
|
930
|
+
"type": "ALIAS",
|
|
931
|
+
"content": {
|
|
932
|
+
"type": "PATTERN",
|
|
933
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
934
|
+
},
|
|
935
|
+
"named": true,
|
|
936
|
+
"value": "module_ref"
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"type": "STRING",
|
|
941
|
+
"value": ","
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"type": "FIELD",
|
|
945
|
+
"name": "map",
|
|
946
|
+
"content": {
|
|
947
|
+
"type": "ALIAS",
|
|
948
|
+
"content": {
|
|
949
|
+
"type": "PATTERN",
|
|
950
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
951
|
+
},
|
|
952
|
+
"named": true,
|
|
953
|
+
"value": "map_ref"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"type": "STRING",
|
|
958
|
+
"value": "."
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"type": "FIELD",
|
|
962
|
+
"name": "field",
|
|
963
|
+
"content": {
|
|
964
|
+
"type": "ALIAS",
|
|
965
|
+
"content": {
|
|
966
|
+
"type": "PATTERN",
|
|
967
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
968
|
+
},
|
|
969
|
+
"named": true,
|
|
970
|
+
"value": "field_ref"
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
]
|
|
568
974
|
},
|
|
569
975
|
"map_access": {
|
|
570
|
-
"type": "
|
|
571
|
-
"
|
|
976
|
+
"type": "SEQ",
|
|
977
|
+
"members": [
|
|
978
|
+
{
|
|
979
|
+
"type": "STRING",
|
|
980
|
+
"value": ","
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"type": "FIELD",
|
|
984
|
+
"name": "map",
|
|
985
|
+
"content": {
|
|
986
|
+
"type": "ALIAS",
|
|
987
|
+
"content": {
|
|
988
|
+
"type": "PATTERN",
|
|
989
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
990
|
+
},
|
|
991
|
+
"named": true,
|
|
992
|
+
"value": "map_ref"
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"type": "STRING",
|
|
997
|
+
"value": "."
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"type": "FIELD",
|
|
1001
|
+
"name": "field",
|
|
1002
|
+
"content": {
|
|
1003
|
+
"type": "ALIAS",
|
|
1004
|
+
"content": {
|
|
1005
|
+
"type": "PATTERN",
|
|
1006
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
1007
|
+
},
|
|
1008
|
+
"named": true,
|
|
1009
|
+
"value": "field_ref"
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
]
|
|
572
1013
|
},
|
|
573
1014
|
"tag_constructor": {
|
|
574
|
-
"type": "
|
|
575
|
-
"
|
|
1015
|
+
"type": "SEQ",
|
|
1016
|
+
"members": [
|
|
1017
|
+
{
|
|
1018
|
+
"type": "STRING",
|
|
1019
|
+
"value": "#"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"type": "FIELD",
|
|
1023
|
+
"name": "name",
|
|
1024
|
+
"content": {
|
|
1025
|
+
"type": "ALIAS",
|
|
1026
|
+
"content": {
|
|
1027
|
+
"type": "PATTERN",
|
|
1028
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
1029
|
+
},
|
|
1030
|
+
"named": true,
|
|
1031
|
+
"value": "tag_ref"
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
]
|
|
576
1035
|
},
|
|
577
1036
|
"tag_pattern": {
|
|
578
|
-
"type": "
|
|
579
|
-
"
|
|
1037
|
+
"type": "SEQ",
|
|
1038
|
+
"members": [
|
|
1039
|
+
{
|
|
1040
|
+
"type": "STRING",
|
|
1041
|
+
"value": "_"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"type": "FIELD",
|
|
1045
|
+
"name": "name",
|
|
1046
|
+
"content": {
|
|
1047
|
+
"type": "ALIAS",
|
|
1048
|
+
"content": {
|
|
1049
|
+
"type": "PATTERN",
|
|
1050
|
+
"value": "[A-Z][a-zA-Z0-9_]*"
|
|
1051
|
+
},
|
|
1052
|
+
"named": true,
|
|
1053
|
+
"value": "tag_ref"
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
},
|
|
1058
|
+
"default_pattern": {
|
|
1059
|
+
"type": "TOKEN",
|
|
1060
|
+
"content": {
|
|
1061
|
+
"type": "STRING",
|
|
1062
|
+
"value": "_"
|
|
1063
|
+
}
|
|
580
1064
|
},
|
|
581
1065
|
"slot_push": {
|
|
582
|
-
"type": "
|
|
583
|
-
"
|
|
1066
|
+
"type": "SEQ",
|
|
1067
|
+
"members": [
|
|
1068
|
+
{
|
|
1069
|
+
"type": "STRING",
|
|
1070
|
+
"value": ":"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"type": "FIELD",
|
|
1074
|
+
"name": "name",
|
|
1075
|
+
"content": {
|
|
1076
|
+
"type": "ALIAS",
|
|
1077
|
+
"content": {
|
|
1078
|
+
"type": "PATTERN",
|
|
1079
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
1080
|
+
},
|
|
1081
|
+
"named": true,
|
|
1082
|
+
"value": "slot_ref"
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
]
|
|
584
1086
|
},
|
|
585
1087
|
"slot_pop": {
|
|
586
|
-
"type": "
|
|
587
|
-
"
|
|
1088
|
+
"type": "SEQ",
|
|
1089
|
+
"members": [
|
|
1090
|
+
{
|
|
1091
|
+
"type": "STRING",
|
|
1092
|
+
"value": ";"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"type": "FIELD",
|
|
1096
|
+
"name": "name",
|
|
1097
|
+
"content": {
|
|
1098
|
+
"type": "ALIAS",
|
|
1099
|
+
"content": {
|
|
1100
|
+
"type": "PATTERN",
|
|
1101
|
+
"value": "[a-z][a-zA-Z0-9_]*"
|
|
1102
|
+
},
|
|
1103
|
+
"named": true,
|
|
1104
|
+
"value": "slot_ref"
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
]
|
|
588
1108
|
},
|
|
589
1109
|
"raw_string": {
|
|
590
1110
|
"type": "PATTERN",
|
|
591
1111
|
"value": "\\'[^\\']*\\'"
|
|
592
1112
|
},
|
|
593
|
-
"
|
|
594
|
-
"type": "
|
|
595
|
-
"
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
1113
|
+
"raw_value": {
|
|
1114
|
+
"type": "TOKEN",
|
|
1115
|
+
"content": {
|
|
1116
|
+
"type": "PREC",
|
|
1117
|
+
"value": -1,
|
|
1118
|
+
"content": {
|
|
1119
|
+
"type": "PATTERN",
|
|
1120
|
+
"value": "[^\\s\\[\\]()']+"
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
600
1123
|
}
|
|
601
1124
|
},
|
|
602
1125
|
"extras": [
|
|
@@ -618,16 +1141,25 @@
|
|
|
618
1141
|
"word_def"
|
|
619
1142
|
],
|
|
620
1143
|
[
|
|
621
|
-
"tag_def",
|
|
622
1144
|
"tag_group"
|
|
623
1145
|
],
|
|
624
1146
|
[
|
|
625
|
-
"
|
|
626
|
-
|
|
1147
|
+
"tag_def"
|
|
1148
|
+
],
|
|
1149
|
+
[
|
|
1150
|
+
"map_def"
|
|
1151
|
+
],
|
|
1152
|
+
[
|
|
1153
|
+
"map_field"
|
|
1154
|
+
],
|
|
1155
|
+
[
|
|
1156
|
+
"tag_def",
|
|
1157
|
+
"tag_group"
|
|
627
1158
|
]
|
|
628
1159
|
],
|
|
629
1160
|
"precedences": [],
|
|
630
1161
|
"externals": [],
|
|
631
1162
|
"inline": [],
|
|
632
|
-
"supertypes": []
|
|
633
|
-
}
|
|
1163
|
+
"supertypes": [],
|
|
1164
|
+
"reserved": {}
|
|
1165
|
+
}
|