@willbooster/tree-sitter-bash 1.1.4 → 2.0.1

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/src/grammar.json DELETED
@@ -1,5000 +0,0 @@
1
- {
2
- "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
3
- "name": "bash",
4
- "word": "word",
5
- "rules": {
6
- "program": {
7
- "type": "CHOICE",
8
- "members": [
9
- {
10
- "type": "SYMBOL",
11
- "name": "_statements"
12
- },
13
- {
14
- "type": "BLANK"
15
- }
16
- ]
17
- },
18
- "_statements": {
19
- "type": "SEQ",
20
- "members": [
21
- {
22
- "type": "REPEAT",
23
- "content": {
24
- "type": "SEQ",
25
- "members": [
26
- {
27
- "type": "SYMBOL",
28
- "name": "_statement"
29
- },
30
- {
31
- "type": "SYMBOL",
32
- "name": "_terminator"
33
- }
34
- ]
35
- }
36
- },
37
- {
38
- "type": "SYMBOL",
39
- "name": "_statement"
40
- },
41
- {
42
- "type": "CHOICE",
43
- "members": [
44
- {
45
- "type": "SYMBOL",
46
- "name": "_terminator"
47
- },
48
- {
49
- "type": "BLANK"
50
- }
51
- ]
52
- }
53
- ]
54
- },
55
- "_terminated_statements": {
56
- "type": "REPEAT1",
57
- "content": {
58
- "type": "SEQ",
59
- "members": [
60
- {
61
- "type": "SYMBOL",
62
- "name": "_statement"
63
- },
64
- {
65
- "type": "SYMBOL",
66
- "name": "_terminator"
67
- }
68
- ]
69
- }
70
- },
71
- "_terminator": {
72
- "type": "CHOICE",
73
- "members": [
74
- {
75
- "type": "STRING",
76
- "value": ";"
77
- },
78
- {
79
- "type": "STRING",
80
- "value": "&"
81
- },
82
- {
83
- "type": "SYMBOL",
84
- "name": "_newline"
85
- }
86
- ]
87
- },
88
- "_statement": {
89
- "type": "CHOICE",
90
- "members": [
91
- {
92
- "type": "SYMBOL",
93
- "name": "_command_statement"
94
- },
95
- {
96
- "type": "SYMBOL",
97
- "name": "pipeline"
98
- },
99
- {
100
- "type": "SYMBOL",
101
- "name": "list"
102
- },
103
- {
104
- "type": "SYMBOL",
105
- "name": "negated_command"
106
- },
107
- {
108
- "type": "SYMBOL",
109
- "name": "timed_command"
110
- },
111
- {
112
- "type": "SYMBOL",
113
- "name": "coproc_command"
114
- }
115
- ]
116
- },
117
- "_command_statement": {
118
- "type": "CHOICE",
119
- "members": [
120
- {
121
- "type": "SYMBOL",
122
- "name": "command"
123
- },
124
- {
125
- "type": "SYMBOL",
126
- "name": "declaration_command"
127
- },
128
- {
129
- "type": "SYMBOL",
130
- "name": "redirected_statement"
131
- },
132
- {
133
- "type": "SYMBOL",
134
- "name": "_compound_command"
135
- },
136
- {
137
- "type": "SYMBOL",
138
- "name": "function_definition"
139
- }
140
- ]
141
- },
142
- "_compound_command": {
143
- "type": "CHOICE",
144
- "members": [
145
- {
146
- "type": "SYMBOL",
147
- "name": "compound_statement"
148
- },
149
- {
150
- "type": "SYMBOL",
151
- "name": "subshell"
152
- },
153
- {
154
- "type": "SYMBOL",
155
- "name": "arithmetic_command"
156
- },
157
- {
158
- "type": "SYMBOL",
159
- "name": "test_command"
160
- },
161
- {
162
- "type": "SYMBOL",
163
- "name": "if_statement"
164
- },
165
- {
166
- "type": "SYMBOL",
167
- "name": "while_statement"
168
- },
169
- {
170
- "type": "SYMBOL",
171
- "name": "for_statement"
172
- },
173
- {
174
- "type": "SYMBOL",
175
- "name": "c_style_for_statement"
176
- },
177
- {
178
- "type": "SYMBOL",
179
- "name": "case_statement"
180
- }
181
- ]
182
- },
183
- "list": {
184
- "type": "PREC_LEFT",
185
- "value": 1,
186
- "content": {
187
- "type": "SEQ",
188
- "members": [
189
- {
190
- "type": "FIELD",
191
- "name": "left",
192
- "content": {
193
- "type": "SYMBOL",
194
- "name": "_statement"
195
- }
196
- },
197
- {
198
- "type": "FIELD",
199
- "name": "operator",
200
- "content": {
201
- "type": "CHOICE",
202
- "members": [
203
- {
204
- "type": "STRING",
205
- "value": "&&"
206
- },
207
- {
208
- "type": "STRING",
209
- "value": "||"
210
- }
211
- ]
212
- }
213
- },
214
- {
215
- "type": "FIELD",
216
- "name": "right",
217
- "content": {
218
- "type": "SYMBOL",
219
- "name": "_statement"
220
- }
221
- }
222
- ]
223
- }
224
- },
225
- "pipeline": {
226
- "type": "PREC_LEFT",
227
- "value": 3,
228
- "content": {
229
- "type": "SEQ",
230
- "members": [
231
- {
232
- "type": "SYMBOL",
233
- "name": "_pipeline_element"
234
- },
235
- {
236
- "type": "REPEAT1",
237
- "content": {
238
- "type": "SEQ",
239
- "members": [
240
- {
241
- "type": "CHOICE",
242
- "members": [
243
- {
244
- "type": "STRING",
245
- "value": "|"
246
- },
247
- {
248
- "type": "STRING",
249
- "value": "|&"
250
- }
251
- ]
252
- },
253
- {
254
- "type": "SYMBOL",
255
- "name": "_pipeline_element"
256
- }
257
- ]
258
- }
259
- }
260
- ]
261
- }
262
- },
263
- "_pipeline_element": {
264
- "type": "CHOICE",
265
- "members": [
266
- {
267
- "type": "SYMBOL",
268
- "name": "_command_statement"
269
- },
270
- {
271
- "type": "SYMBOL",
272
- "name": "coproc_command"
273
- }
274
- ]
275
- },
276
- "negated_command": {
277
- "type": "PREC_RIGHT",
278
- "value": 2,
279
- "content": {
280
- "type": "SEQ",
281
- "members": [
282
- {
283
- "type": "STRING",
284
- "value": "!"
285
- },
286
- {
287
- "type": "CHOICE",
288
- "members": [
289
- {
290
- "type": "SYMBOL",
291
- "name": "_command_statement"
292
- },
293
- {
294
- "type": "SYMBOL",
295
- "name": "pipeline"
296
- },
297
- {
298
- "type": "SYMBOL",
299
- "name": "timed_command"
300
- }
301
- ]
302
- }
303
- ]
304
- }
305
- },
306
- "timed_command": {
307
- "type": "PREC_RIGHT",
308
- "value": 2,
309
- "content": {
310
- "type": "SEQ",
311
- "members": [
312
- {
313
- "type": "STRING",
314
- "value": "time"
315
- },
316
- {
317
- "type": "CHOICE",
318
- "members": [
319
- {
320
- "type": "FIELD",
321
- "name": "option",
322
- "content": {
323
- "type": "ALIAS",
324
- "content": {
325
- "type": "STRING",
326
- "value": "-p"
327
- },
328
- "named": true,
329
- "value": "word"
330
- }
331
- },
332
- {
333
- "type": "BLANK"
334
- }
335
- ]
336
- },
337
- {
338
- "type": "CHOICE",
339
- "members": [
340
- {
341
- "type": "CHOICE",
342
- "members": [
343
- {
344
- "type": "SYMBOL",
345
- "name": "_command_statement"
346
- },
347
- {
348
- "type": "SYMBOL",
349
- "name": "pipeline"
350
- },
351
- {
352
- "type": "SYMBOL",
353
- "name": "negated_command"
354
- }
355
- ]
356
- },
357
- {
358
- "type": "BLANK"
359
- }
360
- ]
361
- }
362
- ]
363
- }
364
- },
365
- "coproc_command": {
366
- "type": "PREC_RIGHT",
367
- "value": 0,
368
- "content": {
369
- "type": "SEQ",
370
- "members": [
371
- {
372
- "type": "STRING",
373
- "value": "coproc"
374
- },
375
- {
376
- "type": "CHOICE",
377
- "members": [
378
- {
379
- "type": "SYMBOL",
380
- "name": "command"
381
- },
382
- {
383
- "type": "SEQ",
384
- "members": [
385
- {
386
- "type": "CHOICE",
387
- "members": [
388
- {
389
- "type": "FIELD",
390
- "name": "name",
391
- "content": {
392
- "type": "SYMBOL",
393
- "name": "word"
394
- }
395
- },
396
- {
397
- "type": "BLANK"
398
- }
399
- ]
400
- },
401
- {
402
- "type": "SYMBOL",
403
- "name": "_compound_command"
404
- },
405
- {
406
- "type": "REPEAT",
407
- "content": {
408
- "type": "FIELD",
409
- "name": "redirect",
410
- "content": {
411
- "type": "SYMBOL",
412
- "name": "_redirect"
413
- }
414
- }
415
- }
416
- ]
417
- }
418
- ]
419
- }
420
- ]
421
- }
422
- },
423
- "redirected_statement": {
424
- "type": "PREC_LEFT",
425
- "value": 0,
426
- "content": {
427
- "type": "SEQ",
428
- "members": [
429
- {
430
- "type": "FIELD",
431
- "name": "body",
432
- "content": {
433
- "type": "CHOICE",
434
- "members": [
435
- {
436
- "type": "SYMBOL",
437
- "name": "_compound_command"
438
- },
439
- {
440
- "type": "SYMBOL",
441
- "name": "function_definition"
442
- }
443
- ]
444
- }
445
- },
446
- {
447
- "type": "REPEAT1",
448
- "content": {
449
- "type": "FIELD",
450
- "name": "redirect",
451
- "content": {
452
- "type": "SYMBOL",
453
- "name": "_redirect"
454
- }
455
- }
456
- }
457
- ]
458
- }
459
- },
460
- "command": {
461
- "type": "PREC_LEFT",
462
- "value": 0,
463
- "content": {
464
- "type": "CHOICE",
465
- "members": [
466
- {
467
- "type": "SEQ",
468
- "members": [
469
- {
470
- "type": "REPEAT",
471
- "content": {
472
- "type": "SYMBOL",
473
- "name": "_command_prefix"
474
- }
475
- },
476
- {
477
- "type": "FIELD",
478
- "name": "name",
479
- "content": {
480
- "type": "SYMBOL",
481
- "name": "command_name"
482
- }
483
- },
484
- {
485
- "type": "REPEAT",
486
- "content": {
487
- "type": "CHOICE",
488
- "members": [
489
- {
490
- "type": "FIELD",
491
- "name": "argument",
492
- "content": {
493
- "type": "SYMBOL",
494
- "name": "_argument"
495
- }
496
- },
497
- {
498
- "type": "FIELD",
499
- "name": "redirect",
500
- "content": {
501
- "type": "SYMBOL",
502
- "name": "_redirect"
503
- }
504
- }
505
- ]
506
- }
507
- }
508
- ]
509
- },
510
- {
511
- "type": "REPEAT1",
512
- "content": {
513
- "type": "SYMBOL",
514
- "name": "_command_prefix"
515
- }
516
- }
517
- ]
518
- }
519
- },
520
- "_command_prefix": {
521
- "type": "CHOICE",
522
- "members": [
523
- {
524
- "type": "FIELD",
525
- "name": "assignment",
526
- "content": {
527
- "type": "SYMBOL",
528
- "name": "variable_assignment"
529
- }
530
- },
531
- {
532
- "type": "FIELD",
533
- "name": "redirect",
534
- "content": {
535
- "type": "SYMBOL",
536
- "name": "_redirect"
537
- }
538
- }
539
- ]
540
- },
541
- "command_name": {
542
- "type": "SYMBOL",
543
- "name": "_word"
544
- },
545
- "declaration_command": {
546
- "type": "PREC_LEFT",
547
- "value": 0,
548
- "content": {
549
- "type": "SEQ",
550
- "members": [
551
- {
552
- "type": "REPEAT",
553
- "content": {
554
- "type": "SYMBOL",
555
- "name": "_command_prefix"
556
- }
557
- },
558
- {
559
- "type": "FIELD",
560
- "name": "name",
561
- "content": {
562
- "type": "ALIAS",
563
- "content": {
564
- "type": "CHOICE",
565
- "members": [
566
- {
567
- "type": "STRING",
568
- "value": "declare"
569
- },
570
- {
571
- "type": "STRING",
572
- "value": "typeset"
573
- },
574
- {
575
- "type": "STRING",
576
- "value": "export"
577
- },
578
- {
579
- "type": "STRING",
580
- "value": "readonly"
581
- },
582
- {
583
- "type": "STRING",
584
- "value": "local"
585
- }
586
- ]
587
- },
588
- "named": true,
589
- "value": "command_name"
590
- }
591
- },
592
- {
593
- "type": "REPEAT",
594
- "content": {
595
- "type": "CHOICE",
596
- "members": [
597
- {
598
- "type": "FIELD",
599
- "name": "argument",
600
- "content": {
601
- "type": "CHOICE",
602
- "members": [
603
- {
604
- "type": "SYMBOL",
605
- "name": "variable_assignment"
606
- },
607
- {
608
- "type": "SYMBOL",
609
- "name": "_argument"
610
- }
611
- ]
612
- }
613
- },
614
- {
615
- "type": "FIELD",
616
- "name": "redirect",
617
- "content": {
618
- "type": "SYMBOL",
619
- "name": "_redirect"
620
- }
621
- }
622
- ]
623
- }
624
- }
625
- ]
626
- }
627
- },
628
- "variable_assignment": {
629
- "type": "SEQ",
630
- "members": [
631
- {
632
- "type": "FIELD",
633
- "name": "name",
634
- "content": {
635
- "type": "CHOICE",
636
- "members": [
637
- {
638
- "type": "SYMBOL",
639
- "name": "variable_name"
640
- },
641
- {
642
- "type": "SYMBOL",
643
- "name": "subscript"
644
- }
645
- ]
646
- }
647
- },
648
- {
649
- "type": "FIELD",
650
- "name": "operator",
651
- "content": {
652
- "type": "IMMEDIATE_TOKEN",
653
- "content": {
654
- "type": "CHOICE",
655
- "members": [
656
- {
657
- "type": "STRING",
658
- "value": "="
659
- },
660
- {
661
- "type": "STRING",
662
- "value": "+="
663
- }
664
- ]
665
- }
666
- }
667
- },
668
- {
669
- "type": "FIELD",
670
- "name": "value",
671
- "content": {
672
- "type": "CHOICE",
673
- "members": [
674
- {
675
- "type": "SYMBOL",
676
- "name": "_argument"
677
- },
678
- {
679
- "type": "SYMBOL",
680
- "name": "_hash_value"
681
- },
682
- {
683
- "type": "SYMBOL",
684
- "name": "array"
685
- },
686
- {
687
- "type": "SYMBOL",
688
- "name": "_empty_value"
689
- }
690
- ]
691
- }
692
- }
693
- ]
694
- },
695
- "_hash_value": {
696
- "type": "CHOICE",
697
- "members": [
698
- {
699
- "type": "ALIAS",
700
- "content": {
701
- "type": "SYMBOL",
702
- "name": "_hash_word"
703
- },
704
- "named": true,
705
- "value": "word"
706
- },
707
- {
708
- "type": "ALIAS",
709
- "content": {
710
- "type": "SYMBOL",
711
- "name": "_hash_concatenation"
712
- },
713
- "named": true,
714
- "value": "concatenation"
715
- }
716
- ]
717
- },
718
- "_hash_concatenation": {
719
- "type": "PREC_RIGHT",
720
- "value": 0,
721
- "content": {
722
- "type": "SEQ",
723
- "members": [
724
- {
725
- "type": "ALIAS",
726
- "content": {
727
- "type": "SYMBOL",
728
- "name": "_hash_word"
729
- },
730
- "named": true,
731
- "value": "word"
732
- },
733
- {
734
- "type": "REPEAT1",
735
- "content": {
736
- "type": "SEQ",
737
- "members": [
738
- {
739
- "type": "SYMBOL",
740
- "name": "_concat"
741
- },
742
- {
743
- "type": "CHOICE",
744
- "members": [
745
- {
746
- "type": "SYMBOL",
747
- "name": "_word_part"
748
- },
749
- {
750
- "type": "ALIAS",
751
- "content": {
752
- "type": "SYMBOL",
753
- "name": "_hash_word"
754
- },
755
- "named": true,
756
- "value": "word"
757
- },
758
- {
759
- "type": "ALIAS",
760
- "content": {
761
- "type": "SYMBOL",
762
- "name": "_negated_extglob_pattern"
763
- },
764
- "named": true,
765
- "value": "extglob_pattern"
766
- }
767
- ]
768
- }
769
- ]
770
- }
771
- }
772
- ]
773
- }
774
- },
775
- "subscript": {
776
- "type": "SEQ",
777
- "members": [
778
- {
779
- "type": "FIELD",
780
- "name": "name",
781
- "content": {
782
- "type": "SYMBOL",
783
- "name": "variable_name"
784
- }
785
- },
786
- {
787
- "type": "IMMEDIATE_TOKEN",
788
- "content": {
789
- "type": "STRING",
790
- "value": "["
791
- }
792
- },
793
- {
794
- "type": "FIELD",
795
- "name": "index",
796
- "content": {
797
- "type": "SYMBOL",
798
- "name": "_subscript_index"
799
- }
800
- },
801
- {
802
- "type": "STRING",
803
- "value": "]"
804
- }
805
- ]
806
- },
807
- "_subscript_index": {
808
- "type": "REPEAT1",
809
- "content": {
810
- "type": "CHOICE",
811
- "members": [
812
- {
813
- "type": "ALIAS",
814
- "content": {
815
- "type": "IMMEDIATE_TOKEN",
816
- "content": {
817
- "type": "PREC",
818
- "value": 1,
819
- "content": {
820
- "type": "PATTERN",
821
- "value": "([^\\[\\]$`\"'\\\\<>]|[<>]+[^(\\[\\]$`\"'\\\\<>]|\\\\.)+"
822
- }
823
- }
824
- },
825
- "named": true,
826
- "value": "word"
827
- },
828
- {
829
- "type": "ALIAS",
830
- "content": {
831
- "type": "TOKEN",
832
- "content": {
833
- "type": "PREC",
834
- "value": 1,
835
- "content": {
836
- "type": "PATTERN",
837
- "value": "([^\\[\\]$`\"'\\\\<>]|[<>]+[^(\\[\\]$`\"'\\\\<>]|\\\\.)+"
838
- }
839
- }
840
- },
841
- "named": true,
842
- "value": "word"
843
- },
844
- {
845
- "type": "ALIAS",
846
- "content": {
847
- "type": "SYMBOL",
848
- "name": "_angle_text"
849
- },
850
- "named": true,
851
- "value": "word"
852
- },
853
- {
854
- "type": "SYMBOL",
855
- "name": "_quoted_or_expansion"
856
- },
857
- {
858
- "type": "SYMBOL",
859
- "name": "_subscript_group"
860
- }
861
- ]
862
- }
863
- },
864
- "_subscript_group": {
865
- "type": "SEQ",
866
- "members": [
867
- {
868
- "type": "STRING",
869
- "value": "["
870
- },
871
- {
872
- "type": "CHOICE",
873
- "members": [
874
- {
875
- "type": "SYMBOL",
876
- "name": "_subscript_index"
877
- },
878
- {
879
- "type": "BLANK"
880
- }
881
- ]
882
- },
883
- {
884
- "type": "STRING",
885
- "value": "]"
886
- }
887
- ]
888
- },
889
- "_quoted_or_expansion": {
890
- "type": "CHOICE",
891
- "members": [
892
- {
893
- "type": "SYMBOL",
894
- "name": "string"
895
- },
896
- {
897
- "type": "SYMBOL",
898
- "name": "raw_string"
899
- },
900
- {
901
- "type": "SYMBOL",
902
- "name": "ansi_c_string"
903
- },
904
- {
905
- "type": "SYMBOL",
906
- "name": "translated_string"
907
- },
908
- {
909
- "type": "SYMBOL",
910
- "name": "simple_expansion"
911
- },
912
- {
913
- "type": "SYMBOL",
914
- "name": "expansion"
915
- },
916
- {
917
- "type": "SYMBOL",
918
- "name": "command_substitution"
919
- },
920
- {
921
- "type": "SYMBOL",
922
- "name": "arithmetic_expansion"
923
- },
924
- {
925
- "type": "SYMBOL",
926
- "name": "process_substitution"
927
- }
928
- ]
929
- },
930
- "array": {
931
- "type": "SEQ",
932
- "members": [
933
- {
934
- "type": "IMMEDIATE_TOKEN",
935
- "content": {
936
- "type": "STRING",
937
- "value": "("
938
- }
939
- },
940
- {
941
- "type": "REPEAT",
942
- "content": {
943
- "type": "SYMBOL",
944
- "name": "_argument"
945
- }
946
- },
947
- {
948
- "type": "STRING",
949
- "value": ")"
950
- }
951
- ]
952
- },
953
- "_redirect": {
954
- "type": "CHOICE",
955
- "members": [
956
- {
957
- "type": "SYMBOL",
958
- "name": "file_redirect"
959
- },
960
- {
961
- "type": "SYMBOL",
962
- "name": "heredoc_redirect"
963
- },
964
- {
965
- "type": "SYMBOL",
966
- "name": "herestring_redirect"
967
- }
968
- ]
969
- },
970
- "file_redirect": {
971
- "type": "SEQ",
972
- "members": [
973
- {
974
- "type": "CHOICE",
975
- "members": [
976
- {
977
- "type": "FIELD",
978
- "name": "descriptor",
979
- "content": {
980
- "type": "SYMBOL",
981
- "name": "file_descriptor"
982
- }
983
- },
984
- {
985
- "type": "BLANK"
986
- }
987
- ]
988
- },
989
- {
990
- "type": "CHOICE",
991
- "members": [
992
- {
993
- "type": "SEQ",
994
- "members": [
995
- {
996
- "type": "FIELD",
997
- "name": "operator",
998
- "content": {
999
- "type": "CHOICE",
1000
- "members": [
1001
- {
1002
- "type": "STRING",
1003
- "value": "<"
1004
- },
1005
- {
1006
- "type": "STRING",
1007
- "value": ">"
1008
- },
1009
- {
1010
- "type": "STRING",
1011
- "value": ">>"
1012
- },
1013
- {
1014
- "type": "STRING",
1015
- "value": ">|"
1016
- },
1017
- {
1018
- "type": "STRING",
1019
- "value": "<>"
1020
- },
1021
- {
1022
- "type": "STRING",
1023
- "value": "&>"
1024
- },
1025
- {
1026
- "type": "STRING",
1027
- "value": "&>>"
1028
- },
1029
- {
1030
- "type": "STRING",
1031
- "value": "<&"
1032
- },
1033
- {
1034
- "type": "STRING",
1035
- "value": ">&"
1036
- }
1037
- ]
1038
- }
1039
- },
1040
- {
1041
- "type": "FIELD",
1042
- "name": "destination",
1043
- "content": {
1044
- "type": "SYMBOL",
1045
- "name": "_argument"
1046
- }
1047
- }
1048
- ]
1049
- },
1050
- {
1051
- "type": "FIELD",
1052
- "name": "operator",
1053
- "content": {
1054
- "type": "CHOICE",
1055
- "members": [
1056
- {
1057
- "type": "STRING",
1058
- "value": "<&-"
1059
- },
1060
- {
1061
- "type": "STRING",
1062
- "value": ">&-"
1063
- }
1064
- ]
1065
- }
1066
- }
1067
- ]
1068
- }
1069
- ]
1070
- },
1071
- "herestring_redirect": {
1072
- "type": "SEQ",
1073
- "members": [
1074
- {
1075
- "type": "CHOICE",
1076
- "members": [
1077
- {
1078
- "type": "FIELD",
1079
- "name": "descriptor",
1080
- "content": {
1081
- "type": "SYMBOL",
1082
- "name": "file_descriptor"
1083
- }
1084
- },
1085
- {
1086
- "type": "BLANK"
1087
- }
1088
- ]
1089
- },
1090
- {
1091
- "type": "FIELD",
1092
- "name": "operator",
1093
- "content": {
1094
- "type": "STRING",
1095
- "value": "<<<"
1096
- }
1097
- },
1098
- {
1099
- "type": "FIELD",
1100
- "name": "value",
1101
- "content": {
1102
- "type": "SYMBOL",
1103
- "name": "_argument"
1104
- }
1105
- }
1106
- ]
1107
- },
1108
- "heredoc_redirect": {
1109
- "type": "SEQ",
1110
- "members": [
1111
- {
1112
- "type": "CHOICE",
1113
- "members": [
1114
- {
1115
- "type": "FIELD",
1116
- "name": "descriptor",
1117
- "content": {
1118
- "type": "SYMBOL",
1119
- "name": "file_descriptor"
1120
- }
1121
- },
1122
- {
1123
- "type": "BLANK"
1124
- }
1125
- ]
1126
- },
1127
- {
1128
- "type": "FIELD",
1129
- "name": "operator",
1130
- "content": {
1131
- "type": "CHOICE",
1132
- "members": [
1133
- {
1134
- "type": "ALIAS",
1135
- "content": {
1136
- "type": "SYMBOL",
1137
- "name": "_heredoc_arrow"
1138
- },
1139
- "named": false,
1140
- "value": "<<"
1141
- },
1142
- {
1143
- "type": "ALIAS",
1144
- "content": {
1145
- "type": "SYMBOL",
1146
- "name": "_heredoc_arrow_dash"
1147
- },
1148
- "named": false,
1149
- "value": "<<-"
1150
- }
1151
- ]
1152
- }
1153
- },
1154
- {
1155
- "type": "FIELD",
1156
- "name": "delimiter",
1157
- "content": {
1158
- "type": "SYMBOL",
1159
- "name": "heredoc_start"
1160
- }
1161
- }
1162
- ]
1163
- },
1164
- "heredoc_body": {
1165
- "type": "SEQ",
1166
- "members": [
1167
- {
1168
- "type": "SYMBOL",
1169
- "name": "_heredoc_body_start"
1170
- },
1171
- {
1172
- "type": "REPEAT",
1173
- "content": {
1174
- "type": "CHOICE",
1175
- "members": [
1176
- {
1177
- "type": "SYMBOL",
1178
- "name": "heredoc_content"
1179
- },
1180
- {
1181
- "type": "SYMBOL",
1182
- "name": "simple_expansion"
1183
- },
1184
- {
1185
- "type": "SYMBOL",
1186
- "name": "expansion"
1187
- },
1188
- {
1189
- "type": "SYMBOL",
1190
- "name": "command_substitution"
1191
- },
1192
- {
1193
- "type": "SYMBOL",
1194
- "name": "arithmetic_expansion"
1195
- }
1196
- ]
1197
- }
1198
- },
1199
- {
1200
- "type": "SYMBOL",
1201
- "name": "heredoc_end"
1202
- }
1203
- ]
1204
- },
1205
- "compound_statement": {
1206
- "type": "SEQ",
1207
- "members": [
1208
- {
1209
- "type": "STRING",
1210
- "value": "{"
1211
- },
1212
- {
1213
- "type": "CHOICE",
1214
- "members": [
1215
- {
1216
- "type": "SYMBOL",
1217
- "name": "_terminated_statements"
1218
- },
1219
- {
1220
- "type": "BLANK"
1221
- }
1222
- ]
1223
- },
1224
- {
1225
- "type": "STRING",
1226
- "value": "}"
1227
- }
1228
- ]
1229
- },
1230
- "subshell": {
1231
- "type": "SEQ",
1232
- "members": [
1233
- {
1234
- "type": "STRING",
1235
- "value": "("
1236
- },
1237
- {
1238
- "type": "CHOICE",
1239
- "members": [
1240
- {
1241
- "type": "SYMBOL",
1242
- "name": "_statements"
1243
- },
1244
- {
1245
- "type": "BLANK"
1246
- }
1247
- ]
1248
- },
1249
- {
1250
- "type": "STRING",
1251
- "value": ")"
1252
- }
1253
- ]
1254
- },
1255
- "arithmetic_command": {
1256
- "type": "SEQ",
1257
- "members": [
1258
- {
1259
- "type": "STRING",
1260
- "value": "(("
1261
- },
1262
- {
1263
- "type": "SYMBOL",
1264
- "name": "_substitution_start"
1265
- },
1266
- {
1267
- "type": "CHOICE",
1268
- "members": [
1269
- {
1270
- "type": "SYMBOL",
1271
- "name": "_arithmetic_expression"
1272
- },
1273
- {
1274
- "type": "BLANK"
1275
- }
1276
- ]
1277
- },
1278
- {
1279
- "type": "SYMBOL",
1280
- "name": "_substitution_end"
1281
- },
1282
- {
1283
- "type": "STRING",
1284
- "value": "))"
1285
- }
1286
- ]
1287
- },
1288
- "test_command": {
1289
- "type": "SEQ",
1290
- "members": [
1291
- {
1292
- "type": "STRING",
1293
- "value": "[["
1294
- },
1295
- {
1296
- "type": "SYMBOL",
1297
- "name": "_test_expression"
1298
- },
1299
- {
1300
- "type": "STRING",
1301
- "value": "]]"
1302
- }
1303
- ]
1304
- },
1305
- "_test_expression": {
1306
- "type": "CHOICE",
1307
- "members": [
1308
- {
1309
- "type": "SYMBOL",
1310
- "name": "_word"
1311
- },
1312
- {
1313
- "type": "SYMBOL",
1314
- "name": "unary_test"
1315
- },
1316
- {
1317
- "type": "SYMBOL",
1318
- "name": "binary_test"
1319
- },
1320
- {
1321
- "type": "SYMBOL",
1322
- "name": "regex_test"
1323
- },
1324
- {
1325
- "type": "ALIAS",
1326
- "content": {
1327
- "type": "SYMBOL",
1328
- "name": "_test_negation"
1329
- },
1330
- "named": true,
1331
- "value": "negated_test"
1332
- },
1333
- {
1334
- "type": "ALIAS",
1335
- "content": {
1336
- "type": "SYMBOL",
1337
- "name": "_test_logical"
1338
- },
1339
- "named": true,
1340
- "value": "logical_test"
1341
- },
1342
- {
1343
- "type": "ALIAS",
1344
- "content": {
1345
- "type": "SYMBOL",
1346
- "name": "_test_parenthesized"
1347
- },
1348
- "named": true,
1349
- "value": "parenthesized_test"
1350
- }
1351
- ]
1352
- },
1353
- "unary_test": {
1354
- "type": "PREC",
1355
- "value": 14,
1356
- "content": {
1357
- "type": "SEQ",
1358
- "members": [
1359
- {
1360
- "type": "FIELD",
1361
- "name": "operator",
1362
- "content": {
1363
- "type": "ALIAS",
1364
- "content": {
1365
- "type": "CHOICE",
1366
- "members": [
1367
- {
1368
- "type": "STRING",
1369
- "value": "-a"
1370
- },
1371
- {
1372
- "type": "STRING",
1373
- "value": "-b"
1374
- },
1375
- {
1376
- "type": "STRING",
1377
- "value": "-c"
1378
- },
1379
- {
1380
- "type": "STRING",
1381
- "value": "-d"
1382
- },
1383
- {
1384
- "type": "STRING",
1385
- "value": "-e"
1386
- },
1387
- {
1388
- "type": "STRING",
1389
- "value": "-f"
1390
- },
1391
- {
1392
- "type": "STRING",
1393
- "value": "-g"
1394
- },
1395
- {
1396
- "type": "STRING",
1397
- "value": "-h"
1398
- },
1399
- {
1400
- "type": "STRING",
1401
- "value": "-k"
1402
- },
1403
- {
1404
- "type": "STRING",
1405
- "value": "-p"
1406
- },
1407
- {
1408
- "type": "STRING",
1409
- "value": "-r"
1410
- },
1411
- {
1412
- "type": "STRING",
1413
- "value": "-s"
1414
- },
1415
- {
1416
- "type": "STRING",
1417
- "value": "-t"
1418
- },
1419
- {
1420
- "type": "STRING",
1421
- "value": "-u"
1422
- },
1423
- {
1424
- "type": "STRING",
1425
- "value": "-w"
1426
- },
1427
- {
1428
- "type": "STRING",
1429
- "value": "-x"
1430
- },
1431
- {
1432
- "type": "STRING",
1433
- "value": "-G"
1434
- },
1435
- {
1436
- "type": "STRING",
1437
- "value": "-L"
1438
- },
1439
- {
1440
- "type": "STRING",
1441
- "value": "-N"
1442
- },
1443
- {
1444
- "type": "STRING",
1445
- "value": "-O"
1446
- },
1447
- {
1448
- "type": "STRING",
1449
- "value": "-S"
1450
- },
1451
- {
1452
- "type": "STRING",
1453
- "value": "-z"
1454
- },
1455
- {
1456
- "type": "STRING",
1457
- "value": "-n"
1458
- },
1459
- {
1460
- "type": "STRING",
1461
- "value": "-o"
1462
- },
1463
- {
1464
- "type": "STRING",
1465
- "value": "-v"
1466
- },
1467
- {
1468
- "type": "STRING",
1469
- "value": "-R"
1470
- }
1471
- ]
1472
- },
1473
- "named": true,
1474
- "value": "test_operator"
1475
- }
1476
- },
1477
- {
1478
- "type": "FIELD",
1479
- "name": "operand",
1480
- "content": {
1481
- "type": "SYMBOL",
1482
- "name": "_argument"
1483
- }
1484
- }
1485
- ]
1486
- }
1487
- },
1488
- "binary_test": {
1489
- "type": "PREC",
1490
- "value": 9,
1491
- "content": {
1492
- "type": "SEQ",
1493
- "members": [
1494
- {
1495
- "type": "FIELD",
1496
- "name": "left",
1497
- "content": {
1498
- "type": "SYMBOL",
1499
- "name": "_word"
1500
- }
1501
- },
1502
- {
1503
- "type": "FIELD",
1504
- "name": "operator",
1505
- "content": {
1506
- "type": "ALIAS",
1507
- "content": {
1508
- "type": "CHOICE",
1509
- "members": [
1510
- {
1511
- "type": "STRING",
1512
- "value": "-eq"
1513
- },
1514
- {
1515
- "type": "STRING",
1516
- "value": "-ne"
1517
- },
1518
- {
1519
- "type": "STRING",
1520
- "value": "-lt"
1521
- },
1522
- {
1523
- "type": "STRING",
1524
- "value": "-le"
1525
- },
1526
- {
1527
- "type": "STRING",
1528
- "value": "-gt"
1529
- },
1530
- {
1531
- "type": "STRING",
1532
- "value": "-ge"
1533
- },
1534
- {
1535
- "type": "STRING",
1536
- "value": "-nt"
1537
- },
1538
- {
1539
- "type": "STRING",
1540
- "value": "-ot"
1541
- },
1542
- {
1543
- "type": "STRING",
1544
- "value": "-ef"
1545
- },
1546
- {
1547
- "type": "STRING",
1548
- "value": "=="
1549
- },
1550
- {
1551
- "type": "STRING",
1552
- "value": "="
1553
- },
1554
- {
1555
- "type": "STRING",
1556
- "value": "!="
1557
- },
1558
- {
1559
- "type": "STRING",
1560
- "value": "<"
1561
- },
1562
- {
1563
- "type": "STRING",
1564
- "value": ">"
1565
- }
1566
- ]
1567
- },
1568
- "named": true,
1569
- "value": "test_operator"
1570
- }
1571
- },
1572
- {
1573
- "type": "FIELD",
1574
- "name": "right",
1575
- "content": {
1576
- "type": "SYMBOL",
1577
- "name": "_argument"
1578
- }
1579
- }
1580
- ]
1581
- }
1582
- },
1583
- "regex_test": {
1584
- "type": "PREC",
1585
- "value": 9,
1586
- "content": {
1587
- "type": "SEQ",
1588
- "members": [
1589
- {
1590
- "type": "FIELD",
1591
- "name": "left",
1592
- "content": {
1593
- "type": "SYMBOL",
1594
- "name": "_word"
1595
- }
1596
- },
1597
- {
1598
- "type": "FIELD",
1599
- "name": "operator",
1600
- "content": {
1601
- "type": "STRING",
1602
- "value": "=~"
1603
- }
1604
- },
1605
- {
1606
- "type": "SYMBOL",
1607
- "name": "_regex_start"
1608
- },
1609
- {
1610
- "type": "FIELD",
1611
- "name": "right",
1612
- "content": {
1613
- "type": "CHOICE",
1614
- "members": [
1615
- {
1616
- "type": "SYMBOL",
1617
- "name": "_regex_part"
1618
- },
1619
- {
1620
- "type": "ALIAS",
1621
- "content": {
1622
- "type": "SYMBOL",
1623
- "name": "_regex_concatenation"
1624
- },
1625
- "named": true,
1626
- "value": "concatenation"
1627
- }
1628
- ]
1629
- }
1630
- }
1631
- ]
1632
- }
1633
- },
1634
- "_regex_concatenation": {
1635
- "type": "PREC_RIGHT",
1636
- "value": 0,
1637
- "content": {
1638
- "type": "SEQ",
1639
- "members": [
1640
- {
1641
- "type": "SYMBOL",
1642
- "name": "_regex_part"
1643
- },
1644
- {
1645
- "type": "REPEAT1",
1646
- "content": {
1647
- "type": "SEQ",
1648
- "members": [
1649
- {
1650
- "type": "SYMBOL",
1651
- "name": "_regex_concat"
1652
- },
1653
- {
1654
- "type": "SYMBOL",
1655
- "name": "_regex_part"
1656
- }
1657
- ]
1658
- }
1659
- }
1660
- ]
1661
- }
1662
- },
1663
- "_regex_part": {
1664
- "type": "CHOICE",
1665
- "members": [
1666
- {
1667
- "type": "SYMBOL",
1668
- "name": "regex"
1669
- },
1670
- {
1671
- "type": "SYMBOL",
1672
- "name": "_quoted_or_expansion"
1673
- }
1674
- ]
1675
- },
1676
- "_test_negation": {
1677
- "type": "PREC",
1678
- "value": 14,
1679
- "content": {
1680
- "type": "SEQ",
1681
- "members": [
1682
- {
1683
- "type": "STRING",
1684
- "value": "!"
1685
- },
1686
- {
1687
- "type": "SYMBOL",
1688
- "name": "_test_expression"
1689
- }
1690
- ]
1691
- }
1692
- },
1693
- "_test_logical": {
1694
- "type": "CHOICE",
1695
- "members": [
1696
- {
1697
- "type": "PREC_LEFT",
1698
- "value": 4,
1699
- "content": {
1700
- "type": "SEQ",
1701
- "members": [
1702
- {
1703
- "type": "SYMBOL",
1704
- "name": "_test_expression"
1705
- },
1706
- {
1707
- "type": "STRING",
1708
- "value": "&&"
1709
- },
1710
- {
1711
- "type": "SYMBOL",
1712
- "name": "_test_expression"
1713
- }
1714
- ]
1715
- }
1716
- },
1717
- {
1718
- "type": "PREC_LEFT",
1719
- "value": 3,
1720
- "content": {
1721
- "type": "SEQ",
1722
- "members": [
1723
- {
1724
- "type": "SYMBOL",
1725
- "name": "_test_expression"
1726
- },
1727
- {
1728
- "type": "STRING",
1729
- "value": "||"
1730
- },
1731
- {
1732
- "type": "SYMBOL",
1733
- "name": "_test_expression"
1734
- }
1735
- ]
1736
- }
1737
- }
1738
- ]
1739
- },
1740
- "_test_parenthesized": {
1741
- "type": "SEQ",
1742
- "members": [
1743
- {
1744
- "type": "STRING",
1745
- "value": "("
1746
- },
1747
- {
1748
- "type": "SYMBOL",
1749
- "name": "_test_expression"
1750
- },
1751
- {
1752
- "type": "STRING",
1753
- "value": ")"
1754
- }
1755
- ]
1756
- },
1757
- "if_statement": {
1758
- "type": "SEQ",
1759
- "members": [
1760
- {
1761
- "type": "STRING",
1762
- "value": "if"
1763
- },
1764
- {
1765
- "type": "FIELD",
1766
- "name": "condition",
1767
- "content": {
1768
- "type": "SYMBOL",
1769
- "name": "_terminated_statements"
1770
- }
1771
- },
1772
- {
1773
- "type": "STRING",
1774
- "value": "then"
1775
- },
1776
- {
1777
- "type": "CHOICE",
1778
- "members": [
1779
- {
1780
- "type": "FIELD",
1781
- "name": "consequence",
1782
- "content": {
1783
- "type": "SYMBOL",
1784
- "name": "_terminated_statements"
1785
- }
1786
- },
1787
- {
1788
- "type": "BLANK"
1789
- }
1790
- ]
1791
- },
1792
- {
1793
- "type": "REPEAT",
1794
- "content": {
1795
- "type": "SYMBOL",
1796
- "name": "elif_clause"
1797
- }
1798
- },
1799
- {
1800
- "type": "CHOICE",
1801
- "members": [
1802
- {
1803
- "type": "SYMBOL",
1804
- "name": "else_clause"
1805
- },
1806
- {
1807
- "type": "BLANK"
1808
- }
1809
- ]
1810
- },
1811
- {
1812
- "type": "STRING",
1813
- "value": "fi"
1814
- }
1815
- ]
1816
- },
1817
- "elif_clause": {
1818
- "type": "SEQ",
1819
- "members": [
1820
- {
1821
- "type": "STRING",
1822
- "value": "elif"
1823
- },
1824
- {
1825
- "type": "FIELD",
1826
- "name": "condition",
1827
- "content": {
1828
- "type": "SYMBOL",
1829
- "name": "_terminated_statements"
1830
- }
1831
- },
1832
- {
1833
- "type": "STRING",
1834
- "value": "then"
1835
- },
1836
- {
1837
- "type": "CHOICE",
1838
- "members": [
1839
- {
1840
- "type": "FIELD",
1841
- "name": "consequence",
1842
- "content": {
1843
- "type": "SYMBOL",
1844
- "name": "_terminated_statements"
1845
- }
1846
- },
1847
- {
1848
- "type": "BLANK"
1849
- }
1850
- ]
1851
- }
1852
- ]
1853
- },
1854
- "else_clause": {
1855
- "type": "SEQ",
1856
- "members": [
1857
- {
1858
- "type": "STRING",
1859
- "value": "else"
1860
- },
1861
- {
1862
- "type": "CHOICE",
1863
- "members": [
1864
- {
1865
- "type": "SYMBOL",
1866
- "name": "_terminated_statements"
1867
- },
1868
- {
1869
- "type": "BLANK"
1870
- }
1871
- ]
1872
- }
1873
- ]
1874
- },
1875
- "while_statement": {
1876
- "type": "SEQ",
1877
- "members": [
1878
- {
1879
- "type": "FIELD",
1880
- "name": "keyword",
1881
- "content": {
1882
- "type": "CHOICE",
1883
- "members": [
1884
- {
1885
- "type": "STRING",
1886
- "value": "while"
1887
- },
1888
- {
1889
- "type": "STRING",
1890
- "value": "until"
1891
- }
1892
- ]
1893
- }
1894
- },
1895
- {
1896
- "type": "FIELD",
1897
- "name": "condition",
1898
- "content": {
1899
- "type": "SYMBOL",
1900
- "name": "_terminated_statements"
1901
- }
1902
- },
1903
- {
1904
- "type": "FIELD",
1905
- "name": "body",
1906
- "content": {
1907
- "type": "SYMBOL",
1908
- "name": "do_group"
1909
- }
1910
- }
1911
- ]
1912
- },
1913
- "do_group": {
1914
- "type": "SEQ",
1915
- "members": [
1916
- {
1917
- "type": "STRING",
1918
- "value": "do"
1919
- },
1920
- {
1921
- "type": "CHOICE",
1922
- "members": [
1923
- {
1924
- "type": "SYMBOL",
1925
- "name": "_terminated_statements"
1926
- },
1927
- {
1928
- "type": "BLANK"
1929
- }
1930
- ]
1931
- },
1932
- {
1933
- "type": "STRING",
1934
- "value": "done"
1935
- }
1936
- ]
1937
- },
1938
- "for_statement": {
1939
- "type": "SEQ",
1940
- "members": [
1941
- {
1942
- "type": "FIELD",
1943
- "name": "keyword",
1944
- "content": {
1945
- "type": "CHOICE",
1946
- "members": [
1947
- {
1948
- "type": "STRING",
1949
- "value": "for"
1950
- },
1951
- {
1952
- "type": "STRING",
1953
- "value": "select"
1954
- }
1955
- ]
1956
- }
1957
- },
1958
- {
1959
- "type": "FIELD",
1960
- "name": "variable",
1961
- "content": {
1962
- "type": "ALIAS",
1963
- "content": {
1964
- "type": "SYMBOL",
1965
- "name": "word"
1966
- },
1967
- "named": true,
1968
- "value": "variable_name"
1969
- }
1970
- },
1971
- {
1972
- "type": "CHOICE",
1973
- "members": [
1974
- {
1975
- "type": "SEQ",
1976
- "members": [
1977
- {
1978
- "type": "CHOICE",
1979
- "members": [
1980
- {
1981
- "type": "SYMBOL",
1982
- "name": "_newline"
1983
- },
1984
- {
1985
- "type": "BLANK"
1986
- }
1987
- ]
1988
- },
1989
- {
1990
- "type": "STRING",
1991
- "value": "in"
1992
- },
1993
- {
1994
- "type": "REPEAT",
1995
- "content": {
1996
- "type": "FIELD",
1997
- "name": "value",
1998
- "content": {
1999
- "type": "SYMBOL",
2000
- "name": "_argument"
2001
- }
2002
- }
2003
- },
2004
- {
2005
- "type": "SYMBOL",
2006
- "name": "_terminator"
2007
- }
2008
- ]
2009
- },
2010
- {
2011
- "type": "CHOICE",
2012
- "members": [
2013
- {
2014
- "type": "SYMBOL",
2015
- "name": "_terminator"
2016
- },
2017
- {
2018
- "type": "BLANK"
2019
- }
2020
- ]
2021
- }
2022
- ]
2023
- },
2024
- {
2025
- "type": "FIELD",
2026
- "name": "body",
2027
- "content": {
2028
- "type": "CHOICE",
2029
- "members": [
2030
- {
2031
- "type": "SYMBOL",
2032
- "name": "do_group"
2033
- },
2034
- {
2035
- "type": "SYMBOL",
2036
- "name": "compound_statement"
2037
- }
2038
- ]
2039
- }
2040
- }
2041
- ]
2042
- },
2043
- "c_style_for_statement": {
2044
- "type": "SEQ",
2045
- "members": [
2046
- {
2047
- "type": "STRING",
2048
- "value": "for"
2049
- },
2050
- {
2051
- "type": "STRING",
2052
- "value": "(("
2053
- },
2054
- {
2055
- "type": "SYMBOL",
2056
- "name": "_substitution_start"
2057
- },
2058
- {
2059
- "type": "FIELD",
2060
- "name": "initializer",
2061
- "content": {
2062
- "type": "CHOICE",
2063
- "members": [
2064
- {
2065
- "type": "SYMBOL",
2066
- "name": "_arithmetic_expression"
2067
- },
2068
- {
2069
- "type": "BLANK"
2070
- }
2071
- ]
2072
- }
2073
- },
2074
- {
2075
- "type": "STRING",
2076
- "value": ";"
2077
- },
2078
- {
2079
- "type": "FIELD",
2080
- "name": "condition",
2081
- "content": {
2082
- "type": "CHOICE",
2083
- "members": [
2084
- {
2085
- "type": "SYMBOL",
2086
- "name": "_arithmetic_expression"
2087
- },
2088
- {
2089
- "type": "BLANK"
2090
- }
2091
- ]
2092
- }
2093
- },
2094
- {
2095
- "type": "STRING",
2096
- "value": ";"
2097
- },
2098
- {
2099
- "type": "FIELD",
2100
- "name": "update",
2101
- "content": {
2102
- "type": "CHOICE",
2103
- "members": [
2104
- {
2105
- "type": "SYMBOL",
2106
- "name": "_arithmetic_expression"
2107
- },
2108
- {
2109
- "type": "BLANK"
2110
- }
2111
- ]
2112
- }
2113
- },
2114
- {
2115
- "type": "SYMBOL",
2116
- "name": "_substitution_end"
2117
- },
2118
- {
2119
- "type": "STRING",
2120
- "value": "))"
2121
- },
2122
- {
2123
- "type": "CHOICE",
2124
- "members": [
2125
- {
2126
- "type": "SYMBOL",
2127
- "name": "_terminator"
2128
- },
2129
- {
2130
- "type": "BLANK"
2131
- }
2132
- ]
2133
- },
2134
- {
2135
- "type": "FIELD",
2136
- "name": "body",
2137
- "content": {
2138
- "type": "CHOICE",
2139
- "members": [
2140
- {
2141
- "type": "SYMBOL",
2142
- "name": "do_group"
2143
- },
2144
- {
2145
- "type": "SYMBOL",
2146
- "name": "compound_statement"
2147
- }
2148
- ]
2149
- }
2150
- }
2151
- ]
2152
- },
2153
- "case_statement": {
2154
- "type": "SEQ",
2155
- "members": [
2156
- {
2157
- "type": "STRING",
2158
- "value": "case"
2159
- },
2160
- {
2161
- "type": "FIELD",
2162
- "name": "value",
2163
- "content": {
2164
- "type": "SYMBOL",
2165
- "name": "_argument"
2166
- }
2167
- },
2168
- {
2169
- "type": "STRING",
2170
- "value": "in"
2171
- },
2172
- {
2173
- "type": "REPEAT",
2174
- "content": {
2175
- "type": "SYMBOL",
2176
- "name": "case_item"
2177
- }
2178
- },
2179
- {
2180
- "type": "CHOICE",
2181
- "members": [
2182
- {
2183
- "type": "ALIAS",
2184
- "content": {
2185
- "type": "SYMBOL",
2186
- "name": "_last_case_item"
2187
- },
2188
- "named": true,
2189
- "value": "case_item"
2190
- },
2191
- {
2192
- "type": "BLANK"
2193
- }
2194
- ]
2195
- },
2196
- {
2197
- "type": "STRING",
2198
- "value": "esac"
2199
- }
2200
- ]
2201
- },
2202
- "case_item": {
2203
- "type": "SEQ",
2204
- "members": [
2205
- {
2206
- "type": "SYMBOL",
2207
- "name": "_case_patterns"
2208
- },
2209
- {
2210
- "type": "CHOICE",
2211
- "members": [
2212
- {
2213
- "type": "SYMBOL",
2214
- "name": "_statements"
2215
- },
2216
- {
2217
- "type": "BLANK"
2218
- }
2219
- ]
2220
- },
2221
- {
2222
- "type": "FIELD",
2223
- "name": "terminator",
2224
- "content": {
2225
- "type": "CHOICE",
2226
- "members": [
2227
- {
2228
- "type": "STRING",
2229
- "value": ";;"
2230
- },
2231
- {
2232
- "type": "STRING",
2233
- "value": ";&"
2234
- },
2235
- {
2236
- "type": "STRING",
2237
- "value": ";;&"
2238
- }
2239
- ]
2240
- }
2241
- }
2242
- ]
2243
- },
2244
- "_last_case_item": {
2245
- "type": "SEQ",
2246
- "members": [
2247
- {
2248
- "type": "SYMBOL",
2249
- "name": "_case_patterns"
2250
- },
2251
- {
2252
- "type": "CHOICE",
2253
- "members": [
2254
- {
2255
- "type": "SYMBOL",
2256
- "name": "_terminated_statements"
2257
- },
2258
- {
2259
- "type": "BLANK"
2260
- }
2261
- ]
2262
- }
2263
- ]
2264
- },
2265
- "_case_patterns": {
2266
- "type": "SEQ",
2267
- "members": [
2268
- {
2269
- "type": "CHOICE",
2270
- "members": [
2271
- {
2272
- "type": "STRING",
2273
- "value": "("
2274
- },
2275
- {
2276
- "type": "BLANK"
2277
- }
2278
- ]
2279
- },
2280
- {
2281
- "type": "FIELD",
2282
- "name": "pattern",
2283
- "content": {
2284
- "type": "SYMBOL",
2285
- "name": "_argument"
2286
- }
2287
- },
2288
- {
2289
- "type": "REPEAT",
2290
- "content": {
2291
- "type": "SEQ",
2292
- "members": [
2293
- {
2294
- "type": "STRING",
2295
- "value": "|"
2296
- },
2297
- {
2298
- "type": "FIELD",
2299
- "name": "pattern",
2300
- "content": {
2301
- "type": "SYMBOL",
2302
- "name": "_argument"
2303
- }
2304
- }
2305
- ]
2306
- }
2307
- },
2308
- {
2309
- "type": "STRING",
2310
- "value": ")"
2311
- }
2312
- ]
2313
- },
2314
- "function_definition": {
2315
- "type": "SEQ",
2316
- "members": [
2317
- {
2318
- "type": "CHOICE",
2319
- "members": [
2320
- {
2321
- "type": "SEQ",
2322
- "members": [
2323
- {
2324
- "type": "STRING",
2325
- "value": "function"
2326
- },
2327
- {
2328
- "type": "FIELD",
2329
- "name": "name",
2330
- "content": {
2331
- "type": "SYMBOL",
2332
- "name": "word"
2333
- }
2334
- },
2335
- {
2336
- "type": "CHOICE",
2337
- "members": [
2338
- {
2339
- "type": "SEQ",
2340
- "members": [
2341
- {
2342
- "type": "STRING",
2343
- "value": "("
2344
- },
2345
- {
2346
- "type": "STRING",
2347
- "value": ")"
2348
- }
2349
- ]
2350
- },
2351
- {
2352
- "type": "BLANK"
2353
- }
2354
- ]
2355
- }
2356
- ]
2357
- },
2358
- {
2359
- "type": "SEQ",
2360
- "members": [
2361
- {
2362
- "type": "FIELD",
2363
- "name": "name",
2364
- "content": {
2365
- "type": "SYMBOL",
2366
- "name": "word"
2367
- }
2368
- },
2369
- {
2370
- "type": "STRING",
2371
- "value": "("
2372
- },
2373
- {
2374
- "type": "STRING",
2375
- "value": ")"
2376
- }
2377
- ]
2378
- }
2379
- ]
2380
- },
2381
- {
2382
- "type": "FIELD",
2383
- "name": "body",
2384
- "content": {
2385
- "type": "SYMBOL",
2386
- "name": "_compound_command"
2387
- }
2388
- }
2389
- ]
2390
- },
2391
- "_word": {
2392
- "type": "CHOICE",
2393
- "members": [
2394
- {
2395
- "type": "SYMBOL",
2396
- "name": "_word_part"
2397
- },
2398
- {
2399
- "type": "SYMBOL",
2400
- "name": "concatenation"
2401
- }
2402
- ]
2403
- },
2404
- "_argument": {
2405
- "type": "CHOICE",
2406
- "members": [
2407
- {
2408
- "type": "SYMBOL",
2409
- "name": "_word"
2410
- },
2411
- {
2412
- "type": "ALIAS",
2413
- "content": {
2414
- "type": "SYMBOL",
2415
- "name": "_negated_extglob_word"
2416
- },
2417
- "named": true,
2418
- "value": "word"
2419
- },
2420
- {
2421
- "type": "ALIAS",
2422
- "content": {
2423
- "type": "SYMBOL",
2424
- "name": "_negated_extglob_pattern"
2425
- },
2426
- "named": true,
2427
- "value": "extglob_pattern"
2428
- },
2429
- {
2430
- "type": "ALIAS",
2431
- "content": {
2432
- "type": "SYMBOL",
2433
- "name": "_negated_extglob_concatenation"
2434
- },
2435
- "named": true,
2436
- "value": "concatenation"
2437
- }
2438
- ]
2439
- },
2440
- "_negated_extglob_concatenation": {
2441
- "type": "PREC_RIGHT",
2442
- "value": 0,
2443
- "content": {
2444
- "type": "SEQ",
2445
- "members": [
2446
- {
2447
- "type": "CHOICE",
2448
- "members": [
2449
- {
2450
- "type": "ALIAS",
2451
- "content": {
2452
- "type": "SYMBOL",
2453
- "name": "_negated_extglob_pattern"
2454
- },
2455
- "named": true,
2456
- "value": "extglob_pattern"
2457
- },
2458
- {
2459
- "type": "ALIAS",
2460
- "content": {
2461
- "type": "SYMBOL",
2462
- "name": "_negated_extglob_word"
2463
- },
2464
- "named": true,
2465
- "value": "word"
2466
- }
2467
- ]
2468
- },
2469
- {
2470
- "type": "REPEAT1",
2471
- "content": {
2472
- "type": "SEQ",
2473
- "members": [
2474
- {
2475
- "type": "SYMBOL",
2476
- "name": "_concat"
2477
- },
2478
- {
2479
- "type": "CHOICE",
2480
- "members": [
2481
- {
2482
- "type": "SYMBOL",
2483
- "name": "_word_part"
2484
- },
2485
- {
2486
- "type": "ALIAS",
2487
- "content": {
2488
- "type": "SYMBOL",
2489
- "name": "_hash_word"
2490
- },
2491
- "named": true,
2492
- "value": "word"
2493
- },
2494
- {
2495
- "type": "ALIAS",
2496
- "content": {
2497
- "type": "SYMBOL",
2498
- "name": "_negated_extglob_pattern"
2499
- },
2500
- "named": true,
2501
- "value": "extglob_pattern"
2502
- }
2503
- ]
2504
- }
2505
- ]
2506
- }
2507
- }
2508
- ]
2509
- }
2510
- },
2511
- "_negated_extglob_word": {
2512
- "type": "TOKEN",
2513
- "content": {
2514
- "type": "PREC",
2515
- "value": 1,
2516
- "content": {
2517
- "type": "SEQ",
2518
- "members": [
2519
- {
2520
- "type": "PATTERN",
2521
- "value": "!\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2522
- },
2523
- {
2524
- "type": "REPEAT",
2525
- "content": {
2526
- "type": "CHOICE",
2527
- "members": [
2528
- {
2529
- "type": "PATTERN",
2530
- "value": "[^ \\t\\n|&;()<>\"'`$\\\\]"
2531
- },
2532
- {
2533
- "type": "PATTERN",
2534
- "value": "\\\\[^\\n]"
2535
- },
2536
- {
2537
- "type": "PATTERN",
2538
- "value": "[?*+@]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2539
- },
2540
- {
2541
- "type": "PATTERN",
2542
- "value": "!\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2543
- }
2544
- ]
2545
- }
2546
- }
2547
- ]
2548
- }
2549
- }
2550
- },
2551
- "concatenation": {
2552
- "type": "PREC_RIGHT",
2553
- "value": 0,
2554
- "content": {
2555
- "type": "SEQ",
2556
- "members": [
2557
- {
2558
- "type": "SYMBOL",
2559
- "name": "_word_part"
2560
- },
2561
- {
2562
- "type": "REPEAT1",
2563
- "content": {
2564
- "type": "SEQ",
2565
- "members": [
2566
- {
2567
- "type": "SYMBOL",
2568
- "name": "_concat"
2569
- },
2570
- {
2571
- "type": "CHOICE",
2572
- "members": [
2573
- {
2574
- "type": "SYMBOL",
2575
- "name": "_word_part"
2576
- },
2577
- {
2578
- "type": "ALIAS",
2579
- "content": {
2580
- "type": "SYMBOL",
2581
- "name": "_hash_word"
2582
- },
2583
- "named": true,
2584
- "value": "word"
2585
- },
2586
- {
2587
- "type": "ALIAS",
2588
- "content": {
2589
- "type": "SYMBOL",
2590
- "name": "_negated_extglob_pattern"
2591
- },
2592
- "named": true,
2593
- "value": "extglob_pattern"
2594
- }
2595
- ]
2596
- }
2597
- ]
2598
- }
2599
- }
2600
- ]
2601
- }
2602
- },
2603
- "_word_part": {
2604
- "type": "CHOICE",
2605
- "members": [
2606
- {
2607
- "type": "SYMBOL",
2608
- "name": "word"
2609
- },
2610
- {
2611
- "type": "ALIAS",
2612
- "content": {
2613
- "type": "SYMBOL",
2614
- "name": "_extglob_prefix"
2615
- },
2616
- "named": true,
2617
- "value": "word"
2618
- },
2619
- {
2620
- "type": "SYMBOL",
2621
- "name": "extglob_pattern"
2622
- },
2623
- {
2624
- "type": "SYMBOL",
2625
- "name": "string"
2626
- },
2627
- {
2628
- "type": "SYMBOL",
2629
- "name": "raw_string"
2630
- },
2631
- {
2632
- "type": "SYMBOL",
2633
- "name": "ansi_c_string"
2634
- },
2635
- {
2636
- "type": "SYMBOL",
2637
- "name": "translated_string"
2638
- },
2639
- {
2640
- "type": "SYMBOL",
2641
- "name": "simple_expansion"
2642
- },
2643
- {
2644
- "type": "SYMBOL",
2645
- "name": "expansion"
2646
- },
2647
- {
2648
- "type": "SYMBOL",
2649
- "name": "command_substitution"
2650
- },
2651
- {
2652
- "type": "SYMBOL",
2653
- "name": "arithmetic_expansion"
2654
- },
2655
- {
2656
- "type": "SYMBOL",
2657
- "name": "process_substitution"
2658
- },
2659
- {
2660
- "type": "ALIAS",
2661
- "content": {
2662
- "type": "SYMBOL",
2663
- "name": "_bare_dollar"
2664
- },
2665
- "named": true,
2666
- "value": "word"
2667
- }
2668
- ]
2669
- },
2670
- "word": {
2671
- "type": "TOKEN",
2672
- "content": {
2673
- "type": "SEQ",
2674
- "members": [
2675
- {
2676
- "type": "CHOICE",
2677
- "members": [
2678
- {
2679
- "type": "PATTERN",
2680
- "value": "[^# \\t\\n|&;()<>\"'`$\\\\]"
2681
- },
2682
- {
2683
- "type": "PATTERN",
2684
- "value": "\\\\[^\\n]"
2685
- },
2686
- {
2687
- "type": "PATTERN",
2688
- "value": "[?*+@]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2689
- }
2690
- ]
2691
- },
2692
- {
2693
- "type": "REPEAT",
2694
- "content": {
2695
- "type": "CHOICE",
2696
- "members": [
2697
- {
2698
- "type": "PATTERN",
2699
- "value": "[^ \\t\\n|&;()<>\"'`$\\\\]"
2700
- },
2701
- {
2702
- "type": "PATTERN",
2703
- "value": "\\\\[^\\n]"
2704
- },
2705
- {
2706
- "type": "PATTERN",
2707
- "value": "[?*+@]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2708
- },
2709
- {
2710
- "type": "PATTERN",
2711
- "value": "!\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2712
- }
2713
- ]
2714
- }
2715
- }
2716
- ]
2717
- }
2718
- },
2719
- "extglob_pattern": {
2720
- "type": "SEQ",
2721
- "members": [
2722
- {
2723
- "type": "FIELD",
2724
- "name": "operator",
2725
- "content": {
2726
- "type": "CHOICE",
2727
- "members": [
2728
- {
2729
- "type": "STRING",
2730
- "value": "?("
2731
- },
2732
- {
2733
- "type": "STRING",
2734
- "value": "*("
2735
- },
2736
- {
2737
- "type": "STRING",
2738
- "value": "+("
2739
- },
2740
- {
2741
- "type": "STRING",
2742
- "value": "@("
2743
- }
2744
- ]
2745
- }
2746
- },
2747
- {
2748
- "type": "CHOICE",
2749
- "members": [
2750
- {
2751
- "type": "SYMBOL",
2752
- "name": "_extglob_alternative"
2753
- },
2754
- {
2755
- "type": "BLANK"
2756
- }
2757
- ]
2758
- },
2759
- {
2760
- "type": "REPEAT",
2761
- "content": {
2762
- "type": "SEQ",
2763
- "members": [
2764
- {
2765
- "type": "STRING",
2766
- "value": "|"
2767
- },
2768
- {
2769
- "type": "CHOICE",
2770
- "members": [
2771
- {
2772
- "type": "SYMBOL",
2773
- "name": "_extglob_alternative"
2774
- },
2775
- {
2776
- "type": "BLANK"
2777
- }
2778
- ]
2779
- }
2780
- ]
2781
- }
2782
- },
2783
- {
2784
- "type": "STRING",
2785
- "value": ")"
2786
- }
2787
- ]
2788
- },
2789
- "_negated_extglob_pattern": {
2790
- "type": "SEQ",
2791
- "members": [
2792
- {
2793
- "type": "FIELD",
2794
- "name": "operator",
2795
- "content": {
2796
- "type": "STRING",
2797
- "value": "!("
2798
- }
2799
- },
2800
- {
2801
- "type": "CHOICE",
2802
- "members": [
2803
- {
2804
- "type": "SYMBOL",
2805
- "name": "_extglob_alternative"
2806
- },
2807
- {
2808
- "type": "BLANK"
2809
- }
2810
- ]
2811
- },
2812
- {
2813
- "type": "REPEAT",
2814
- "content": {
2815
- "type": "SEQ",
2816
- "members": [
2817
- {
2818
- "type": "STRING",
2819
- "value": "|"
2820
- },
2821
- {
2822
- "type": "CHOICE",
2823
- "members": [
2824
- {
2825
- "type": "SYMBOL",
2826
- "name": "_extglob_alternative"
2827
- },
2828
- {
2829
- "type": "BLANK"
2830
- }
2831
- ]
2832
- }
2833
- ]
2834
- }
2835
- },
2836
- {
2837
- "type": "STRING",
2838
- "value": ")"
2839
- }
2840
- ]
2841
- },
2842
- "_extglob_alternative": {
2843
- "type": "REPEAT1",
2844
- "content": {
2845
- "type": "FIELD",
2846
- "name": "alternative",
2847
- "content": {
2848
- "type": "CHOICE",
2849
- "members": [
2850
- {
2851
- "type": "SYMBOL",
2852
- "name": "_argument"
2853
- },
2854
- {
2855
- "type": "SYMBOL",
2856
- "name": "_hash_value"
2857
- }
2858
- ]
2859
- }
2860
- }
2861
- },
2862
- "_hash_word": {
2863
- "type": "TOKEN",
2864
- "content": {
2865
- "type": "PREC",
2866
- "value": 1,
2867
- "content": {
2868
- "type": "SEQ",
2869
- "members": [
2870
- {
2871
- "type": "STRING",
2872
- "value": "#"
2873
- },
2874
- {
2875
- "type": "REPEAT",
2876
- "content": {
2877
- "type": "CHOICE",
2878
- "members": [
2879
- {
2880
- "type": "PATTERN",
2881
- "value": "[^ \\t\\n|&;()<>\"'`$\\\\]"
2882
- },
2883
- {
2884
- "type": "PATTERN",
2885
- "value": "\\\\[^\\n]"
2886
- },
2887
- {
2888
- "type": "PATTERN",
2889
- "value": "[?*+@]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2890
- },
2891
- {
2892
- "type": "PATTERN",
2893
- "value": "!\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.|[?*+@!]\\((?:[^()\\\\$`'\"]|\\\\.)*\\))*\\))*\\)"
2894
- }
2895
- ]
2896
- }
2897
- }
2898
- ]
2899
- }
2900
- }
2901
- },
2902
- "string": {
2903
- "type": "SEQ",
2904
- "members": [
2905
- {
2906
- "type": "STRING",
2907
- "value": "\""
2908
- },
2909
- {
2910
- "type": "REPEAT",
2911
- "content": {
2912
- "type": "CHOICE",
2913
- "members": [
2914
- {
2915
- "type": "SYMBOL",
2916
- "name": "string_content"
2917
- },
2918
- {
2919
- "type": "SYMBOL",
2920
- "name": "simple_expansion"
2921
- },
2922
- {
2923
- "type": "SYMBOL",
2924
- "name": "expansion"
2925
- },
2926
- {
2927
- "type": "SYMBOL",
2928
- "name": "command_substitution"
2929
- },
2930
- {
2931
- "type": "SYMBOL",
2932
- "name": "arithmetic_expansion"
2933
- }
2934
- ]
2935
- }
2936
- },
2937
- {
2938
- "type": "STRING",
2939
- "value": "\""
2940
- }
2941
- ]
2942
- },
2943
- "raw_string": {
2944
- "type": "CHOICE",
2945
- "members": [
2946
- {
2947
- "type": "PATTERN",
2948
- "value": "'[^']*'"
2949
- },
2950
- {
2951
- "type": "SEQ",
2952
- "members": [
2953
- {
2954
- "type": "SYMBOL",
2955
- "name": "_closer_line_raw_string_start"
2956
- },
2957
- {
2958
- "type": "REPEAT",
2959
- "content": {
2960
- "type": "ALIAS",
2961
- "content": {
2962
- "type": "SYMBOL",
2963
- "name": "_closer_line_raw_string_content"
2964
- },
2965
- "named": true,
2966
- "value": "string_content"
2967
- }
2968
- },
2969
- {
2970
- "type": "STRING",
2971
- "value": "'"
2972
- }
2973
- ]
2974
- }
2975
- ]
2976
- },
2977
- "ansi_c_string": {
2978
- "type": "CHOICE",
2979
- "members": [
2980
- {
2981
- "type": "PATTERN",
2982
- "value": "\\$'([^'\\\\]|\\\\(.|\\n))*'"
2983
- },
2984
- {
2985
- "type": "SEQ",
2986
- "members": [
2987
- {
2988
- "type": "SYMBOL",
2989
- "name": "_closer_line_ansi_c_string_start"
2990
- },
2991
- {
2992
- "type": "REPEAT",
2993
- "content": {
2994
- "type": "ALIAS",
2995
- "content": {
2996
- "type": "SYMBOL",
2997
- "name": "_closer_line_ansi_c_string_content"
2998
- },
2999
- "named": true,
3000
- "value": "string_content"
3001
- }
3002
- },
3003
- {
3004
- "type": "STRING",
3005
- "value": "'"
3006
- }
3007
- ]
3008
- }
3009
- ]
3010
- },
3011
- "translated_string": {
3012
- "type": "SEQ",
3013
- "members": [
3014
- {
3015
- "type": "STRING",
3016
- "value": "$\""
3017
- },
3018
- {
3019
- "type": "REPEAT",
3020
- "content": {
3021
- "type": "CHOICE",
3022
- "members": [
3023
- {
3024
- "type": "SYMBOL",
3025
- "name": "string_content"
3026
- },
3027
- {
3028
- "type": "SYMBOL",
3029
- "name": "simple_expansion"
3030
- },
3031
- {
3032
- "type": "SYMBOL",
3033
- "name": "expansion"
3034
- },
3035
- {
3036
- "type": "SYMBOL",
3037
- "name": "command_substitution"
3038
- },
3039
- {
3040
- "type": "SYMBOL",
3041
- "name": "arithmetic_expansion"
3042
- }
3043
- ]
3044
- }
3045
- },
3046
- {
3047
- "type": "STRING",
3048
- "value": "\""
3049
- }
3050
- ]
3051
- },
3052
- "simple_expansion": {
3053
- "type": "SEQ",
3054
- "members": [
3055
- {
3056
- "type": "STRING",
3057
- "value": "$"
3058
- },
3059
- {
3060
- "type": "CHOICE",
3061
- "members": [
3062
- {
3063
- "type": "ALIAS",
3064
- "content": {
3065
- "type": "IMMEDIATE_TOKEN",
3066
- "content": {
3067
- "type": "PATTERN",
3068
- "value": "[A-Za-z_][A-Za-z0-9_]*"
3069
- }
3070
- },
3071
- "named": true,
3072
- "value": "variable_name"
3073
- },
3074
- {
3075
- "type": "ALIAS",
3076
- "content": {
3077
- "type": "IMMEDIATE_TOKEN",
3078
- "content": {
3079
- "type": "PATTERN",
3080
- "value": "[0-9*@#?$!_-]"
3081
- }
3082
- },
3083
- "named": true,
3084
- "value": "special_variable_name"
3085
- }
3086
- ]
3087
- }
3088
- ]
3089
- },
3090
- "expansion": {
3091
- "type": "SEQ",
3092
- "members": [
3093
- {
3094
- "type": "STRING",
3095
- "value": "${"
3096
- },
3097
- {
3098
- "type": "CHOICE",
3099
- "members": [
3100
- {
3101
- "type": "SEQ",
3102
- "members": [
3103
- {
3104
- "type": "CHOICE",
3105
- "members": [
3106
- {
3107
- "type": "FIELD",
3108
- "name": "prefix",
3109
- "content": {
3110
- "type": "ALIAS",
3111
- "content": {
3112
- "type": "IMMEDIATE_TOKEN",
3113
- "content": {
3114
- "type": "CHOICE",
3115
- "members": [
3116
- {
3117
- "type": "STRING",
3118
- "value": "#"
3119
- },
3120
- {
3121
- "type": "STRING",
3122
- "value": "!"
3123
- }
3124
- ]
3125
- }
3126
- },
3127
- "named": true,
3128
- "value": "operator"
3129
- }
3130
- },
3131
- {
3132
- "type": "BLANK"
3133
- }
3134
- ]
3135
- },
3136
- {
3137
- "type": "FIELD",
3138
- "name": "parameter",
3139
- "content": {
3140
- "type": "CHOICE",
3141
- "members": [
3142
- {
3143
- "type": "ALIAS",
3144
- "content": {
3145
- "type": "IMMEDIATE_TOKEN",
3146
- "content": {
3147
- "type": "PATTERN",
3148
- "value": "[A-Za-z_][A-Za-z0-9_]*"
3149
- }
3150
- },
3151
- "named": true,
3152
- "value": "variable_name"
3153
- },
3154
- {
3155
- "type": "ALIAS",
3156
- "content": {
3157
- "type": "IMMEDIATE_TOKEN",
3158
- "content": {
3159
- "type": "PATTERN",
3160
- "value": "[0-9]+|[*@?$_-]"
3161
- }
3162
- },
3163
- "named": true,
3164
- "value": "special_variable_name"
3165
- },
3166
- {
3167
- "type": "ALIAS",
3168
- "content": {
3169
- "type": "IMMEDIATE_TOKEN",
3170
- "content": {
3171
- "type": "CHOICE",
3172
- "members": [
3173
- {
3174
- "type": "STRING",
3175
- "value": "#"
3176
- },
3177
- {
3178
- "type": "STRING",
3179
- "value": "!"
3180
- }
3181
- ]
3182
- }
3183
- },
3184
- "named": true,
3185
- "value": "special_variable_name"
3186
- },
3187
- {
3188
- "type": "ALIAS",
3189
- "content": {
3190
- "type": "SYMBOL",
3191
- "name": "_expansion_subscript"
3192
- },
3193
- "named": true,
3194
- "value": "subscript"
3195
- }
3196
- ]
3197
- }
3198
- },
3199
- {
3200
- "type": "CHOICE",
3201
- "members": [
3202
- {
3203
- "type": "SYMBOL",
3204
- "name": "_expansion_operation"
3205
- },
3206
- {
3207
- "type": "BLANK"
3208
- }
3209
- ]
3210
- }
3211
- ]
3212
- },
3213
- {
3214
- "type": "FIELD",
3215
- "name": "parameter",
3216
- "content": {
3217
- "type": "ALIAS",
3218
- "content": {
3219
- "type": "IMMEDIATE_TOKEN",
3220
- "content": {
3221
- "type": "CHOICE",
3222
- "members": [
3223
- {
3224
- "type": "STRING",
3225
- "value": "#"
3226
- },
3227
- {
3228
- "type": "STRING",
3229
- "value": "!"
3230
- }
3231
- ]
3232
- }
3233
- },
3234
- "named": true,
3235
- "value": "special_variable_name"
3236
- }
3237
- },
3238
- {
3239
- "type": "REPEAT",
3240
- "content": {
3241
- "type": "FIELD",
3242
- "name": "argument",
3243
- "content": {
3244
- "type": "CHOICE",
3245
- "members": [
3246
- {
3247
- "type": "ALIAS",
3248
- "content": {
3249
- "type": "SYMBOL",
3250
- "name": "_expansion_text"
3251
- },
3252
- "named": true,
3253
- "value": "word"
3254
- },
3255
- {
3256
- "type": "ALIAS",
3257
- "content": {
3258
- "type": "SYMBOL",
3259
- "name": "_blank_expansion_text"
3260
- },
3261
- "named": true,
3262
- "value": "word"
3263
- },
3264
- {
3265
- "type": "ALIAS",
3266
- "content": {
3267
- "type": "SYMBOL",
3268
- "name": "_angle_text"
3269
- },
3270
- "named": true,
3271
- "value": "word"
3272
- },
3273
- {
3274
- "type": "SYMBOL",
3275
- "name": "string"
3276
- },
3277
- {
3278
- "type": "SYMBOL",
3279
- "name": "raw_string"
3280
- },
3281
- {
3282
- "type": "SYMBOL",
3283
- "name": "ansi_c_string"
3284
- },
3285
- {
3286
- "type": "SYMBOL",
3287
- "name": "translated_string"
3288
- },
3289
- {
3290
- "type": "SYMBOL",
3291
- "name": "command_substitution"
3292
- }
3293
- ]
3294
- }
3295
- }
3296
- }
3297
- ]
3298
- },
3299
- {
3300
- "type": "STRING",
3301
- "value": "}"
3302
- }
3303
- ]
3304
- },
3305
- "_expansion_subscript": {
3306
- "type": "SEQ",
3307
- "members": [
3308
- {
3309
- "type": "FIELD",
3310
- "name": "name",
3311
- "content": {
3312
- "type": "ALIAS",
3313
- "content": {
3314
- "type": "IMMEDIATE_TOKEN",
3315
- "content": {
3316
- "type": "PATTERN",
3317
- "value": "[A-Za-z_][A-Za-z0-9_]*"
3318
- }
3319
- },
3320
- "named": true,
3321
- "value": "variable_name"
3322
- }
3323
- },
3324
- {
3325
- "type": "REPEAT1",
3326
- "content": {
3327
- "type": "SEQ",
3328
- "members": [
3329
- {
3330
- "type": "IMMEDIATE_TOKEN",
3331
- "content": {
3332
- "type": "STRING",
3333
- "value": "["
3334
- }
3335
- },
3336
- {
3337
- "type": "FIELD",
3338
- "name": "index",
3339
- "content": {
3340
- "type": "SYMBOL",
3341
- "name": "_subscript_index"
3342
- }
3343
- },
3344
- {
3345
- "type": "STRING",
3346
- "value": "]"
3347
- }
3348
- ]
3349
- }
3350
- }
3351
- ]
3352
- },
3353
- "_expansion_operation": {
3354
- "type": "CHOICE",
3355
- "members": [
3356
- {
3357
- "type": "SEQ",
3358
- "members": [
3359
- {
3360
- "type": "FIELD",
3361
- "name": "operator",
3362
- "content": {
3363
- "type": "ALIAS",
3364
- "content": {
3365
- "type": "IMMEDIATE_TOKEN",
3366
- "content": {
3367
- "type": "CHOICE",
3368
- "members": [
3369
- {
3370
- "type": "STRING",
3371
- "value": ":-"
3372
- },
3373
- {
3374
- "type": "STRING",
3375
- "value": "-"
3376
- },
3377
- {
3378
- "type": "STRING",
3379
- "value": ":="
3380
- },
3381
- {
3382
- "type": "STRING",
3383
- "value": "="
3384
- },
3385
- {
3386
- "type": "STRING",
3387
- "value": ":?"
3388
- },
3389
- {
3390
- "type": "STRING",
3391
- "value": "?"
3392
- },
3393
- {
3394
- "type": "STRING",
3395
- "value": ":+"
3396
- },
3397
- {
3398
- "type": "STRING",
3399
- "value": "+"
3400
- },
3401
- {
3402
- "type": "STRING",
3403
- "value": "#"
3404
- },
3405
- {
3406
- "type": "STRING",
3407
- "value": "##"
3408
- },
3409
- {
3410
- "type": "STRING",
3411
- "value": "%"
3412
- },
3413
- {
3414
- "type": "STRING",
3415
- "value": "%%"
3416
- },
3417
- {
3418
- "type": "STRING",
3419
- "value": "^"
3420
- },
3421
- {
3422
- "type": "STRING",
3423
- "value": "^^"
3424
- },
3425
- {
3426
- "type": "STRING",
3427
- "value": ","
3428
- },
3429
- {
3430
- "type": "STRING",
3431
- "value": ",,"
3432
- },
3433
- {
3434
- "type": "STRING",
3435
- "value": "~"
3436
- },
3437
- {
3438
- "type": "STRING",
3439
- "value": "~~"
3440
- },
3441
- {
3442
- "type": "STRING",
3443
- "value": "/"
3444
- },
3445
- {
3446
- "type": "STRING",
3447
- "value": "//"
3448
- },
3449
- {
3450
- "type": "STRING",
3451
- "value": "/#"
3452
- },
3453
- {
3454
- "type": "STRING",
3455
- "value": "/%"
3456
- },
3457
- {
3458
- "type": "STRING",
3459
- "value": ":"
3460
- },
3461
- {
3462
- "type": "STRING",
3463
- "value": "@"
3464
- }
3465
- ]
3466
- }
3467
- },
3468
- "named": true,
3469
- "value": "operator"
3470
- }
3471
- },
3472
- {
3473
- "type": "REPEAT",
3474
- "content": {
3475
- "type": "FIELD",
3476
- "name": "argument",
3477
- "content": {
3478
- "type": "CHOICE",
3479
- "members": [
3480
- {
3481
- "type": "ALIAS",
3482
- "content": {
3483
- "type": "SYMBOL",
3484
- "name": "_expansion_text"
3485
- },
3486
- "named": true,
3487
- "value": "word"
3488
- },
3489
- {
3490
- "type": "ALIAS",
3491
- "content": {
3492
- "type": "SYMBOL",
3493
- "name": "_blank_expansion_text"
3494
- },
3495
- "named": true,
3496
- "value": "word"
3497
- },
3498
- {
3499
- "type": "ALIAS",
3500
- "content": {
3501
- "type": "SYMBOL",
3502
- "name": "_angle_text"
3503
- },
3504
- "named": true,
3505
- "value": "word"
3506
- },
3507
- {
3508
- "type": "SYMBOL",
3509
- "name": "_quoted_or_expansion"
3510
- },
3511
- {
3512
- "type": "ALIAS",
3513
- "content": {
3514
- "type": "SYMBOL",
3515
- "name": "_bare_dollar"
3516
- },
3517
- "named": true,
3518
- "value": "word"
3519
- }
3520
- ]
3521
- }
3522
- }
3523
- }
3524
- ]
3525
- },
3526
- {
3527
- "type": "FIELD",
3528
- "name": "operator",
3529
- "content": {
3530
- "type": "ALIAS",
3531
- "content": {
3532
- "type": "IMMEDIATE_TOKEN",
3533
- "content": {
3534
- "type": "CHOICE",
3535
- "members": [
3536
- {
3537
- "type": "STRING",
3538
- "value": "*"
3539
- },
3540
- {
3541
- "type": "STRING",
3542
- "value": "@"
3543
- }
3544
- ]
3545
- }
3546
- },
3547
- "named": true,
3548
- "value": "operator"
3549
- }
3550
- },
3551
- {
3552
- "type": "REPEAT1",
3553
- "content": {
3554
- "type": "FIELD",
3555
- "name": "argument",
3556
- "content": {
3557
- "type": "CHOICE",
3558
- "members": [
3559
- {
3560
- "type": "ALIAS",
3561
- "content": {
3562
- "type": "SYMBOL",
3563
- "name": "_expansion_text"
3564
- },
3565
- "named": true,
3566
- "value": "word"
3567
- },
3568
- {
3569
- "type": "ALIAS",
3570
- "content": {
3571
- "type": "SYMBOL",
3572
- "name": "_blank_expansion_text"
3573
- },
3574
- "named": true,
3575
- "value": "word"
3576
- },
3577
- {
3578
- "type": "ALIAS",
3579
- "content": {
3580
- "type": "SYMBOL",
3581
- "name": "_angle_text"
3582
- },
3583
- "named": true,
3584
- "value": "word"
3585
- },
3586
- {
3587
- "type": "SYMBOL",
3588
- "name": "_quoted_or_expansion"
3589
- }
3590
- ]
3591
- }
3592
- }
3593
- }
3594
- ]
3595
- },
3596
- "_expansion_text": {
3597
- "type": "TOKEN",
3598
- "content": {
3599
- "type": "PREC",
3600
- "value": -1,
3601
- "content": {
3602
- "type": "SEQ",
3603
- "members": [
3604
- {
3605
- "type": "CHOICE",
3606
- "members": [
3607
- {
3608
- "type": "PATTERN",
3609
- "value": "[^}$`\"'\\\\<> \\t\\n]"
3610
- },
3611
- {
3612
- "type": "SEQ",
3613
- "members": [
3614
- {
3615
- "type": "PATTERN",
3616
- "value": "[<>]+"
3617
- },
3618
- {
3619
- "type": "PATTERN",
3620
- "value": "[^(}$`\"'\\\\<>]"
3621
- }
3622
- ]
3623
- },
3624
- {
3625
- "type": "PATTERN",
3626
- "value": "\\\\(.|\\n)"
3627
- }
3628
- ]
3629
- },
3630
- {
3631
- "type": "REPEAT",
3632
- "content": {
3633
- "type": "CHOICE",
3634
- "members": [
3635
- {
3636
- "type": "PATTERN",
3637
- "value": "[^}$`\"'\\\\<>]"
3638
- },
3639
- {
3640
- "type": "SEQ",
3641
- "members": [
3642
- {
3643
- "type": "PATTERN",
3644
- "value": "[<>]+"
3645
- },
3646
- {
3647
- "type": "PATTERN",
3648
- "value": "[^(}$`\"'\\\\<>]"
3649
- }
3650
- ]
3651
- },
3652
- {
3653
- "type": "PATTERN",
3654
- "value": "\\\\(.|\\n)"
3655
- }
3656
- ]
3657
- }
3658
- }
3659
- ]
3660
- }
3661
- }
3662
- },
3663
- "_blank_expansion_text": {
3664
- "type": "TOKEN",
3665
- "content": {
3666
- "type": "PREC",
3667
- "value": 1,
3668
- "content": {
3669
- "type": "SEQ",
3670
- "members": [
3671
- {
3672
- "type": "PATTERN",
3673
- "value": "[ \\t\\n]"
3674
- },
3675
- {
3676
- "type": "REPEAT",
3677
- "content": {
3678
- "type": "CHOICE",
3679
- "members": [
3680
- {
3681
- "type": "PATTERN",
3682
- "value": "[^}$`\"'\\\\<>]"
3683
- },
3684
- {
3685
- "type": "SEQ",
3686
- "members": [
3687
- {
3688
- "type": "PATTERN",
3689
- "value": "[<>]+"
3690
- },
3691
- {
3692
- "type": "PATTERN",
3693
- "value": "[^(}$`\"'\\\\<>]"
3694
- }
3695
- ]
3696
- },
3697
- {
3698
- "type": "PATTERN",
3699
- "value": "\\\\(.|\\n)"
3700
- }
3701
- ]
3702
- }
3703
- }
3704
- ]
3705
- }
3706
- }
3707
- },
3708
- "_angle_text": {
3709
- "type": "TOKEN",
3710
- "content": {
3711
- "type": "PREC",
3712
- "value": -1,
3713
- "content": {
3714
- "type": "PATTERN",
3715
- "value": "[<>]"
3716
- }
3717
- }
3718
- },
3719
- "command_substitution": {
3720
- "type": "CHOICE",
3721
- "members": [
3722
- {
3723
- "type": "SEQ",
3724
- "members": [
3725
- {
3726
- "type": "STRING",
3727
- "value": "$("
3728
- },
3729
- {
3730
- "type": "SYMBOL",
3731
- "name": "_substitution_start"
3732
- },
3733
- {
3734
- "type": "CHOICE",
3735
- "members": [
3736
- {
3737
- "type": "SYMBOL",
3738
- "name": "_statements"
3739
- },
3740
- {
3741
- "type": "BLANK"
3742
- }
3743
- ]
3744
- },
3745
- {
3746
- "type": "SYMBOL",
3747
- "name": "_substitution_end"
3748
- },
3749
- {
3750
- "type": "STRING",
3751
- "value": ")"
3752
- }
3753
- ]
3754
- },
3755
- {
3756
- "type": "SEQ",
3757
- "members": [
3758
- {
3759
- "type": "ALIAS",
3760
- "content": {
3761
- "type": "TOKEN",
3762
- "content": {
3763
- "type": "PATTERN",
3764
- "value": "\\$\\{[ \\t\\n|]"
3765
- }
3766
- },
3767
- "named": false,
3768
- "value": "${"
3769
- },
3770
- {
3771
- "type": "SYMBOL",
3772
- "name": "_brace_substitution_start"
3773
- },
3774
- {
3775
- "type": "CHOICE",
3776
- "members": [
3777
- {
3778
- "type": "SYMBOL",
3779
- "name": "_terminated_statements"
3780
- },
3781
- {
3782
- "type": "BLANK"
3783
- }
3784
- ]
3785
- },
3786
- {
3787
- "type": "SYMBOL",
3788
- "name": "_brace_substitution_end"
3789
- },
3790
- {
3791
- "type": "STRING",
3792
- "value": "}"
3793
- }
3794
- ]
3795
- },
3796
- {
3797
- "type": "SEQ",
3798
- "members": [
3799
- {
3800
- "type": "ALIAS",
3801
- "content": {
3802
- "type": "SYMBOL",
3803
- "name": "_backtick_open"
3804
- },
3805
- "named": false,
3806
- "value": "`"
3807
- },
3808
- {
3809
- "type": "CHOICE",
3810
- "members": [
3811
- {
3812
- "type": "SYMBOL",
3813
- "name": "_statements"
3814
- },
3815
- {
3816
- "type": "BLANK"
3817
- }
3818
- ]
3819
- },
3820
- {
3821
- "type": "ALIAS",
3822
- "content": {
3823
- "type": "SYMBOL",
3824
- "name": "_backtick_close"
3825
- },
3826
- "named": false,
3827
- "value": "`"
3828
- }
3829
- ]
3830
- }
3831
- ]
3832
- },
3833
- "process_substitution": {
3834
- "type": "SEQ",
3835
- "members": [
3836
- {
3837
- "type": "CHOICE",
3838
- "members": [
3839
- {
3840
- "type": "STRING",
3841
- "value": "<("
3842
- },
3843
- {
3844
- "type": "STRING",
3845
- "value": ">("
3846
- }
3847
- ]
3848
- },
3849
- {
3850
- "type": "SYMBOL",
3851
- "name": "_substitution_start"
3852
- },
3853
- {
3854
- "type": "CHOICE",
3855
- "members": [
3856
- {
3857
- "type": "SYMBOL",
3858
- "name": "_statements"
3859
- },
3860
- {
3861
- "type": "BLANK"
3862
- }
3863
- ]
3864
- },
3865
- {
3866
- "type": "SYMBOL",
3867
- "name": "_substitution_end"
3868
- },
3869
- {
3870
- "type": "STRING",
3871
- "value": ")"
3872
- }
3873
- ]
3874
- },
3875
- "arithmetic_expansion": {
3876
- "type": "CHOICE",
3877
- "members": [
3878
- {
3879
- "type": "SEQ",
3880
- "members": [
3881
- {
3882
- "type": "STRING",
3883
- "value": "$(("
3884
- },
3885
- {
3886
- "type": "SYMBOL",
3887
- "name": "_substitution_start"
3888
- },
3889
- {
3890
- "type": "CHOICE",
3891
- "members": [
3892
- {
3893
- "type": "SYMBOL",
3894
- "name": "_arithmetic_expression"
3895
- },
3896
- {
3897
- "type": "BLANK"
3898
- }
3899
- ]
3900
- },
3901
- {
3902
- "type": "SYMBOL",
3903
- "name": "_substitution_end"
3904
- },
3905
- {
3906
- "type": "STRING",
3907
- "value": "))"
3908
- }
3909
- ]
3910
- },
3911
- {
3912
- "type": "SEQ",
3913
- "members": [
3914
- {
3915
- "type": "STRING",
3916
- "value": "$["
3917
- },
3918
- {
3919
- "type": "SYMBOL",
3920
- "name": "_bracket_substitution_start"
3921
- },
3922
- {
3923
- "type": "CHOICE",
3924
- "members": [
3925
- {
3926
- "type": "SYMBOL",
3927
- "name": "_arithmetic_expression"
3928
- },
3929
- {
3930
- "type": "BLANK"
3931
- }
3932
- ]
3933
- },
3934
- {
3935
- "type": "SYMBOL",
3936
- "name": "_bracket_substitution_end"
3937
- },
3938
- {
3939
- "type": "STRING",
3940
- "value": "]"
3941
- }
3942
- ]
3943
- }
3944
- ]
3945
- },
3946
- "_arithmetic_expression": {
3947
- "type": "CHOICE",
3948
- "members": [
3949
- {
3950
- "type": "SYMBOL",
3951
- "name": "number"
3952
- },
3953
- {
3954
- "type": "ALIAS",
3955
- "content": {
3956
- "type": "SYMBOL",
3957
- "name": "_arithmetic_variable"
3958
- },
3959
- "named": true,
3960
- "value": "variable_name"
3961
- },
3962
- {
3963
- "type": "ALIAS",
3964
- "content": {
3965
- "type": "SYMBOL",
3966
- "name": "_arithmetic_subscript"
3967
- },
3968
- "named": true,
3969
- "value": "subscript"
3970
- },
3971
- {
3972
- "type": "SYMBOL",
3973
- "name": "simple_expansion"
3974
- },
3975
- {
3976
- "type": "SYMBOL",
3977
- "name": "expansion"
3978
- },
3979
- {
3980
- "type": "SYMBOL",
3981
- "name": "command_substitution"
3982
- },
3983
- {
3984
- "type": "SYMBOL",
3985
- "name": "arithmetic_expansion"
3986
- },
3987
- {
3988
- "type": "SYMBOL",
3989
- "name": "string"
3990
- },
3991
- {
3992
- "type": "ALIAS",
3993
- "content": {
3994
- "type": "SYMBOL",
3995
- "name": "_arithmetic_unary"
3996
- },
3997
- "named": true,
3998
- "value": "unary_expression"
3999
- },
4000
- {
4001
- "type": "ALIAS",
4002
- "content": {
4003
- "type": "SYMBOL",
4004
- "name": "_arithmetic_postfix"
4005
- },
4006
- "named": true,
4007
- "value": "postfix_expression"
4008
- },
4009
- {
4010
- "type": "ALIAS",
4011
- "content": {
4012
- "type": "SYMBOL",
4013
- "name": "_arithmetic_binary"
4014
- },
4015
- "named": true,
4016
- "value": "binary_expression"
4017
- },
4018
- {
4019
- "type": "ALIAS",
4020
- "content": {
4021
- "type": "SYMBOL",
4022
- "name": "_arithmetic_ternary"
4023
- },
4024
- "named": true,
4025
- "value": "ternary_expression"
4026
- },
4027
- {
4028
- "type": "ALIAS",
4029
- "content": {
4030
- "type": "SYMBOL",
4031
- "name": "_arithmetic_parenthesized"
4032
- },
4033
- "named": true,
4034
- "value": "parenthesized_expression"
4035
- }
4036
- ]
4037
- },
4038
- "number": {
4039
- "type": "CHOICE",
4040
- "members": [
4041
- {
4042
- "type": "PATTERN",
4043
- "value": "(0[xX][0-9a-fA-F]+|[0-9]+#[0-9a-zA-Z@_]+|[0-9]+)"
4044
- },
4045
- {
4046
- "type": "SEQ",
4047
- "members": [
4048
- {
4049
- "type": "PATTERN",
4050
- "value": "[0-9]+#"
4051
- },
4052
- {
4053
- "type": "CHOICE",
4054
- "members": [
4055
- {
4056
- "type": "SYMBOL",
4057
- "name": "simple_expansion"
4058
- },
4059
- {
4060
- "type": "SYMBOL",
4061
- "name": "expansion"
4062
- }
4063
- ]
4064
- }
4065
- ]
4066
- }
4067
- ]
4068
- },
4069
- "_arithmetic_variable": {
4070
- "type": "PATTERN",
4071
- "value": "[A-Za-z_][A-Za-z0-9_]*"
4072
- },
4073
- "_arithmetic_subscript": {
4074
- "type": "SEQ",
4075
- "members": [
4076
- {
4077
- "type": "FIELD",
4078
- "name": "name",
4079
- "content": {
4080
- "type": "ALIAS",
4081
- "content": {
4082
- "type": "SYMBOL",
4083
- "name": "_arithmetic_variable"
4084
- },
4085
- "named": true,
4086
- "value": "variable_name"
4087
- }
4088
- },
4089
- {
4090
- "type": "IMMEDIATE_TOKEN",
4091
- "content": {
4092
- "type": "STRING",
4093
- "value": "["
4094
- }
4095
- },
4096
- {
4097
- "type": "FIELD",
4098
- "name": "index",
4099
- "content": {
4100
- "type": "SYMBOL",
4101
- "name": "_arithmetic_expression"
4102
- }
4103
- },
4104
- {
4105
- "type": "STRING",
4106
- "value": "]"
4107
- }
4108
- ]
4109
- },
4110
- "_arithmetic_unary": {
4111
- "type": "CHOICE",
4112
- "members": [
4113
- {
4114
- "type": "PREC",
4115
- "value": 15,
4116
- "content": {
4117
- "type": "SEQ",
4118
- "members": [
4119
- {
4120
- "type": "FIELD",
4121
- "name": "operator",
4122
- "content": {
4123
- "type": "CHOICE",
4124
- "members": [
4125
- {
4126
- "type": "STRING",
4127
- "value": "++"
4128
- },
4129
- {
4130
- "type": "STRING",
4131
- "value": "--"
4132
- }
4133
- ]
4134
- }
4135
- },
4136
- {
4137
- "type": "SYMBOL",
4138
- "name": "_arithmetic_expression"
4139
- }
4140
- ]
4141
- }
4142
- },
4143
- {
4144
- "type": "PREC",
4145
- "value": 14,
4146
- "content": {
4147
- "type": "SEQ",
4148
- "members": [
4149
- {
4150
- "type": "FIELD",
4151
- "name": "operator",
4152
- "content": {
4153
- "type": "CHOICE",
4154
- "members": [
4155
- {
4156
- "type": "STRING",
4157
- "value": "-"
4158
- },
4159
- {
4160
- "type": "STRING",
4161
- "value": "+"
4162
- },
4163
- {
4164
- "type": "STRING",
4165
- "value": "!"
4166
- },
4167
- {
4168
- "type": "STRING",
4169
- "value": "~"
4170
- }
4171
- ]
4172
- }
4173
- },
4174
- {
4175
- "type": "SYMBOL",
4176
- "name": "_arithmetic_expression"
4177
- }
4178
- ]
4179
- }
4180
- }
4181
- ]
4182
- },
4183
- "_arithmetic_postfix": {
4184
- "type": "PREC",
4185
- "value": 16,
4186
- "content": {
4187
- "type": "SEQ",
4188
- "members": [
4189
- {
4190
- "type": "SYMBOL",
4191
- "name": "_arithmetic_expression"
4192
- },
4193
- {
4194
- "type": "FIELD",
4195
- "name": "operator",
4196
- "content": {
4197
- "type": "CHOICE",
4198
- "members": [
4199
- {
4200
- "type": "STRING",
4201
- "value": "++"
4202
- },
4203
- {
4204
- "type": "STRING",
4205
- "value": "--"
4206
- }
4207
- ]
4208
- }
4209
- }
4210
- ]
4211
- }
4212
- },
4213
- "_arithmetic_binary": {
4214
- "type": "CHOICE",
4215
- "members": [
4216
- {
4217
- "type": "PREC_LEFT",
4218
- "value": -1,
4219
- "content": {
4220
- "type": "SEQ",
4221
- "members": [
4222
- {
4223
- "type": "FIELD",
4224
- "name": "left",
4225
- "content": {
4226
- "type": "SYMBOL",
4227
- "name": "_arithmetic_expression"
4228
- }
4229
- },
4230
- {
4231
- "type": "FIELD",
4232
- "name": "operator",
4233
- "content": {
4234
- "type": "STRING",
4235
- "value": ","
4236
- }
4237
- },
4238
- {
4239
- "type": "FIELD",
4240
- "name": "right",
4241
- "content": {
4242
- "type": "SYMBOL",
4243
- "name": "_arithmetic_expression"
4244
- }
4245
- }
4246
- ]
4247
- }
4248
- },
4249
- {
4250
- "type": "PREC_RIGHT",
4251
- "value": 1,
4252
- "content": {
4253
- "type": "SEQ",
4254
- "members": [
4255
- {
4256
- "type": "FIELD",
4257
- "name": "left",
4258
- "content": {
4259
- "type": "SYMBOL",
4260
- "name": "_arithmetic_expression"
4261
- }
4262
- },
4263
- {
4264
- "type": "FIELD",
4265
- "name": "operator",
4266
- "content": {
4267
- "type": "CHOICE",
4268
- "members": [
4269
- {
4270
- "type": "STRING",
4271
- "value": "="
4272
- },
4273
- {
4274
- "type": "STRING",
4275
- "value": "+="
4276
- },
4277
- {
4278
- "type": "STRING",
4279
- "value": "-="
4280
- },
4281
- {
4282
- "type": "STRING",
4283
- "value": "*="
4284
- },
4285
- {
4286
- "type": "STRING",
4287
- "value": "/="
4288
- },
4289
- {
4290
- "type": "STRING",
4291
- "value": "%="
4292
- },
4293
- {
4294
- "type": "STRING",
4295
- "value": "**="
4296
- },
4297
- {
4298
- "type": "STRING",
4299
- "value": "<<="
4300
- },
4301
- {
4302
- "type": "STRING",
4303
- "value": ">>="
4304
- },
4305
- {
4306
- "type": "STRING",
4307
- "value": "&="
4308
- },
4309
- {
4310
- "type": "STRING",
4311
- "value": "^="
4312
- },
4313
- {
4314
- "type": "STRING",
4315
- "value": "|="
4316
- }
4317
- ]
4318
- }
4319
- },
4320
- {
4321
- "type": "FIELD",
4322
- "name": "right",
4323
- "content": {
4324
- "type": "SYMBOL",
4325
- "name": "_arithmetic_expression"
4326
- }
4327
- }
4328
- ]
4329
- }
4330
- },
4331
- {
4332
- "type": "PREC_LEFT",
4333
- "value": 3,
4334
- "content": {
4335
- "type": "SEQ",
4336
- "members": [
4337
- {
4338
- "type": "FIELD",
4339
- "name": "left",
4340
- "content": {
4341
- "type": "SYMBOL",
4342
- "name": "_arithmetic_expression"
4343
- }
4344
- },
4345
- {
4346
- "type": "FIELD",
4347
- "name": "operator",
4348
- "content": {
4349
- "type": "STRING",
4350
- "value": "||"
4351
- }
4352
- },
4353
- {
4354
- "type": "FIELD",
4355
- "name": "right",
4356
- "content": {
4357
- "type": "SYMBOL",
4358
- "name": "_arithmetic_expression"
4359
- }
4360
- }
4361
- ]
4362
- }
4363
- },
4364
- {
4365
- "type": "PREC_LEFT",
4366
- "value": 4,
4367
- "content": {
4368
- "type": "SEQ",
4369
- "members": [
4370
- {
4371
- "type": "FIELD",
4372
- "name": "left",
4373
- "content": {
4374
- "type": "SYMBOL",
4375
- "name": "_arithmetic_expression"
4376
- }
4377
- },
4378
- {
4379
- "type": "FIELD",
4380
- "name": "operator",
4381
- "content": {
4382
- "type": "STRING",
4383
- "value": "&&"
4384
- }
4385
- },
4386
- {
4387
- "type": "FIELD",
4388
- "name": "right",
4389
- "content": {
4390
- "type": "SYMBOL",
4391
- "name": "_arithmetic_expression"
4392
- }
4393
- }
4394
- ]
4395
- }
4396
- },
4397
- {
4398
- "type": "PREC_LEFT",
4399
- "value": 5,
4400
- "content": {
4401
- "type": "SEQ",
4402
- "members": [
4403
- {
4404
- "type": "FIELD",
4405
- "name": "left",
4406
- "content": {
4407
- "type": "SYMBOL",
4408
- "name": "_arithmetic_expression"
4409
- }
4410
- },
4411
- {
4412
- "type": "FIELD",
4413
- "name": "operator",
4414
- "content": {
4415
- "type": "STRING",
4416
- "value": "|"
4417
- }
4418
- },
4419
- {
4420
- "type": "FIELD",
4421
- "name": "right",
4422
- "content": {
4423
- "type": "SYMBOL",
4424
- "name": "_arithmetic_expression"
4425
- }
4426
- }
4427
- ]
4428
- }
4429
- },
4430
- {
4431
- "type": "PREC_LEFT",
4432
- "value": 6,
4433
- "content": {
4434
- "type": "SEQ",
4435
- "members": [
4436
- {
4437
- "type": "FIELD",
4438
- "name": "left",
4439
- "content": {
4440
- "type": "SYMBOL",
4441
- "name": "_arithmetic_expression"
4442
- }
4443
- },
4444
- {
4445
- "type": "FIELD",
4446
- "name": "operator",
4447
- "content": {
4448
- "type": "STRING",
4449
- "value": "^"
4450
- }
4451
- },
4452
- {
4453
- "type": "FIELD",
4454
- "name": "right",
4455
- "content": {
4456
- "type": "SYMBOL",
4457
- "name": "_arithmetic_expression"
4458
- }
4459
- }
4460
- ]
4461
- }
4462
- },
4463
- {
4464
- "type": "PREC_LEFT",
4465
- "value": 7,
4466
- "content": {
4467
- "type": "SEQ",
4468
- "members": [
4469
- {
4470
- "type": "FIELD",
4471
- "name": "left",
4472
- "content": {
4473
- "type": "SYMBOL",
4474
- "name": "_arithmetic_expression"
4475
- }
4476
- },
4477
- {
4478
- "type": "FIELD",
4479
- "name": "operator",
4480
- "content": {
4481
- "type": "STRING",
4482
- "value": "&"
4483
- }
4484
- },
4485
- {
4486
- "type": "FIELD",
4487
- "name": "right",
4488
- "content": {
4489
- "type": "SYMBOL",
4490
- "name": "_arithmetic_expression"
4491
- }
4492
- }
4493
- ]
4494
- }
4495
- },
4496
- {
4497
- "type": "PREC_LEFT",
4498
- "value": 8,
4499
- "content": {
4500
- "type": "SEQ",
4501
- "members": [
4502
- {
4503
- "type": "FIELD",
4504
- "name": "left",
4505
- "content": {
4506
- "type": "SYMBOL",
4507
- "name": "_arithmetic_expression"
4508
- }
4509
- },
4510
- {
4511
- "type": "FIELD",
4512
- "name": "operator",
4513
- "content": {
4514
- "type": "CHOICE",
4515
- "members": [
4516
- {
4517
- "type": "STRING",
4518
- "value": "=="
4519
- },
4520
- {
4521
- "type": "STRING",
4522
- "value": "!="
4523
- }
4524
- ]
4525
- }
4526
- },
4527
- {
4528
- "type": "FIELD",
4529
- "name": "right",
4530
- "content": {
4531
- "type": "SYMBOL",
4532
- "name": "_arithmetic_expression"
4533
- }
4534
- }
4535
- ]
4536
- }
4537
- },
4538
- {
4539
- "type": "PREC_LEFT",
4540
- "value": 9,
4541
- "content": {
4542
- "type": "SEQ",
4543
- "members": [
4544
- {
4545
- "type": "FIELD",
4546
- "name": "left",
4547
- "content": {
4548
- "type": "SYMBOL",
4549
- "name": "_arithmetic_expression"
4550
- }
4551
- },
4552
- {
4553
- "type": "FIELD",
4554
- "name": "operator",
4555
- "content": {
4556
- "type": "CHOICE",
4557
- "members": [
4558
- {
4559
- "type": "STRING",
4560
- "value": "<"
4561
- },
4562
- {
4563
- "type": "STRING",
4564
- "value": ">"
4565
- },
4566
- {
4567
- "type": "STRING",
4568
- "value": "<="
4569
- },
4570
- {
4571
- "type": "STRING",
4572
- "value": ">="
4573
- }
4574
- ]
4575
- }
4576
- },
4577
- {
4578
- "type": "FIELD",
4579
- "name": "right",
4580
- "content": {
4581
- "type": "SYMBOL",
4582
- "name": "_arithmetic_expression"
4583
- }
4584
- }
4585
- ]
4586
- }
4587
- },
4588
- {
4589
- "type": "PREC_LEFT",
4590
- "value": 10,
4591
- "content": {
4592
- "type": "SEQ",
4593
- "members": [
4594
- {
4595
- "type": "FIELD",
4596
- "name": "left",
4597
- "content": {
4598
- "type": "SYMBOL",
4599
- "name": "_arithmetic_expression"
4600
- }
4601
- },
4602
- {
4603
- "type": "FIELD",
4604
- "name": "operator",
4605
- "content": {
4606
- "type": "CHOICE",
4607
- "members": [
4608
- {
4609
- "type": "STRING",
4610
- "value": "<<"
4611
- },
4612
- {
4613
- "type": "STRING",
4614
- "value": ">>"
4615
- }
4616
- ]
4617
- }
4618
- },
4619
- {
4620
- "type": "FIELD",
4621
- "name": "right",
4622
- "content": {
4623
- "type": "SYMBOL",
4624
- "name": "_arithmetic_expression"
4625
- }
4626
- }
4627
- ]
4628
- }
4629
- },
4630
- {
4631
- "type": "PREC_LEFT",
4632
- "value": 11,
4633
- "content": {
4634
- "type": "SEQ",
4635
- "members": [
4636
- {
4637
- "type": "FIELD",
4638
- "name": "left",
4639
- "content": {
4640
- "type": "SYMBOL",
4641
- "name": "_arithmetic_expression"
4642
- }
4643
- },
4644
- {
4645
- "type": "FIELD",
4646
- "name": "operator",
4647
- "content": {
4648
- "type": "CHOICE",
4649
- "members": [
4650
- {
4651
- "type": "STRING",
4652
- "value": "+"
4653
- },
4654
- {
4655
- "type": "STRING",
4656
- "value": "-"
4657
- }
4658
- ]
4659
- }
4660
- },
4661
- {
4662
- "type": "FIELD",
4663
- "name": "right",
4664
- "content": {
4665
- "type": "SYMBOL",
4666
- "name": "_arithmetic_expression"
4667
- }
4668
- }
4669
- ]
4670
- }
4671
- },
4672
- {
4673
- "type": "PREC_LEFT",
4674
- "value": 12,
4675
- "content": {
4676
- "type": "SEQ",
4677
- "members": [
4678
- {
4679
- "type": "FIELD",
4680
- "name": "left",
4681
- "content": {
4682
- "type": "SYMBOL",
4683
- "name": "_arithmetic_expression"
4684
- }
4685
- },
4686
- {
4687
- "type": "FIELD",
4688
- "name": "operator",
4689
- "content": {
4690
- "type": "CHOICE",
4691
- "members": [
4692
- {
4693
- "type": "STRING",
4694
- "value": "*"
4695
- },
4696
- {
4697
- "type": "STRING",
4698
- "value": "/"
4699
- },
4700
- {
4701
- "type": "STRING",
4702
- "value": "%"
4703
- }
4704
- ]
4705
- }
4706
- },
4707
- {
4708
- "type": "FIELD",
4709
- "name": "right",
4710
- "content": {
4711
- "type": "SYMBOL",
4712
- "name": "_arithmetic_expression"
4713
- }
4714
- }
4715
- ]
4716
- }
4717
- },
4718
- {
4719
- "type": "PREC_RIGHT",
4720
- "value": 13,
4721
- "content": {
4722
- "type": "SEQ",
4723
- "members": [
4724
- {
4725
- "type": "FIELD",
4726
- "name": "left",
4727
- "content": {
4728
- "type": "SYMBOL",
4729
- "name": "_arithmetic_expression"
4730
- }
4731
- },
4732
- {
4733
- "type": "FIELD",
4734
- "name": "operator",
4735
- "content": {
4736
- "type": "STRING",
4737
- "value": "**"
4738
- }
4739
- },
4740
- {
4741
- "type": "FIELD",
4742
- "name": "right",
4743
- "content": {
4744
- "type": "SYMBOL",
4745
- "name": "_arithmetic_expression"
4746
- }
4747
- }
4748
- ]
4749
- }
4750
- }
4751
- ]
4752
- },
4753
- "_arithmetic_ternary": {
4754
- "type": "PREC_RIGHT",
4755
- "value": 2,
4756
- "content": {
4757
- "type": "SEQ",
4758
- "members": [
4759
- {
4760
- "type": "FIELD",
4761
- "name": "condition",
4762
- "content": {
4763
- "type": "SYMBOL",
4764
- "name": "_arithmetic_expression"
4765
- }
4766
- },
4767
- {
4768
- "type": "STRING",
4769
- "value": "?"
4770
- },
4771
- {
4772
- "type": "FIELD",
4773
- "name": "consequence",
4774
- "content": {
4775
- "type": "SYMBOL",
4776
- "name": "_arithmetic_expression"
4777
- }
4778
- },
4779
- {
4780
- "type": "STRING",
4781
- "value": ":"
4782
- },
4783
- {
4784
- "type": "FIELD",
4785
- "name": "alternative",
4786
- "content": {
4787
- "type": "SYMBOL",
4788
- "name": "_arithmetic_expression"
4789
- }
4790
- }
4791
- ]
4792
- }
4793
- },
4794
- "_arithmetic_parenthesized": {
4795
- "type": "SEQ",
4796
- "members": [
4797
- {
4798
- "type": "STRING",
4799
- "value": "("
4800
- },
4801
- {
4802
- "type": "SYMBOL",
4803
- "name": "_arithmetic_expression"
4804
- },
4805
- {
4806
- "type": "STRING",
4807
- "value": ")"
4808
- }
4809
- ]
4810
- },
4811
- "comment": {
4812
- "type": "CHOICE",
4813
- "members": [
4814
- {
4815
- "type": "TOKEN",
4816
- "content": {
4817
- "type": "PREC",
4818
- "value": -10,
4819
- "content": {
4820
- "type": "PATTERN",
4821
- "value": "#.*"
4822
- }
4823
- }
4824
- },
4825
- {
4826
- "type": "SYMBOL",
4827
- "name": "_joined_comment"
4828
- }
4829
- ]
4830
- }
4831
- },
4832
- "extras": [
4833
- {
4834
- "type": "SYMBOL",
4835
- "name": "comment"
4836
- },
4837
- {
4838
- "type": "SYMBOL",
4839
- "name": "heredoc_body"
4840
- },
4841
- {
4842
- "type": "PATTERN",
4843
- "value": "[ \\t\\n]"
4844
- },
4845
- {
4846
- "type": "PATTERN",
4847
- "value": "\\\\\\n"
4848
- },
4849
- {
4850
- "type": "SYMBOL",
4851
- "name": "_line_continuation"
4852
- }
4853
- ],
4854
- "conflicts": [
4855
- [
4856
- "_statements",
4857
- "_last_case_item"
4858
- ]
4859
- ],
4860
- "precedences": [],
4861
- "externals": [
4862
- {
4863
- "type": "SYMBOL",
4864
- "name": "heredoc_start"
4865
- },
4866
- {
4867
- "type": "SYMBOL",
4868
- "name": "_heredoc_body_start"
4869
- },
4870
- {
4871
- "type": "SYMBOL",
4872
- "name": "heredoc_content"
4873
- },
4874
- {
4875
- "type": "SYMBOL",
4876
- "name": "heredoc_end"
4877
- },
4878
- {
4879
- "type": "SYMBOL",
4880
- "name": "_heredoc_arrow"
4881
- },
4882
- {
4883
- "type": "SYMBOL",
4884
- "name": "_heredoc_arrow_dash"
4885
- },
4886
- {
4887
- "type": "SYMBOL",
4888
- "name": "_concat"
4889
- },
4890
- {
4891
- "type": "SYMBOL",
4892
- "name": "file_descriptor"
4893
- },
4894
- {
4895
- "type": "SYMBOL",
4896
- "name": "variable_name"
4897
- },
4898
- {
4899
- "type": "SYMBOL",
4900
- "name": "_bare_dollar"
4901
- },
4902
- {
4903
- "type": "SYMBOL",
4904
- "name": "_empty_value"
4905
- },
4906
- {
4907
- "type": "SYMBOL",
4908
- "name": "regex"
4909
- },
4910
- {
4911
- "type": "SYMBOL",
4912
- "name": "string_content"
4913
- },
4914
- {
4915
- "type": "SYMBOL",
4916
- "name": "_backtick_open"
4917
- },
4918
- {
4919
- "type": "SYMBOL",
4920
- "name": "_backtick_close"
4921
- },
4922
- {
4923
- "type": "SYMBOL",
4924
- "name": "_newline"
4925
- },
4926
- {
4927
- "type": "SYMBOL",
4928
- "name": "_substitution_start"
4929
- },
4930
- {
4931
- "type": "SYMBOL",
4932
- "name": "_substitution_end"
4933
- },
4934
- {
4935
- "type": "SYMBOL",
4936
- "name": "_brace_substitution_end"
4937
- },
4938
- {
4939
- "type": "SYMBOL",
4940
- "name": "_bracket_substitution_end"
4941
- },
4942
- {
4943
- "type": "SYMBOL",
4944
- "name": "_extglob_prefix"
4945
- },
4946
- {
4947
- "type": "SYMBOL",
4948
- "name": "_line_continuation"
4949
- },
4950
- {
4951
- "type": "SYMBOL",
4952
- "name": "_brace_substitution_start"
4953
- },
4954
- {
4955
- "type": "SYMBOL",
4956
- "name": "_bracket_substitution_start"
4957
- },
4958
- {
4959
- "type": "SYMBOL",
4960
- "name": "_regex_start"
4961
- },
4962
- {
4963
- "type": "SYMBOL",
4964
- "name": "_regex_concat"
4965
- },
4966
- {
4967
- "type": "SYMBOL",
4968
- "name": "_closer_line_raw_string_start"
4969
- },
4970
- {
4971
- "type": "SYMBOL",
4972
- "name": "_closer_line_ansi_c_string_start"
4973
- },
4974
- {
4975
- "type": "SYMBOL",
4976
- "name": "_closer_line_raw_string_content"
4977
- },
4978
- {
4979
- "type": "SYMBOL",
4980
- "name": "_closer_line_ansi_c_string_content"
4981
- },
4982
- {
4983
- "type": "SYMBOL",
4984
- "name": "_joined_comment"
4985
- },
4986
- {
4987
- "type": "SYMBOL",
4988
- "name": "__error_recovery"
4989
- }
4990
- ],
4991
- "inline": [
4992
- "_terminator",
4993
- "_command_statement"
4994
- ],
4995
- "supertypes": [
4996
- "_statement",
4997
- "_arithmetic_expression"
4998
- ],
4999
- "reserved": {}
5000
- }