summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/MachineIndependent/Gen_glslang_tab.cpp
blob: 69aa60872620295b69f3de111e1a792f8809516b (plain)
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
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
/* A Bison parser, made by GNU Bison 1.875.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* Written by Richard Stallman by simplifying the original so called
   ``semantic'' parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 1

/* Using locations.  */
#define YYLSP_NEEDED 0



/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     ATTRIBUTE = 258,
     CONST_QUAL = 259,
     BOOL_TYPE = 260,
     FLOAT_TYPE = 261,
     INT_TYPE = 262,
     BREAK = 263,
     CONTINUE = 264,
     DO = 265,
     ELSE = 266,
     FOR = 267,
     IF = 268,
     DISCARD = 269,
     RETURN = 270,
     BVEC2 = 271,
     BVEC3 = 272,
     BVEC4 = 273,
     IVEC2 = 274,
     IVEC3 = 275,
     IVEC4 = 276,
     VEC2 = 277,
     VEC3 = 278,
     VEC4 = 279,
     MATRIX2 = 280,
     MATRIX3 = 281,
     MATRIX4 = 282,
     IN_QUAL = 283,
     OUT_QUAL = 284,
     INOUT_QUAL = 285,
     UNIFORM = 286,
     VARYING = 287,
     STRUCT = 288,
     VOID_TYPE = 289,
     WHILE = 290,
     SAMPLER1D = 291,
     SAMPLER2D = 292,
     SAMPLER3D = 293,
     SAMPLERCUBE = 294,
     SAMPLER1DSHADOW = 295,
     SAMPLER2DSHADOW = 296,
     IDENTIFIER = 297,
     TYPE_NAME = 298,
     FLOATCONSTANT = 299,
     INTCONSTANT = 300,
     BOOLCONSTANT = 301,
     FIELD_SELECTION = 302,
     LEFT_OP = 303,
     RIGHT_OP = 304,
     INC_OP = 305,
     DEC_OP = 306,
     LE_OP = 307,
     GE_OP = 308,
     EQ_OP = 309,
     NE_OP = 310,
     AND_OP = 311,
     OR_OP = 312,
     XOR_OP = 313,
     MUL_ASSIGN = 314,
     DIV_ASSIGN = 315,
     ADD_ASSIGN = 316,
     MOD_ASSIGN = 317,
     LEFT_ASSIGN = 318,
     RIGHT_ASSIGN = 319,
     AND_ASSIGN = 320,
     XOR_ASSIGN = 321,
     OR_ASSIGN = 322,
     SUB_ASSIGN = 323,
     LEFT_PAREN = 324,
     RIGHT_PAREN = 325,
     LEFT_BRACKET = 326,
     RIGHT_BRACKET = 327,
     LEFT_BRACE = 328,
     RIGHT_BRACE = 329,
     DOT = 330,
     COMMA = 331,
     COLON = 332,
     EQUAL = 333,
     SEMICOLON = 334,
     BANG = 335,
     DASH = 336,
     TILDE = 337,
     PLUS = 338,
     STAR = 339,
     SLASH = 340,
     PERCENT = 341,
     LEFT_ANGLE = 342,
     RIGHT_ANGLE = 343,
     VERTICAL_BAR = 344,
     CARET = 345,
     AMPERSAND = 346,
     QUESTION = 347
   };
#endif
#define ATTRIBUTE 258
#define CONST_QUAL 259
#define BOOL_TYPE 260
#define FLOAT_TYPE 261
#define INT_TYPE 262
#define BREAK 263
#define CONTINUE 264
#define DO 265
#define ELSE 266
#define FOR 267
#define IF 268
#define DISCARD 269
#define RETURN 270
#define BVEC2 271
#define BVEC3 272
#define BVEC4 273
#define IVEC2 274
#define IVEC3 275
#define IVEC4 276
#define VEC2 277
#define VEC3 278
#define VEC4 279
#define MATRIX2 280
#define MATRIX3 281
#define MATRIX4 282
#define IN_QUAL 283
#define OUT_QUAL 284
#define INOUT_QUAL 285
#define UNIFORM 286
#define VARYING 287
#define STRUCT 288
#define VOID_TYPE 289
#define WHILE 290
#define SAMPLER1D 291
#define SAMPLER2D 292
#define SAMPLER3D 293
#define SAMPLERCUBE 294
#define SAMPLER1DSHADOW 295
#define SAMPLER2DSHADOW 296
#define IDENTIFIER 297
#define TYPE_NAME 298
#define FLOATCONSTANT 299
#define INTCONSTANT 300
#define BOOLCONSTANT 301
#define FIELD_SELECTION 302
#define LEFT_OP 303
#define RIGHT_OP 304
#define INC_OP 305
#define DEC_OP 306
#define LE_OP 307
#define GE_OP 308
#define EQ_OP 309
#define NE_OP 310
#define AND_OP 311
#define OR_OP 312
#define XOR_OP 313
#define MUL_ASSIGN 314
#define DIV_ASSIGN 315
#define ADD_ASSIGN 316
#define MOD_ASSIGN 317
#define LEFT_ASSIGN 318
#define RIGHT_ASSIGN 319
#define AND_ASSIGN 320
#define XOR_ASSIGN 321
#define OR_ASSIGN 322
#define SUB_ASSIGN 323
#define LEFT_PAREN 324
#define RIGHT_PAREN 325
#define LEFT_BRACKET 326
#define RIGHT_BRACKET 327
#define LEFT_BRACE 328
#define RIGHT_BRACE 329
#define DOT 330
#define COMMA 331
#define COLON 332
#define EQUAL 333
#define SEMICOLON 334
#define BANG 335
#define DASH 336
#define TILDE 337
#define PLUS 338
#define STAR 339
#define SLASH 340
#define PERCENT 341
#define LEFT_ANGLE 342
#define RIGHT_ANGLE 343
#define VERTICAL_BAR 344
#define CARET 345
#define AMPERSAND 346
#define QUESTION 347




/* Copy the first part of user declarations.  */
#line 39 "glslang.y"


/* Based on:
ANSI C Yacc grammar

In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a 
matching Lex specification) for the April 30, 1985 draft version of the 
ANSI C standard.  Tom Stockfisch reposted it to net.sources in 1987; that
original, as mentioned in the answer to question 17.25 of the comp.lang.c
FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z.
 
I intend to keep this version as close to the current C Standard grammar as 
possible; please let me know if you discover discrepancies. 

Jutta Degener, 1995 
*/

#include "SymbolTable.h"
#include "ParseHelper.h"
#include "../Public/ShaderLang.h"

#ifdef _WIN32
    #define YYPARSE_PARAM parseContext
    #define YYPARSE_PARAM_DECL TParseContext&
    #define YY_DECL int yylex(YYSTYPE* pyylval, TParseContext& parseContext)
    #define YYLEX_PARAM parseContext
#else
    #define YYPARSE_PARAM parseContextLocal
    #define parseContext (*((TParseContext*)(parseContextLocal)))
    #define YY_DECL int yylex(YYSTYPE* pyylval, void* parseContextLocal)
    #define YYLEX_PARAM (void*)(parseContextLocal)
    extern void yyerror(char*);    
#endif

#define FRAG_VERT_ONLY(S, L) {                                                  \
    if (parseContext.language != EShLangFragment &&                             \
        parseContext.language != EShLangVertex) {                               \
        parseContext.error(L, " supported in vertex/fragment shaders only ", S, "", "");   \
        parseContext.recover();                                                            \
    }                                                                           \
}

#define VERTEX_ONLY(S, L) {                                                     \
    if (parseContext.language != EShLangVertex) {                               \
        parseContext.error(L, " supported in vertex shaders only ", S, "", "");            \
        parseContext.recover();                                                            \
    }                                                                           \
}

#define FRAG_ONLY(S, L) {                                                       \
    if (parseContext.language != EShLangFragment) {                             \
        parseContext.error(L, " supported in fragment shaders only ", S, "", "");          \
        parseContext.recover();                                                            \
    }                                                                           \
}

#define PACK_ONLY(S, L) {                                                       \
    if (parseContext.language != EShLangPack) {                                 \
        parseContext.error(L, " supported in pack shaders only ", S, "", "");              \
        parseContext.recover();                                                            \
    }                                                                           \
}

#define UNPACK_ONLY(S, L) {                                                     \
    if (parseContext.language != EShLangUnpack) {                               \
        parseContext.error(L, " supported in unpack shaders only ", S, "", "");            \
        parseContext.recover();                                                            \
    }                                                                           \
}

#define PACK_UNPACK_ONLY(S, L) {                                                \
    if (parseContext.language != EShLangUnpack &&                               \
        parseContext.language != EShLangPack) {                                 \
        parseContext.error(L, " supported in pack/unpack shaders only ", S, "", "");       \
        parseContext.recover();                                                            \
    }                                                                           \
}


/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 117 "glslang.y"
typedef union YYSTYPE {
    struct {
        TSourceLoc line;
        union {
            TString *string;
            float f;
            int i;
            bool b;
        };
        TSymbol* symbol;
    } lex;
    struct {
        TSourceLoc line;
        TOperator op;
        union {
            TIntermNode* intermNode;
            TIntermNodePair nodePair;
            TIntermTyped* intermTypedNode;
            TIntermAggregate* intermAggregate;
        };
        union {
            TPublicType type;
            TQualifier qualifier;
            TFunction* function;
            TParameter param;
            TTypeLine typeLine;
            TTypeList* typeList;
        };
    } interm;
} YYSTYPE;
/* Line 191 of yacc.c.  */
#line 369 "glslang.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif



/* Copy the second part of user declarations.  */
#line 148 "glslang.y"

#ifndef _WIN32
    extern int yylex(YYSTYPE*, void*);
#endif


/* Line 214 of yacc.c.  */
#line 386 "glslang.tab.c"

#if ! defined (yyoverflow) || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# if YYSTACK_USE_ALLOCA
#  define YYSTACK_ALLOC alloca
# else
#  ifndef YYSTACK_USE_ALLOCA
#   if defined (alloca) || defined (_ALLOCA_H)
#    define YYSTACK_ALLOC alloca
#   else
#    ifdef __GNUC__
#     define YYSTACK_ALLOC __builtin_alloca
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning. */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
#  if defined (__STDC__) || defined (__cplusplus)
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   define YYSIZE_T size_t
#  endif
#  define YYSTACK_ALLOC malloc
#  define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */


#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
	 || (YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
  };

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  register YYSIZE_T yyi;		\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (0)
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)					\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
	Stack = &yyptr->Stack;						\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
    while (0)

#endif

#if defined (__STDC__) || defined (__cplusplus)
   typedef signed char yysigned_char;
#else
   typedef short yysigned_char;
#endif

/* YYFINAL -- State number of the termination state. */
#define YYFINAL  59
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   1231

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  93
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  75
/* YYNRULES -- Number of rules. */
#define YYNRULES  214
/* YYNRULES -- Number of states. */
#define YYNSTATES  331

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   347

#define YYTRANSLATE(YYX) 						\
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const unsigned char yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     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
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned short yyprhs[] =
{
       0,     0,     3,     5,     7,     9,    11,    13,    17,    19,
      24,    26,    30,    33,    36,    38,    40,    43,    46,    49,
      51,    54,    58,    61,    63,    65,    67,    69,    71,    73,
      75,    77,    79,    81,    83,    85,    87,    89,    91,    93,
      95,    97,    99,   102,   105,   108,   110,   112,   114,   116,
     118,   122,   126,   130,   132,   136,   140,   142,   146,   150,
     152,   156,   160,   164,   168,   170,   174,   178,   180,   184,
     186,   190,   192,   196,   198,   202,   204,   208,   210,   214,
     216,   222,   224,   228,   230,   232,   234,   236,   238,   240,
     242,   244,   246,   248,   250,   252,   256,   258,   261,   264,
     267,   269,   271,   274,   278,   282,   285,   291,   295,   298,
     302,   305,   306,   308,   310,   312,   314,   319,   321,   325,
     331,   338,   344,   346,   349,   354,   360,   365,   367,   370,
     372,   374,   376,   378,   380,   382,   384,   386,   388,   390,
     392,   394,   396,   398,   400,   402,   404,   406,   408,   410,
     412,   414,   416,   418,   420,   422,   424,   426,   432,   437,
     439,   442,   446,   448,   452,   454,   459,   461,   463,   465,
     467,   469,   471,   473,   475,   477,   480,   481,   482,   488,
     490,   492,   495,   499,   501,   504,   506,   509,   515,   519,
     521,   523,   528,   529,   536,   537,   546,   547,   555,   557,
     559,   561,   562,   565,   569,   572,   575,   578,   582,   585,
     587,   590,   592,   594,   595
};

/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const short yyrhs[] =
{
     164,     0,    -1,    42,    -1,    94,    -1,    45,    -1,    44,
      -1,    46,    -1,    69,   121,    70,    -1,    95,    -1,    96,
      71,    97,    72,    -1,    98,    -1,    96,    75,    47,    -1,
      96,    50,    -1,    96,    51,    -1,   121,    -1,    99,    -1,
     101,    70,    -1,   100,    70,    -1,   102,    34,    -1,   102,
      -1,   102,   119,    -1,   101,    76,   119,    -1,   103,    69,
      -1,   104,    -1,    42,    -1,     6,    -1,     7,    -1,     5,
      -1,    22,    -1,    23,    -1,    24,    -1,    16,    -1,    17,
      -1,    18,    -1,    19,    -1,    20,    -1,    21,    -1,    25,
      -1,    26,    -1,    27,    -1,    43,    -1,    96,    -1,    50,
     105,    -1,    51,   105,    -1,   106,   105,    -1,    83,    -1,
      81,    -1,    80,    -1,    82,    -1,   105,    -1,   107,    84,
     105,    -1,   107,    85,   105,    -1,   107,    86,   105,    -1,
     107,    -1,   108,    83,   107,    -1,   108,    81,   107,    -1,
     108,    -1,   109,    48,   108,    -1,   109,    49,   108,    -1,
     109,    -1,   110,    87,   109,    -1,   110,    88,   109,    -1,
     110,    52,   109,    -1,   110,    53,   109,    -1,   110,    -1,
     111,    54,   110,    -1,   111,    55,   110,    -1,   111,    -1,
     112,    91,   111,    -1,   112,    -1,   113,    90,   112,    -1,
     113,    -1,   114,    89,   113,    -1,   114,    -1,   115,    56,
     114,    -1,   115,    -1,   116,    58,   115,    -1,   116,    -1,
     117,    57,   116,    -1,   117,    -1,   117,    92,   121,    77,
     119,    -1,   118,    -1,   105,   120,   119,    -1,    78,    -1,
      59,    -1,    60,    -1,    62,    -1,    61,    -1,    68,    -1,
      63,    -1,    64,    -1,    65,    -1,    66,    -1,    67,    -1,
     119,    -1,   121,    76,   119,    -1,   118,    -1,   124,    79,
      -1,   132,    79,    -1,   125,    70,    -1,   127,    -1,   126,
      -1,   127,   129,    -1,   126,    76,   129,    -1,   134,    42,
      69,    -1,   136,    42,    -1,   136,    42,    71,   122,    72,
      -1,   135,   130,   128,    -1,   130,   128,    -1,   135,   130,
     131,    -1,   130,   131,    -1,    -1,    28,    -1,    29,    -1,
      30,    -1,   136,    -1,   136,    71,   122,    72,    -1,   133,
      -1,   132,    76,    42,    -1,   132,    76,    42,    71,    72,
      -1,   132,    76,    42,    71,   122,    72,    -1,   132,    76,
      42,    78,   142,    -1,   134,    -1,   134,    42,    -1,   134,
      42,    71,    72,    -1,   134,    42,    71,   122,    72,    -1,
     134,    42,    78,   142,    -1,   136,    -1,   135,   136,    -1,
       4,    -1,     3,    -1,    32,    -1,    31,    -1,    34,    -1,
       6,    -1,     7,    -1,     5,    -1,    22,    -1,    23,    -1,
      24,    -1,    16,    -1,    17,    -1,    18,    -1,    19,    -1,
      20,    -1,    21,    -1,    25,    -1,    26,    -1,    27,    -1,
      36,    -1,    37,    -1,    38,    -1,    39,    -1,    40,    -1,
      41,    -1,   137,    -1,    43,    -1,    33,    42,    73,   138,
      74,    -1,    33,    73,   138,    74,    -1,   139,    -1,   138,
     139,    -1,   136,   140,    79,    -1,   141,    -1,   140,    76,
     141,    -1,    42,    -1,    42,    71,   122,    72,    -1,   119,
      -1,   123,    -1,   146,    -1,   145,    -1,   143,    -1,   152,
      -1,   153,    -1,   156,    -1,   163,    -1,    73,    74,    -1,
      -1,    -1,    73,   147,   151,   148,    74,    -1,   150,    -1,
     145,    -1,    73,    74,    -1,    73,   151,    74,    -1,   144,
      -1,   151,   144,    -1,    79,    -1,   121,    79,    -1,    13,
      69,   121,    70,   154,    -1,   144,    11,   144,    -1,   144,
      -1,   121,    -1,   134,    42,    78,   142,    -1,    -1,    35,
      69,   157,   155,    70,   149,    -1,    -1,    10,   158,   144,
      35,    69,   121,    70,    79,    -1,    -1,    12,    69,   159,
     160,   162,    70,   149,    -1,   152,    -1,   143,    -1,   155,
      -1,    -1,   161,    79,    -1,   161,    79,   121,    -1,     9,
      79,    -1,     8,    79,    -1,    15,    79,    -1,    15,   121,
      79,    -1,    14,    79,    -1,   165,    -1,   164,   165,    -1,
     166,    -1,   123,    -1,    -1,   124,   167,   150,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short yyrline[] =
{
       0,   210,   210,   245,   248,   261,   266,   271,   277,   280,
     348,   351,   460,   470,   483,   491,   586,   590,   597,   601,
     608,   614,   623,   629,   640,   656,   657,   658,   659,   660,
     661,   662,   663,   664,   665,   666,   667,   668,   669,   670,
     671,   682,   685,   695,   705,   727,   728,   729,   730,   736,
     737,   746,   755,   767,   768,   776,   787,   788,   797,   809,
     810,   820,   830,   840,   853,   854,   864,   877,   878,   890,
     891,   903,   904,   916,   917,   930,   931,   944,   945,   958,
     959,   976,   977,   990,   991,   992,   993,   994,   995,   996,
     997,   998,   999,  1000,  1004,  1007,  1018,  1026,  1027,  1035,
    1071,  1074,  1081,  1089,  1110,  1129,  1140,  1167,  1172,  1182,
    1187,  1197,  1200,  1203,  1206,  1212,  1217,  1235,  1238,  1246,
    1254,  1262,  1284,  1288,  1297,  1306,  1315,  1405,  1408,  1425,
    1429,  1436,  1444,  1453,  1458,  1463,  1468,  1479,  1484,  1489,
    1494,  1499,  1504,  1509,  1514,  1519,  1524,  1530,  1536,  1542,
    1548,  1554,  1560,  1566,  1572,  1578,  1583,  1596,  1606,  1614,
    1617,  1632,  1650,  1654,  1660,  1665,  1681,  1685,  1689,  1690,
    1696,  1697,  1698,  1699,  1700,  1704,  1705,  1705,  1705,  1713,
    1714,  1719,  1722,  1730,  1733,  1739,  1740,  1744,  1752,  1756,
    1766,  1771,  1788,  1788,  1793,  1793,  1800,  1800,  1813,  1816,
    1822,  1825,  1831,  1835,  1842,  1849,  1856,  1863,  1874,  1883,
    1887,  1894,  1897,  1903,  1903
};
#endif

#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "ATTRIBUTE", "CONST_QUAL", "BOOL_TYPE", 
  "FLOAT_TYPE", "INT_TYPE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", 
  "IF", "DISCARD", "RETURN", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", 
  "IVEC4", "VEC2", "VEC3", "VEC4", "MATRIX2", "MATRIX3", "MATRIX4", 
  "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM", "VARYING", "STRUCT", 
  "VOID_TYPE", "WHILE", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", 
  "SAMPLERCUBE", "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "IDENTIFIER", 
  "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT", "BOOLCONSTANT", 
  "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", 
  "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", 
  "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", 
  "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", 
  "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", 
  "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", 
  "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", 
  "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION", 
  "$accept", "variable_identifier", "primary_expression", 
  "postfix_expression", "integer_expression", "function_call", 
  "function_call_generic", "function_call_header_no_parameters", 
  "function_call_header_with_parameters", "function_call_header", 
  "function_identifier", "constructor_identifier", "unary_expression", 
  "unary_operator", "multiplicative_expression", "additive_expression", 
  "shift_expression", "relational_expression", "equality_expression", 
  "and_expression", "exclusive_or_expression", "inclusive_or_expression", 
  "logical_and_expression", "logical_xor_expression", 
  "logical_or_expression", "conditional_expression", 
  "assignment_expression", "assignment_operator", "expression", 
  "constant_expression", "declaration", "function_prototype", 
  "function_declarator", "function_header_with_parameters", 
  "function_header", "parameter_declarator", "parameter_declaration", 
  "parameter_qualifier", "parameter_type_specifier", 
  "init_declarator_list", "single_declaration", "fully_specified_type", 
  "type_qualifier", "type_specifier", "struct_specifier", 
  "struct_declaration_list", "struct_declaration", 
  "struct_declarator_list", "struct_declarator", "initializer", 
  "declaration_statement", "statement", "simple_statement", 
  "compound_statement", "@1", "@2", "statement_no_new_scope", 
  "compound_statement_no_new_scope", "statement_list", 
  "expression_statement", "selection_statement", 
  "selection_rest_statement", "condition", "iteration_statement", "@3", 
  "@4", "@5", "for_init_statement", "conditionopt", "for_rest_statement", 
  "jump_statement", "translation_unit", "external_declaration", 
  "function_definition", "@6", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short yytoknum[] =
{
       0,   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
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    93,    94,    95,    95,    95,    95,    95,    96,    96,
      96,    96,    96,    96,    97,    98,    99,    99,   100,   100,
     101,   101,   102,   103,   103,   104,   104,   104,   104,   104,
     104,   104,   104,   104,   104,   104,   104,   104,   104,   104,
     104,   105,   105,   105,   105,   106,   106,   106,   106,   107,
     107,   107,   107,   108,   108,   108,   109,   109,   109,   110,
     110,   110,   110,   110,   111,   111,   111,   112,   112,   113,
     113,   114,   114,   115,   115,   116,   116,   117,   117,   118,
     118,   119,   119,   120,   120,   120,   120,   120,   120,   120,
     120,   120,   120,   120,   121,   121,   122,   123,   123,   124,
     125,   125,   126,   126,   127,   128,   128,   129,   129,   129,
     129,   130,   130,   130,   130,   131,   131,   132,   132,   132,
     132,   132,   133,   133,   133,   133,   133,   134,   134,   135,
     135,   135,   135,   136,   136,   136,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   136,   136,   136,
     136,   136,   136,   136,   136,   136,   136,   137,   137,   138,
     138,   139,   140,   140,   141,   141,   142,   143,   144,   144,
     145,   145,   145,   145,   145,   146,   147,   148,   146,   149,
     149,   150,   150,   151,   151,   152,   152,   153,   154,   154,
     155,   155,   157,   156,   158,   156,   159,   156,   160,   160,
     161,   161,   162,   162,   163,   163,   163,   163,   163,   164,
     164,   165,   165,   167,   166
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const unsigned char yyr2[] =
{
       0,     2,     1,     1,     1,     1,     1,     3,     1,     4,
       1,     3,     2,     2,     1,     1,     2,     2,     2,     1,
       2,     3,     2,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     2,     2,     2,     1,     1,     1,     1,     1,
       3,     3,     3,     1,     3,     3,     1,     3,     3,     1,
       3,     3,     3,     3,     1,     3,     3,     1,     3,     1,
       3,     1,     3,     1,     3,     1,     3,     1,     3,     1,
       5,     1,     3,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     3,     1,     2,     2,     2,
       1,     1,     2,     3,     3,     2,     5,     3,     2,     3,
       2,     0,     1,     1,     1,     1,     4,     1,     3,     5,
       6,     5,     1,     2,     4,     5,     4,     1,     2,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     5,     4,     1,
       2,     3,     1,     3,     1,     4,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     2,     0,     0,     5,     1,
       1,     2,     3,     1,     2,     1,     2,     5,     3,     1,
       1,     4,     0,     6,     0,     8,     0,     7,     1,     1,
       1,     0,     2,     3,     2,     2,     2,     3,     2,     1,
       2,     1,     1,     0,     3
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const unsigned char yydefact[] =
{
       0,   130,   129,   136,   134,   135,   140,   141,   142,   143,
     144,   145,   137,   138,   139,   146,   147,   148,   132,   131,
       0,   133,   149,   150,   151,   152,   153,   154,   156,   212,
     213,     0,   101,   111,     0,   117,   122,     0,   127,   155,
       0,   209,   211,     0,     0,    97,     0,    99,   111,   112,
     113,   114,   102,     0,   111,     0,    98,   123,   128,     1,
     210,     0,     0,     0,   159,     0,   214,   103,   108,   110,
     115,     0,   118,   104,     0,     0,     0,   164,     0,   162,
     158,   160,   136,   134,   135,     0,     0,   194,     0,     0,
       0,     0,   140,   141,   142,   143,   144,   145,   137,   138,
     139,   146,   147,   148,     0,     2,   156,     5,     4,     6,
       0,     0,     0,   176,   181,   185,    47,    46,    48,    45,
       3,     8,    41,    10,    15,     0,     0,    19,     0,    23,
      49,     0,    53,    56,    59,    64,    67,    69,    71,    73,
      75,    77,    79,    81,    94,     0,   167,     0,   170,   183,
     169,   168,     0,   171,   172,   173,   174,   105,     0,   107,
     109,     0,     0,    27,    25,    26,    31,    32,    33,    34,
      35,    36,    28,    29,    30,    37,    38,    39,    40,   124,
      49,    96,     0,   166,   126,   157,     0,     0,   161,   205,
     204,     0,   196,     0,   208,   206,     0,   192,    42,    43,
       0,   175,     0,    12,    13,     0,     0,    17,    16,     0,
      18,    20,    22,    84,    85,    87,    86,    89,    90,    91,
      92,    93,    88,    83,     0,    44,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   186,   182,   184,
       0,     0,   119,     0,   121,   125,     0,   163,     0,     0,
       0,   207,     0,     7,   177,     0,    14,    11,    21,    82,
      50,    51,    52,    55,    54,    57,    58,    62,    63,    60,
      61,    65,    66,    68,    70,    72,    74,    76,    78,     0,
      95,     0,   116,   120,   165,     0,   199,   198,   201,     0,
     190,     0,     0,     0,     9,     0,   106,     0,   200,     0,
       0,   189,   187,     0,     0,   178,    80,     0,   202,     0,
       0,     0,   180,   193,   179,     0,   203,   197,   188,   191,
     195
};

/* YYDEFGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
      -1,   120,   121,   122,   265,   123,   124,   125,   126,   127,
     128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
     138,   139,   140,   141,   142,   143,   144,   224,   145,   182,
     146,   147,    31,    32,    33,    68,    52,    53,    69,    34,
      35,    36,    37,    38,    39,    63,    64,    78,    79,   184,
     148,   149,   150,   151,   202,   303,   323,   324,   152,   153,
     154,   312,   302,   155,   262,   191,   259,   298,   309,   310,
     156,    40,    41,    42,    46
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -297
static const short yypact[] =
{
    1149,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
    -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
     -27,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
     -42,   -28,   -32,     4,    18,  -297,    19,  1188,  -297,  -297,
    1108,  -297,  -297,   -10,  1188,  -297,    -3,  -297,    36,  -297,
    -297,  -297,  -297,  1188,    83,    33,  -297,    -9,  -297,  -297,
    -297,  1188,    39,  1025,  -297,   235,  -297,  -297,  -297,  -297,
     -18,  1188,   -52,  -297,   685,   957,  1064,   -17,    20,  -297,
    -297,  -297,    29,    45,    63,    21,    23,  -297,    75,    77,
      66,   753,    78,    79,    81,    82,    84,    85,    87,    89,
      90,    91,    93,    94,    95,    96,    97,  -297,  -297,  -297,
     957,   957,   957,   120,  -297,  -297,  -297,  -297,  -297,  -297,
    -297,  -297,     5,  -297,  -297,    98,     1,   821,   100,  -297,
      57,   957,    42,   -56,    37,   -40,    76,    61,    80,   106,
     111,   138,   -41,  -297,  -297,    30,  -297,   -42,  -297,  -297,
    -297,  -297,   316,  -297,  -297,  -297,  -297,   127,   957,  -297,
    -297,   889,   957,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
    -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
    -297,  -297,   128,  -297,  -297,  -297,   957,    39,  -297,  -297,
    -297,   397,  -297,   957,  -297,  -297,    31,  -297,  -297,  -297,
       3,  -297,   397,  -297,  -297,   957,   152,  -297,  -297,   957,
    -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
    -297,  -297,  -297,  -297,   957,  -297,   957,   957,   957,   957,
     957,   957,   957,   957,   957,   957,   957,   957,   957,   957,
     957,   957,   957,   957,   957,   957,   957,  -297,  -297,  -297,
     957,   129,  -297,   130,  -297,  -297,   131,  -297,   169,   549,
      12,  -297,   617,  -297,   397,   133,   134,  -297,  -297,  -297,
    -297,  -297,  -297,    42,    42,   -56,   -56,    37,    37,    37,
      37,   -40,   -40,    76,    61,    80,   106,   111,   138,    60,
    -297,   135,  -297,  -297,  -297,   137,  -297,  -297,   617,   397,
     134,   167,   141,   140,  -297,   957,  -297,   957,  -297,   136,
     142,   205,  -297,   143,   478,  -297,  -297,    13,   957,   478,
     397,   957,  -297,  -297,  -297,   139,   134,  -297,  -297,  -297,
    -297
};

/* YYPGOTO[NTERM-NUM].  */
static const short yypgoto[] =
{
    -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
    -297,  -297,   -53,  -297,   -91,   -89,  -143,   -97,   -20,   -16,
     -21,   -15,   -14,   -22,  -297,   -57,   -75,  -297,   -90,  -155,
       9,    10,  -297,  -297,  -297,   154,   175,   172,   160,  -297,
    -297,  -257,   -19,   -33,  -297,   171,    -4,  -297,    46,  -160,
     -25,  -107,  -296,  -297,  -297,  -297,   -84,   190,    35,     6,
    -297,  -297,   -35,  -297,  -297,  -297,  -297,  -297,  -297,  -297,
    -297,  -297,   224,  -297,  -297
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -101
static const short yytable[] =
{
     183,   196,   254,   251,    58,   301,   253,     1,     2,    29,
      30,    62,   233,   234,    54,    43,   244,   181,   322,   161,
      70,   180,   200,   322,   157,   229,   162,   230,    62,    54,
      62,   256,    49,    50,    51,    18,    19,    45,    70,     1,
       2,   301,    47,    62,    48,   249,    44,   235,   236,    29,
      30,   245,   211,   158,   186,   203,   204,   198,   199,    81,
      73,    57,    74,    61,    49,    50,    51,    18,    19,    75,
      65,   208,    81,   263,  -100,    72,   205,   209,   225,   246,
     206,    77,   299,   325,   258,   231,   232,   183,   246,   246,
     277,   278,   279,   280,    55,   291,   187,    56,   -27,   188,
     189,   181,   190,   260,   181,   180,   246,   246,   180,   247,
     261,    49,    50,    51,   -25,   266,   213,   214,   215,   216,
     217,   218,   219,   220,   221,   222,   226,   227,   228,   181,
     237,   238,   -26,   180,   268,   223,   246,   305,   273,   274,
     281,   282,   275,   276,   192,   194,   193,   -31,   -32,   269,
     -33,   -34,   239,   -35,   -36,   289,   -28,   249,   -29,   -30,
     -37,   329,   -38,   -39,   197,   -24,   -40,   242,   207,   212,
     240,   290,   300,   270,   271,   272,   180,   180,   180,   180,
     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
     180,   180,   311,   181,   201,   241,   243,   180,   250,   267,
     255,   292,   293,   294,   295,   304,   307,   306,   300,   313,
     246,   314,   319,   328,   315,   318,   320,   317,   330,   283,
     285,   321,   288,    67,   284,   159,    71,   286,   326,   287,
     316,   160,    76,   257,   296,   327,    66,   264,     1,     2,
      82,    83,    84,    85,    86,    87,   183,    88,    89,    90,
      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
     101,   102,   103,   308,    60,   297,    18,    19,    20,    21,
     104,    22,    23,    24,    25,    26,    27,   105,   106,   107,
     108,   109,     0,     0,     0,   110,   111,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   112,     0,     0,     0,   113,   114,
       0,     0,     0,     0,   115,   116,   117,   118,   119,     1,
       2,    82,    83,    84,    85,    86,    87,     0,    88,    89,
      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
     100,   101,   102,   103,     0,     0,     0,    18,    19,    20,
      21,   104,    22,    23,    24,    25,    26,    27,   105,   106,
     107,   108,   109,     0,     0,     0,   110,   111,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   112,     0,     0,     0,   113,
     248,     0,     0,     0,     0,   115,   116,   117,   118,   119,
       1,     2,    82,    83,    84,    85,    86,    87,     0,    88,
      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
      99,   100,   101,   102,   103,     0,     0,     0,    18,    19,
      20,    21,   104,    22,    23,    24,    25,    26,    27,   105,
     106,   107,   108,   109,     0,     0,     0,   110,   111,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   112,     0,     0,     0,
     113,     0,     0,     0,     0,     0,   115,   116,   117,   118,
     119,     1,     2,    82,    83,    84,    85,    86,    87,     0,
      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
      98,    99,   100,   101,   102,   103,     0,     0,     0,    18,
      19,    20,    21,   104,    22,    23,    24,    25,    26,    27,
     105,   106,   107,   108,   109,     0,     0,     0,   110,   111,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   112,     0,     0,
       0,    65,     1,     2,    82,    83,    84,   115,   116,   117,
     118,   119,     0,     0,     0,    92,    93,    94,    95,    96,
      97,    98,    99,   100,   101,   102,   103,     0,     0,     0,
      18,    19,    20,    21,     0,    22,    23,    24,    25,    26,
      27,   105,   106,   107,   108,   109,     0,     0,     0,   110,
     111,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   112,     0,
       1,     2,    82,    83,    84,     0,     0,     0,   115,   116,
     117,   118,   119,    92,    93,    94,    95,    96,    97,    98,
      99,   100,   101,   102,   103,     0,     0,     0,    18,    19,
      20,    21,     0,    22,    23,    24,    25,    26,    27,   105,
     106,   107,   108,   109,     0,     0,     0,   110,   111,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   112,     0,     0,     0,
     163,   164,   165,     0,     0,     0,     0,   116,   117,   118,
     119,   166,   167,   168,   169,   170,   171,   172,   173,   174,
     175,   176,   177,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,   105,   178,   107,
     108,   109,     0,     0,     0,   110,   111,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   112,     0,     0,   179,   163,   164,
     165,     0,     0,     0,     0,   116,   117,   118,   119,   166,
     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
     177,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   105,   178,   107,   108,   109,
       0,     0,     0,   110,   111,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   112,     0,     0,     0,   163,   164,   165,     0,
       0,     0,   195,   116,   117,   118,   119,   166,   167,   168,
     169,   170,   171,   172,   173,   174,   175,   176,   177,     0,
       0,     0,     0,     0,     0,   210,     0,     0,     0,     0,
       0,     0,     0,   105,   178,   107,   108,   109,     0,     0,
       0,   110,   111,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     112,     0,     0,     0,   163,   164,   165,     0,     0,     0,
       0,   116,   117,   118,   119,   166,   167,   168,   169,   170,
     171,   172,   173,   174,   175,   176,   177,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,   105,   178,   107,   108,   109,     0,     0,     0,   110,
     111,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   112,     0,
       0,   252,   163,   164,   165,     0,     0,     0,     0,   116,
     117,   118,   119,   166,   167,   168,   169,   170,   171,   172,
     173,   174,   175,   176,   177,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   105,
     178,   107,   108,   109,     0,     0,     0,   110,   111,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   112,     0,     0,     0,
       3,     4,     5,     0,     0,     0,     0,   116,   117,   118,
     119,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,     0,     0,     0,     0,     0,    20,    21,
       0,    22,    23,    24,    25,    26,    27,     0,    28,     3,
       4,     5,     0,     0,     0,     0,     0,     0,     0,     0,
       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
      16,    17,     0,     0,     0,     0,     0,    20,    21,    80,
      22,    23,    24,    25,    26,    27,     0,    28,    59,     0,
       0,     1,     2,     3,     4,     5,     0,     0,     0,     0,
       0,     0,     0,     0,     6,     7,     8,     9,    10,    11,
      12,    13,    14,    15,    16,    17,     0,     0,   185,    18,
      19,    20,    21,     0,    22,    23,    24,    25,    26,    27,
       0,    28,     1,     2,     3,     4,     5,     0,     0,     0,
       0,     0,     0,     0,     0,     6,     7,     8,     9,    10,
      11,    12,    13,    14,    15,    16,    17,     0,     0,     0,
      18,    19,    20,    21,     0,    22,    23,    24,    25,    26,
      27,     0,    28,     3,     4,     5,     0,     0,     0,     0,
       0,     0,     0,     0,     6,     7,     8,     9,    10,    11,
      12,    13,    14,    15,    16,    17,     0,     0,     0,     0,
       0,    20,    21,     0,    22,    23,    24,    25,    26,    27,
       0,    28
};

static const short yycheck[] =
{
      75,    91,   162,   158,    37,   262,   161,     3,     4,     0,
       0,    44,    52,    53,    33,    42,    57,    74,   314,    71,
      53,    74,   112,   319,    42,    81,    78,    83,    61,    48,
      63,   186,    28,    29,    30,    31,    32,    79,    71,     3,
       4,   298,    70,    76,    76,   152,    73,    87,    88,    40,
      40,    92,   127,    71,    71,    50,    51,   110,   111,    63,
      69,    42,    71,    73,    28,    29,    30,    31,    32,    78,
      73,    70,    76,    70,    70,    42,    71,    76,   131,    76,
      75,    42,    70,    70,   191,    48,    49,   162,    76,    76,
     233,   234,   235,   236,    76,   250,    76,    79,    69,    79,
      79,   158,    79,   193,   161,   158,    76,    76,   161,    79,
      79,    28,    29,    30,    69,   205,    59,    60,    61,    62,
      63,    64,    65,    66,    67,    68,    84,    85,    86,   186,
      54,    55,    69,   186,   209,    78,    76,    77,   229,   230,
     237,   238,   231,   232,    69,    79,    69,    69,    69,   224,
      69,    69,    91,    69,    69,   245,    69,   264,    69,    69,
      69,   321,    69,    69,    69,    69,    69,    56,    70,    69,
      90,   246,   262,   226,   227,   228,   229,   230,   231,   232,
     233,   234,   235,   236,   237,   238,   239,   240,   241,   242,
     243,   244,   299,   250,    74,    89,    58,   250,    71,    47,
      72,    72,    72,    72,    35,    72,    69,    72,   298,    42,
      76,    70,    70,   320,    74,    79,    11,   307,    79,   239,
     241,    78,   244,    48,   240,    71,    54,   242,   318,   243,
     305,    71,    61,   187,   259,   319,    46,   202,     3,     4,
       5,     6,     7,     8,     9,    10,   321,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,   298,    40,   259,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    -1,    -1,    -1,    50,    51,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    73,    74,
      -1,    -1,    -1,    -1,    79,    80,    81,    82,    83,     3,
       4,     5,     6,     7,     8,     9,    10,    -1,    12,    13,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,    27,    -1,    -1,    -1,    31,    32,    33,
      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
      44,    45,    46,    -1,    -1,    -1,    50,    51,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    73,
      74,    -1,    -1,    -1,    -1,    79,    80,    81,    82,    83,
       3,     4,     5,     6,     7,     8,     9,    10,    -1,    12,
      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,    26,    27,    -1,    -1,    -1,    31,    32,
      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
      43,    44,    45,    46,    -1,    -1,    -1,    50,    51,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,
      73,    -1,    -1,    -1,    -1,    -1,    79,    80,    81,    82,
      83,     3,     4,     5,     6,     7,     8,     9,    10,    -1,
      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,    26,    27,    -1,    -1,    -1,    31,
      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
      42,    43,    44,    45,    46,    -1,    -1,    -1,    50,    51,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    69,    -1,    -1,
      -1,    73,     3,     4,     5,     6,     7,    79,    80,    81,
      82,    83,    -1,    -1,    -1,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    -1,    -1,    -1,
      31,    32,    33,    34,    -1,    36,    37,    38,    39,    40,
      41,    42,    43,    44,    45,    46,    -1,    -1,    -1,    50,
      51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    69,    -1,
       3,     4,     5,     6,     7,    -1,    -1,    -1,    79,    80,
      81,    82,    83,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,    26,    27,    -1,    -1,    -1,    31,    32,
      33,    34,    -1,    36,    37,    38,    39,    40,    41,    42,
      43,    44,    45,    46,    -1,    -1,    -1,    50,    51,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,
       5,     6,     7,    -1,    -1,    -1,    -1,    80,    81,    82,
      83,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    42,    43,    44,
      45,    46,    -1,    -1,    -1,    50,    51,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    69,    -1,    -1,    72,     5,     6,
       7,    -1,    -1,    -1,    -1,    80,    81,    82,    83,    16,
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
      27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    42,    43,    44,    45,    46,
      -1,    -1,    -1,    50,    51,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    69,    -1,    -1,    -1,     5,     6,     7,    -1,
      -1,    -1,    79,    80,    81,    82,    83,    16,    17,    18,
      19,    20,    21,    22,    23,    24,    25,    26,    27,    -1,
      -1,    -1,    -1,    -1,    -1,    34,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    42,    43,    44,    45,    46,    -1,    -1,
      -1,    50,    51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      69,    -1,    -1,    -1,     5,     6,     7,    -1,    -1,    -1,
      -1,    80,    81,    82,    83,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    42,    43,    44,    45,    46,    -1,    -1,    -1,    50,
      51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    69,    -1,
      -1,    72,     5,     6,     7,    -1,    -1,    -1,    -1,    80,
      81,    82,    83,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,    26,    27,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    42,
      43,    44,    45,    46,    -1,    -1,    -1,    50,    51,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,
       5,     6,     7,    -1,    -1,    -1,    -1,    80,    81,    82,
      83,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    -1,    -1,    -1,    -1,    -1,    33,    34,
      -1,    36,    37,    38,    39,    40,    41,    -1,    43,     5,
       6,     7,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,    27,    -1,    -1,    -1,    -1,    -1,    33,    34,    74,
      36,    37,    38,    39,    40,    41,    -1,    43,     0,    -1,
      -1,     3,     4,     5,     6,     7,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,    26,    27,    -1,    -1,    74,    31,
      32,    33,    34,    -1,    36,    37,    38,    39,    40,    41,
      -1,    43,     3,     4,     5,     6,     7,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    16,    17,    18,    19,    20,
      21,    22,    23,    24,    25,    26,    27,    -1,    -1,    -1,
      31,    32,    33,    34,    -1,    36,    37,    38,    39,    40,
      41,    -1,    43,     5,     6,     7,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,    26,    27,    -1,    -1,    -1,    -1,
      -1,    33,    34,    -1,    36,    37,    38,    39,    40,    41,
      -1,    43
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,     3,     4,     5,     6,     7,    16,    17,    18,    19,
      20,    21,    22,    23,    24,    25,    26,    27,    31,    32,
      33,    34,    36,    37,    38,    39,    40,    41,    43,   123,
     124,   125,   126,   127,   132,   133,   134,   135,   136,   137,
     164,   165,   166,    42,    73,    79,   167,    70,    76,    28,
      29,    30,   129,   130,   135,    76,    79,    42,   136,     0,
     165,    73,   136,   138,   139,    73,   150,   129,   128,   131,
     136,   130,    42,    69,    71,    78,   138,    42,   140,   141,
      74,   139,     5,     6,     7,     8,     9,    10,    12,    13,
      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,    27,    35,    42,    43,    44,    45,    46,
      50,    51,    69,    73,    74,    79,    80,    81,    82,    83,
      94,    95,    96,    98,    99,   100,   101,   102,   103,   104,
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,   116,   117,   118,   119,   121,   123,   124,   143,   144,
     145,   146,   151,   152,   153,   156,   163,    42,    71,   128,
     131,    71,    78,     5,     6,     7,    16,    17,    18,    19,
      20,    21,    22,    23,    24,    25,    26,    27,    43,    72,
     105,   118,   122,   119,   142,    74,    71,    76,    79,    79,
      79,   158,    69,    69,    79,    79,   121,    69,   105,   105,
     121,    74,   147,    50,    51,    71,    75,    70,    70,    76,
      34,   119,    69,    59,    60,    61,    62,    63,    64,    65,
      66,    67,    68,    78,   120,   105,    84,    85,    86,    81,
      83,    48,    49,    52,    53,    87,    88,    54,    55,    91,
      90,    89,    56,    58,    57,    92,    76,    79,    74,   144,
      71,   122,    72,   122,   142,    72,   122,   141,   144,   159,
     121,    79,   157,    70,   151,    97,   121,    47,   119,   119,
     105,   105,   105,   107,   107,   108,   108,   109,   109,   109,
     109,   110,   110,   111,   112,   113,   114,   115,   116,   121,
     119,   122,    72,    72,    72,    35,   143,   152,   160,    70,
     121,   134,   155,   148,    72,    77,    72,    69,   155,   161,
     162,   144,   154,    42,    70,    74,   119,   121,    79,    70,
      11,    78,   145,   149,   150,    70,   121,   149,   144,   142,
      79
};

#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		(-2)
#define YYEOF		0

#define YYACCEPT	goto yyacceptlab
#define YYABORT		goto yyabortlab
#define YYERROR		goto yyerrlab1


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */

#define YYFAIL		goto yyerrlab

#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)					\
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    {								\
      yychar = (Token);						\
      yylval = (Value);						\
      yytoken = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { 								\
      yyerror ("syntax error: cannot back up");\
      YYERROR;							\
    }								\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)         \
  Current.first_line   = Rhs[1].first_line;      \
  Current.first_column = Rhs[1].first_column;    \
  Current.last_line    = Rhs[N].last_line;       \
  Current.last_column  = Rhs[N].last_column;
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
# define YYLEX yylex (&yylval)
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (0)

# define YYDSYMPRINT(Args)			\
do {						\
  if (yydebug)					\
    yysymprint Args;				\
} while (0)

# define YYDSYMPRINTF(Title, Token, Value, Location)		\
do {								\
  if (yydebug)							\
    {								\
      YYFPRINTF (stderr, "%s ", Title);				\
      yysymprint (stderr, 					\
                  Token, Value);	\
      YYFPRINTF (stderr, "\n");					\
    }								\
} while (0)

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (cinluded).                                                   |
`------------------------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
    short *bottom;
    short *top;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (/* Nothing. */; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
    int yyrule;
#endif
{
  int yyi;
  unsigned int yylineno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylineno);
  /* Print the symbols being reduced, and their result.  */
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
}

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (Rule);		\
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif



#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
{
  register const char *yys = yystr;

  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

#endif /* !YYERROR_VERBOSE */



#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
#else
static void
yysymprint (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
    }
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
}

#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yytype, yyvaluep)
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  switch (yytype)
    {

      default:
        break;
    }
}


/* Prevent warnings from -Wmissing-prototypes.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */






/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{
  /* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;

  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  short	yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;



#define YYPOPSTACK   (yyvsp--, yyssp--)

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;


  /* When reducing, the number of symbols on the RHS of the reduced
     rule.  */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
	/* Give user a chance to reallocate the stack. Use copies of
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
	short *yyss1 = yyss;


	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  This used to be a
	   conditional around just the two extra args, but that might
	   be undefined if yyoverflow is a macro.  */
	yyoverflow ("parser stack overflow",
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),

		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
	goto yyoverflowlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
	yystacksize = YYMAXDEPTH;

      {
	short *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyoverflowlab;
	YYSTACK_RELOCATE (yyss);
	YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;


      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
	YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;


  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  yystate = yyn;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 2:
#line 210 "glslang.y"
    {
        // The symbol table search was done in the lexical phase
        const TSymbol* symbol = yyvsp[0].lex.symbol;
        const TVariable* variable;
        if (symbol == 0) {
            parseContext.error(yyvsp[0].lex.line, "undeclared identifier", yyvsp[0].lex.string->c_str(), "");
            parseContext.recover();
            TType type(EbtFloat);
            TVariable* fakeVariable = new TVariable(yyvsp[0].lex.string, type);
            parseContext.symbolTable.insert(*fakeVariable);
            variable = fakeVariable;
        } else {
            // This identifier can only be a variable type symbol 
            if (! symbol->isVariable()) {
                parseContext.error(yyvsp[0].lex.line, "variable expected", yyvsp[0].lex.string->c_str(), "");
                parseContext.recover();
            }
            variable = static_cast<const TVariable*>(symbol);
        }

        // don't delete $1.string, it's used by error recovery, and the pool
        // pop will reclaim the memory

        if (variable->getType().getQualifier() == EvqConst ) {
            constUnion* constArray = variable->getConstPointer();
            TType t(variable->getType());
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(constArray, t, yyvsp[0].lex.line);        
        } else
            yyval.interm.intermTypedNode = parseContext.intermediate.addSymbol(variable->getUniqueId(), 
                                                     variable->getName(), 
                                                     variable->getType(), yyvsp[0].lex.line);
    ;}
    break;

  case 3:
#line 245 "glslang.y"
    {
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 4:
#line 248 "glslang.y"
    {
        //
        // INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders, 
        // check for overflow for constants
        //
        if (abs(yyvsp[0].lex.i) >= (1 << 16)) {
            parseContext.error(yyvsp[0].lex.line, " integer constant overflow", "", "");
            parseContext.recover();
        }
        constUnion *unionArray = new constUnion[1];
        unionArray->iConst = yyvsp[0].lex.i;
        yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line);
    ;}
    break;

  case 5:
#line 261 "glslang.y"
    {
        constUnion *unionArray = new constUnion[1];
        unionArray->fConst = yyvsp[0].lex.f;
        yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), yyvsp[0].lex.line);
    ;}
    break;

  case 6:
#line 266 "glslang.y"
    {
        constUnion *unionArray = new constUnion[1];
        unionArray->bConst = yyvsp[0].lex.b;
        yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[0].lex.line);
    ;}
    break;

  case 7:
#line 271 "glslang.y"
    {
        yyval.interm.intermTypedNode = yyvsp[-1].interm.intermTypedNode;
    ;}
    break;

  case 8:
#line 277 "glslang.y"
    { 
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 9:
#line 280 "glslang.y"
    {
        if (!yyvsp[-3].interm.intermTypedNode->isArray() && !yyvsp[-3].interm.intermTypedNode->isMatrix() && !yyvsp[-3].interm.intermTypedNode->isVector()) {
            if (yyvsp[-3].interm.intermTypedNode->getAsSymbolNode())
                parseContext.error(yyvsp[-2].lex.line, " left of '[' is not of type array, matrix, or vector ", yyvsp[-3].interm.intermTypedNode->getAsSymbolNode()->getSymbol().c_str(), "");
            else
                parseContext.error(yyvsp[-2].lex.line, " left of '[' is not of type array, matrix, or vector ", "expression", "");
            parseContext.recover();
        }
        if (yyvsp[-3].interm.intermTypedNode->getType().getQualifier() == EvqConst && !yyvsp[-3].interm.intermTypedNode->isArray() && yyvsp[-1].interm.intermTypedNode->getQualifier() == EvqConst) {
             if (yyvsp[-3].interm.intermTypedNode->isVector()) {  // constant folding for vectors
                TVectorFields fields;
                fields.num = 1;
                fields.offsets[0] = yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst; // need to do it this way because v.xy sends fields integer array
                yyval.interm.intermTypedNode = parseContext.addConstVectorNode(fields, yyvsp[-3].interm.intermTypedNode, yyvsp[-2].lex.line);
            } else if (yyvsp[-3].interm.intermTypedNode->isMatrix()) { // constant folding for matrices
                yyval.interm.intermTypedNode = parseContext.addConstMatrixNode(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst, yyvsp[-3].interm.intermTypedNode, yyvsp[-2].lex.line);
            }
        } else {
            if (yyvsp[-1].interm.intermTypedNode->getQualifier() == EvqConst) {
                if ((yyvsp[-3].interm.intermTypedNode->isVector() || yyvsp[-3].interm.intermTypedNode->isMatrix()) && yyvsp[-3].interm.intermTypedNode->getType().getNominalSize() <= yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst && !yyvsp[-3].interm.intermTypedNode->isArray() ) {
                    parseContext.error(yyvsp[-2].lex.line, "", "[", "field selection out of range '%d'", yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst);
                    parseContext.recover();
                } else {
                    if (yyvsp[-3].interm.intermTypedNode->isArray()) {
                        if (yyvsp[-3].interm.intermTypedNode->getType().getArraySize() == 0) {
                            if (yyvsp[-3].interm.intermTypedNode->getType().getMaxArraySize() <= yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst) {
                                if (parseContext.arraySetMaxSize(yyvsp[-3].interm.intermTypedNode->getAsSymbolNode(), yyvsp[-3].interm.intermTypedNode->getTypePointer(), yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst, true, yyvsp[-2].lex.line))
                                    parseContext.recover(); 
                            } else {
                                if (parseContext.arraySetMaxSize(yyvsp[-3].interm.intermTypedNode->getAsSymbolNode(), yyvsp[-3].interm.intermTypedNode->getTypePointer(), 0, false, yyvsp[-2].lex.line))
                                    parseContext.recover(); 
                            }
                        } else if ( yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst >= yyvsp[-3].interm.intermTypedNode->getType().getArraySize()) {
                            parseContext.error(yyvsp[-2].lex.line, "", "[", "array index out of range '%d'", yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst);
                            parseContext.recover();
                        }
                    }
                    yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-3].interm.intermTypedNode, yyvsp[-1].interm.intermTypedNode, yyvsp[-2].lex.line);
                }
            } else {
                if (yyvsp[-3].interm.intermTypedNode->isArray() && yyvsp[-3].interm.intermTypedNode->getType().getArraySize() == 0) {
                    parseContext.error(yyvsp[-2].lex.line, "", "[", "array must be redeclared with a size before being indexed with a variable");
                    parseContext.recover();
                }
                
                yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexIndirect, yyvsp[-3].interm.intermTypedNode, yyvsp[-1].interm.intermTypedNode, yyvsp[-2].lex.line);
            }
        } 
        if (yyval.interm.intermTypedNode == 0) {
            constUnion *unionArray = new constUnion[1];
            unionArray->fConst = 0.0;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), yyvsp[-2].lex.line);
        } else if (yyvsp[-3].interm.intermTypedNode->isArray()) {
            if (yyvsp[-3].interm.intermTypedNode->getType().getStruct())
                yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getType().getStruct(), yyvsp[-3].interm.intermTypedNode->getType().getTypeName()));
            else
                yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqTemporary, yyvsp[-3].interm.intermTypedNode->getNominalSize(), yyvsp[-3].interm.intermTypedNode->isMatrix()));
        } else if (yyvsp[-3].interm.intermTypedNode->isMatrix() && yyvsp[-3].interm.intermTypedNode->getType().getQualifier() == EvqConst)         
            yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqConst, yyvsp[-3].interm.intermTypedNode->getNominalSize()));     
        else if (yyvsp[-3].interm.intermTypedNode->isMatrix())            
            yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqTemporary, yyvsp[-3].interm.intermTypedNode->getNominalSize()));     
        else if (yyvsp[-3].interm.intermTypedNode->isVector() && yyvsp[-3].interm.intermTypedNode->getType().getQualifier() == EvqConst)          
            yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqConst));     
        else if (yyvsp[-3].interm.intermTypedNode->isVector())       
            yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqTemporary));
        else
            yyval.interm.intermTypedNode->setType(yyvsp[-3].interm.intermTypedNode->getType()); 
    ;}
    break;

  case 10:
#line 348 "glslang.y"
    {
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 11:
#line 351 "glslang.y"
    {        
        if (yyvsp[-2].interm.intermTypedNode->isArray()) {
            parseContext.error(yyvsp[0].lex.line, "cannot apply dot operator to an array", ".", "");
            parseContext.recover();
        }

        if (yyvsp[-2].interm.intermTypedNode->isVector()) {
            TVectorFields fields;
            if (! parseContext.parseVectorFields(*yyvsp[0].lex.string, yyvsp[-2].interm.intermTypedNode->getNominalSize(), fields, yyvsp[0].lex.line)) {
                fields.num = 1;
                fields.offsets[0] = 0;
                parseContext.recover();
            }

            if (yyvsp[-2].interm.intermTypedNode->getType().getQualifier() == EvqConst) { // constant folding for vector fields
                yyval.interm.intermTypedNode = parseContext.addConstVectorNode(fields, yyvsp[-2].interm.intermTypedNode, yyvsp[0].lex.line);
                if (yyval.interm.intermTypedNode == 0) {
                    parseContext.recover();
                    yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
                }
                else
                    yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType(), EvqConst, (int) (*yyvsp[0].lex.string).size()));
            } else {
                if (fields.num == 1) {
                    constUnion *unionArray = new constUnion[1];
                    unionArray->iConst = fields.offsets[0];
                    TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line);
                    yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line);
                    yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType()));
                } else {
                    TString vectorString = *yyvsp[0].lex.string;
                    TIntermTyped* index = parseContext.intermediate.addSwizzle(fields, yyvsp[0].lex.line);                
                    yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpVectorSwizzle, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line);
                    yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType(),EvqTemporary, (int) vectorString.size()));  
                }
            }
        } else if (yyvsp[-2].interm.intermTypedNode->isMatrix()) {
            TMatrixFields fields;
            if (! parseContext.parseMatrixFields(*yyvsp[0].lex.string, yyvsp[-2].interm.intermTypedNode->getNominalSize(), fields, yyvsp[0].lex.line)) {
                fields.wholeRow = false;
                fields.wholeCol = false;
                fields.row = 0;
                fields.col = 0;
                parseContext.recover();
            }

            if (fields.wholeRow || fields.wholeCol) {
                parseContext.error(yyvsp[-1].lex.line, " non-scalar fields not implemented yet", ".", "");
                parseContext.recover();
                constUnion *unionArray = new constUnion[1];
                unionArray->iConst = 0;
                TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line);
                yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line);                
                yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType(), EvqTemporary, yyvsp[-2].interm.intermTypedNode->getNominalSize()));
            } else {
                constUnion *unionArray = new constUnion[1];
                unionArray->iConst = fields.col * yyvsp[-2].interm.intermTypedNode->getNominalSize() + fields.row;
                TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line);
                yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line);                
                yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType()));
            }
        } else if (yyvsp[-2].interm.intermTypedNode->getBasicType() == EbtStruct) {
            bool fieldFound = false;
            TTypeList* fields = yyvsp[-2].interm.intermTypedNode->getType().getStruct();
            if (fields == 0) {
                parseContext.error(yyvsp[-1].lex.line, "structure has no fields", "Internal Error", "");
                parseContext.recover();
                yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
            } else {
                unsigned int i;
                for (i = 0; i < fields->size(); ++i) {
                    if ((*fields)[i].type->getFieldName() == *yyvsp[0].lex.string) {
                        fieldFound = true;
                        break;
                    }                
                }
                if (fieldFound) {
                    if (yyvsp[-2].interm.intermTypedNode->getType().getQualifier() == EvqConst) {
                        yyval.interm.intermTypedNode = parseContext.addConstStruct(*yyvsp[0].lex.string, yyvsp[-2].interm.intermTypedNode, yyvsp[-1].lex.line);
                        if (yyval.interm.intermTypedNode == 0) {
                            parseContext.recover();
                            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
                        }
                        else {
                            yyval.interm.intermTypedNode->setType(*(*fields)[i].type);
                            // change the qualifier of the return type, not of the structure field
                            // as the structure definition is shared between various structures.
                            yyval.interm.intermTypedNode->getTypePointer()->changeQualifier(EvqConst);
                        }
                    } else {
                        constUnion *unionArray = new constUnion[1];
                        unionArray->iConst = i;
                        TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line);
                        yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirectStruct, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line);                
                        yyval.interm.intermTypedNode->setType(*(*fields)[i].type);
                    }
                } else {
                    parseContext.error(yyvsp[-1].lex.line, " no such field in structure", yyvsp[0].lex.string->c_str(), "");
                    parseContext.recover();
                    yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
                }
            }
        } else {
            parseContext.error(yyvsp[-1].lex.line, " field selection requires structure, vector, or matrix on left hand side", yyvsp[0].lex.string->c_str(), "");
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
        // don't delete $3.string, it's from the pool
    ;}
    break;

  case 12:
#line 460 "glslang.y"
    {
        if (parseContext.lValueErrorCheck(yyvsp[0].lex.line, "++", yyvsp[-1].interm.intermTypedNode))
            parseContext.recover();
        yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPostIncrement, yyvsp[-1].interm.intermTypedNode, yyvsp[0].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.unaryOpError(yyvsp[0].lex.line, "++", yyvsp[-1].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-1].interm.intermTypedNode;
        }
    ;}
    break;

  case 13:
#line 470 "glslang.y"
    {
        if (parseContext.lValueErrorCheck(yyvsp[0].lex.line, "--", yyvsp[-1].interm.intermTypedNode))
            parseContext.recover();
        yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPostDecrement, yyvsp[-1].interm.intermTypedNode, yyvsp[0].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.unaryOpError(yyvsp[0].lex.line, "--", yyvsp[-1].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-1].interm.intermTypedNode;
        }
    ;}
    break;

  case 14:
#line 483 "glslang.y"
    {
        if (parseContext.integerErrorCheck(yyvsp[0].interm.intermTypedNode, "[]"))
            parseContext.recover();
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; 
    ;}
    break;

  case 15:
#line 491 "glslang.y"
    {
        TFunction* fnCall = yyvsp[0].interm.function;
        TOperator op = fnCall->getBuiltInOp();
        
        if (op != EOpNull) {
            //
            // Then this should be a constructor.
            //
            TType type(EbtVoid);  // use this to get the type back
            if (parseContext.constructorErrorCheck(yyvsp[0].interm.line, yyvsp[0].interm.intermNode, *fnCall, op, &type)) {
                yyval.interm.intermTypedNode = 0;
            } else {
                //
                // It's a constructor, of type 'type'.
                //
                yyval.interm.intermTypedNode = parseContext.addConstructor(yyvsp[0].interm.intermNode, &type, op, fnCall, yyvsp[0].interm.line);
            }
            
            if (yyval.interm.intermTypedNode == 0) {        
                parseContext.recover();
                yyval.interm.intermTypedNode = parseContext.intermediate.setAggregateOperator(0, op, yyvsp[0].interm.line);
            }
            yyval.interm.intermTypedNode->setType(type);
        } else {
            //
            // Not a constructor.  Find it in the symbol table.
            //
            const TFunction* fnCandidate;
            bool builtIn;
            fnCandidate = parseContext.findFunction(yyvsp[0].interm.line, fnCall, &builtIn);
            if (fnCandidate) {
                //
                // A declared function.  But, it might still map to a built-in
                // operation.
                //
                op = fnCandidate->getBuiltInOp();
                if (builtIn && op != EOpNull) {
                    //
                    // A function call mapped to a built-in operation.
                    //
                    if (fnCandidate->getParamCount() == 1) {
                        //
                        // Treat it like a built-in unary operator.
                        //
                        yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(op, yyvsp[0].interm.intermNode, 0, parseContext.symbolTable);
                        if (yyval.interm.intermTypedNode == 0)  {
                            parseContext.error(yyvsp[0].interm.intermNode->getLine(), " wrong operand type", "Internal Error", 
                                "built in unary operator function.  Type: %s",
                                static_cast<TIntermTyped*>(yyvsp[0].interm.intermNode)->getCompleteString().c_str());
                            YYERROR;
                        }
                    } else {
                        yyval.interm.intermTypedNode = parseContext.intermediate.setAggregateOperator(yyvsp[0].interm.intermAggregate, op, yyvsp[0].interm.line);
                    }
                } else {
                    // This is a real function call
                    
                    yyval.interm.intermTypedNode = parseContext.intermediate.setAggregateOperator(yyvsp[0].interm.intermAggregate, EOpFunctionCall, yyvsp[0].interm.line);
                    yyval.interm.intermTypedNode->setType(fnCandidate->getReturnType());                   
                    
                    // this is how we know whether the given function is a builtIn function or a user defined function
                    // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also
                    // if builtIn == true, it's definitely a builtIn function with EOpNull
                    if (!builtIn) 
                        yyval.interm.intermTypedNode->getAsAggregate()->setUserDefined(); 
                    yyval.interm.intermTypedNode->getAsAggregate()->setName(fnCandidate->getMangledName());

                    TQualifier qual;
                    TQualifierList& qualifierList = yyval.interm.intermTypedNode->getAsAggregate()->getQualifier();
                    for (int i = 0; i < fnCandidate->getParamCount(); ++i) {
                        qual = (*fnCandidate)[i].type->getQualifier();
                        if (qual == EvqOut || qual == EvqInOut) {
                            if (parseContext.lValueErrorCheck(yyval.interm.intermTypedNode->getLine(), "assign", yyval.interm.intermTypedNode->getAsAggregate()->getSequence()[i]->getAsTyped())) {
                                parseContext.error(yyvsp[0].interm.intermNode->getLine(), "Constant value cannot be passed for 'out' or 'inout' parameters.", "Error", "");
                                parseContext.recover();
                            }
                        }
                        qualifierList.push_back(qual);
                    }
                }
                yyval.interm.intermTypedNode->setType(fnCandidate->getReturnType());
            } else {
                // error message was put out by PaFindFunction()
                // Put on a dummy node for error recovery
                constUnion *unionArray = new constUnion[1];
                unionArray->fConst = 0.0;
                yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), yyvsp[0].interm.line);
                parseContext.recover();
            }
        }
        delete fnCall;
    ;}
    break;

  case 16:
#line 586 "glslang.y"
    {
        yyval.interm = yyvsp[-1].interm;
        yyval.interm.line = yyvsp[0].lex.line;
    ;}
    break;

  case 17:
#line 590 "glslang.y"
    {
        yyval.interm = yyvsp[-1].interm;
        yyval.interm.line = yyvsp[0].lex.line;
    ;}
    break;

  case 18:
#line 597 "glslang.y"
    {
        yyval.interm.function = yyvsp[-1].interm.function;
        yyval.interm.intermNode = 0;
    ;}
    break;

  case 19:
#line 601 "glslang.y"
    {
        yyval.interm.function = yyvsp[0].interm.function;
        yyval.interm.intermNode = 0;
    ;}
    break;

  case 20:
#line 608 "glslang.y"
    {
        TParameter param = { 0, new TType(yyvsp[0].interm.intermTypedNode->getType()) };
        yyvsp[-1].interm.function->addParameter(param);
        yyval.interm.function = yyvsp[-1].interm.function;
        yyval.interm.intermNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 21:
#line 614 "glslang.y"
    {
        TParameter param = { 0, new TType(yyvsp[0].interm.intermTypedNode->getType()) };
        yyvsp[-2].interm.function->addParameter(param);
        yyval.interm.function = yyvsp[-2].interm.function;
        yyval.interm.intermNode = parseContext.intermediate.growAggregate(yyvsp[-2].interm.intermNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line);
    ;}
    break;

  case 22:
#line 623 "glslang.y"
    {
        yyval.interm.function = yyvsp[-1].interm.function;
    ;}
    break;

  case 23:
#line 629 "glslang.y"
    {
        if (yyvsp[0].interm.op == EOpConstructStruct) {
            TString tempString = "";
            TFunction *function = new TFunction(&tempString, *(yyvsp[0].interm.type.userDef), yyvsp[0].interm.op);
            yyval.interm.function = function;
        }
        else {
            TFunction *function = new TFunction(yyvsp[0].interm.op);
            yyval.interm.function = function;
        }
    ;}
    break;

  case 24:
#line 640 "glslang.y"
    {
        if (parseContext.reservedErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string)) 
            parseContext.recover();
        TType type(EbtVoid);
        TFunction *function = new TFunction(yyvsp[0].lex.string, type);
        yyval.interm.function = function;        
    ;}
    break;

  case 25:
#line 656 "glslang.y"
    {                                   yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructFloat; ;}
    break;

  case 26:
#line 657 "glslang.y"
    {                                   yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructInt;   ;}
    break;

  case 27:
#line 658 "glslang.y"
    {                                   yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBool;  ;}
    break;

  case 28:
#line 659 "glslang.y"
    {                                   yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructVec2;  ;}
    break;

  case 29:
#line 660 "glslang.y"
    {                                   yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructVec3;  ;}
    break;

  case 30:
#line 661 "glslang.y"
    {                                   yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructVec4;  ;}
    break;

  case 31:
#line 662 "glslang.y"
    { FRAG_VERT_ONLY("bvec2", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBVec2; ;}
    break;

  case 32:
#line 663 "glslang.y"
    { FRAG_VERT_ONLY("bvec3", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBVec3; ;}
    break;

  case 33:
#line 664 "glslang.y"
    { FRAG_VERT_ONLY("bvec4", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBVec4; ;}
    break;

  case 34:
#line 665 "glslang.y"
    { FRAG_VERT_ONLY("ivec2", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructIVec2; ;}
    break;

  case 35:
#line 666 "glslang.y"
    { FRAG_VERT_ONLY("ivec3", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructIVec3; ;}
    break;

  case 36:
#line 667 "glslang.y"
    { FRAG_VERT_ONLY("ivec4", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructIVec4; ;}
    break;

  case 37:
#line 668 "glslang.y"
    { FRAG_VERT_ONLY("mat2", yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructMat2;  ;}
    break;

  case 38:
#line 669 "glslang.y"
    { FRAG_VERT_ONLY("mat3", yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructMat3;  ;}
    break;

  case 39:
#line 670 "glslang.y"
    { FRAG_VERT_ONLY("mat4", yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructMat4;  ;}
    break;

  case 40:
#line 671 "glslang.y"
    {                                   
        TType& structure = static_cast<TVariable*>(yyvsp[0].lex.symbol)->getType();
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtStruct, qual, 1, false, false, &structure, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
        yyval.interm.line = yyvsp[0].lex.line; 
        yyval.interm.op = EOpConstructStruct; 
    ;}
    break;

  case 41:
#line 682 "glslang.y"
    {
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 42:
#line 685 "glslang.y"
    {
        if (parseContext.lValueErrorCheck(yyvsp[-1].lex.line, "++", yyvsp[0].interm.intermTypedNode))
            parseContext.recover();
        yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPreIncrement, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.unaryOpError(yyvsp[-1].lex.line, "++", yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
        }
    ;}
    break;

  case 43:
#line 695 "glslang.y"
    {
        if (parseContext.lValueErrorCheck(yyvsp[-1].lex.line, "--", yyvsp[0].interm.intermTypedNode))
            parseContext.recover();
        yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPreDecrement, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.unaryOpError(yyvsp[-1].lex.line, "--", yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
        }
    ;}
    break;

  case 44:
#line 705 "glslang.y"
    {
        if (yyvsp[-1].interm.op != EOpNull) {
            yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(yyvsp[-1].interm.op, yyvsp[0].interm.intermTypedNode, yyvsp[-1].interm.line, parseContext.symbolTable);
            if (yyval.interm.intermTypedNode == 0) {
                char* errorOp = "";
                switch(yyvsp[-1].interm.op) {
                case EOpNegative:   errorOp = "-"; break;
                case EOpLogicalNot: errorOp = "!"; break;
                case EOpBitwiseNot: errorOp = "~"; break;
				default: break;
                }
                parseContext.unaryOpError(yyvsp[-1].interm.line, errorOp, yyvsp[0].interm.intermTypedNode->getCompleteString());
                parseContext.recover();
                yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
            }
        } else
            yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 45:
#line 727 "glslang.y"
    { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpNull; ;}
    break;

  case 46:
#line 728 "glslang.y"
    { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpNegative; ;}
    break;

  case 47:
#line 729 "glslang.y"
    { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpLogicalNot; ;}
    break;

  case 48:
#line 730 "glslang.y"
    { PACK_UNPACK_ONLY("~", yyvsp[0].lex.line);  
              yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpBitwiseNot; ;}
    break;

  case 49:
#line 736 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 50:
#line 737 "glslang.y"
    {
        FRAG_VERT_ONLY("*", yyvsp[-1].lex.line);
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpMul, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "*", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 51:
#line 746 "glslang.y"
    {
        FRAG_VERT_ONLY("/", yyvsp[-1].lex.line); 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpDiv, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "/", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 52:
#line 755 "glslang.y"
    {
        PACK_UNPACK_ONLY("%", yyvsp[-1].lex.line);
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpMod, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "%", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 53:
#line 767 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 54:
#line 768 "glslang.y"
    {  
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpAdd, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "+", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 55:
#line 776 "glslang.y"
    {
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpSub, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "-", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        } 
    ;}
    break;

  case 56:
#line 787 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 57:
#line 788 "glslang.y"
    {
        PACK_UNPACK_ONLY("<<", yyvsp[-1].lex.line);
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLeftShift, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "<<", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 58:
#line 797 "glslang.y"
    {
        PACK_UNPACK_ONLY(">>", yyvsp[-1].lex.line);
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpRightShift, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, ">>", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 59:
#line 809 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 60:
#line 810 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLessThan, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "<", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 61:
#line 820 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpGreaterThan, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, ">", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 62:
#line 830 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLessThanEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "<=", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 63:
#line 840 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpGreaterThanEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, ">=", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 64:
#line 853 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 65:
#line 854 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "==", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 66:
#line 864 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpNotEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "!=", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 67:
#line 877 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 68:
#line 878 "glslang.y"
    {
        PACK_UNPACK_ONLY("&", yyvsp[-1].lex.line);
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpAnd, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "&", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 69:
#line 890 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 70:
#line 891 "glslang.y"
    {
        PACK_UNPACK_ONLY("^", yyvsp[-1].lex.line);
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpExclusiveOr, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "^", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 71:
#line 903 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 72:
#line 904 "glslang.y"
    {
        PACK_UNPACK_ONLY("|", yyvsp[-1].lex.line);
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpInclusiveOr, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "|", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 73:
#line 916 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 74:
#line 917 "glslang.y"
    {
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLogicalAnd, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "&&", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 75:
#line 930 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 76:
#line 931 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLogicalXor, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "^^", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 77:
#line 944 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 78:
#line 945 "glslang.y"
    { 
        yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLogicalOr, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, "||", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            constUnion *unionArray = new constUnion[1];
            unionArray->bConst = false;
            yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line);
        }
    ;}
    break;

  case 79:
#line 958 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 80:
#line 959 "glslang.y"
    {
       if (parseContext.boolErrorCheck(yyvsp[-3].lex.line, yyvsp[-4].interm.intermTypedNode))
            parseContext.recover();
       
        yyval.interm.intermTypedNode = parseContext.intermediate.addSelection(yyvsp[-4].interm.intermTypedNode, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-3].lex.line);
        if (yyvsp[-2].interm.intermTypedNode->getType() != yyvsp[0].interm.intermTypedNode->getType())
            yyval.interm.intermTypedNode = 0;
            
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-3].lex.line, ":", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
        }
    ;}
    break;

  case 81:
#line 976 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 82:
#line 977 "glslang.y"
    {
        if (parseContext.lValueErrorCheck(yyvsp[-1].interm.line, "assign", yyvsp[-2].interm.intermTypedNode))
            parseContext.recover();
        yyval.interm.intermTypedNode = parseContext.intermediate.addAssign(yyvsp[-1].interm.op, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].interm.line);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.assignError(yyvsp[-1].interm.line, "assign", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode;
        }
    ;}
    break;

  case 83:
#line 990 "glslang.y"
    {                                    yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpAssign; ;}
    break;

  case 84:
#line 991 "glslang.y"
    { FRAG_VERT_ONLY("*=", yyvsp[0].lex.line);     yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpMulAssign; ;}
    break;

  case 85:
#line 992 "glslang.y"
    { FRAG_VERT_ONLY("/=", yyvsp[0].lex.line);     yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpDivAssign; ;}
    break;

  case 86:
#line 993 "glslang.y"
    { PACK_UNPACK_ONLY("%=", yyvsp[0].lex.line);   yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpModAssign; ;}
    break;

  case 87:
#line 994 "glslang.y"
    {                                    yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpAddAssign; ;}
    break;

  case 88:
#line 995 "glslang.y"
    {                                    yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpSubAssign; ;}
    break;

  case 89:
#line 996 "glslang.y"
    { PACK_UNPACK_ONLY("<<=", yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpLeftShiftAssign; ;}
    break;

  case 90:
#line 997 "glslang.y"
    { PACK_UNPACK_ONLY("<<=", yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpRightShiftAssign; ;}
    break;

  case 91:
#line 998 "glslang.y"
    { PACK_UNPACK_ONLY("&=",  yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpAndAssign; ;}
    break;

  case 92:
#line 999 "glslang.y"
    { PACK_UNPACK_ONLY("^=",  yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpExclusiveOrAssign; ;}
    break;

  case 93:
#line 1000 "glslang.y"
    { PACK_UNPACK_ONLY("|=",  yyvsp[0].lex.line);  yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpInclusiveOrAssign; ;}
    break;

  case 94:
#line 1004 "glslang.y"
    {
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 95:
#line 1007 "glslang.y"
    {
        yyval.interm.intermTypedNode = parseContext.intermediate.addComma(yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line);
        if (yyval.interm.intermTypedNode == 0) {
            parseContext.binaryOpError(yyvsp[-1].lex.line, ",", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString());
            parseContext.recover();
            yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
        }
    ;}
    break;

  case 96:
#line 1018 "glslang.y"
    {
        if (parseContext.constErrorCheck(yyvsp[0].interm.intermTypedNode))
            parseContext.recover();
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 97:
#line 1026 "glslang.y"
    { yyval.interm.intermNode = 0; ;}
    break;

  case 98:
#line 1027 "glslang.y"
    { 
        if (yyvsp[-1].interm.intermAggregate)
            yyvsp[-1].interm.intermAggregate->setOperator(EOpSequence); 
        yyval.interm.intermNode = yyvsp[-1].interm.intermAggregate; 
    ;}
    break;

  case 99:
#line 1035 "glslang.y"
    {
        //
        // Multiple declarations of the same function are allowed.
        //
        // If this is a definition, the definition production code will check for redefinitions 
        // (we don't know at this point if it's a definition or not).
        //
        // Redeclarations are allowed.  But, return types and parameter qualifiers must match.
        //        
        TFunction* prevDec = static_cast<TFunction*>(parseContext.symbolTable.find(yyvsp[-1].interm.function->getMangledName()));
        if (prevDec) {
            if (prevDec->getReturnType() != yyvsp[-1].interm.function->getReturnType()) {
                parseContext.error(yyvsp[0].lex.line, "overloaded functions must have the same return type", yyvsp[-1].interm.function->getReturnType().getBasicString(), "");
                parseContext.recover();
            }
            for (int i = 0; i < prevDec->getParamCount(); ++i) {
                if ((*prevDec)[i].type->getQualifier() != (*yyvsp[-1].interm.function)[i].type->getQualifier()) {
                    parseContext.error(yyvsp[0].lex.line, "overloaded functions must have the same parameter qualifiers", (*yyvsp[-1].interm.function)[i].type->getQualifierString(), "");
                    parseContext.recover();
                }
            }
        }
        
        //
        // If this is a redeclaration, it could also be a definition,
        // in which case, we want to use the variable names from this one, and not the one that's
        // being redeclared.  So, pass back up this declaration, not the one in the symbol table.
        //
        yyval.interm.function = yyvsp[-1].interm.function;
        yyval.interm.line = yyvsp[0].lex.line;

        parseContext.symbolTable.insert(*yyval.interm.function);
    ;}
    break;

  case 100:
#line 1071 "glslang.y"
    {
        yyval.interm.function = yyvsp[0].interm.function;
    ;}
    break;

  case 101:
#line 1074 "glslang.y"
    { 
        yyval.interm.function = yyvsp[0].interm.function;  
    ;}
    break;

  case 102:
#line 1081 "glslang.y"
    {
        // Add the parameter 
        yyval.interm.function = yyvsp[-1].interm.function;
        if (yyvsp[0].interm.param.type->getBasicType() != EbtVoid)
            yyvsp[-1].interm.function->addParameter(yyvsp[0].interm.param);
        else
            delete yyvsp[0].interm.param.type;
    ;}
    break;

  case 103:
#line 1089 "glslang.y"
    {   
        //
        // Only first parameter of one-parameter functions can be void
        // The check for named parameters not being void is done in parameter_declarator 
        //
        if (yyvsp[0].interm.param.type->getBasicType() == EbtVoid) {
            //
            // This parameter > first is void
            //
            parseContext.error(yyvsp[-1].lex.line, "cannot be an argument type except for '(void)'", "void", "");
            parseContext.recover();
            delete yyvsp[0].interm.param.type;
        } else {
            // Add the parameter 
            yyval.interm.function = yyvsp[-2].interm.function; 
            yyvsp[-2].interm.function->addParameter(yyvsp[0].interm.param);
        }
    ;}
    break;

  case 104:
#line 1110 "glslang.y"
    {
        if (yyvsp[-2].interm.type.qualifier != EvqGlobal && yyvsp[-2].interm.type.qualifier != EvqTemporary) {
            parseContext.error(yyvsp[-1].lex.line, "no qualifiers allowed for function return", getQualifierString(yyvsp[-2].interm.type.qualifier), "");
            parseContext.recover();
        }
        // make sure a sampler is not involved as well...
        if (parseContext.structQualifierErrorCheck(yyvsp[-1].lex.line, yyvsp[-2].interm.type))
            parseContext.recover();
        
        // Add the function as a prototype after parsing it (we do not support recursion) 
        TFunction *function;
        TType type(yyvsp[-2].interm.type);
        function = new TFunction(yyvsp[-1].lex.string, type);
        yyval.interm.function = function;
    ;}
    break;

  case 105:
#line 1129 "glslang.y"
    {
        if (yyvsp[-1].interm.type.type == EbtVoid) {
            parseContext.error(yyvsp[0].lex.line, "illegal use of type 'void'", yyvsp[0].lex.string->c_str(), "");
            parseContext.recover();
        }
        if (parseContext.reservedErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string))
            parseContext.recover();
        TParameter param = {yyvsp[0].lex.string, new TType(yyvsp[-1].interm.type)};
        yyval.interm.line = yyvsp[0].lex.line;
        yyval.interm.param = param;
    ;}
    break;

  case 106:
#line 1140 "glslang.y"
    {
        // Check that we can make an array out of this type
        if (yyvsp[-4].interm.type.array) {
            parseContext.error(yyvsp[-2].lex.line, "cannot declare arrays of this type", TType(yyvsp[-4].interm.type).getCompleteString().c_str(), "");
            parseContext.recover();
        }
        if (parseContext.reservedErrorCheck(yyvsp[-3].lex.line, *yyvsp[-3].lex.string))
            parseContext.recover();
        yyvsp[-4].interm.type.array = true;
        TType* type = new TType(yyvsp[-4].interm.type);        
        if (yyvsp[-1].interm.intermTypedNode->getAsConstantUnion())
            type->setArraySize(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst);
        TParameter param = { yyvsp[-3].lex.string, type };
        yyval.interm.line = yyvsp[-3].lex.line;
        yyval.interm.param = param;
    ;}
    break;

  case 107:
#line 1167 "glslang.y"
    {
        yyval.interm = yyvsp[0].interm;
        if (parseContext.paramErrorCheck(yyvsp[0].interm.line, yyvsp[-2].interm.type.qualifier, yyvsp[-1].interm.qualifier, yyval.interm.param.type))
            parseContext.recover();
    ;}
    break;

  case 108:
#line 1172 "glslang.y"
    {
        yyval.interm = yyvsp[0].interm;
        if (parseContext.parameterSamplerErrorCheck(yyvsp[0].interm.line, yyvsp[-1].interm.qualifier, *yyvsp[0].interm.param.type))
            parseContext.recover();
        if (parseContext.paramErrorCheck(yyvsp[0].interm.line, EvqTemporary, yyvsp[-1].interm.qualifier, yyval.interm.param.type))
            parseContext.recover();
    ;}
    break;

  case 109:
#line 1182 "glslang.y"
    {
        yyval.interm = yyvsp[0].interm;
        if (parseContext.paramErrorCheck(yyvsp[0].interm.line, yyvsp[-2].interm.type.qualifier, yyvsp[-1].interm.qualifier, yyval.interm.param.type))
            parseContext.recover();
    ;}
    break;

  case 110:
#line 1187 "glslang.y"
    {
        yyval.interm = yyvsp[0].interm;
        if (parseContext.parameterSamplerErrorCheck(yyvsp[0].interm.line, yyvsp[-1].interm.qualifier, *yyvsp[0].interm.param.type))
            parseContext.recover();
        if (parseContext.paramErrorCheck(yyvsp[0].interm.line, EvqTemporary, yyvsp[-1].interm.qualifier, yyval.interm.param.type))
            parseContext.recover();
    ;}
    break;

  case 111:
#line 1197 "glslang.y"
    {
        yyval.interm.qualifier = EvqIn;
    ;}
    break;

  case 112:
#line 1200 "glslang.y"
    {
        yyval.interm.qualifier = EvqIn;
    ;}
    break;

  case 113:
#line 1203 "glslang.y"
    {
        yyval.interm.qualifier = EvqOut;
    ;}
    break;

  case 114:
#line 1206 "glslang.y"
    {
        yyval.interm.qualifier = EvqInOut;
    ;}
    break;

  case 115:
#line 1212 "glslang.y"
    {
        TParameter param = { 0, new TType(yyvsp[0].interm.type) };
        yyval.interm.param = param;
        
    ;}
    break;

  case 116:
#line 1217 "glslang.y"
    {
        // Check that we can make an array out of this type 
        if (yyvsp[-3].interm.type.array) {
            parseContext.error(yyvsp[-2].lex.line, "cannot declare arrays of this type", TType(yyvsp[-3].interm.type).getCompleteString().c_str(), "");
            parseContext.recover();
        }
        yyvsp[-3].interm.type.array = true;
        TType* type = new TType(yyvsp[-3].interm.type);       
        if (yyvsp[-1].interm.intermTypedNode->getAsConstantUnion())
            type->setArraySize(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst);

        TParameter param = { 0, type };
        yyval.interm.line = yyvsp[-2].lex.line;
        yyval.interm.param = param;
    ;}
    break;

  case 117:
#line 1235 "glslang.y"
    {
        yyval.interm = yyvsp[0].interm;
    ;}
    break;

  case 118:
#line 1238 "glslang.y"
    {
        yyval.interm = yyvsp[-2].interm;
        if (parseContext.structQualifierErrorCheck(yyvsp[0].lex.line, yyvsp[-2].interm.type))
            parseContext.recover();
        
        if (parseContext.nonInitErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string, yyval.interm.type))
            parseContext.recover();
    ;}
    break;

  case 119:
#line 1246 "glslang.y"
    {
        yyval.interm = yyvsp[-4].interm;
        if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-4].interm.type))
            parseContext.recover();
            
        if (parseContext.arrayErrorCheck(yyvsp[-1].lex.line, *yyvsp[-2].lex.string, yyval.interm.type, 0))
            parseContext.recover();
    ;}
    break;

  case 120:
#line 1254 "glslang.y"
    {
        yyval.interm = yyvsp[-5].interm;
        if (parseContext.structQualifierErrorCheck(yyvsp[-3].lex.line, yyvsp[-5].interm.type))
            parseContext.recover();
            
        if (parseContext.arrayErrorCheck(yyvsp[-2].lex.line, *yyvsp[-3].lex.string, yyval.interm.type, yyvsp[-1].interm.intermTypedNode))
            parseContext.recover();
    ;}
    break;

  case 121:
#line 1262 "glslang.y"
    {
        yyval.interm = yyvsp[-4].interm;
        if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-4].interm.type))
            parseContext.recover();
        
        TIntermNode* intermNode;
        if (!parseContext.executeInitializer(yyvsp[-2].lex.line, *yyvsp[-2].lex.string, yyvsp[-4].interm.type, yyvsp[0].interm.intermTypedNode, intermNode)) {
            //
            // build the intermediate representation
            //
            if (intermNode)
                yyval.interm.intermAggregate = parseContext.intermediate.growAggregate(yyvsp[-4].interm.intermNode, intermNode, yyvsp[-1].lex.line);
            else
                yyval.interm.intermAggregate = yyvsp[-4].interm.intermAggregate;
        } else {
            parseContext.recover();
            yyval.interm.intermAggregate = 0;
        }
    ;}
    break;

  case 122:
#line 1284 "glslang.y"
    {
        yyval.interm.type = yyvsp[0].interm.type;
        yyval.interm.intermAggregate = 0;
    ;}
    break;

  case 123:
#line 1288 "glslang.y"
    {
        yyval.interm.intermAggregate = 0;
        yyval.interm.type = yyvsp[-1].interm.type;
        if (parseContext.structQualifierErrorCheck(yyvsp[0].lex.line, yyvsp[-1].interm.type))
            parseContext.recover();
        
        if (parseContext.nonInitErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string, yyval.interm.type))
            parseContext.recover();
    ;}
    break;

  case 124:
#line 1297 "glslang.y"
    {
        yyval.interm.intermAggregate = 0;
        yyval.interm.type = yyvsp[-3].interm.type;
        if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type))
            parseContext.recover();
        
        if (parseContext.arrayErrorCheck(yyvsp[-1].lex.line, *yyvsp[-2].lex.string, yyval.interm.type, 0))
            parseContext.recover();
    ;}
    break;

  case 125:
#line 1306 "glslang.y"
    {
        yyval.interm.intermAggregate = 0;
        yyval.interm.type = yyvsp[-4].interm.type;
        if (parseContext.structQualifierErrorCheck(yyvsp[-3].lex.line, yyvsp[-4].interm.type))
            parseContext.recover();
        
        if (parseContext.arrayErrorCheck(yyvsp[-2].lex.line, *yyvsp[-3].lex.string, yyval.interm.type, yyvsp[-1].interm.intermTypedNode))
            parseContext.recover();
    ;}
    break;

  case 126:
#line 1315 "glslang.y"
    {
        yyval.interm.type = yyvsp[-3].interm.type;
        if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type))
            parseContext.recover();
        
        TIntermNode* intermNode;
        if (!parseContext.executeInitializer(yyvsp[-2].lex.line, *yyvsp[-2].lex.string, yyvsp[-3].interm.type, yyvsp[0].interm.intermTypedNode, intermNode)) {
            //
            // Build intermediate representation
            //
            if (intermNode)
                yyval.interm.intermAggregate = parseContext.intermediate.makeAggregate(intermNode, yyvsp[-1].lex.line);
            else
                yyval.interm.intermAggregate = 0;
        } else {
            parseContext.recover();
            yyval.interm.intermAggregate = 0;
        }
    ;}
    break;

  case 127:
#line 1405 "glslang.y"
    {
        yyval.interm.type = yyvsp[0].interm.type;
    ;}
    break;

  case 128:
#line 1408 "glslang.y"
    { 
        TPublicType t = { yyvsp[0].interm.type.type, yyvsp[-1].interm.type.qualifier, yyvsp[0].interm.type.size, yyvsp[0].interm.type.matrix, false, yyvsp[0].interm.type.userDef, 0 };
        if (yyvsp[-1].interm.type.qualifier == EvqAttribute &&
            (yyvsp[0].interm.type.type == EbtBool || yyvsp[0].interm.type.type == EbtInt)) {
            parseContext.error(yyvsp[0].interm.type.line, "cannot be bool or int", getQualifierString(yyvsp[-1].interm.type.qualifier), "");
            parseContext.recover();
        }
        if ((yyvsp[-1].interm.type.qualifier == EvqVaryingIn || yyvsp[-1].interm.type.qualifier == EvqVaryingOut) &&
            (yyvsp[0].interm.type.type == EbtBool || yyvsp[0].interm.type.type == EbtInt)) {
            parseContext.error(yyvsp[0].interm.type.line, "cannot be bool or int", getQualifierString(yyvsp[-1].interm.type.qualifier), "");
            parseContext.recover();
        }
        yyval.interm.type = t;
    ;}
    break;

  case 129:
#line 1425 "glslang.y"
    { 
        TPublicType t = { EbtVoid,  EvqConst,     1, false, false, 0 }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 130:
#line 1429 "glslang.y"
    { 
        VERTEX_ONLY("attribute", yyvsp[0].lex.line);
        if (parseContext.globalErrorCheck(yyvsp[0].lex.line, parseContext.symbolTable.atGlobalLevel(), "attribute"))
            parseContext.recover();
        TPublicType t = { EbtVoid,  EvqAttribute, 1, false, false, 0 }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 131:
#line 1436 "glslang.y"
    {
        if (parseContext.globalErrorCheck(yyvsp[0].lex.line, parseContext.symbolTable.atGlobalLevel(), "varying"))
            parseContext.recover();
        TPublicType t = { EbtVoid,  EvqVaryingIn, 1, false, false, 0 };
        if (parseContext.language == EShLangVertex)
            t.qualifier = EvqVaryingOut;
        yyval.interm.type = t; 
    ;}
    break;

  case 132:
#line 1444 "glslang.y"
    {
        if (parseContext.globalErrorCheck(yyvsp[0].lex.line, parseContext.symbolTable.atGlobalLevel(), "uniform"))
            parseContext.recover();
        TPublicType t = { EbtVoid,  EvqUniform,   1, false, false, 0 }; 
        yyval.interm.type = t;
    ;}
    break;

  case 133:
#line 1453 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtVoid, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 134:
#line 1458 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtFloat, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 135:
#line 1463 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtInt, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 136:
#line 1468 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtBool, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 137:
#line 1479 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtFloat, qual, 2, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 138:
#line 1484 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtFloat, qual, 3, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 139:
#line 1489 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtFloat, qual, 4, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 140:
#line 1494 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtBool, qual, 2, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 141:
#line 1499 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtBool, qual, 3, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 142:
#line 1504 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtBool, qual, 4, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 143:
#line 1509 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtInt, qual, 2, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 144:
#line 1514 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtInt, qual, 3, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 145:
#line 1519 "glslang.y"
    {
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtInt, qual, 4, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 146:
#line 1524 "glslang.y"
    {
        FRAG_VERT_ONLY("mat2", yyvsp[0].lex.line); 
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtFloat, qual, 2, true, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 147:
#line 1530 "glslang.y"
    { 
        FRAG_VERT_ONLY("mat3", yyvsp[0].lex.line); 
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtFloat, qual, 3, true, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 148:
#line 1536 "glslang.y"
    { 
        FRAG_VERT_ONLY("mat4", yyvsp[0].lex.line);
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtFloat, qual, 4, true, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t; 
    ;}
    break;

  case 149:
#line 1542 "glslang.y"
    {
        FRAG_VERT_ONLY("sampler1D", yyvsp[0].lex.line);
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtSampler1D, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
    ;}
    break;

  case 150:
#line 1548 "glslang.y"
    {
        FRAG_VERT_ONLY("sampler2D", yyvsp[0].lex.line);
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtSampler2D, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
    ;}
    break;

  case 151:
#line 1554 "glslang.y"
    {
        FRAG_VERT_ONLY("sampler3D", yyvsp[0].lex.line);
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtSampler3D, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
    ;}
    break;

  case 152:
#line 1560 "glslang.y"
    {
        FRAG_VERT_ONLY("samplerCube", yyvsp[0].lex.line);
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtSamplerCube, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
    ;}
    break;

  case 153:
#line 1566 "glslang.y"
    {
        FRAG_VERT_ONLY("sampler1DShadow", yyvsp[0].lex.line);
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtSampler1DShadow, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
    ;}
    break;

  case 154:
#line 1572 "glslang.y"
    {
        FRAG_VERT_ONLY("sampler2DShadow", yyvsp[0].lex.line);
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtSampler2DShadow, qual, 1, false, false, 0, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
    ;}
    break;

  case 155:
#line 1578 "glslang.y"
    {
        FRAG_VERT_ONLY("struct", yyvsp[0].interm.type.line);
        yyval.interm.type = yyvsp[0].interm.type;
        yyval.interm.type.qualifier = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
    ;}
    break;

  case 156:
#line 1583 "glslang.y"
    {     
        //
        // This is for user defined type names.  The lexical phase looked up the 
        // type.
        //
        TType& structure = static_cast<TVariable*>(yyvsp[0].lex.symbol)->getType();
        TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
        TPublicType t = { EbtStruct, qual, 1, false, false, &structure, yyvsp[0].lex.line }; 
        yyval.interm.type = t;
    ;}
    break;

  case 157:
#line 1596 "glslang.y"
    {
        TType* structure = new TType(yyvsp[-1].interm.typeList, *yyvsp[-3].lex.string);
        TVariable* userTypeDef = new TVariable(yyvsp[-3].lex.string, *structure, true);
        if (! parseContext.symbolTable.insert(*userTypeDef)) {
            parseContext.error(yyvsp[-3].lex.line, "redefinition", yyvsp[-3].lex.string->c_str(), "struct");
            parseContext.recover();
        }
        TPublicType t = { EbtStruct, EvqTemporary, 1, false, false, structure, yyvsp[-4].lex.line };
        yyval.interm.type = t;
    ;}
    break;

  case 158:
#line 1606 "glslang.y"
    {
        TType* structure = new TType(yyvsp[-1].interm.typeList, TString(""));
        TPublicType t = { EbtStruct, EvqTemporary, 1, false, false, structure, yyvsp[-3].lex.line };
        yyval.interm.type = t;
    ;}
    break;

  case 159:
#line 1614 "glslang.y"
    {
        yyval.interm.typeList = yyvsp[0].interm.typeList;
    ;}
    break;

  case 160:
#line 1617 "glslang.y"
    {
        yyval.interm.typeList = yyvsp[-1].interm.typeList;
        for (unsigned int i = 0; i < yyvsp[0].interm.typeList->size(); ++i) {
            for (unsigned int j = 0; j < yyval.interm.typeList->size(); ++j) {
                if ((*yyval.interm.typeList)[j].type->getFieldName() == (*yyvsp[0].interm.typeList)[i].type->getFieldName()) {
                    parseContext.error((*yyvsp[0].interm.typeList)[i].line, "duplicate field name in structure:", "struct", (*yyvsp[0].interm.typeList)[i].type->getFieldName().c_str());
                    parseContext.recover();
                }
            }
            yyval.interm.typeList->push_back((*yyvsp[0].interm.typeList)[i]);
        }
    ;}
    break;

  case 161:
#line 1632 "glslang.y"
    {
        yyval.interm.typeList = yyvsp[-1].interm.typeList;
        
        if (parseContext.voidErrorCheck(yyvsp[-2].interm.type.line, (*yyvsp[-1].interm.typeList)[0].type->getFieldName(), yyvsp[-2].interm.type)) {
            parseContext.recover();
        }
        for (unsigned int i = 0; i < yyval.interm.typeList->size(); ++i) {
            //
            // Careful not to replace already know aspects of type, like array-ness
            //
            (*yyval.interm.typeList)[i].type->setType(yyvsp[-2].interm.type.type, yyvsp[-2].interm.type.size, yyvsp[-2].interm.type.matrix, yyvsp[-2].interm.type.userDef);
            if (yyvsp[-2].interm.type.userDef)
                (*yyval.interm.typeList)[i].type->setTypeName(yyvsp[-2].interm.type.userDef->getTypeName());
        }
    ;}
    break;

  case 162:
#line 1650 "glslang.y"
    {
        yyval.interm.typeList = NewPoolTTypeList();
        yyval.interm.typeList->push_back(yyvsp[0].interm.typeLine);
    ;}
    break;

  case 163:
#line 1654 "glslang.y"
    {
        yyval.interm.typeList->push_back(yyvsp[0].interm.typeLine);
    ;}
    break;

  case 164:
#line 1660 "glslang.y"
    {
        yyval.interm.typeLine.type = new TType(EbtVoid);
        yyval.interm.typeLine.line = yyvsp[0].lex.line;
        yyval.interm.typeLine.type->setFieldName(*yyvsp[0].lex.string);
    ;}
    break;

  case 165:
#line 1665 "glslang.y"
    {
        yyval.interm.typeLine.type = new TType(EbtVoid);
        yyval.interm.typeLine.line = yyvsp[-3].lex.line;
        yyval.interm.typeLine.type->setFieldName(*yyvsp[-3].lex.string);
        
        if (yyvsp[-1].interm.intermTypedNode->getAsConstantUnion() == 0 || yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getBasicType() != EbtInt ||
            yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst <= 0) {
            parseContext.error(yyvsp[-2].lex.line, "structure field array size must be a positive integer", yyvsp[-3].lex.string->c_str(), "");
            parseContext.recover();
        } else {           
            yyval.interm.typeLine.type->setArraySize(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst);
        }
    ;}
    break;

  case 166:
#line 1681 "glslang.y"
    { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;}
    break;

  case 167:
#line 1685 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 168:
#line 1689 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermAggregate; ;}
    break;

  case 169:
#line 1690 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 170:
#line 1696 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 171:
#line 1697 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 172:
#line 1698 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 173:
#line 1699 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 174:
#line 1700 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 175:
#line 1704 "glslang.y"
    { yyval.interm.intermAggregate = 0; ;}
    break;

  case 176:
#line 1705 "glslang.y"
    { parseContext.symbolTable.push(); ;}
    break;

  case 177:
#line 1705 "glslang.y"
    { parseContext.symbolTable.pop(); ;}
    break;

  case 178:
#line 1705 "glslang.y"
    {
        if (yyvsp[-2].interm.intermAggregate != 0)            
            yyvsp[-2].interm.intermAggregate->setOperator(EOpSequence); 
        yyval.interm.intermAggregate = yyvsp[-2].interm.intermAggregate;
    ;}
    break;

  case 179:
#line 1713 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 180:
#line 1714 "glslang.y"
    { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;}
    break;

  case 181:
#line 1719 "glslang.y"
    { 
        yyval.interm.intermNode = 0; 
    ;}
    break;

  case 182:
#line 1722 "glslang.y"
    { 
        if (yyvsp[-1].interm.intermAggregate)
            yyvsp[-1].interm.intermAggregate->setOperator(EOpSequence); 
        yyval.interm.intermNode = yyvsp[-1].interm.intermAggregate; 
    ;}
    break;

  case 183:
#line 1730 "glslang.y"
    {
        yyval.interm.intermAggregate = parseContext.intermediate.makeAggregate(yyvsp[0].interm.intermNode, 0); 
    ;}
    break;

  case 184:
#line 1733 "glslang.y"
    { 
        yyval.interm.intermAggregate = parseContext.intermediate.growAggregate(yyvsp[-1].interm.intermAggregate, yyvsp[0].interm.intermNode, 0);
    ;}
    break;

  case 185:
#line 1739 "glslang.y"
    { yyval.interm.intermNode = 0; ;}
    break;

  case 186:
#line 1740 "glslang.y"
    { yyval.interm.intermNode = static_cast<TIntermNode*>(yyvsp[-1].interm.intermTypedNode); ;}
    break;

  case 187:
#line 1744 "glslang.y"
    { 
        if (parseContext.boolErrorCheck(yyvsp[-4].lex.line, yyvsp[-2].interm.intermTypedNode))
            parseContext.recover();
        yyval.interm.intermNode = parseContext.intermediate.addSelection(yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.nodePair, yyvsp[-4].lex.line);
    ;}
    break;

  case 188:
#line 1752 "glslang.y"
    {
        yyval.interm.nodePair.node1 = yyvsp[-2].interm.intermNode;
        yyval.interm.nodePair.node2 = yyvsp[0].interm.intermNode;
    ;}
    break;

  case 189:
#line 1756 "glslang.y"
    { 
        yyval.interm.nodePair.node1 = yyvsp[0].interm.intermNode;
        yyval.interm.nodePair.node2 = 0;
    ;}
    break;

  case 190:
#line 1766 "glslang.y"
    {
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
        if (parseContext.boolErrorCheck(yyvsp[0].interm.intermTypedNode->getLine(), yyvsp[0].interm.intermTypedNode))
            parseContext.recover();          
    ;}
    break;

  case 191:
#line 1771 "glslang.y"
    {
        TIntermNode* intermNode;
        if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type))
            parseContext.recover();
        if (parseContext.boolErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type))
            parseContext.recover();
        
        if (!parseContext.executeInitializer(yyvsp[-2].lex.line, *yyvsp[-2].lex.string, yyvsp[-3].interm.type, yyvsp[0].interm.intermTypedNode, intermNode))
            yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode;
        else {
            parseContext.recover();
            yyval.interm.intermTypedNode = 0;
        }
    ;}
    break;

  case 192:
#line 1788 "glslang.y"
    { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ;}
    break;

  case 193:
#line 1788 "glslang.y"
    { 
        parseContext.symbolTable.pop();
        yyval.interm.intermNode = parseContext.intermediate.addLoop(yyvsp[0].interm.intermNode, yyvsp[-2].interm.intermTypedNode, 0, true, yyvsp[-5].lex.line);
        --parseContext.loopNestingLevel;
    ;}
    break;

  case 194:
#line 1793 "glslang.y"
    { ++parseContext.loopNestingLevel; ;}
    break;

  case 195:
#line 1793 "glslang.y"
    {
        if (parseContext.boolErrorCheck(yyvsp[0].lex.line, yyvsp[-2].interm.intermTypedNode))
            parseContext.recover();
                    
        yyval.interm.intermNode = parseContext.intermediate.addLoop(yyvsp[-5].interm.intermNode, yyvsp[-2].interm.intermTypedNode, 0, false, yyvsp[-4].lex.line);
        --parseContext.loopNestingLevel;
    ;}
    break;

  case 196:
#line 1800 "glslang.y"
    { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ;}
    break;

  case 197:
#line 1800 "glslang.y"
    {
        parseContext.symbolTable.pop();
        yyval.interm.intermNode = parseContext.intermediate.makeAggregate(yyvsp[-3].interm.intermNode, yyvsp[-5].lex.line);
        yyval.interm.intermNode = parseContext.intermediate.growAggregate(
                yyval.interm.intermNode,
                parseContext.intermediate.addLoop(yyvsp[0].interm.intermNode, reinterpret_cast<TIntermTyped*>(yyvsp[-2].interm.nodePair.node1), reinterpret_cast<TIntermTyped*>(yyvsp[-2].interm.nodePair.node2), true, yyvsp[-6].lex.line),
                yyvsp[-6].lex.line);
        yyval.interm.intermNode->getAsAggregate()->setOperator(EOpSequence);
        --parseContext.loopNestingLevel;
    ;}
    break;

  case 198:
#line 1813 "glslang.y"
    {
        yyval.interm.intermNode = yyvsp[0].interm.intermNode; 
    ;}
    break;

  case 199:
#line 1816 "glslang.y"
    {
        yyval.interm.intermNode = yyvsp[0].interm.intermNode;
    ;}
    break;

  case 200:
#line 1822 "glslang.y"
    { 
        yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; 
    ;}
    break;

  case 201:
#line 1825 "glslang.y"
    { 
        yyval.interm.intermTypedNode = 0; 
    ;}
    break;

  case 202:
#line 1831 "glslang.y"
    { 
        yyval.interm.nodePair.node1 = yyvsp[-1].interm.intermTypedNode;
        yyval.interm.nodePair.node2 = 0;
    ;}
    break;

  case 203:
#line 1835 "glslang.y"
    {
        yyval.interm.nodePair.node1 = yyvsp[-2].interm.intermTypedNode;
        yyval.interm.nodePair.node2 = yyvsp[0].interm.intermTypedNode;
    ;}
    break;

  case 204:
#line 1842 "glslang.y"
    {
        if (parseContext.loopNestingLevel <= 0) {
            parseContext.error(yyvsp[-1].lex.line, "continue statement only allowed in loops", "", "");
            parseContext.recover();
        }        
        yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpContinue, yyvsp[-1].lex.line);
    ;}
    break;

  case 205:
#line 1849 "glslang.y"
    {
        if (parseContext.loopNestingLevel <= 0) {
            parseContext.error(yyvsp[-1].lex.line, "break statement only allowed in loops", "", "");
            parseContext.recover();
        }        
        yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpBreak, yyvsp[-1].lex.line);
    ;}
    break;

  case 206:
#line 1856 "glslang.y"
    {
        yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpReturn, yyvsp[-1].lex.line);
        if (parseContext.currentFunctionType->getBasicType() != EbtVoid) {
            parseContext.error(yyvsp[-1].lex.line, "non-void function must return a value", "return", "");
            parseContext.recover();
        }
    ;}
    break;

  case 207:
#line 1863 "glslang.y"
    {        
        yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpReturn, yyvsp[-1].interm.intermTypedNode, yyvsp[-2].lex.line);
        parseContext.functionReturnsValue = true;
        if (parseContext.currentFunctionType->getBasicType() == EbtVoid) {
            parseContext.error(yyvsp[-2].lex.line, "void function cannot return a value", "return", "");
            parseContext.recover();
        } else if (*(parseContext.currentFunctionType) != yyvsp[-1].interm.intermTypedNode->getType()) {
            parseContext.error(yyvsp[-2].lex.line, "function return is not matching type:", "return", "");
            parseContext.recover();
        }
    ;}
    break;

  case 208:
#line 1874 "glslang.y"
    {
        FRAG_ONLY("discard", yyvsp[-1].lex.line);
        yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpKill, yyvsp[-1].lex.line);
    ;}
    break;

  case 209:
#line 1883 "glslang.y"
    { 
        yyval.interm.intermNode = yyvsp[0].interm.intermNode; 
        parseContext.treeRoot = yyval.interm.intermNode; 
    ;}
    break;

  case 210:
#line 1887 "glslang.y"
    {
        yyval.interm.intermNode = parseContext.intermediate.growAggregate(yyvsp[-1].interm.intermNode, yyvsp[0].interm.intermNode, 0);
        parseContext.treeRoot = yyval.interm.intermNode;
    ;}
    break;

  case 211:
#line 1894 "glslang.y"
    { 
        yyval.interm.intermNode = yyvsp[0].interm.intermNode; 
    ;}
    break;

  case 212:
#line 1897 "glslang.y"
    { 
        yyval.interm.intermNode = yyvsp[0].interm.intermNode; 
    ;}
    break;

  case 213:
#line 1903 "glslang.y"
    {
        TFunction& function = *(yyvsp[0].interm.function);
        TFunction* prevDec = static_cast<TFunction*>(parseContext.symbolTable.find(function.getMangledName()));
        //
        // Note:  'prevDec' could be 'function' if this is the first time we've seen function
        // as it would have just been put in the symbol table.  Otherwise, we're looking up
        // an earlier occurance.
        //
        if (prevDec->isDefined()) {
            //
            // Then this function already has a body.
            //
            parseContext.error(yyvsp[0].interm.line, "function already has a body", function.getName().c_str(), "");
            parseContext.recover();
        }
        prevDec->setDefined();
        
        //
        // Raise error message if main function takes any parameters or return anything other than void
        //
        if (function.getName() == "main") {
            if (function.getParamCount() > 0) {
                parseContext.error(yyvsp[0].interm.line, "function cannot take any parameter(s)", function.getName().c_str(), "");
                parseContext.recover();
            }
            if (function.getReturnType().getBasicType() != EbtVoid) {
                parseContext.error(yyvsp[0].interm.line, "", function.getReturnType().getBasicString(), "main function cannot return a value" );
                parseContext.recover();
            }            
        }
   
        //
        // New symbol table scope for body of function plus its arguments
        //
        parseContext.symbolTable.push();
        
        //
        // Remember the return type for later checking for RETURN statements.
        //
        parseContext.currentFunctionType = &(prevDec->getReturnType());
        parseContext.functionReturnsValue = false;
        
        // 
        // Insert parameters into the symbol table.
        // If the parameter has no name, it's not an error, just don't insert it 
        // (could be used for unused args).
        //
        // Also, accumulate the list of parameters into the HIL, so lower level code
        // knows where to find parameters.
        //
        TIntermAggregate* paramNodes = new TIntermAggregate;
        for (int i = 0; i < function.getParamCount(); i++) {
            TParameter& param = function[i];
            if (param.name != 0) {
                TVariable *variable = new TVariable(param.name, *param.type);
                // 
                // Insert the parameters with name in the symbol table.
                //
                if (! parseContext.symbolTable.insert(*variable)) {
                    parseContext.error(yyvsp[0].interm.line, "redefinition", variable->getName().c_str(), "");
                    parseContext.recover();
                    delete variable;
                }
                //
                // Transfer ownership of name pointer to symbol table.
                //
                param.name = 0;
                
                //
                // Add the parameter to the HIL
                //                
                paramNodes = parseContext.intermediate.growAggregate(
                                               paramNodes, 
                                               parseContext.intermediate.addSymbol(variable->getUniqueId(),
                                                                       variable->getName(),
                                                                       variable->getType(), yyvsp[0].interm.line), 
                                               yyvsp[0].interm.line);
            } else {
                paramNodes = parseContext.intermediate.growAggregate(paramNodes, parseContext.intermediate.addSymbol(0, "", *param.type, yyvsp[0].interm.line), yyvsp[0].interm.line);
            }
        }
        parseContext.intermediate.setAggregateOperator(paramNodes, EOpParameters, yyvsp[0].interm.line);
        yyvsp[0].interm.intermAggregate = paramNodes;
        parseContext.loopNestingLevel = 0;
    ;}
    break;

  case 214:
#line 1988 "glslang.y"
    {
        //?? Check that all paths return a value if return type != void ?
        //   May be best done as post process phase on intermediate code
        if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) {
            parseContext.error(yyvsp[-2].interm.line, "function does not return a value:", "", yyvsp[-2].interm.function->getName().c_str());
            parseContext.recover();
        }
        parseContext.symbolTable.pop();
        yyval.interm.intermNode = parseContext.intermediate.growAggregate(yyvsp[-2].interm.intermAggregate, yyvsp[0].interm.intermNode, 0);
        parseContext.intermediate.setAggregateOperator(yyval.interm.intermNode, EOpFunction, yyvsp[-2].interm.line);
        yyval.interm.intermNode->getAsAggregate()->setName(yyvsp[-2].interm.function->getMangledName().c_str());
        yyval.interm.intermNode->getAsAggregate()->setType(yyvsp[-2].interm.function->getReturnType());
        
        // store the pragma information for debug and optimize and other vendor specific 
        // information. This information can be queried from the parse tree
        yyval.interm.intermNode->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize);
        yyval.interm.intermNode->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
        yyval.interm.intermNode->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable);
    ;}
    break;


    }

/* Line 999 of yacc.c.  */
#line 4158 "glslang.tab.c"

  yyvsp -= yylen;
  yyssp -= yylen;


  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;


  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (YYPACT_NINF < yyn && yyn < YYLAST)
	{
	  YYSIZE_T yysize = 0;
	  int yytype = YYTRANSLATE (yychar);
	  char *yymsg;
	  int yyx, yycount;

	  yycount = 0;
	  /* Start YYX at -YYN if negative to avoid negative indexes in
	     YYCHECK.  */
	  for (yyx = yyn < 0 ? -yyn : 0;
	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
	  yysize += yystrlen ("syntax error, unexpected ") + 1;
	  yysize += yystrlen (yytname[yytype]);
	  yymsg = (char *) YYSTACK_ALLOC (yysize);
	  if (yymsg != 0)
	    {
	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
	      yyp = yystpcpy (yyp, yytname[yytype]);

	      if (yycount < 5)
		{
		  yycount = 0;
		  for (yyx = yyn < 0 ? -yyn : 0;
		       yyx < (int) (sizeof (yytname) / sizeof (char *));
		       yyx++)
		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
		      {
			const char *yyq = ! yycount ? ", expecting " : " or ";
			yyp = yystpcpy (yyp, yyq);
			yyp = yystpcpy (yyp, yytname[yyx]);
			yycount++;
		      }
		}
	      yyerror (yymsg);
	      YYSTACK_FREE (yymsg);
	    }
	  else
	    yyerror ("syntax error; also virtual memory exhausted");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror ("syntax error");
    }



  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
	 error, discard it.  */

      /* Return failure if at end of input.  */
      if (yychar == YYEOF)
        {
	  /* Pop the error token.  */
          YYPOPSTACK;
	  /* Pop the rest of the stack.  */
	  while (yyss < yyssp)
	    {
	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
	      yydestruct (yystos[*yyssp], yyvsp);
	      YYPOPSTACK;
	    }
	  YYABORT;
        }

      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
      yydestruct (yytoken, &yylval);
      yychar = YYEMPTY;

    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action.  |
`----------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;

      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
      yydestruct (yystos[yystate], yyvsp);
      yyvsp--;
      yystate = *--yyssp;

      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;


  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here.  |
`----------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}


#line 209 "glslang.y"