@felixtensor/tree-sitter-mlir 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/grammar.json CHANGED
@@ -103,6 +103,29 @@
103
103
  ]
104
104
  }
105
105
  },
106
+ "_unsigned_decimal_literal": {
107
+ "type": "TOKEN",
108
+ "content": {
109
+ "type": "REPEAT1",
110
+ "content": {
111
+ "type": "PATTERN",
112
+ "value": "[0-9]"
113
+ }
114
+ }
115
+ },
116
+ "_unsigned_integer_literal": {
117
+ "type": "CHOICE",
118
+ "members": [
119
+ {
120
+ "type": "SYMBOL",
121
+ "name": "_unsigned_decimal_literal"
122
+ },
123
+ {
124
+ "type": "SYMBOL",
125
+ "name": "_hexadecimal_literal"
126
+ }
127
+ ]
128
+ },
106
129
  "_hexadecimal_literal": {
107
130
  "type": "TOKEN",
108
131
  "content": {
@@ -1608,6 +1631,22 @@
1608
1631
  ]
1609
1632
  }
1610
1633
  },
1634
+ {
1635
+ "type": "REPEAT",
1636
+ "content": {
1637
+ "type": "FIELD",
1638
+ "name": "specifier",
1639
+ "content": {
1640
+ "type": "ALIAS",
1641
+ "content": {
1642
+ "type": "SYMBOL",
1643
+ "name": "bare_id"
1644
+ },
1645
+ "named": true,
1646
+ "value": "function_specifier"
1647
+ }
1648
+ }
1649
+ },
1611
1650
  {
1612
1651
  "type": "FIELD",
1613
1652
  "name": "sym_name",
@@ -2005,6 +2044,10 @@
2005
2044
  "type": "SYMBOL",
2006
2045
  "name": "region"
2007
2046
  },
2047
+ {
2048
+ "type": "SYMBOL",
2049
+ "name": "_custom_body_value_group"
2050
+ },
2008
2051
  {
2009
2052
  "type": "SYMBOL",
2010
2053
  "name": "_custom_body_paren"
@@ -2025,6 +2068,10 @@
2025
2068
  "type": "STRING",
2026
2069
  "value": "array"
2027
2070
  },
2071
+ {
2072
+ "type": "STRING",
2073
+ "value": "vector"
2074
+ },
2028
2075
  {
2029
2076
  "type": "STRING",
2030
2077
  "value": "ceildiv"
@@ -2061,6 +2108,14 @@
2061
2108
  "type": "STRING",
2062
2109
  "value": "*"
2063
2110
  },
2111
+ {
2112
+ "type": "STRING",
2113
+ "value": "?"
2114
+ },
2115
+ {
2116
+ "type": "SYMBOL",
2117
+ "name": "dimension_separator"
2118
+ },
2064
2119
  {
2065
2120
  "type": "STRING",
2066
2121
  "value": "+"
@@ -2127,6 +2182,55 @@
2127
2182
  }
2128
2183
  ]
2129
2184
  },
2185
+ "_custom_body_value_group": {
2186
+ "type": "SEQ",
2187
+ "members": [
2188
+ {
2189
+ "type": "STRING",
2190
+ "value": "{"
2191
+ },
2192
+ {
2193
+ "type": "SYMBOL",
2194
+ "name": "value_use"
2195
+ },
2196
+ {
2197
+ "type": "STRING",
2198
+ "value": ":"
2199
+ },
2200
+ {
2201
+ "type": "SYMBOL",
2202
+ "name": "type"
2203
+ },
2204
+ {
2205
+ "type": "REPEAT",
2206
+ "content": {
2207
+ "type": "SEQ",
2208
+ "members": [
2209
+ {
2210
+ "type": "STRING",
2211
+ "value": ","
2212
+ },
2213
+ {
2214
+ "type": "SYMBOL",
2215
+ "name": "value_use"
2216
+ },
2217
+ {
2218
+ "type": "STRING",
2219
+ "value": ":"
2220
+ },
2221
+ {
2222
+ "type": "SYMBOL",
2223
+ "name": "type"
2224
+ }
2225
+ ]
2226
+ }
2227
+ },
2228
+ {
2229
+ "type": "STRING",
2230
+ "value": "}"
2231
+ }
2232
+ ]
2233
+ },
2130
2234
  "_custom_body_angle_group": {
2131
2235
  "type": "SEQ",
2132
2236
  "members": [
@@ -2168,7 +2272,7 @@
2168
2272
  "name": "block_label"
2169
2273
  },
2170
2274
  {
2171
- "type": "REPEAT1",
2275
+ "type": "REPEAT",
2172
2276
  "content": {
2173
2277
  "type": "SYMBOL",
2174
2278
  "name": "operation"
@@ -2803,6 +2907,18 @@
2803
2907
  "type": "STRING",
2804
2908
  "value": "array"
2805
2909
  },
2910
+ {
2911
+ "type": "STRING",
2912
+ "value": "vector"
2913
+ },
2914
+ {
2915
+ "type": "STRING",
2916
+ "value": "tensor"
2917
+ },
2918
+ {
2919
+ "type": "STRING",
2920
+ "value": "opaque"
2921
+ },
2806
2922
  {
2807
2923
  "type": "SYMBOL",
2808
2924
  "name": "bare_id"
@@ -2851,6 +2967,10 @@
2851
2967
  "type": "STRING",
2852
2968
  "value": "*"
2853
2969
  },
2970
+ {
2971
+ "type": "STRING",
2972
+ "value": "?"
2973
+ },
2854
2974
  {
2855
2975
  "type": "STRING",
2856
2976
  "value": "@"
@@ -3036,6 +3156,14 @@
3036
3156
  "name": "type"
3037
3157
  }
3038
3158
  },
3159
+ {
3160
+ "type": "PREC",
3161
+ "value": 1,
3162
+ "content": {
3163
+ "type": "SYMBOL",
3164
+ "name": "_pretty_dialect_body_type"
3165
+ }
3166
+ },
3039
3167
  {
3040
3168
  "type": "ALIAS",
3041
3169
  "content": {
@@ -3055,6 +3183,28 @@
3055
3183
  }
3056
3184
  ]
3057
3185
  },
3186
+ "_pretty_dialect_body_type": {
3187
+ "type": "SEQ",
3188
+ "members": [
3189
+ {
3190
+ "type": "CHOICE",
3191
+ "members": [
3192
+ {
3193
+ "type": "SYMBOL",
3194
+ "name": "bare_id"
3195
+ },
3196
+ {
3197
+ "type": "STRING",
3198
+ "value": "array"
3199
+ }
3200
+ ]
3201
+ },
3202
+ {
3203
+ "type": "SYMBOL",
3204
+ "name": "pretty_dialect_item_body"
3205
+ }
3206
+ ]
3207
+ },
3058
3208
  "builtin_type": {
3059
3209
  "type": "CHOICE",
3060
3210
  "members": [
@@ -3503,35 +3653,39 @@
3503
3653
  "name": "attribute_value"
3504
3654
  },
3505
3655
  "vector_type": {
3506
- "type": "SEQ",
3507
- "members": [
3508
- {
3509
- "type": "TOKEN",
3510
- "content": {
3656
+ "type": "PREC",
3657
+ "value": 1,
3658
+ "content": {
3659
+ "type": "SEQ",
3660
+ "members": [
3661
+ {
3662
+ "type": "TOKEN",
3663
+ "content": {
3664
+ "type": "STRING",
3665
+ "value": "vector"
3666
+ }
3667
+ },
3668
+ {
3511
3669
  "type": "STRING",
3512
- "value": "vector"
3513
- }
3514
- },
3515
- {
3516
- "type": "STRING",
3517
- "value": "<"
3518
- },
3519
- {
3520
- "type": "REPEAT",
3521
- "content": {
3670
+ "value": "<"
3671
+ },
3672
+ {
3673
+ "type": "REPEAT",
3674
+ "content": {
3675
+ "type": "SYMBOL",
3676
+ "name": "vector_dim_list"
3677
+ }
3678
+ },
3679
+ {
3522
3680
  "type": "SYMBOL",
3523
- "name": "vector_dim_list"
3681
+ "name": "_prim_type"
3682
+ },
3683
+ {
3684
+ "type": "STRING",
3685
+ "value": ">"
3524
3686
  }
3525
- },
3526
- {
3527
- "type": "SYMBOL",
3528
- "name": "_prim_type"
3529
- },
3530
- {
3531
- "type": "STRING",
3532
- "value": ">"
3533
- }
3534
- ]
3687
+ ]
3688
+ }
3535
3689
  },
3536
3690
  "vector_dim_list": {
3537
3691
  "type": "PREC_LEFT",
@@ -3762,45 +3916,8 @@
3762
3916
  ]
3763
3917
  },
3764
3918
  {
3765
- "type": "SEQ",
3766
- "members": [
3767
- {
3768
- "type": "STRING",
3769
- "value": "["
3770
- },
3771
- {
3772
- "type": "CHOICE",
3773
- "members": [
3774
- {
3775
- "type": "SYMBOL",
3776
- "name": "_attribute_value_nobracket"
3777
- },
3778
- {
3779
- "type": "BLANK"
3780
- }
3781
- ]
3782
- },
3783
- {
3784
- "type": "REPEAT",
3785
- "content": {
3786
- "type": "SEQ",
3787
- "members": [
3788
- {
3789
- "type": "STRING",
3790
- "value": ","
3791
- },
3792
- {
3793
- "type": "SYMBOL",
3794
- "name": "_attribute_value_nobracket"
3795
- }
3796
- ]
3797
- }
3798
- },
3799
- {
3800
- "type": "STRING",
3801
- "value": "]"
3802
- }
3803
- ]
3919
+ "type": "SYMBOL",
3920
+ "name": "_attribute_array"
3804
3921
  }
3805
3922
  ]
3806
3923
  },
@@ -3808,46 +3925,63 @@
3808
3925
  "type": "CHOICE",
3809
3926
  "members": [
3810
3927
  {
3811
- "type": "SEQ",
3928
+ "type": "SYMBOL",
3929
+ "name": "_attribute_array"
3930
+ },
3931
+ {
3932
+ "type": "SYMBOL",
3933
+ "name": "_attribute_value_nobracket"
3934
+ }
3935
+ ]
3936
+ },
3937
+ "_attribute_array": {
3938
+ "type": "SEQ",
3939
+ "members": [
3940
+ {
3941
+ "type": "STRING",
3942
+ "value": "["
3943
+ },
3944
+ {
3945
+ "type": "CHOICE",
3812
3946
  "members": [
3813
3947
  {
3814
- "type": "STRING",
3815
- "value": "["
3816
- },
3817
- {
3818
- "type": "CHOICE",
3819
- "members": [
3820
- {
3821
- "type": "SYMBOL",
3822
- "name": "_attribute_value_nobracket"
3823
- },
3824
- {
3825
- "type": "BLANK"
3826
- }
3827
- ]
3828
- },
3829
- {
3830
- "type": "REPEAT",
3831
- "content": {
3832
- "type": "SEQ",
3833
- "members": [
3834
- {
3835
- "type": "STRING",
3836
- "value": ","
3837
- },
3838
- {
3839
- "type": "SYMBOL",
3840
- "name": "_attribute_value_nobracket"
3841
- }
3842
- ]
3843
- }
3948
+ "type": "SYMBOL",
3949
+ "name": "_attribute_array_element"
3844
3950
  },
3845
3951
  {
3846
- "type": "STRING",
3847
- "value": "]"
3952
+ "type": "BLANK"
3848
3953
  }
3849
3954
  ]
3850
3955
  },
3956
+ {
3957
+ "type": "REPEAT",
3958
+ "content": {
3959
+ "type": "SEQ",
3960
+ "members": [
3961
+ {
3962
+ "type": "STRING",
3963
+ "value": ","
3964
+ },
3965
+ {
3966
+ "type": "SYMBOL",
3967
+ "name": "_attribute_array_element"
3968
+ }
3969
+ ]
3970
+ }
3971
+ },
3972
+ {
3973
+ "type": "STRING",
3974
+ "value": "]"
3975
+ }
3976
+ ]
3977
+ },
3978
+ "_attribute_array_element": {
3979
+ "type": "CHOICE",
3980
+ "members": [
3981
+ {
3982
+ "type": "SYMBOL",
3983
+ "name": "_attribute_array"
3984
+ },
3851
3985
  {
3852
3986
  "type": "SYMBOL",
3853
3987
  "name": "_attribute_value_nobracket"
@@ -4032,6 +4166,10 @@
4032
4166
  {
4033
4167
  "type": "SYMBOL",
4034
4168
  "name": "dense_resource_literal"
4169
+ },
4170
+ {
4171
+ "type": "SYMBOL",
4172
+ "name": "distinct_attribute"
4035
4173
  }
4036
4174
  ]
4037
4175
  },
@@ -4068,6 +4206,55 @@
4068
4206
  }
4069
4207
  ]
4070
4208
  },
4209
+ "distinct_attribute": {
4210
+ "type": "SEQ",
4211
+ "members": [
4212
+ {
4213
+ "type": "TOKEN",
4214
+ "content": {
4215
+ "type": "STRING",
4216
+ "value": "distinct"
4217
+ }
4218
+ },
4219
+ {
4220
+ "type": "STRING",
4221
+ "value": "["
4222
+ },
4223
+ {
4224
+ "type": "ALIAS",
4225
+ "content": {
4226
+ "type": "SYMBOL",
4227
+ "name": "_unsigned_integer_literal"
4228
+ },
4229
+ "named": true,
4230
+ "value": "integer_literal"
4231
+ },
4232
+ {
4233
+ "type": "STRING",
4234
+ "value": "]"
4235
+ },
4236
+ {
4237
+ "type": "STRING",
4238
+ "value": "<"
4239
+ },
4240
+ {
4241
+ "type": "CHOICE",
4242
+ "members": [
4243
+ {
4244
+ "type": "SYMBOL",
4245
+ "name": "attribute_value"
4246
+ },
4247
+ {
4248
+ "type": "BLANK"
4249
+ }
4250
+ ]
4251
+ },
4252
+ {
4253
+ "type": "STRING",
4254
+ "value": ">"
4255
+ }
4256
+ ]
4257
+ },
4071
4258
  "strided_layout": {
4072
4259
  "type": "SEQ",
4073
4260
  "members": [
@@ -4728,32 +4915,20 @@
4728
4915
  "value": ","
4729
4916
  },
4730
4917
  {
4731
- "type": "SYMBOL",
4732
- "name": "_value_id_and_type_attr"
4918
+ "type": "CHOICE",
4919
+ "members": [
4920
+ {
4921
+ "type": "SYMBOL",
4922
+ "name": "_value_id_and_type_attr"
4923
+ },
4924
+ {
4925
+ "type": "SYMBOL",
4926
+ "name": "variadic"
4927
+ }
4928
+ ]
4733
4929
  }
4734
4930
  ]
4735
4931
  }
4736
- },
4737
- {
4738
- "type": "CHOICE",
4739
- "members": [
4740
- {
4741
- "type": "SEQ",
4742
- "members": [
4743
- {
4744
- "type": "STRING",
4745
- "value": ","
4746
- },
4747
- {
4748
- "type": "SYMBOL",
4749
- "name": "variadic"
4750
- }
4751
- ]
4752
- },
4753
- {
4754
- "type": "BLANK"
4755
- }
4756
- ]
4757
4932
  }
4758
4933
  ]
4759
4934
  },
@@ -378,6 +378,10 @@
378
378
  "type": "dense_resource_literal",
379
379
  "named": true
380
380
  },
381
+ {
382
+ "type": "distinct_attribute",
383
+ "named": true
384
+ },
381
385
  {
382
386
  "type": "strided_layout",
383
387
  "named": true
@@ -598,6 +602,10 @@
598
602
  "type": "bool_literal",
599
603
  "named": true
600
604
  },
605
+ {
606
+ "type": "dimension_separator",
607
+ "named": true
608
+ },
601
609
  {
602
610
  "type": "float_literal",
603
611
  "named": true
@@ -707,6 +715,10 @@
707
715
  "multiple": true,
708
716
  "required": true,
709
717
  "types": [
718
+ {
719
+ "type": "bare_id",
720
+ "named": true
721
+ },
710
722
  {
711
723
  "type": "dimension_separator",
712
724
  "named": true
@@ -715,6 +727,10 @@
715
727
  "type": "dimension_size",
716
728
  "named": true
717
729
  },
730
+ {
731
+ "type": "pretty_dialect_item_body",
732
+ "named": true
733
+ },
718
734
  {
719
735
  "type": "type",
720
736
  "named": true
@@ -789,6 +805,25 @@
789
805
  "named": true,
790
806
  "fields": {}
791
807
  },
808
+ {
809
+ "type": "distinct_attribute",
810
+ "named": true,
811
+ "fields": {},
812
+ "children": {
813
+ "multiple": true,
814
+ "required": true,
815
+ "types": [
816
+ {
817
+ "type": "attribute_value",
818
+ "named": true
819
+ },
820
+ {
821
+ "type": "integer_literal",
822
+ "named": true
823
+ }
824
+ ]
825
+ }
826
+ },
792
827
  {
793
828
  "type": "entry_block",
794
829
  "named": true,
@@ -972,6 +1007,16 @@
972
1007
  }
973
1008
  ]
974
1009
  },
1010
+ "specifier": {
1011
+ "multiple": true,
1012
+ "required": false,
1013
+ "types": [
1014
+ {
1015
+ "type": "function_specifier",
1016
+ "named": true
1017
+ }
1018
+ ]
1019
+ },
975
1020
  "sym_name": {
976
1021
  "multiple": false,
977
1022
  "required": true,
@@ -2113,6 +2158,10 @@
2113
2158
  "type": "dimension_separator",
2114
2159
  "named": true
2115
2160
  },
2161
+ {
2162
+ "type": "distinct",
2163
+ "named": false
2164
+ },
2116
2165
  {
2117
2166
  "type": "escape_sequence",
2118
2167
  "named": true
@@ -2133,6 +2182,10 @@
2133
2182
  "type": "func.func",
2134
2183
  "named": false
2135
2184
  },
2185
+ {
2186
+ "type": "function_specifier",
2187
+ "named": true
2188
+ },
2136
2189
  {
2137
2190
  "type": "fused",
2138
2191
  "named": false