zclsyntax: create comma tokens in the scanner

This commit is contained in:
Martin Atkins 2017-06-04 14:22:27 -07:00
parent cd85a1f0a6
commit 4488df0cd8
2 changed files with 176 additions and 176 deletions

View File

@ -152,17 +152,17 @@ var _zcltok_key_offsets []int16 = []int16{
5910, 5915, 5919, 5921, 5928, 5932, 5940, 5944,
5945, 5947, 5949, 5951, 5953, 5955, 5956, 5957,
5959, 5961, 5963, 5964, 5965, 5966, 5967, 5969,
5971, 5973, 5974, 5975, 6049, 6050, 6051, 6052,
6053, 6054, 6055, 6057, 6058, 6063, 6065, 6066,
6109, 6110, 6111, 6113, 6118, 6122, 6122, 6124,
6126, 6137, 6147, 6155, 6156, 6158, 6159, 6163,
6167, 6177, 6181, 6188, 6199, 6206, 6210, 6216,
6227, 6259, 6308, 6323, 6338, 6343, 6345, 6350,
6382, 6390, 6392, 6414, 6436, 6438, 6454, 6470,
6485, 6494, 6508, 6522, 6538, 6539, 6540, 6541,
6542, 6544, 6546, 6548, 6562, 6576, 6577, 6578,
6580, 6582, 6584, 6598, 6612, 6613, 6614, 6616,
6618,
5971, 5973, 5974, 5975, 6048, 6049, 6050, 6051,
6052, 6053, 6054, 6056, 6057, 6062, 6064, 6065,
6108, 6109, 6110, 6112, 6117, 6121, 6121, 6123,
6125, 6136, 6146, 6154, 6155, 6157, 6158, 6162,
6166, 6176, 6180, 6187, 6198, 6205, 6209, 6215,
6226, 6258, 6307, 6322, 6337, 6342, 6344, 6349,
6381, 6389, 6391, 6413, 6435, 6437, 6453, 6469,
6484, 6493, 6507, 6521, 6537, 6538, 6539, 6540,
6541, 6543, 6545, 6547, 6561, 6575, 6576, 6577,
6579, 6581, 6583, 6597, 6611, 6612, 6613, 6615,
6617,
}
var _zcltok_trans_keys []byte = []byte{
@ -913,87 +913,87 @@ var _zcltok_trans_keys []byte = []byte{
191, 128, 191, 10, 123, 128, 191, 128,
191, 128, 191, 123, 123, 10, 123, 128,
191, 128, 191, 128, 191, 123, 123, 9,
10, 13, 32, 33, 34, 35, 38, 44,
47, 60, 62, 64, 92, 95, 123, 124,
125, 126, 127, 194, 195, 198, 199, 203,
204, 205, 206, 207, 210, 212, 213, 214,
215, 216, 217, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 233, 234, 237,
238, 239, 240, 0, 39, 40, 46, 48,
57, 58, 63, 65, 90, 91, 96, 97,
122, 192, 193, 196, 218, 229, 236, 241,
247, 9, 10, 32, 61, 10, 38, 42,
47, 42, 46, 69, 101, 48, 57, 60,
61, 61, 95, 194, 195, 198, 199, 203,
204, 205, 206, 207, 210, 212, 213, 214,
215, 216, 217, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 233, 234, 237,
239, 240, 243, 48, 57, 65, 90, 97,
122, 196, 218, 229, 236, 124, 125, 128,
191, 170, 181, 186, 128, 191, 151, 183,
128, 255, 192, 255, 0, 127, 173, 130,
133, 146, 159, 165, 171, 175, 191, 192,
255, 181, 190, 128, 175, 176, 183, 184,
185, 186, 191, 134, 139, 141, 162, 128,
135, 136, 255, 182, 130, 137, 176, 151,
152, 154, 160, 136, 191, 192, 255, 128,
143, 144, 170, 171, 175, 176, 178, 179,
191, 128, 159, 160, 191, 176, 128, 138,
139, 173, 174, 255, 148, 150, 164, 167,
173, 176, 185, 189, 190, 192, 255, 144,
128, 145, 146, 175, 176, 191, 128, 140,
141, 255, 166, 176, 178, 191, 192, 255,
186, 128, 137, 138, 170, 171, 179, 180,
181, 182, 191, 160, 161, 162, 164, 165,
166, 167, 168, 169, 170, 171, 172, 173,
174, 175, 176, 177, 178, 179, 180, 181,
182, 183, 184, 185, 186, 187, 188, 189,
190, 128, 191, 128, 129, 130, 131, 137,
138, 139, 140, 141, 142, 143, 144, 153,
154, 155, 156, 157, 158, 159, 160, 161,
162, 163, 164, 165, 166, 167, 168, 169,
170, 171, 172, 173, 174, 175, 176, 177,
178, 179, 180, 182, 183, 184, 188, 189,
190, 191, 132, 187, 129, 130, 132, 133,
134, 176, 177, 178, 179, 180, 181, 182,
183, 128, 191, 128, 129, 130, 131, 132,
133, 134, 135, 144, 136, 143, 145, 191,
192, 255, 182, 183, 184, 128, 191, 128,
191, 191, 128, 190, 192, 255, 128, 146,
147, 148, 152, 153, 154, 155, 156, 158,
159, 160, 161, 162, 163, 164, 165, 166,
10, 13, 32, 33, 34, 35, 38, 47,
60, 62, 64, 92, 95, 123, 124, 125,
126, 127, 194, 195, 198, 199, 203, 204,
205, 206, 207, 210, 212, 213, 214, 215,
216, 217, 219, 220, 221, 222, 223, 224,
225, 226, 227, 228, 233, 234, 237, 238,
239, 240, 0, 39, 40, 46, 48, 57,
58, 63, 65, 90, 91, 96, 97, 122,
192, 193, 196, 218, 229, 236, 241, 247,
9, 10, 32, 61, 10, 38, 42, 47,
42, 46, 69, 101, 48, 57, 60, 61,
61, 95, 194, 195, 198, 199, 203, 204,
205, 206, 207, 210, 212, 213, 214, 215,
216, 217, 219, 220, 221, 222, 223, 224,
225, 226, 227, 228, 233, 234, 237, 239,
240, 243, 48, 57, 65, 90, 97, 122,
196, 218, 229, 236, 124, 125, 128, 191,
170, 181, 186, 128, 191, 151, 183, 128,
255, 192, 255, 0, 127, 173, 130, 133,
146, 159, 165, 171, 175, 191, 192, 255,
181, 190, 128, 175, 176, 183, 184, 185,
186, 191, 134, 139, 141, 162, 128, 135,
136, 255, 182, 130, 137, 176, 151, 152,
154, 160, 136, 191, 192, 255, 128, 143,
144, 170, 171, 175, 176, 178, 179, 191,
128, 159, 160, 191, 176, 128, 138, 139,
173, 174, 255, 148, 150, 164, 167, 173,
176, 185, 189, 190, 192, 255, 144, 128,
145, 146, 175, 176, 191, 128, 140, 141,
255, 166, 176, 178, 191, 192, 255, 186,
128, 137, 138, 170, 171, 179, 180, 181,
182, 191, 160, 161, 162, 164, 165, 166,
167, 168, 169, 170, 171, 172, 173, 174,
175, 176, 129, 191, 192, 255, 158, 159,
128, 157, 160, 191, 192, 255, 128, 191,
164, 169, 171, 172, 173, 174, 175, 180,
181, 182, 183, 184, 185, 187, 188, 189,
190, 191, 128, 163, 165, 186, 144, 145,
146, 147, 148, 150, 151, 152, 155, 157,
158, 160, 170, 171, 172, 175, 128, 159,
161, 169, 173, 191, 128, 191, 10, 13,
33, 34, 36, 92, 128, 191, 192, 223,
224, 239, 240, 247, 248, 255, 10, 13,
33, 34, 36, 92, 128, 191, 192, 223,
224, 239, 240, 247, 248, 255, 10, 13,
33, 36, 92, 128, 191, 192, 223, 224,
239, 240, 247, 248, 255, 33, 36, 92,
192, 223, 224, 239, 240, 247, 10, 13,
33, 34, 36, 92, 192, 223, 224, 239,
240, 247, 248, 255, 10, 13, 33, 34,
36, 92, 128, 223, 224, 239, 240, 247,
248, 255, 10, 13, 33, 34, 36, 92,
128, 191, 192, 223, 224, 239, 240, 247,
248, 255, 123, 126, 123, 126, 128, 191,
128, 191, 128, 191, 10, 13, 33, 36,
128, 191, 192, 223, 224, 239, 240, 247,
248, 255, 10, 13, 33, 36, 128, 191,
192, 223, 224, 239, 240, 247, 248, 255,
126, 126, 128, 191, 128, 191, 128, 191,
10, 13, 33, 36, 128, 191, 192, 223,
224, 239, 240, 247, 248, 255, 10, 13,
33, 36, 128, 191, 192, 223, 224, 239,
240, 247, 248, 255, 126, 126, 128, 191,
128, 191, 128, 191,
175, 176, 177, 178, 179, 180, 181, 182,
183, 184, 185, 186, 187, 188, 189, 190,
128, 191, 128, 129, 130, 131, 137, 138,
139, 140, 141, 142, 143, 144, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162,
163, 164, 165, 166, 167, 168, 169, 170,
171, 172, 173, 174, 175, 176, 177, 178,
179, 180, 182, 183, 184, 188, 189, 190,
191, 132, 187, 129, 130, 132, 133, 134,
176, 177, 178, 179, 180, 181, 182, 183,
128, 191, 128, 129, 130, 131, 132, 133,
134, 135, 144, 136, 143, 145, 191, 192,
255, 182, 183, 184, 128, 191, 128, 191,
191, 128, 190, 192, 255, 128, 146, 147,
148, 152, 153, 154, 155, 156, 158, 159,
160, 161, 162, 163, 164, 165, 166, 167,
168, 169, 170, 171, 172, 173, 174, 175,
176, 129, 191, 192, 255, 158, 159, 128,
157, 160, 191, 192, 255, 128, 191, 164,
169, 171, 172, 173, 174, 175, 180, 181,
182, 183, 184, 185, 187, 188, 189, 190,
191, 128, 163, 165, 186, 144, 145, 146,
147, 148, 150, 151, 152, 155, 157, 158,
160, 170, 171, 172, 175, 128, 159, 161,
169, 173, 191, 128, 191, 10, 13, 33,
34, 36, 92, 128, 191, 192, 223, 224,
239, 240, 247, 248, 255, 10, 13, 33,
34, 36, 92, 128, 191, 192, 223, 224,
239, 240, 247, 248, 255, 10, 13, 33,
36, 92, 128, 191, 192, 223, 224, 239,
240, 247, 248, 255, 33, 36, 92, 192,
223, 224, 239, 240, 247, 10, 13, 33,
34, 36, 92, 192, 223, 224, 239, 240,
247, 248, 255, 10, 13, 33, 34, 36,
92, 128, 223, 224, 239, 240, 247, 248,
255, 10, 13, 33, 34, 36, 92, 128,
191, 192, 223, 224, 239, 240, 247, 248,
255, 123, 126, 123, 126, 128, 191, 128,
191, 128, 191, 10, 13, 33, 36, 128,
191, 192, 223, 224, 239, 240, 247, 248,
255, 10, 13, 33, 36, 128, 191, 192,
223, 224, 239, 240, 247, 248, 255, 126,
126, 128, 191, 128, 191, 128, 191, 10,
13, 33, 36, 128, 191, 192, 223, 224,
239, 240, 247, 248, 255, 10, 13, 33,
36, 128, 191, 192, 223, 224, 239, 240,
247, 248, 255, 126, 126, 128, 191, 128,
191, 128, 191,
}
var _zcltok_single_lengths []byte = []byte{
@ -1115,7 +1115,7 @@ var _zcltok_single_lengths []byte = []byte{
3, 0, 0, 1, 0, 2, 0, 1,
0, 0, 0, 0, 0, 1, 1, 0,
0, 0, 1, 1, 1, 1, 0, 0,
0, 1, 1, 52, 1, 1, 1, 1,
0, 1, 1, 51, 1, 1, 1, 1,
1, 1, 2, 1, 3, 2, 1, 33,
1, 1, 0, 3, 2, 0, 0, 0,
1, 2, 4, 1, 0, 1, 0, 0,
@ -1379,17 +1379,17 @@ var _zcltok_index_offsets []int16 = []int16{
4691, 4696, 4699, 4701, 4706, 4709, 4715, 4718,
4720, 4722, 4724, 4726, 4728, 4730, 4732, 4734,
4736, 4738, 4740, 4742, 4744, 4746, 4748, 4750,
4752, 4754, 4756, 4758, 4822, 4824, 4826, 4828,
4830, 4832, 4834, 4837, 4839, 4844, 4847, 4849,
4888, 4890, 4892, 4894, 4899, 4903, 4904, 4906,
4908, 4915, 4922, 4929, 4931, 4933, 4935, 4938,
4941, 4947, 4950, 4955, 4962, 4967, 4970, 4974,
4981, 5013, 5062, 5077, 5090, 5095, 5097, 5101,
5132, 5138, 5140, 5161, 5181, 5183, 5195, 5207,
5218, 5225, 5236, 5247, 5259, 5261, 5263, 5265,
5267, 5269, 5271, 5273, 5283, 5293, 5295, 5297,
5299, 5301, 5303, 5313, 5323, 5325, 5327, 5329,
5331,
4752, 4754, 4756, 4758, 4821, 4823, 4825, 4827,
4829, 4831, 4833, 4836, 4838, 4843, 4846, 4848,
4887, 4889, 4891, 4893, 4898, 4902, 4903, 4905,
4907, 4914, 4921, 4928, 4930, 4932, 4934, 4937,
4940, 4946, 4949, 4954, 4961, 4966, 4969, 4973,
4980, 5012, 5061, 5076, 5089, 5094, 5096, 5100,
5131, 5137, 5139, 5160, 5180, 5182, 5194, 5206,
5217, 5224, 5235, 5246, 5258, 5260, 5262, 5264,
5266, 5268, 5270, 5272, 5282, 5292, 5294, 5296,
5298, 5300, 5302, 5312, 5322, 5324, 5326, 5328,
5330,
}
var _zcltok_indicies []int16 = []int16{
@ -1988,78 +1988,78 @@ var _zcltok_indicies []int16 = []int16{
775, 771, 776, 773, 777, 774, 778, 774,
780, 779, 781, 782, 782, 779, 783, 779,
784, 781, 785, 782, 786, 782, 787, 788,
789, 790, 791, 792, 793, 794, 669, 796,
797, 798, 669, 669, 669, 799, 800, 801,
802, 669, 805, 806, 808, 809, 810, 804,
811, 812, 813, 814, 815, 816, 817, 818,
819, 820, 821, 822, 823, 824, 825, 826,
827, 828, 829, 830, 832, 833, 834, 835,
836, 837, 669, 795, 8, 795, 419, 795,
419, 804, 807, 831, 838, 803, 787, 839,
788, 840, 790, 841, 843, 842, 2, 1,
844, 842, 3, 1, 842, 4, 3, 8,
847, 847, 8, 846, 848, 849, 842, 850,
842, 419, 852, 853, 488, 469, 854, 469,
855, 856, 857, 858, 859, 860, 861, 862,
863, 864, 865, 543, 866, 519, 867, 868,
869, 870, 871, 872, 873, 874, 875, 876,
877, 878, 419, 419, 419, 424, 564, 851,
879, 842, 880, 842, 669, 881, 419, 419,
419, 669, 881, 669, 669, 419, 881, 419,
881, 419, 881, 419, 669, 669, 669, 669,
669, 881, 419, 669, 669, 669, 419, 669,
419, 881, 419, 669, 669, 669, 669, 419,
881, 669, 419, 669, 419, 669, 419, 669,
669, 419, 669, 881, 419, 669, 419, 669,
419, 669, 881, 669, 419, 881, 669, 419,
669, 419, 881, 669, 669, 669, 669, 669,
881, 419, 419, 669, 419, 669, 881, 669,
419, 881, 669, 669, 881, 419, 419, 669,
419, 669, 419, 669, 881, 882, 883, 884,
885, 886, 887, 888, 889, 890, 891, 892,
714, 893, 894, 895, 896, 897, 898, 899,
900, 901, 902, 903, 904, 903, 905, 906,
907, 908, 909, 670, 881, 910, 911, 912,
913, 914, 915, 916, 917, 918, 919, 920,
921, 922, 923, 924, 925, 926, 927, 928,
724, 929, 930, 931, 691, 932, 933, 934,
935, 936, 937, 670, 938, 939, 940, 941,
942, 943, 944, 945, 673, 946, 670, 673,
947, 948, 949, 950, 682, 881, 951, 952,
953, 954, 702, 955, 956, 682, 957, 958,
959, 960, 961, 670, 881, 962, 921, 963,
964, 965, 682, 966, 967, 673, 670, 682,
424, 881, 931, 670, 673, 682, 424, 682,
424, 968, 682, 881, 424, 673, 969, 970,
673, 971, 972, 680, 973, 974, 975, 976,
977, 927, 978, 979, 980, 981, 982, 983,
984, 985, 986, 987, 988, 989, 946, 990,
673, 682, 424, 881, 991, 992, 682, 670,
881, 424, 670, 881, 673, 993, 730, 994,
995, 996, 997, 998, 999, 1000, 1001, 670,
1002, 1003, 1004, 1005, 1006, 1007, 670, 682,
881, 1009, 1010, 1011, 1012, 1013, 1014, 1015,
1016, 1017, 1018, 1019, 1015, 1021, 1022, 1023,
1024, 1008, 1020, 1008, 881, 1008, 881, 1025,
1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032,
1033, 1030, 766, 1034, 1034, 1035, 1034, 1035,
1029, 1034, 767, 768, 1036, 1034, 766, 1034,
1034, 1037, 1037, 1029, 1034, 767, 768, 1036,
1034, 766, 1037, 1037, 1029, 1038, 1039, 1040,
766, 1034, 1034, 1035, 1034, 1035, 1029, 767,
768, 1036, 1034, 766, 1034, 1034, 1035, 1034,
1035, 1029, 767, 768, 1036, 1034, 766, 1034,
1034, 1035, 1034, 1035, 1029, 768, 767, 768,
1036, 1034, 766, 1042, 766, 1044, 1043, 1045,
766, 1047, 1046, 766, 1048, 770, 1048, 1049,
1048, 772, 1050, 1051, 1052, 1053, 1054, 1055,
1056, 1053, 774, 772, 1050, 1058, 1058, 1057,
775, 776, 1059, 1057, 774, 1061, 1060, 1063,
1062, 774, 1064, 775, 1064, 776, 1064, 780,
1065, 1066, 1067, 1068, 1069, 1070, 1071, 1068,
782, 780, 1065, 1073, 1073, 1072, 783, 784,
1074, 1072, 782, 1076, 1075, 1078, 1077, 782,
1079, 783, 1079, 784, 1079,
789, 790, 791, 792, 793, 794, 796, 797,
798, 669, 669, 669, 799, 800, 801, 802,
669, 805, 806, 808, 809, 810, 804, 811,
812, 813, 814, 815, 816, 817, 818, 819,
820, 821, 822, 823, 824, 825, 826, 827,
828, 829, 830, 832, 833, 834, 835, 836,
837, 669, 795, 8, 795, 419, 795, 419,
804, 807, 831, 838, 803, 787, 839, 788,
840, 790, 841, 843, 842, 2, 1, 844,
842, 3, 1, 842, 4, 3, 8, 847,
847, 8, 846, 848, 849, 842, 850, 842,
419, 852, 853, 488, 469, 854, 469, 855,
856, 857, 858, 859, 860, 861, 862, 863,
864, 865, 543, 866, 519, 867, 868, 869,
870, 871, 872, 873, 874, 875, 876, 877,
878, 419, 419, 419, 424, 564, 851, 879,
842, 880, 842, 669, 881, 419, 419, 419,
669, 881, 669, 669, 419, 881, 419, 881,
419, 881, 419, 669, 669, 669, 669, 669,
881, 419, 669, 669, 669, 419, 669, 419,
881, 419, 669, 669, 669, 669, 419, 881,
669, 419, 669, 419, 669, 419, 669, 669,
419, 669, 881, 419, 669, 419, 669, 419,
669, 881, 669, 419, 881, 669, 419, 669,
419, 881, 669, 669, 669, 669, 669, 881,
419, 419, 669, 419, 669, 881, 669, 419,
881, 669, 669, 881, 419, 419, 669, 419,
669, 419, 669, 881, 882, 883, 884, 885,
886, 887, 888, 889, 890, 891, 892, 714,
893, 894, 895, 896, 897, 898, 899, 900,
901, 902, 903, 904, 903, 905, 906, 907,
908, 909, 670, 881, 910, 911, 912, 913,
914, 915, 916, 917, 918, 919, 920, 921,
922, 923, 924, 925, 926, 927, 928, 724,
929, 930, 931, 691, 932, 933, 934, 935,
936, 937, 670, 938, 939, 940, 941, 942,
943, 944, 945, 673, 946, 670, 673, 947,
948, 949, 950, 682, 881, 951, 952, 953,
954, 702, 955, 956, 682, 957, 958, 959,
960, 961, 670, 881, 962, 921, 963, 964,
965, 682, 966, 967, 673, 670, 682, 424,
881, 931, 670, 673, 682, 424, 682, 424,
968, 682, 881, 424, 673, 969, 970, 673,
971, 972, 680, 973, 974, 975, 976, 977,
927, 978, 979, 980, 981, 982, 983, 984,
985, 986, 987, 988, 989, 946, 990, 673,
682, 424, 881, 991, 992, 682, 670, 881,
424, 670, 881, 673, 993, 730, 994, 995,
996, 997, 998, 999, 1000, 1001, 670, 1002,
1003, 1004, 1005, 1006, 1007, 670, 682, 881,
1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016,
1017, 1018, 1019, 1015, 1021, 1022, 1023, 1024,
1008, 1020, 1008, 881, 1008, 881, 1025, 1025,
1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033,
1030, 766, 1034, 1034, 1035, 1034, 1035, 1029,
1034, 767, 768, 1036, 1034, 766, 1034, 1034,
1037, 1037, 1029, 1034, 767, 768, 1036, 1034,
766, 1037, 1037, 1029, 1038, 1039, 1040, 766,
1034, 1034, 1035, 1034, 1035, 1029, 767, 768,
1036, 1034, 766, 1034, 1034, 1035, 1034, 1035,
1029, 767, 768, 1036, 1034, 766, 1034, 1034,
1035, 1034, 1035, 1029, 768, 767, 768, 1036,
1034, 766, 1042, 766, 1044, 1043, 1045, 766,
1047, 1046, 766, 1048, 770, 1048, 1049, 1048,
772, 1050, 1051, 1052, 1053, 1054, 1055, 1056,
1053, 774, 772, 1050, 1058, 1058, 1057, 775,
776, 1059, 1057, 774, 1061, 1060, 1063, 1062,
774, 1064, 775, 1064, 776, 1064, 780, 1065,
1066, 1067, 1068, 1069, 1070, 1071, 1068, 782,
780, 1065, 1073, 1073, 1072, 783, 784, 1074,
1072, 782, 1076, 1075, 1078, 1077, 782, 1079,
783, 1079, 784, 1079,
}
var _zcltok_trans_targs []int16 = []int16{

View File

@ -37,7 +37,7 @@ func scanTokens(data []byte, filename string, start zcl.Pos, mode scanMode) []To
Ident = ID_Start ID_Continue*;
# Symbols that just represent themselves are handled as a single rule.
SelfToken = "[" | "]" | "(" | ")" | "." | "*" | "/" | "+" | "-" | "=" | "<" | ">" | "!" | "?" | ":" | "\n" | "&" | "|" | "~" | "^" | ";" | "`";
SelfToken = "[" | "]" | "(" | ")" | "." | "," | "*" | "/" | "+" | "-" | "=" | "<" | ">" | "!" | "?" | ":" | "\n" | "&" | "|" | "~" | "^" | ";" | "`";
NotEqual = "!=";
GreaterThanEqual = ">=";