@konomanoasa/tree-sitter-posix-awk 0.15.0 → 0.17.0

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 CHANGED
@@ -31,15 +31,6 @@
31
31
  }
32
32
  ]
33
33
  },
34
- "_continuation_marker": {
35
- "type": "ALIAS",
36
- "content": {
37
- "type": "SYMBOL",
38
- "name": "_continuation_backslash"
39
- },
40
- "named": false,
41
- "value": "\\"
42
- },
43
34
  "_additive_operator": {
44
35
  "type": "FIELD",
45
36
  "name": "operator",
@@ -1276,17 +1267,12 @@
1276
1267
  }
1277
1268
  },
1278
1269
  {
1279
- "type": "SEQ",
1280
- "members": [
1281
- {
1282
- "type": "SYMBOL",
1283
- "name": "while_keyword"
1284
- },
1285
- {
1286
- "type": "SYMBOL",
1287
- "name": "_parenthesized_condition"
1288
- }
1289
- ]
1270
+ "type": "SYMBOL",
1271
+ "name": "while_keyword"
1272
+ },
1273
+ {
1274
+ "type": "SYMBOL",
1275
+ "name": "_parenthesized_condition"
1290
1276
  }
1291
1277
  ]
1292
1278
  }
@@ -2636,6 +2622,166 @@
2636
2622
  }
2637
2623
  ]
2638
2624
  },
2625
+ "_getline_updated_update": {
2626
+ "type": "SEQ",
2627
+ "members": [
2628
+ {
2629
+ "type": "FIELD",
2630
+ "name": "operand",
2631
+ "content": {
2632
+ "type": "ALIAS",
2633
+ "content": {
2634
+ "type": "SYMBOL",
2635
+ "name": "postfix_lvalue"
2636
+ },
2637
+ "named": true,
2638
+ "value": "lvalue"
2639
+ }
2640
+ },
2641
+ {
2642
+ "type": "FIELD",
2643
+ "name": "operator",
2644
+ "content": {
2645
+ "type": "CHOICE",
2646
+ "members": [
2647
+ {
2648
+ "type": "SYMBOL",
2649
+ "name": "incr"
2650
+ },
2651
+ {
2652
+ "type": "SYMBOL",
2653
+ "name": "decr"
2654
+ }
2655
+ ]
2656
+ }
2657
+ }
2658
+ ]
2659
+ },
2660
+ "getline_updated_update_operand": {
2661
+ "type": "PREC",
2662
+ "value": 1,
2663
+ "content": {
2664
+ "type": "SYMBOL",
2665
+ "name": "_getline_updated_update"
2666
+ }
2667
+ },
2668
+ "_getline_updated_exponentiation": {
2669
+ "type": "CHOICE",
2670
+ "members": [
2671
+ {
2672
+ "type": "SYMBOL",
2673
+ "name": "_getline_updated_update"
2674
+ },
2675
+ {
2676
+ "type": "SEQ",
2677
+ "members": [
2678
+ {
2679
+ "type": "FIELD",
2680
+ "name": "left",
2681
+ "content": {
2682
+ "type": "ALIAS",
2683
+ "content": {
2684
+ "type": "SYMBOL",
2685
+ "name": "getline_updated_update_operand"
2686
+ },
2687
+ "named": true,
2688
+ "value": "non_unary_expr"
2689
+ }
2690
+ },
2691
+ {
2692
+ "type": "SYMBOL",
2693
+ "name": "_normal_exponentiation_tail"
2694
+ }
2695
+ ]
2696
+ }
2697
+ ]
2698
+ },
2699
+ "_getline_updated_multiplicative": {
2700
+ "type": "CHOICE",
2701
+ "members": [
2702
+ {
2703
+ "type": "SYMBOL",
2704
+ "name": "_getline_updated_exponentiation"
2705
+ },
2706
+ {
2707
+ "type": "PREC_LEFT",
2708
+ "value": 18,
2709
+ "content": {
2710
+ "type": "SEQ",
2711
+ "members": [
2712
+ {
2713
+ "type": "FIELD",
2714
+ "name": "left",
2715
+ "content": {
2716
+ "type": "ALIAS",
2717
+ "content": {
2718
+ "type": "SYMBOL",
2719
+ "name": "getline_updated_multiplicative_operand"
2720
+ },
2721
+ "named": true,
2722
+ "value": "non_unary_expr"
2723
+ }
2724
+ },
2725
+ {
2726
+ "type": "SYMBOL",
2727
+ "name": "_normal_multiplicative_tail"
2728
+ }
2729
+ ]
2730
+ }
2731
+ }
2732
+ ]
2733
+ },
2734
+ "getline_updated_multiplicative_operand": {
2735
+ "type": "PREC",
2736
+ "value": 1,
2737
+ "content": {
2738
+ "type": "SYMBOL",
2739
+ "name": "_getline_updated_multiplicative"
2740
+ }
2741
+ },
2742
+ "_getline_updated_additive": {
2743
+ "type": "CHOICE",
2744
+ "members": [
2745
+ {
2746
+ "type": "SYMBOL",
2747
+ "name": "_getline_updated_multiplicative"
2748
+ },
2749
+ {
2750
+ "type": "PREC_LEFT",
2751
+ "value": 16,
2752
+ "content": {
2753
+ "type": "SEQ",
2754
+ "members": [
2755
+ {
2756
+ "type": "FIELD",
2757
+ "name": "left",
2758
+ "content": {
2759
+ "type": "ALIAS",
2760
+ "content": {
2761
+ "type": "SYMBOL",
2762
+ "name": "getline_updated_additive_operand"
2763
+ },
2764
+ "named": true,
2765
+ "value": "non_unary_expr"
2766
+ }
2767
+ },
2768
+ {
2769
+ "type": "SYMBOL",
2770
+ "name": "_normal_additive_tail"
2771
+ }
2772
+ ]
2773
+ }
2774
+ }
2775
+ ]
2776
+ },
2777
+ "getline_updated_additive_operand": {
2778
+ "type": "PREC",
2779
+ "value": 1,
2780
+ "content": {
2781
+ "type": "SYMBOL",
2782
+ "name": "_getline_updated_additive"
2783
+ }
2784
+ },
2639
2785
  "_normal_concatenation_tail": {
2640
2786
  "type": "FIELD",
2641
2787
  "name": "right",
@@ -2656,6 +2802,41 @@
2656
2802
  "type": "SYMBOL",
2657
2803
  "name": "_normal_unary_additive_expr"
2658
2804
  },
2805
+ {
2806
+ "type": "PREC_LEFT",
2807
+ "value": 14,
2808
+ "content": {
2809
+ "type": "SEQ",
2810
+ "members": [
2811
+ {
2812
+ "type": "FIELD",
2813
+ "name": "left",
2814
+ "content": {
2815
+ "type": "ALIAS",
2816
+ "content": {
2817
+ "type": "SYMBOL",
2818
+ "name": "omitted_unary_get_operand"
2819
+ },
2820
+ "named": true,
2821
+ "value": "unary_expr"
2822
+ }
2823
+ },
2824
+ {
2825
+ "type": "FIELD",
2826
+ "name": "right",
2827
+ "content": {
2828
+ "type": "ALIAS",
2829
+ "content": {
2830
+ "type": "SYMBOL",
2831
+ "name": "getline_updated_additive_operand"
2832
+ },
2833
+ "named": true,
2834
+ "value": "non_unary_expr"
2835
+ }
2836
+ }
2837
+ ]
2838
+ }
2839
+ },
2659
2840
  {
2660
2841
  "type": "PREC_LEFT",
2661
2842
  "value": 14,
@@ -2691,6 +2872,41 @@
2691
2872
  "type": "SYMBOL",
2692
2873
  "name": "_normal_non_unary_additive_expr"
2693
2874
  },
2875
+ {
2876
+ "type": "PREC_LEFT",
2877
+ "value": 14,
2878
+ "content": {
2879
+ "type": "SEQ",
2880
+ "members": [
2881
+ {
2882
+ "type": "FIELD",
2883
+ "name": "left",
2884
+ "content": {
2885
+ "type": "ALIAS",
2886
+ "content": {
2887
+ "type": "SYMBOL",
2888
+ "name": "omitted_get_operand"
2889
+ },
2890
+ "named": true,
2891
+ "value": "non_unary_expr"
2892
+ }
2893
+ },
2894
+ {
2895
+ "type": "FIELD",
2896
+ "name": "right",
2897
+ "content": {
2898
+ "type": "ALIAS",
2899
+ "content": {
2900
+ "type": "SYMBOL",
2901
+ "name": "getline_updated_additive_operand"
2902
+ },
2903
+ "named": true,
2904
+ "value": "non_unary_expr"
2905
+ }
2906
+ }
2907
+ ]
2908
+ }
2909
+ },
2694
2910
  {
2695
2911
  "type": "PREC_LEFT",
2696
2912
  "value": 14,
@@ -5595,29 +5811,33 @@
5595
5811
  ]
5596
5812
  },
5597
5813
  "nonpostfix_simple_get": {
5598
- "type": "PREC_DYNAMIC",
5814
+ "type": "PREC",
5599
5815
  "value": 1,
5600
5816
  "content": {
5601
- "type": "SEQ",
5602
- "members": [
5603
- {
5604
- "type": "SYMBOL",
5605
- "name": "getline_keyword"
5606
- },
5607
- {
5608
- "type": "FIELD",
5609
- "name": "target",
5610
- "content": {
5611
- "type": "ALIAS",
5817
+ "type": "PREC_DYNAMIC",
5818
+ "value": 1,
5819
+ "content": {
5820
+ "type": "SEQ",
5821
+ "members": [
5822
+ {
5823
+ "type": "SYMBOL",
5824
+ "name": "getline_keyword"
5825
+ },
5826
+ {
5827
+ "type": "FIELD",
5828
+ "name": "target",
5612
5829
  "content": {
5613
- "type": "SYMBOL",
5614
- "name": "nonpostfix_lvalue"
5615
- },
5616
- "named": true,
5617
- "value": "lvalue"
5830
+ "type": "ALIAS",
5831
+ "content": {
5832
+ "type": "SYMBOL",
5833
+ "name": "nonpostfix_lvalue"
5834
+ },
5835
+ "named": true,
5836
+ "value": "lvalue"
5837
+ }
5618
5838
  }
5619
- }
5620
- ]
5839
+ ]
5840
+ }
5621
5841
  }
5622
5842
  },
5623
5843
  "postfix_simple_get": {
@@ -5628,26 +5848,96 @@
5628
5848
  "name": "getline_keyword"
5629
5849
  },
5630
5850
  {
5631
- "type": "PREC_DYNAMIC",
5851
+ "type": "PREC",
5632
5852
  "value": 1,
5853
+ "content": {
5854
+ "type": "PREC_DYNAMIC",
5855
+ "value": 1,
5856
+ "content": {
5857
+ "type": "SEQ",
5858
+ "members": [
5859
+ {
5860
+ "type": "SYMBOL",
5861
+ "name": "getline_keyword"
5862
+ },
5863
+ {
5864
+ "type": "FIELD",
5865
+ "name": "target",
5866
+ "content": {
5867
+ "type": "ALIAS",
5868
+ "content": {
5869
+ "type": "SYMBOL",
5870
+ "name": "postfix_lvalue"
5871
+ },
5872
+ "named": true,
5873
+ "value": "lvalue"
5874
+ }
5875
+ }
5876
+ ]
5877
+ }
5878
+ }
5879
+ }
5880
+ ]
5881
+ },
5882
+ "omitted_get_operand": {
5883
+ "type": "ALIAS",
5884
+ "content": {
5885
+ "type": "SYMBOL",
5886
+ "name": "omitted_get_input"
5887
+ },
5888
+ "named": true,
5889
+ "value": "non_unary_input_function"
5890
+ },
5891
+ "omitted_get_input": {
5892
+ "type": "CHOICE",
5893
+ "members": [
5894
+ {
5895
+ "type": "FIELD",
5896
+ "name": "get",
5897
+ "content": {
5898
+ "type": "ALIAS",
5899
+ "content": {
5900
+ "type": "SYMBOL",
5901
+ "name": "postfix_omitted_get"
5902
+ },
5903
+ "named": true,
5904
+ "value": "simple_get"
5905
+ }
5906
+ },
5907
+ {
5908
+ "type": "PREC_RIGHT",
5909
+ "value": 22,
5633
5910
  "content": {
5634
5911
  "type": "SEQ",
5635
5912
  "members": [
5636
5913
  {
5637
- "type": "SYMBOL",
5638
- "name": "getline_keyword"
5914
+ "type": "FIELD",
5915
+ "name": "source",
5916
+ "content": {
5917
+ "type": "SYMBOL",
5918
+ "name": "non_unary_expr"
5919
+ }
5920
+ },
5921
+ {
5922
+ "type": "ALIAS",
5923
+ "content": {
5924
+ "type": "SYMBOL",
5925
+ "name": "_pipe_operator"
5926
+ },
5927
+ "named": false,
5928
+ "value": "|"
5639
5929
  },
5640
5930
  {
5641
5931
  "type": "FIELD",
5642
- "name": "target",
5932
+ "name": "get",
5643
5933
  "content": {
5644
5934
  "type": "ALIAS",
5645
5935
  "content": {
5646
5936
  "type": "SYMBOL",
5647
- "name": "postfix_lvalue"
5937
+ "name": "postfix_omitted_get"
5648
5938
  },
5649
5939
  "named": true,
5650
- "value": "lvalue"
5940
+ "value": "simple_get"
5651
5941
  }
5652
5942
  }
5653
5943
  ]
@@ -5655,6 +5945,62 @@
5655
5945
  }
5656
5946
  ]
5657
5947
  },
5948
+ "omitted_unary_get_operand": {
5949
+ "type": "ALIAS",
5950
+ "content": {
5951
+ "type": "SYMBOL",
5952
+ "name": "omitted_unary_get_input"
5953
+ },
5954
+ "named": true,
5955
+ "value": "unary_input_function"
5956
+ },
5957
+ "omitted_unary_get_input": {
5958
+ "type": "PREC_RIGHT",
5959
+ "value": 22,
5960
+ "content": {
5961
+ "type": "SEQ",
5962
+ "members": [
5963
+ {
5964
+ "type": "FIELD",
5965
+ "name": "source",
5966
+ "content": {
5967
+ "type": "SYMBOL",
5968
+ "name": "unary_expr"
5969
+ }
5970
+ },
5971
+ {
5972
+ "type": "ALIAS",
5973
+ "content": {
5974
+ "type": "SYMBOL",
5975
+ "name": "_pipe_operator"
5976
+ },
5977
+ "named": false,
5978
+ "value": "|"
5979
+ },
5980
+ {
5981
+ "type": "FIELD",
5982
+ "name": "get",
5983
+ "content": {
5984
+ "type": "ALIAS",
5985
+ "content": {
5986
+ "type": "SYMBOL",
5987
+ "name": "postfix_omitted_get"
5988
+ },
5989
+ "named": true,
5990
+ "value": "simple_get"
5991
+ }
5992
+ }
5993
+ ]
5994
+ }
5995
+ },
5996
+ "postfix_omitted_get": {
5997
+ "type": "PREC",
5998
+ "value": 1,
5999
+ "content": {
6000
+ "type": "SYMBOL",
6001
+ "name": "getline_keyword"
6002
+ }
6003
+ },
5658
6004
  "getline_keyword": {
5659
6005
  "type": "SYMBOL",
5660
6006
  "name": "_getline_word"
@@ -6328,11 +6674,16 @@
6328
6674
  "value": "escape_sequence"
6329
6675
  },
6330
6676
  "wildcard": {
6331
- "type": "IMMEDIATE_TOKEN",
6677
+ "type": "ALIAS",
6332
6678
  "content": {
6333
- "type": "STRING",
6334
- "value": "."
6335
- }
6679
+ "type": "IMMEDIATE_TOKEN",
6680
+ "content": {
6681
+ "type": "STRING",
6682
+ "value": "."
6683
+ }
6684
+ },
6685
+ "named": false,
6686
+ "value": "."
6336
6687
  },
6337
6688
  "left_anchor": {
6338
6689
  "type": "IMMEDIATE_TOKEN",
@@ -6404,11 +6755,16 @@
6404
6755
  }
6405
6756
  },
6406
6757
  "repetition_modifier": {
6407
- "type": "IMMEDIATE_TOKEN",
6758
+ "type": "ALIAS",
6408
6759
  "content": {
6409
- "type": "STRING",
6410
- "value": "?"
6411
- }
6760
+ "type": "IMMEDIATE_TOKEN",
6761
+ "content": {
6762
+ "type": "STRING",
6763
+ "value": "?"
6764
+ }
6765
+ },
6766
+ "named": false,
6767
+ "value": "?"
6412
6768
  },
6413
6769
  "_ere_interval": {
6414
6770
  "type": "SEQ",
@@ -7514,8 +7870,11 @@
7514
7870
  "name": "comment"
7515
7871
  },
7516
7872
  {
7517
- "type": "SYMBOL",
7518
- "name": "_continuation_marker"
7873
+ "type": "IMMEDIATE_TOKEN",
7874
+ "content": {
7875
+ "type": "STRING",
7876
+ "value": "\\"
7877
+ }
7519
7878
  },
7520
7879
  {
7521
7880
  "type": "SYMBOL",
@@ -7524,11 +7883,13 @@
7524
7883
  ],
7525
7884
  "conflicts": [
7526
7885
  [
7886
+ "postfix_omitted_get",
7527
7887
  "postfix_simple_get"
7528
7888
  ],
7529
7889
  [
7530
- "postfix_simple_get",
7531
- "nonpostfix_simple_get"
7890
+ "postfix_omitted_get",
7891
+ "nonpostfix_simple_get",
7892
+ "postfix_simple_get"
7532
7893
  ],
7533
7894
  [
7534
7895
  "item_list",
@@ -7834,13 +8195,20 @@
7834
8195
  "name": "comment"
7835
8196
  },
7836
8197
  {
7837
- "type": "SYMBOL",
7838
- "name": "_continuation_backslash"
8198
+ "type": "IMMEDIATE_TOKEN",
8199
+ "content": {
8200
+ "type": "STRING",
8201
+ "value": "\\"
8202
+ }
7839
8203
  },
7840
8204
  {
7841
8205
  "type": "SYMBOL",
7842
8206
  "name": "_continuation_newline"
7843
8207
  },
8208
+ {
8209
+ "type": "SYMBOL",
8210
+ "name": "_stray_backslash"
8211
+ },
7844
8212
  {
7845
8213
  "type": "SYMBOL",
7846
8214
  "name": "_error_sentinel"
@@ -7851,6 +8219,7 @@
7851
8219
  "_simple_get",
7852
8220
  "_direct_input_function",
7853
8221
  "_item",
8222
+ "_normal_conditional_tail",
7854
8223
  "_normal_non_unary_update_expr",
7855
8224
  "_print_non_unary_update_expr",
7856
8225
  "_field_non_unary_update_expr",
@@ -2605,7 +2605,8 @@
2605
2605
  },
2606
2606
  {
2607
2607
  "type": "\\",
2608
- "named": false
2608
+ "named": false,
2609
+ "extra": true
2609
2610
  },
2610
2611
  {
2611
2612
  "type": "]",