1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
|
From e91045469d59c35607faa344bcfba2b2c566da51 Mon Sep 17 00:00:00 2001
From: Christian Kamm <christian.d.kamm@nokia.com>
Date: Mon, 6 Aug 2012 11:29:55 +0200
Subject: [PATCH] GLSL: Fix recovery token order to avoid infinite loop.
The case 'a = b ? ;' recovered with T_NUMBER, T_COMMA, T_NUMBER, ...
Task-number: QTCREATORBUG-7517
Change-Id: I3546266b21d11ce08e4af1331be94a78d3b24c19
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
---
src/libs/glsl/glsl.g | 4 +-
src/libs/glsl/glslparser.cpp | 638 +++++++++++++++++++++---------------------
src/libs/glsl/glslparser.h | 2 +-
3 files changed, 322 insertions(+), 322 deletions(-)
diff --git a/src/libs/glsl/glsl.g b/src/libs/glsl/glsl.g
index 67f564c..3c6ae7c 100644
--- a/src/libs/glsl/glsl.g
+++ b/src/libs/glsl/glsl.g
@@ -456,7 +456,7 @@ private:
#include <iostream>
#include <cstdio>
#include <cassert>
-#include <QtCore/QDebug>
+#include <QDebug>
using namespace GLSL;
@@ -591,7 +591,7 @@ AST *Parser::parse(int startToken)
static int tks[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
- T_SEMICOLON, T_COMMA, T_COLON,
+ T_SEMICOLON, T_COLON, T_COMMA,
T_NUMBER, T_TYPE_NAME, T_IDENTIFIER,
T_LEFT_BRACE, T_LEFT_PAREN, T_LEFT_BRACKET,
T_WHILE,
diff --git a/src/libs/glsl/glslparser.cpp b/src/libs/glsl/glslparser.cpp
index cf4bbe4..d82096b 100644
--- a/src/libs/glsl/glslparser.cpp
+++ b/src/libs/glsl/glslparser.cpp
@@ -1,5 +1,5 @@
-#line 427 "./glsl.g"
+#line 423 "./glsl.g"
/**************************************************************************
**
@@ -171,7 +171,7 @@ AST *Parser::parse(int startToken)
static int tks[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
- T_SEMICOLON, T_COMMA, T_COLON,
+ T_SEMICOLON, T_COLON, T_COMMA,
T_NUMBER, T_TYPE_NAME, T_IDENTIFIER,
T_LEFT_BRACE, T_LEFT_PAREN, T_LEFT_BRACKET,
T_WHILE,
@@ -215,137 +215,137 @@ AST *Parser::parse(int startToken)
return 0;
}
-#line 647 "./glsl.g"
+#line 641 "./glsl.g"
void Parser::reduce(int ruleno)
{
switch(ruleno) {
-#line 656 "./glsl.g"
+#line 650 "./glsl.g"
case 0: {
ast(1) = makeAstNode<IdentifierExpressionAST>(string(1));
} break;
-#line 663 "./glsl.g"
+#line 657 "./glsl.g"
case 1: {
ast(1) = makeAstNode<LiteralExpressionAST>(string(1));
} break;
-#line 670 "./glsl.g"
+#line 664 "./glsl.g"
case 2: {
ast(1) = makeAstNode<LiteralExpressionAST>(_engine->identifier("true", 4));
} break;
-#line 677 "./glsl.g"
+#line 671 "./glsl.g"
case 3: {
ast(1) = makeAstNode<LiteralExpressionAST>(_engine->identifier("false", 5));
} break;
-#line 684 "./glsl.g"
+#line 678 "./glsl.g"
case 4: {
// nothing to do.
} break;
-#line 691 "./glsl.g"
+#line 685 "./glsl.g"
case 5: {
ast(1) = ast(2);
} break;
-#line 698 "./glsl.g"
+#line 692 "./glsl.g"
case 6: {
// nothing to do.
} break;
-#line 705 "./glsl.g"
+#line 699 "./glsl.g"
case 7: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_ArrayAccess, expression(1), expression(3));
} break;
-#line 712 "./glsl.g"
+#line 706 "./glsl.g"
case 8: {
// nothing to do.
} break;
-#line 719 "./glsl.g"
+#line 713 "./glsl.g"
case 9: {
ast(1) = makeAstNode<MemberAccessExpressionAST>(expression(1), string(3));
} break;
-#line 726 "./glsl.g"
+#line 720 "./glsl.g"
case 10: {
ast(1) = makeAstNode<UnaryExpressionAST>(AST::Kind_PostIncrement, expression(1));
} break;
-#line 733 "./glsl.g"
+#line 727 "./glsl.g"
case 11: {
ast(1) = makeAstNode<UnaryExpressionAST>(AST::Kind_PostDecrement, expression(1));
} break;
-#line 740 "./glsl.g"
+#line 734 "./glsl.g"
case 12: {
// nothing to do.
} break;
-#line 747 "./glsl.g"
+#line 741 "./glsl.g"
case 13: {
// nothing to do.
} break;
-#line 754 "./glsl.g"
+#line 748 "./glsl.g"
case 14: {
ast(1) = makeAstNode<FunctionCallExpressionAST>
(sym(1).function.id, sym(1).function.arguments);
} break;
-#line 762 "./glsl.g"
+#line 756 "./glsl.g"
case 15: {
ast(1) = makeAstNode<FunctionCallExpressionAST>
(expression(1), sym(3).function.id, sym(3).function.arguments);
} break;
-#line 770 "./glsl.g"
+#line 764 "./glsl.g"
case 16: {
// nothing to do.
} break;
-#line 777 "./glsl.g"
+#line 771 "./glsl.g"
case 17: {
// nothing to do.
} break;
-#line 784 "./glsl.g"
+#line 778 "./glsl.g"
case 18: {
sym(1).function.id = sym(1).function_identifier;
sym(1).function.arguments = 0;
} break;
-#line 792 "./glsl.g"
+#line 786 "./glsl.g"
case 19: {
sym(1).function.id = sym(1).function_identifier;
sym(1).function.arguments = 0;
} break;
-#line 800 "./glsl.g"
+#line 794 "./glsl.g"
case 20: {
sym(1).function.id = sym(1).function_identifier;
@@ -353,7 +353,7 @@ case 20: {
makeAstNode< List<ExpressionAST *> >(expression(2));
} break;
-#line 809 "./glsl.g"
+#line 803 "./glsl.g"
case 21: {
sym(1).function.arguments =
@@ -361,379 +361,379 @@ case 21: {
(sym(1).function.arguments, expression(3));
} break;
-#line 818 "./glsl.g"
+#line 812 "./glsl.g"
case 22: {
// nothing to do.
} break;
-#line 825 "./glsl.g"
+#line 819 "./glsl.g"
case 23: {
ast(1) = makeAstNode<FunctionIdentifierAST>(type(1));
} break;
-#line 832 "./glsl.g"
+#line 826 "./glsl.g"
case 24: {
ast(1) = makeAstNode<FunctionIdentifierAST>(string(1));
} break;
-#line 839 "./glsl.g"
+#line 833 "./glsl.g"
case 25: {
// nothing to do.
} break;
-#line 846 "./glsl.g"
+#line 840 "./glsl.g"
case 26: {
ast(1) = makeAstNode<UnaryExpressionAST>(AST::Kind_PreIncrement, expression(2));
} break;
-#line 853 "./glsl.g"
+#line 847 "./glsl.g"
case 27: {
ast(1) = makeAstNode<UnaryExpressionAST>(AST::Kind_PreDecrement, expression(2));
} break;
-#line 860 "./glsl.g"
+#line 854 "./glsl.g"
case 28: {
ast(1) = makeAstNode<UnaryExpressionAST>(sym(1).kind, expression(2));
} break;
-#line 867 "./glsl.g"
+#line 861 "./glsl.g"
case 29: {
sym(1).kind = AST::Kind_UnaryPlus;
} break;
-#line 874 "./glsl.g"
+#line 868 "./glsl.g"
case 30: {
sym(1).kind = AST::Kind_UnaryMinus;
} break;
-#line 881 "./glsl.g"
+#line 875 "./glsl.g"
case 31: {
sym(1).kind = AST::Kind_LogicalNot;
} break;
-#line 888 "./glsl.g"
+#line 882 "./glsl.g"
case 32: {
sym(1).kind = AST::Kind_BitwiseNot;
} break;
-#line 895 "./glsl.g"
+#line 889 "./glsl.g"
case 33: {
// nothing to do.
} break;
-#line 902 "./glsl.g"
+#line 896 "./glsl.g"
case 34: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_Multiply, expression(1), expression(3));
} break;
-#line 909 "./glsl.g"
+#line 903 "./glsl.g"
case 35: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_Divide, expression(1), expression(3));
} break;
-#line 916 "./glsl.g"
+#line 910 "./glsl.g"
case 36: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_Modulus, expression(1), expression(3));
} break;
-#line 923 "./glsl.g"
+#line 917 "./glsl.g"
case 37: {
// nothing to do.
} break;
-#line 930 "./glsl.g"
+#line 924 "./glsl.g"
case 38: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_Plus, expression(1), expression(3));
} break;
-#line 937 "./glsl.g"
+#line 931 "./glsl.g"
case 39: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_Minus, expression(1), expression(3));
} break;
-#line 944 "./glsl.g"
+#line 938 "./glsl.g"
case 40: {
// nothing to do.
} break;
-#line 951 "./glsl.g"
+#line 945 "./glsl.g"
case 41: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_ShiftLeft, expression(1), expression(3));
} break;
-#line 958 "./glsl.g"
+#line 952 "./glsl.g"
case 42: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_ShiftRight, expression(1), expression(3));
} break;
-#line 965 "./glsl.g"
+#line 959 "./glsl.g"
case 43: {
// nothing to do.
} break;
-#line 972 "./glsl.g"
+#line 966 "./glsl.g"
case 44: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_LessThan, expression(1), expression(3));
} break;
-#line 979 "./glsl.g"
+#line 973 "./glsl.g"
case 45: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_GreaterThan, expression(1), expression(3));
} break;
-#line 986 "./glsl.g"
+#line 980 "./glsl.g"
case 46: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_LessEqual, expression(1), expression(3));
} break;
-#line 993 "./glsl.g"
+#line 987 "./glsl.g"
case 47: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_GreaterEqual, expression(1), expression(3));
} break;
-#line 1000 "./glsl.g"
+#line 994 "./glsl.g"
case 48: {
// nothing to do.
} break;
-#line 1007 "./glsl.g"
+#line 1001 "./glsl.g"
case 49: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_Equal, expression(1), expression(3));
} break;
-#line 1014 "./glsl.g"
+#line 1008 "./glsl.g"
case 50: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_NotEqual, expression(1), expression(3));
} break;
-#line 1021 "./glsl.g"
+#line 1015 "./glsl.g"
case 51: {
// nothing to do.
} break;
-#line 1028 "./glsl.g"
+#line 1022 "./glsl.g"
case 52: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_BitwiseAnd, expression(1), expression(3));
} break;
-#line 1035 "./glsl.g"
+#line 1029 "./glsl.g"
case 53: {
// nothing to do.
} break;
-#line 1042 "./glsl.g"
+#line 1036 "./glsl.g"
case 54: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_BitwiseXor, expression(1), expression(3));
} break;
-#line 1049 "./glsl.g"
+#line 1043 "./glsl.g"
case 55: {
// nothing to do.
} break;
-#line 1056 "./glsl.g"
+#line 1050 "./glsl.g"
case 56: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_BitwiseOr, expression(1), expression(3));
} break;
-#line 1063 "./glsl.g"
+#line 1057 "./glsl.g"
case 57: {
// nothing to do.
} break;
-#line 1070 "./glsl.g"
+#line 1064 "./glsl.g"
case 58: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_LogicalAnd, expression(1), expression(3));
} break;
-#line 1077 "./glsl.g"
+#line 1071 "./glsl.g"
case 59: {
// nothing to do.
} break;
-#line 1084 "./glsl.g"
+#line 1078 "./glsl.g"
case 60: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_LogicalXor, expression(1), expression(3));
} break;
-#line 1091 "./glsl.g"
+#line 1085 "./glsl.g"
case 61: {
// nothing to do.
} break;
-#line 1098 "./glsl.g"
+#line 1092 "./glsl.g"
case 62: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_LogicalOr, expression(1), expression(3));
} break;
-#line 1105 "./glsl.g"
+#line 1099 "./glsl.g"
case 63: {
// nothing to do.
} break;
-#line 1112 "./glsl.g"
+#line 1106 "./glsl.g"
case 64: {
ast(1) = makeAstNode<TernaryExpressionAST>(AST::Kind_Conditional, expression(1), expression(3), expression(5));
} break;
-#line 1119 "./glsl.g"
+#line 1113 "./glsl.g"
case 65: {
// nothing to do.
} break;
-#line 1126 "./glsl.g"
+#line 1120 "./glsl.g"
case 66: {
ast(1) = makeAstNode<AssignmentExpressionAST>(sym(2).kind, expression(1), expression(3));
} break;
-#line 1133 "./glsl.g"
+#line 1127 "./glsl.g"
case 67: {
sym(1).kind = AST::Kind_Assign;
} break;
-#line 1140 "./glsl.g"
+#line 1134 "./glsl.g"
case 68: {
sym(1).kind = AST::Kind_AssignMultiply;
} break;
-#line 1147 "./glsl.g"
+#line 1141 "./glsl.g"
case 69: {
sym(1).kind = AST::Kind_AssignDivide;
} break;
-#line 1154 "./glsl.g"
+#line 1148 "./glsl.g"
case 70: {
sym(1).kind = AST::Kind_AssignModulus;
} break;
-#line 1161 "./glsl.g"
+#line 1155 "./glsl.g"
case 71: {
sym(1).kind = AST::Kind_AssignPlus;
} break;
-#line 1168 "./glsl.g"
+#line 1162 "./glsl.g"
case 72: {
sym(1).kind = AST::Kind_AssignMinus;
} break;
-#line 1175 "./glsl.g"
+#line 1169 "./glsl.g"
case 73: {
sym(1).kind = AST::Kind_AssignShiftLeft;
} break;
-#line 1182 "./glsl.g"
+#line 1176 "./glsl.g"
case 74: {
sym(1).kind = AST::Kind_AssignShiftRight;
} break;
-#line 1189 "./glsl.g"
+#line 1183 "./glsl.g"
case 75: {
sym(1).kind = AST::Kind_AssignAnd;
} break;
-#line 1196 "./glsl.g"
+#line 1190 "./glsl.g"
case 76: {
sym(1).kind = AST::Kind_AssignXor;
} break;
-#line 1203 "./glsl.g"
+#line 1197 "./glsl.g"
case 77: {
sym(1).kind = AST::Kind_AssignOr;
} break;
-#line 1210 "./glsl.g"
+#line 1204 "./glsl.g"
case 78: {
// nothing to do.
} break;
-#line 1217 "./glsl.g"
+#line 1211 "./glsl.g"
case 79: {
ast(1) = makeAstNode<BinaryExpressionAST>(AST::Kind_Comma, expression(1), expression(3));
} break;
-#line 1224 "./glsl.g"
+#line 1218 "./glsl.g"
case 80: {
// nothing to do.
} break;
-#line 1231 "./glsl.g"
+#line 1225 "./glsl.g"
case 81: {
// nothing to do.
} break;
-#line 1238 "./glsl.g"
+#line 1232 "./glsl.g"
case 82: {
ast(1) = makeAstNode<InitDeclarationAST>(sym(1).declaration_list);
} break;
-#line 1245 "./glsl.g"
+#line 1239 "./glsl.g"
case 83: {
ast(1) = makeAstNode<PrecisionDeclarationAST>(sym(2).precision, type(3));
} break;
-#line 1252 "./glsl.g"
+#line 1246 "./glsl.g"
case 84: {
if (sym(1).type_qualifier.qualifier != QualifiedTypeAST::Struct) {
@@ -743,7 +743,7 @@ case 84: {
ast(1) = makeAstNode<TypeDeclarationAST>(type);
} break;
-#line 1263 "./glsl.g"
+#line 1257 "./glsl.g"
case 85: {
if ((sym(1).type_qualifier.qualifier & QualifiedTypeAST::Struct) == 0) {
@@ -761,7 +761,7 @@ case 85: {
makeAstNode<VariableDeclarationAST>(qualtype, string(6)));
} break;
-#line 1282 "./glsl.g"
+#line 1276 "./glsl.g"
case 86: {
if ((sym(1).type_qualifier.qualifier & QualifiedTypeAST::Struct) == 0) {
@@ -780,7 +780,7 @@ case 86: {
(makeAstNode<ArrayTypeAST>(qualtype), string(6)));
} break;
-#line 1302 "./glsl.g"
+#line 1296 "./glsl.g"
case 87: {
if ((sym(1).type_qualifier.qualifier & QualifiedTypeAST::Struct) == 0) {
@@ -799,7 +799,7 @@ case 87: {
(makeAstNode<ArrayTypeAST>(qualtype, expression(8)), string(6)));
} break;
-#line 1322 "./glsl.g"
+#line 1316 "./glsl.g"
case 88: {
TypeAST *type = makeAstNode<QualifiedTypeAST>
@@ -808,59 +808,59 @@ case 88: {
ast(1) = makeAstNode<TypeDeclarationAST>(type);
} break;
-#line 1332 "./glsl.g"
+#line 1326 "./glsl.g"
case 89: {
function(1)->finishParams();
} break;
-#line 1339 "./glsl.g"
+#line 1333 "./glsl.g"
case 90: {
// nothing to do.
} break;
-#line 1346 "./glsl.g"
+#line 1340 "./glsl.g"
case 91: {
// nothing to do.
} break;
-#line 1353 "./glsl.g"
+#line 1347 "./glsl.g"
case 92: {
function(1)->params = makeAstNode< List<ParameterDeclarationAST *> >
(sym(2).param_declaration);
} break;
-#line 1361 "./glsl.g"
+#line 1355 "./glsl.g"
case 93: {
function(1)->params = makeAstNode< List<ParameterDeclarationAST *> >
(function(1)->params, sym(3).param_declaration);
} break;
-#line 1369 "./glsl.g"
+#line 1363 "./glsl.g"
case 94: {
function(1) = makeAstNode<FunctionDeclarationAST>(type(1), string(2));
} break;
-#line 1376 "./glsl.g"
+#line 1370 "./glsl.g"
case 95: {
sym(1).param_declarator.type = type(1);
sym(1).param_declarator.name = string(2);
} break;
-#line 1384 "./glsl.g"
+#line 1378 "./glsl.g"
case 96: {
sym(1).param_declarator.type = makeAstNode<ArrayTypeAST>(type(1), expression(4));
sym(1).param_declarator.name = string(2);
} break;
-#line 1392 "./glsl.g"
+#line 1386 "./glsl.g"
case 97: {
ast(1) = makeAstNode<ParameterDeclarationAST>
@@ -871,7 +871,7 @@ case 97: {
sym(3).param_declarator.name);
} break;
-#line 1404 "./glsl.g"
+#line 1398 "./glsl.g"
case 98: {
ast(1) = makeAstNode<ParameterDeclarationAST>
@@ -880,7 +880,7 @@ case 98: {
sym(2).param_declarator.name);
} break;
-#line 1414 "./glsl.g"
+#line 1408 "./glsl.g"
case 99: {
ast(1) = makeAstNode<ParameterDeclarationAST>
@@ -890,7 +890,7 @@ case 99: {
(const QString *)0);
} break;
-#line 1425 "./glsl.g"
+#line 1419 "./glsl.g"
case 100: {
ast(1) = makeAstNode<ParameterDeclarationAST>
@@ -898,44 +898,44 @@ case 100: {
(const QString *)0);
} break;
-#line 1434 "./glsl.g"
+#line 1428 "./glsl.g"
case 101: {
sym(1).qualifier = ParameterDeclarationAST::In;
} break;
-#line 1441 "./glsl.g"
+#line 1435 "./glsl.g"
case 102: {
sym(1).qualifier = ParameterDeclarationAST::In;
} break;
-#line 1448 "./glsl.g"
+#line 1442 "./glsl.g"
case 103: {
sym(1).qualifier = ParameterDeclarationAST::Out;
} break;
-#line 1455 "./glsl.g"
+#line 1449 "./glsl.g"
case 104: {
sym(1).qualifier = ParameterDeclarationAST::InOut;
} break;
-#line 1462 "./glsl.g"
+#line 1456 "./glsl.g"
case 105: {
// nothing to do.
} break;
-#line 1469 "./glsl.g"
+#line 1463 "./glsl.g"
case 106: {
sym(1).declaration_list = makeAstNode< List<DeclarationAST *> >
(sym(1).declaration);
} break;
-#line 1477 "./glsl.g"
+#line 1471 "./glsl.g"
case 107: {
TypeAST *type = VariableDeclarationAST::declarationType(sym(1).declaration_list);
@@ -944,7 +944,7 @@ case 107: {
(sym(1).declaration_list, decl);
} break;
-#line 1487 "./glsl.g"
+#line 1481 "./glsl.g"
case 108: {
TypeAST *type = VariableDeclarationAST::declarationType(sym(1).declaration_list);
@@ -954,7 +954,7 @@ case 108: {
(sym(1).declaration_list, decl);
} break;
-#line 1498 "./glsl.g"
+#line 1492 "./glsl.g"
case 109: {
TypeAST *type = VariableDeclarationAST::declarationType(sym(1).declaration_list);
@@ -964,7 +964,7 @@ case 109: {
(sym(1).declaration_list, decl);
} break;
-#line 1509 "./glsl.g"
+#line 1503 "./glsl.g"
case 110: {
TypeAST *type = VariableDeclarationAST::declarationType(sym(1).declaration_list);
@@ -975,7 +975,7 @@ case 110: {
(sym(1).declaration_list, decl);
} break;
-#line 1521 "./glsl.g"
+#line 1515 "./glsl.g"
case 111: {
TypeAST *type = VariableDeclarationAST::declarationType(sym(1).declaration_list);
@@ -986,7 +986,7 @@ case 111: {
(sym(1).declaration_list, decl);
} break;
-#line 1533 "./glsl.g"
+#line 1527 "./glsl.g"
case 112: {
TypeAST *type = VariableDeclarationAST::declarationType(sym(1).declaration_list);
@@ -996,40 +996,40 @@ case 112: {
(sym(1).declaration_list, decl);
} break;
-#line 1544 "./glsl.g"
+#line 1538 "./glsl.g"
case 113: {
ast(1) = makeAstNode<TypeDeclarationAST>(type(1));
} break;
-#line 1551 "./glsl.g"
+#line 1545 "./glsl.g"
case 114: {
ast(1) = makeAstNode<VariableDeclarationAST>(type(1), string(2));
} break;
-#line 1558 "./glsl.g"
+#line 1552 "./glsl.g"
case 115: {
ast(1) = makeAstNode<VariableDeclarationAST>
(makeAstNode<ArrayTypeAST>(type(1)), string(2));
} break;
-#line 1566 "./glsl.g"
+#line 1560 "./glsl.g"
case 116: {
ast(1) = makeAstNode<VariableDeclarationAST>
(makeAstNode<ArrayTypeAST>(type(1), expression(4)), string(2));
} break;
-#line 1574 "./glsl.g"
+#line 1568 "./glsl.g"
case 117: {
ast(1) = makeAstNode<VariableDeclarationAST>
(makeAstNode<ArrayTypeAST>(type(1)), string(2), expression(6));
} break;
-#line 1582 "./glsl.g"
+#line 1576 "./glsl.g"
case 118: {
ast(1) = makeAstNode<VariableDeclarationAST>
@@ -1037,26 +1037,26 @@ case 118: {
string(2), expression(7));
} break;
-#line 1591 "./glsl.g"
+#line 1585 "./glsl.g"
case 119: {
ast(1) = makeAstNode<VariableDeclarationAST>
(type(1), string(2), expression(4));
} break;
-#line 1599 "./glsl.g"
+#line 1593 "./glsl.g"
case 120: {
ast(1) = makeAstNode<InvariantDeclarationAST>(string(2));
} break;
-#line 1606 "./glsl.g"
+#line 1600 "./glsl.g"
case 121: {
ast(1) = makeAstNode<QualifiedTypeAST>(0, type(1), (List<LayoutQualifierAST *> *)0);
} break;
-#line 1613 "./glsl.g"
+#line 1607 "./glsl.g"
case 122: {
ast(1) = makeAstNode<QualifiedTypeAST>
@@ -1064,207 +1064,207 @@ case 122: {
sym(1).type_qualifier.layout_list);
} break;
-#line 1622 "./glsl.g"
+#line 1616 "./glsl.g"
case 123: {
sym(1).qualifier = QualifiedTypeAST::Invariant;
} break;
-#line 1629 "./glsl.g"
+#line 1623 "./glsl.g"
case 124: {
sym(1).qualifier = QualifiedTypeAST::Smooth;
} break;
-#line 1636 "./glsl.g"
+#line 1630 "./glsl.g"
case 125: {
sym(1).qualifier = QualifiedTypeAST::Flat;
} break;
-#line 1643 "./glsl.g"
+#line 1637 "./glsl.g"
case 126: {
sym(1).qualifier = QualifiedTypeAST::NoPerspective;
} break;
-#line 1650 "./glsl.g"
+#line 1644 "./glsl.g"
case 127: {
sym(1) = sym(3);
} break;
-#line 1657 "./glsl.g"
+#line 1651 "./glsl.g"
case 128: {
sym(1).layout_list = makeAstNode< List<LayoutQualifierAST *> >(sym(1).layout);
} break;
-#line 1664 "./glsl.g"
+#line 1658 "./glsl.g"
case 129: {
sym(1).layout_list = makeAstNode< List<LayoutQualifierAST *> >(sym(1).layout_list, sym(3).layout);
} break;
-#line 1671 "./glsl.g"
+#line 1665 "./glsl.g"
case 130: {
sym(1).layout = makeAstNode<LayoutQualifierAST>(string(1), (const QString *)0);
} break;
-#line 1678 "./glsl.g"
+#line 1672 "./glsl.g"
case 131: {
sym(1).layout = makeAstNode<LayoutQualifierAST>(string(1), string(3));
} break;
-#line 1685 "./glsl.g"
+#line 1679 "./glsl.g"
case 132: {
sym(1).qualifier = QualifiedTypeAST::Const;
} break;
-#line 1692 "./glsl.g"
+#line 1686 "./glsl.g"
case 133: {
sym(1).type_qualifier.qualifier = sym(1).qualifier;
sym(1).type_qualifier.layout_list = 0;
} break;
-#line 1700 "./glsl.g"
+#line 1694 "./glsl.g"
case 134: {
sym(1).type_qualifier.layout_list = sym(1).layout_list;
sym(1).type_qualifier.qualifier = 0;
} break;
-#line 1708 "./glsl.g"
+#line 1702 "./glsl.g"
case 135: {
sym(1).type_qualifier.layout_list = sym(1).layout_list;
sym(1).type_qualifier.qualifier = sym(2).qualifier;
} break;
-#line 1716 "./glsl.g"
+#line 1710 "./glsl.g"
case 136: {
sym(1).type_qualifier.qualifier = sym(1).qualifier | sym(2).qualifier;
sym(1).type_qualifier.layout_list = 0;
} break;
-#line 1724 "./glsl.g"
+#line 1718 "./glsl.g"
case 137: {
sym(1).type_qualifier.qualifier = sym(1).qualifier;
sym(1).type_qualifier.layout_list = 0;
} break;
-#line 1732 "./glsl.g"
+#line 1726 "./glsl.g"
case 138: {
sym(1).type_qualifier.qualifier = sym(1).qualifier | sym(2).qualifier;
sym(1).type_qualifier.layout_list = 0;
} break;
-#line 1740 "./glsl.g"
+#line 1734 "./glsl.g"
case 139: {
sym(1).type_qualifier.qualifier = sym(1).qualifier | sym(2).qualifier | sym(3).qualifier;
sym(1).type_qualifier.layout_list = 0;
} break;
-#line 1748 "./glsl.g"
+#line 1742 "./glsl.g"
case 140: {
sym(1).type_qualifier.qualifier = QualifiedTypeAST::Invariant;
sym(1).type_qualifier.layout_list = 0;
} break;
-#line 1756 "./glsl.g"
+#line 1750 "./glsl.g"
case 141: {
sym(1).qualifier = QualifiedTypeAST::Const;
} break;
-#line 1763 "./glsl.g"
+#line 1757 "./glsl.g"
case 142: {
sym(1).qualifier = QualifiedTypeAST::Attribute;
} break;
-#line 1770 "./glsl.g"
+#line 1764 "./glsl.g"
case 143: {
sym(1).qualifier = QualifiedTypeAST::Varying;
} break;
-#line 1777 "./glsl.g"
+#line 1771 "./glsl.g"
case 144: {
sym(1).qualifier = QualifiedTypeAST::CentroidVarying;
} break;
-#line 1784 "./glsl.g"
+#line 1778 "./glsl.g"
case 145: {
sym(1).qualifier = QualifiedTypeAST::In;
} break;
-#line 1791 "./glsl.g"
+#line 1785 "./glsl.g"
case 146: {
sym(1).qualifier = QualifiedTypeAST::Out;
} break;
-#line 1798 "./glsl.g"
+#line 1792 "./glsl.g"
case 147: {
sym(1).qualifier = QualifiedTypeAST::CentroidIn;
} break;
-#line 1805 "./glsl.g"
+#line 1799 "./glsl.g"
case 148: {
sym(1).qualifier = QualifiedTypeAST::CentroidOut;
} break;
-#line 1812 "./glsl.g"
+#line 1806 "./glsl.g"
case 149: {
sym(1).qualifier = QualifiedTypeAST::PatchIn;
} break;
-#line 1819 "./glsl.g"
+#line 1813 "./glsl.g"
case 150: {
sym(1).qualifier = QualifiedTypeAST::PatchOut;
} break;
-#line 1826 "./glsl.g"
+#line 1820 "./glsl.g"
case 151: {
sym(1).qualifier = QualifiedTypeAST::SampleIn;
} break;
-#line 1833 "./glsl.g"
+#line 1827 "./glsl.g"
case 152: {
sym(1).qualifier = QualifiedTypeAST::SampleOut;
} break;
-#line 1840 "./glsl.g"
+#line 1834 "./glsl.g"
case 153: {
sym(1).qualifier = QualifiedTypeAST::Uniform;
} break;
-#line 1847 "./glsl.g"
+#line 1841 "./glsl.g"
case 154: {
// nothing to do.
} break;
-#line 1854 "./glsl.g"
+#line 1848 "./glsl.g"
case 155: {
if (!type(2)->setPrecision(sym(1).precision)) {
@@ -1273,595 +1273,595 @@ case 155: {
ast(1) = type(2);
} break;
-#line 1864 "./glsl.g"
+#line 1858 "./glsl.g"
case 156: {
// nothing to do.
} break;
-#line 1871 "./glsl.g"
+#line 1865 "./glsl.g"
case 157: {
ast(1) = makeAstNode<ArrayTypeAST>(type(1));
} break;
-#line 1878 "./glsl.g"
+#line 1872 "./glsl.g"
case 158: {
ast(1) = makeAstNode<ArrayTypeAST>(type(1), expression(3));
} break;
-#line 1885 "./glsl.g"
+#line 1879 "./glsl.g"
case 159: {
ast(1) = makeBasicType(T_VOID);
} break;
-#line 1892 "./glsl.g"
+#line 1886 "./glsl.g"
case 160: {
ast(1) = makeBasicType(T_FLOAT);
} break;
-#line 1899 "./glsl.g"
+#line 1893 "./glsl.g"
case 161: {
ast(1) = makeBasicType(T_DOUBLE);
} break;
-#line 1906 "./glsl.g"
+#line 1900 "./glsl.g"
case 162: {
ast(1) = makeBasicType(T_INT);
} break;
-#line 1913 "./glsl.g"
+#line 1907 "./glsl.g"
case 163: {
ast(1) = makeBasicType(T_UINT);
} break;
-#line 1920 "./glsl.g"
+#line 1914 "./glsl.g"
case 164: {
ast(1) = makeBasicType(T_BOOL);
} break;
-#line 1927 "./glsl.g"
+#line 1921 "./glsl.g"
case 165: {
ast(1) = makeBasicType(T_VEC2);
} break;
-#line 1934 "./glsl.g"
+#line 1928 "./glsl.g"
case 166: {
ast(1) = makeBasicType(T_VEC3);
} break;
-#line 1941 "./glsl.g"
+#line 1935 "./glsl.g"
case 167: {
ast(1) = makeBasicType(T_VEC4);
} break;
-#line 1948 "./glsl.g"
+#line 1942 "./glsl.g"
case 168: {
ast(1) = makeBasicType(T_DVEC2);
} break;
-#line 1955 "./glsl.g"
+#line 1949 "./glsl.g"
case 169: {
ast(1) = makeBasicType(T_DVEC3);
} break;
-#line 1962 "./glsl.g"
+#line 1956 "./glsl.g"
case 170: {
ast(1) = makeBasicType(T_DVEC4);
} break;
-#line 1969 "./glsl.g"
+#line 1963 "./glsl.g"
case 171: {
ast(1) = makeBasicType(T_BVEC2);
} break;
-#line 1976 "./glsl.g"
+#line 1970 "./glsl.g"
case 172: {
ast(1) = makeBasicType(T_BVEC3);
} break;
-#line 1983 "./glsl.g"
+#line 1977 "./glsl.g"
case 173: {
ast(1) = makeBasicType(T_BVEC4);
} break;
-#line 1990 "./glsl.g"
+#line 1984 "./glsl.g"
case 174: {
ast(1) = makeBasicType(T_IVEC2);
} break;
-#line 1997 "./glsl.g"
+#line 1991 "./glsl.g"
case 175: {
ast(1) = makeBasicType(T_IVEC3);
} break;
-#line 2004 "./glsl.g"
+#line 1998 "./glsl.g"
case 176: {
ast(1) = makeBasicType(T_IVEC4);
} break;
-#line 2011 "./glsl.g"
+#line 2005 "./glsl.g"
case 177: {
ast(1) = makeBasicType(T_UVEC2);
} break;
-#line 2018 "./glsl.g"
+#line 2012 "./glsl.g"
case 178: {
ast(1) = makeBasicType(T_UVEC3);
} break;
-#line 2025 "./glsl.g"
+#line 2019 "./glsl.g"
case 179: {
ast(1) = makeBasicType(T_UVEC4);
} break;
-#line 2032 "./glsl.g"
+#line 2026 "./glsl.g"
case 180: {
ast(1) = makeBasicType(T_MAT2);
} break;
-#line 2039 "./glsl.g"
+#line 2033 "./glsl.g"
case 181: {
ast(1) = makeBasicType(T_MAT3);
} break;
-#line 2046 "./glsl.g"
+#line 2040 "./glsl.g"
case 182: {
ast(1) = makeBasicType(T_MAT4);
} break;
-#line 2053 "./glsl.g"
+#line 2047 "./glsl.g"
case 183: {
ast(1) = makeBasicType(T_MAT2);
} break;
-#line 2060 "./glsl.g"
+#line 2054 "./glsl.g"
case 184: {
ast(1) = makeBasicType(T_MAT2X3);
} break;
-#line 2067 "./glsl.g"
+#line 2061 "./glsl.g"
case 185: {
ast(1) = makeBasicType(T_MAT2X4);
} break;
-#line 2074 "./glsl.g"
+#line 2068 "./glsl.g"
case 186: {
ast(1) = makeBasicType(T_MAT3X2);
} break;
-#line 2081 "./glsl.g"
+#line 2075 "./glsl.g"
case 187: {
ast(1) = makeBasicType(T_MAT3);
} break;
-#line 2088 "./glsl.g"
+#line 2082 "./glsl.g"
case 188: {
ast(1) = makeBasicType(T_MAT3X4);
} break;
-#line 2095 "./glsl.g"
+#line 2089 "./glsl.g"
case 189: {
ast(1) = makeBasicType(T_MAT4X2);
} break;
-#line 2102 "./glsl.g"
+#line 2096 "./glsl.g"
case 190: {
ast(1) = makeBasicType(T_MAT4X3);
} break;
-#line 2109 "./glsl.g"
+#line 2103 "./glsl.g"
case 191: {
ast(1) = makeBasicType(T_MAT4);
} break;
-#line 2116 "./glsl.g"
+#line 2110 "./glsl.g"
case 192: {
ast(1) = makeBasicType(T_DMAT2);
} break;
-#line 2123 "./glsl.g"
+#line 2117 "./glsl.g"
case 193: {
ast(1) = makeBasicType(T_DMAT3);
} break;
-#line 2130 "./glsl.g"
+#line 2124 "./glsl.g"
case 194: {
ast(1) = makeBasicType(T_DMAT4);
} break;
-#line 2137 "./glsl.g"
+#line 2131 "./glsl.g"
case 195: {
ast(1) = makeBasicType(T_DMAT2);
} break;
-#line 2144 "./glsl.g"
+#line 2138 "./glsl.g"
case 196: {
ast(1) = makeBasicType(T_DMAT2X3);
} break;
-#line 2151 "./glsl.g"
+#line 2145 "./glsl.g"
case 197: {
ast(1) = makeBasicType(T_DMAT2X4);
} break;
-#line 2158 "./glsl.g"
+#line 2152 "./glsl.g"
case 198: {
ast(1) = makeBasicType(T_DMAT3X2);
} break;
-#line 2165 "./glsl.g"
+#line 2159 "./glsl.g"
case 199: {
ast(1) = makeBasicType(T_DMAT3);
} break;
-#line 2172 "./glsl.g"
+#line 2166 "./glsl.g"
case 200: {
ast(1) = makeBasicType(T_DMAT3X4);
} break;
-#line 2179 "./glsl.g"
+#line 2173 "./glsl.g"
case 201: {
ast(1) = makeBasicType(T_DMAT4X2);
} break;
-#line 2186 "./glsl.g"
+#line 2180 "./glsl.g"
case 202: {
ast(1) = makeBasicType(T_DMAT4X3);
} break;
-#line 2193 "./glsl.g"
+#line 2187 "./glsl.g"
case 203: {
ast(1) = makeBasicType(T_DMAT4);
} break;
-#line 2200 "./glsl.g"
+#line 2194 "./glsl.g"
case 204: {
ast(1) = makeBasicType(T_SAMPLER1D);
} break;
-#line 2207 "./glsl.g"
+#line 2201 "./glsl.g"
case 205: {
ast(1) = makeBasicType(T_SAMPLER2D);
} break;
-#line 2214 "./glsl.g"
+#line 2208 "./glsl.g"
case 206: {
ast(1) = makeBasicType(T_SAMPLER3D);
} break;
-#line 2221 "./glsl.g"
+#line 2215 "./glsl.g"
case 207: {
ast(1) = makeBasicType(T_SAMPLERCUBE);
} break;
-#line 2228 "./glsl.g"
+#line 2222 "./glsl.g"
case 208: {
ast(1) = makeBasicType(T_SAMPLER1DSHADOW);
} break;
-#line 2235 "./glsl.g"
+#line 2229 "./glsl.g"
case 209: {
ast(1) = makeBasicType(T_SAMPLER2DSHADOW);
} break;
-#line 2242 "./glsl.g"
+#line 2236 "./glsl.g"
case 210: {
ast(1) = makeBasicType(T_SAMPLERCUBESHADOW);
} break;
-#line 2249 "./glsl.g"
+#line 2243 "./glsl.g"
case 211: {
ast(1) = makeBasicType(T_SAMPLER1DARRAY);
} break;
-#line 2256 "./glsl.g"
+#line 2250 "./glsl.g"
case 212: {
ast(1) = makeBasicType(T_SAMPLER2DARRAY);
} break;
-#line 2263 "./glsl.g"
+#line 2257 "./glsl.g"
case 213: {
ast(1) = makeBasicType(T_SAMPLER1DARRAYSHADOW);
} break;
-#line 2270 "./glsl.g"
+#line 2264 "./glsl.g"
case 214: {
ast(1) = makeBasicType(T_SAMPLER2DARRAYSHADOW);
} break;
-#line 2277 "./glsl.g"
+#line 2271 "./glsl.g"
case 215: {
ast(1) = makeBasicType(T_SAMPLERCUBEARRAY);
} break;
-#line 2284 "./glsl.g"
+#line 2278 "./glsl.g"
case 216: {
ast(1) = makeBasicType(T_SAMPLERCUBEARRAYSHADOW);
} break;
-#line 2291 "./glsl.g"
+#line 2285 "./glsl.g"
case 217: {
ast(1) = makeBasicType(T_ISAMPLER1D);
} break;
-#line 2298 "./glsl.g"
+#line 2292 "./glsl.g"
case 218: {
ast(1) = makeBasicType(T_ISAMPLER2D);
} break;
-#line 2305 "./glsl.g"
+#line 2299 "./glsl.g"
case 219: {
ast(1) = makeBasicType(T_ISAMPLER3D);
} break;
-#line 2312 "./glsl.g"
+#line 2306 "./glsl.g"
case 220: {
ast(1) = makeBasicType(T_ISAMPLERCUBE);
} break;
-#line 2319 "./glsl.g"
+#line 2313 "./glsl.g"
case 221: {
ast(1) = makeBasicType(T_ISAMPLER1DARRAY);
} break;
-#line 2326 "./glsl.g"
+#line 2320 "./glsl.g"
case 222: {
ast(1) = makeBasicType(T_ISAMPLER2DARRAY);
} break;
-#line 2333 "./glsl.g"
+#line 2327 "./glsl.g"
case 223: {
ast(1) = makeBasicType(T_ISAMPLERCUBEARRAY);
} break;
-#line 2340 "./glsl.g"
+#line 2334 "./glsl.g"
case 224: {
ast(1) = makeBasicType(T_USAMPLER1D);
} break;
-#line 2347 "./glsl.g"
+#line 2341 "./glsl.g"
case 225: {
ast(1) = makeBasicType(T_USAMPLER2D);
} break;
-#line 2354 "./glsl.g"
+#line 2348 "./glsl.g"
case 226: {
ast(1) = makeBasicType(T_USAMPLER3D);
} break;
-#line 2361 "./glsl.g"
+#line 2355 "./glsl.g"
case 227: {
ast(1) = makeBasicType(T_USAMPLERCUBE);
} break;
-#line 2368 "./glsl.g"
+#line 2362 "./glsl.g"
case 228: {
ast(1) = makeBasicType(T_USAMPLER1DARRAY);
} break;
-#line 2375 "./glsl.g"
+#line 2369 "./glsl.g"
case 229: {
ast(1) = makeBasicType(T_USAMPLER2DARRAY);
} break;
-#line 2382 "./glsl.g"
+#line 2376 "./glsl.g"
case 230: {
ast(1) = makeBasicType(T_USAMPLERCUBEARRAY);
} break;
-#line 2389 "./glsl.g"
+#line 2383 "./glsl.g"
case 231: {
ast(1) = makeBasicType(T_SAMPLER2DRECT);
} break;
-#line 2396 "./glsl.g"
+#line 2390 "./glsl.g"
case 232: {
ast(1) = makeBasicType(T_SAMPLER2DRECTSHADOW);
} break;
-#line 2403 "./glsl.g"
+#line 2397 "./glsl.g"
case 233: {
ast(1) = makeBasicType(T_ISAMPLER2DRECT);
} break;
-#line 2410 "./glsl.g"
+#line 2404 "./glsl.g"
case 234: {
ast(1) = makeBasicType(T_USAMPLER2DRECT);
} break;
-#line 2417 "./glsl.g"
+#line 2411 "./glsl.g"
case 235: {
ast(1) = makeBasicType(T_SAMPLERBUFFER);
} break;
-#line 2424 "./glsl.g"
+#line 2418 "./glsl.g"
case 236: {
ast(1) = makeBasicType(T_ISAMPLERBUFFER);
} break;
-#line 2431 "./glsl.g"
+#line 2425 "./glsl.g"
case 237: {
ast(1) = makeBasicType(T_USAMPLERBUFFER);
} break;
-#line 2438 "./glsl.g"
+#line 2432 "./glsl.g"
case 238: {
ast(1) = makeBasicType(T_SAMPLER2DMS);
} break;
-#line 2445 "./glsl.g"
+#line 2439 "./glsl.g"
case 239: {
ast(1) = makeBasicType(T_ISAMPLER2DMS);
} break;
-#line 2452 "./glsl.g"
+#line 2446 "./glsl.g"
case 240: {
ast(1) = makeBasicType(T_USAMPLER2DMS);
} break;
-#line 2459 "./glsl.g"
+#line 2453 "./glsl.g"
case 241: {
ast(1) = makeBasicType(T_SAMPLER2DMSARRAY);
} break;
-#line 2466 "./glsl.g"
+#line 2460 "./glsl.g"
case 242: {
ast(1) = makeBasicType(T_ISAMPLER2DMSARRAY);
} break;
-#line 2473 "./glsl.g"
+#line 2467 "./glsl.g"
case 243: {
ast(1) = makeBasicType(T_USAMPLER2DMSARRAY);
} break;
-#line 2480 "./glsl.g"
+#line 2474 "./glsl.g"
case 244: {
// nothing to do.
} break;
-#line 2487 "./glsl.g"
+#line 2481 "./glsl.g"
case 245: {
ast(1) = makeAstNode<NamedTypeAST>(string(1));
} break;
-#line 2494 "./glsl.g"
+#line 2488 "./glsl.g"
case 246: {
sym(1).precision = TypeAST::Highp;
} break;
-#line 2501 "./glsl.g"
+#line 2495 "./glsl.g"
case 247: {
sym(1).precision = TypeAST::Mediump;
} break;
-#line 2508 "./glsl.g"
+#line 2502 "./glsl.g"
case 248: {
sym(1).precision = TypeAST::Lowp;
} break;
-#line 2515 "./glsl.g"
+#line 2509 "./glsl.g"
case 249: {
ast(1) = makeAstNode<StructTypeAST>(string(2), sym(4).field_list);
} break;
-#line 2522 "./glsl.g"
+#line 2516 "./glsl.g"
case 250: {
ast(1) = makeAstNode<StructTypeAST>(sym(3).field_list);
} break;
-#line 2529 "./glsl.g"
+#line 2523 "./glsl.g"
case 251: {
// nothing to do.
} break;
-#line 2536 "./glsl.g"
+#line 2530 "./glsl.g"
case 252: {
sym(1).field_list = appendLists(sym(1).field_list, sym(2).field_list);
} break;
-#line 2543 "./glsl.g"
+#line 2537 "./glsl.g"
case 253: {
sym(1).field_list = StructTypeAST::fixInnerTypes(type(1), sym(2).field_list);
} break;
-#line 2550 "./glsl.g"
+#line 2544 "./glsl.g"
case 254: {
sym(1).field_list = StructTypeAST::fixInnerTypes
@@ -1870,106 +1870,106 @@ case 254: {
sym(1).type_qualifier.layout_list), sym(3).field_list);
} break;
-#line 2560 "./glsl.g"
+#line 2554 "./glsl.g"
case 255: {
// nothing to do.
sym(1).field_list = makeAstNode< List<StructTypeAST::Field *> >(sym(1).field);
} break;
-#line 2568 "./glsl.g"
+#line 2562 "./glsl.g"
case 256: {
sym(1).field_list = makeAstNode< List<StructTypeAST::Field *> >(sym(1).field_list, sym(3).field);
} break;
-#line 2575 "./glsl.g"
+#line 2569 "./glsl.g"
case 257: {
sym(1).field = makeAstNode<StructTypeAST::Field>(string(1));
} break;
-#line 2582 "./glsl.g"
+#line 2576 "./glsl.g"
case 258: {
sym(1).field = makeAstNode<StructTypeAST::Field>
(string(1), makeAstNode<ArrayTypeAST>((TypeAST *)0));
} break;
-#line 2590 "./glsl.g"
+#line 2584 "./glsl.g"
case 259: {
sym(1).field = makeAstNode<StructTypeAST::Field>
(string(1), makeAstNode<ArrayTypeAST>((TypeAST *)0, expression(3)));
} break;
-#line 2598 "./glsl.g"
+#line 2592 "./glsl.g"
case 260: {
// nothing to do.
} break;
-#line 2605 "./glsl.g"
+#line 2599 "./glsl.g"
case 261: {
ast(1) = makeAstNode<DeclarationStatementAST>(sym(1).declaration);
} break;
-#line 2612 "./glsl.g"
+#line 2606 "./glsl.g"
case 262: {
// nothing to do.
} break;
-#line 2619 "./glsl.g"
+#line 2613 "./glsl.g"
case 263: {
// nothing to do.
} break;
-#line 2626 "./glsl.g"
+#line 2620 "./glsl.g"
case 264: {
// nothing to do.
} break;
-#line 2633 "./glsl.g"
+#line 2627 "./glsl.g"
case 265: {
// nothing to do.
} break;
-#line 2640 "./glsl.g"
+#line 2634 "./glsl.g"
case 266: {
// nothing to do.
} break;
-#line 2647 "./glsl.g"
+#line 2641 "./glsl.g"
case 267: {
// nothing to do.
} break;
-#line 2654 "./glsl.g"
+#line 2648 "./glsl.g"
case 268: {
// nothing to do.
} break;
-#line 2661 "./glsl.g"
+#line 2655 "./glsl.g"
case 269: {
// nothing to do.
} break;
-#line 2668 "./glsl.g"
+#line 2662 "./glsl.g"
case 270: {
// nothing to do.
} break;
-#line 2675 "./glsl.g"
+#line 2669 "./glsl.g"
case 271: {
CompoundStatementAST *stmt = makeAstNode<CompoundStatementAST>();
@@ -1978,7 +1978,7 @@ case 271: {
ast(1) = stmt;
} break;
-#line 2685 "./glsl.g"
+#line 2679 "./glsl.g"
case 272: {
CompoundStatementAST *stmt = makeAstNode<CompoundStatementAST>(sym(2).statement_list);
@@ -1987,19 +1987,19 @@ case 272: {
ast(1) = stmt;
} break;
-#line 2695 "./glsl.g"
+#line 2689 "./glsl.g"
case 273: {
// nothing to do.
} break;
-#line 2702 "./glsl.g"
+#line 2696 "./glsl.g"
case 274: {
// nothing to do.
} break;
-#line 2709 "./glsl.g"
+#line 2703 "./glsl.g"
case 275: {
CompoundStatementAST *stmt = makeAstNode<CompoundStatementAST>();
@@ -2008,7 +2008,7 @@ case 275: {
ast(1) = stmt;
} break;
-#line 2719 "./glsl.g"
+#line 2713 "./glsl.g"
case 276: {
CompoundStatementAST *stmt = makeAstNode<CompoundStatementAST>(sym(2).statement_list);
@@ -2017,186 +2017,186 @@ case 276: {
ast(1) = stmt;
} break;
-#line 2729 "./glsl.g"
+#line 2723 "./glsl.g"
case 277: {
sym(1).statement_list = makeAstNode< List<StatementAST *> >(sym(1).statement);
} break;
-#line 2736 "./glsl.g"
+#line 2730 "./glsl.g"
case 278: {
sym(1).statement_list = makeAstNode< List<StatementAST *> >(sym(1).statement_list, sym(2).statement);
} break;
-#line 2743 "./glsl.g"
+#line 2737 "./glsl.g"
case 279: {
ast(1) = makeAstNode<CompoundStatementAST>(); // Empty statement
} break;
-#line 2750 "./glsl.g"
+#line 2744 "./glsl.g"
case 280: {
ast(1) = makeAstNode<ExpressionStatementAST>(expression(1));
} break;
-#line 2757 "./glsl.g"
+#line 2751 "./glsl.g"
case 281: {
ast(1) = makeAstNode<IfStatementAST>(expression(3), sym(5).ifstmt.thenClause, sym(5).ifstmt.elseClause);
} break;
-#line 2764 "./glsl.g"
+#line 2758 "./glsl.g"
case 282: {
sym(1).ifstmt.thenClause = statement(1);
sym(1).ifstmt.elseClause = statement(3);
} break;
-#line 2772 "./glsl.g"
+#line 2766 "./glsl.g"
case 283: {
sym(1).ifstmt.thenClause = statement(1);
sym(1).ifstmt.elseClause = 0;
} break;
-#line 2780 "./glsl.g"
+#line 2774 "./glsl.g"
case 284: {
// nothing to do.
} break;
-#line 2787 "./glsl.g"
+#line 2781 "./glsl.g"
case 285: {
ast(1) = makeAstNode<DeclarationExpressionAST>
(type(1), string(2), expression(4));
} break;
-#line 2795 "./glsl.g"
+#line 2789 "./glsl.g"
case 286: {
ast(1) = makeAstNode<SwitchStatementAST>(expression(3), statement(6));
} break;
-#line 2802 "./glsl.g"
+#line 2796 "./glsl.g"
case 287: {
ast(1) = makeAstNode<CompoundStatementAST>();
} break;
-#line 2809 "./glsl.g"
+#line 2803 "./glsl.g"
case 288: {
ast(1) = makeAstNode<CompoundStatementAST>(sym(1).statement_list);
} break;
-#line 2816 "./glsl.g"
+#line 2810 "./glsl.g"
case 289: {
ast(1) = makeAstNode<CaseLabelStatementAST>(expression(2));
} break;
-#line 2823 "./glsl.g"
+#line 2817 "./glsl.g"
case 290: {
ast(1) = makeAstNode<CaseLabelStatementAST>();
} break;
-#line 2830 "./glsl.g"
+#line 2824 "./glsl.g"
case 291: {
ast(1) = makeAstNode<WhileStatementAST>(expression(3), statement(5));
} break;
-#line 2837 "./glsl.g"
+#line 2831 "./glsl.g"
case 292: {
ast(1) = makeAstNode<DoStatementAST>(statement(2), expression(5));
} break;
-#line 2844 "./glsl.g"
+#line 2838 "./glsl.g"
case 293: {
ast(1) = makeAstNode<ForStatementAST>(statement(3), sym(4).forstmt.condition, sym(4).forstmt.increment, statement(6));
} break;
-#line 2851 "./glsl.g"
+#line 2845 "./glsl.g"
case 294: {
// nothing to do.
} break;
-#line 2858 "./glsl.g"
+#line 2852 "./glsl.g"
case 295: {
// nothing to do.
} break;
-#line 2865 "./glsl.g"
+#line 2859 "./glsl.g"
case 296: {
// nothing to do.
} break;
-#line 2872 "./glsl.g"
+#line 2866 "./glsl.g"
case 297: {
// nothing to do.
} break;
-#line 2879 "./glsl.g"
+#line 2873 "./glsl.g"
case 298: {
sym(1).forstmt.condition = expression(1);
sym(1).forstmt.increment = 0;
} break;
-#line 2887 "./glsl.g"
+#line 2881 "./glsl.g"
case 299: {
sym(1).forstmt.condition = expression(1);
sym(1).forstmt.increment = expression(3);
} break;
-#line 2895 "./glsl.g"
+#line 2889 "./glsl.g"
case 300: {
ast(1) = makeAstNode<JumpStatementAST>(AST::Kind_Continue);
} break;
-#line 2902 "./glsl.g"
+#line 2896 "./glsl.g"
case 301: {
ast(1) = makeAstNode<JumpStatementAST>(AST::Kind_Break);
} break;
-#line 2909 "./glsl.g"
+#line 2903 "./glsl.g"
case 302: {
ast(1) = makeAstNode<ReturnStatementAST>();
} break;
-#line 2916 "./glsl.g"
+#line 2910 "./glsl.g"
case 303: {
ast(1) = makeAstNode<ReturnStatementAST>(expression(2));
} break;
-#line 2923 "./glsl.g"
+#line 2917 "./glsl.g"
case 304: {
ast(1) = makeAstNode<JumpStatementAST>(AST::Kind_Discard);
} break;
-#line 2930 "./glsl.g"
+#line 2924 "./glsl.g"
case 305: {
ast(1) = makeAstNode<TranslationUnitAST>(sym(1).declaration_list);
} break;
-#line 2937 "./glsl.g"
+#line 2931 "./glsl.g"
case 306: {
if (sym(1).declaration) {
@@ -2207,7 +2207,7 @@ case 306: {
}
} break;
-#line 2949 "./glsl.g"
+#line 2943 "./glsl.g"
case 307: {
if (sym(1).declaration_list && sym(2).declaration) {
@@ -2223,49 +2223,49 @@ case 307: {
}
} break;
-#line 2966 "./glsl.g"
+#line 2960 "./glsl.g"
case 308: {
// nothing to do.
} break;
-#line 2973 "./glsl.g"
+#line 2967 "./glsl.g"
case 309: {
// nothing to do.
} break;
-#line 2980 "./glsl.g"
+#line 2974 "./glsl.g"
case 310: {
ast(1) = 0;
} break;
-#line 2987 "./glsl.g"
+#line 2981 "./glsl.g"
case 311: {
function(1)->body = statement(2);
} break;
-#line 2994 "./glsl.g"
+#line 2988 "./glsl.g"
case 312: {
ast(1) = 0;
} break;
-#line 3002 "./glsl.g"
+#line 2996 "./glsl.g"
case 313: {
ast(1) = ast(2);
} break;
-#line 3009 "./glsl.g"
+#line 3003 "./glsl.g"
case 314: {
ast(1) = ast(2);
} break;
-#line 3015 "./glsl.g"
+#line 3009 "./glsl.g"
} // end switch
} // end Parser::reduce()
diff --git a/src/libs/glsl/glslparser.h b/src/libs/glsl/glslparser.h
index 7bf70e2..bab2616 100644
--- a/src/libs/glsl/glslparser.h
+++ b/src/libs/glsl/glslparser.h
@@ -1,5 +1,5 @@
-#line 217 "./glsl.g"
+#line 215 "./glsl.g"
/**************************************************************************
**
--
1.7.10
|