Menu â–¾ â–´

[39a9d1]: / parser.cpp  Maximize  Restore  History

Download this file

2781 lines (2517 with data), 86.4 kB

   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
#define YY_MyParser_h_included
/* A Bison++ parser, made from pcode.y */
/* with Bison++ version bison++ Version 1.21-8, adapted from GNU bison by coetmeur@icdc.fr
*/
#line 1 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* HEADER SECTION */
#if defined( _MSDOS ) || defined(MSDOS) || defined(__MSDOS__)
#define __MSDOS_AND_ALIKE
#endif
#if defined(_WINDOWS) && defined(_MSC_VER)
#define __HAVE_NO_ALLOCA
#define __MSDOS_AND_ALIKE
#endif
#ifndef alloca
#if defined( __GNUC__)
#define alloca __builtin_alloca
#elif (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#elif defined (__MSDOS_AND_ALIKE)
#include <malloc.h>
#ifndef __TURBOC__
/* MS C runtime lib */
#define alloca _alloca
#endif
#elif defined(_AIX)
#include <malloc.h>
#pragma alloca
#elif defined(__hpux)
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* not _AIX not MSDOS, or __TURBOC__ or _AIX, not sparc. */
#endif /* alloca not defined. */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#ifndef YY_USE_CLASS
#define YY_USE_CLASS
#endif
#else
#ifndef __STDC__
#define const
#endif
#endif
#include <stdio.h>
#define YYBISON 1
/* #line 73 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 85 "parser.cpp"
#define YY_MyParser_LSP_NEEDED
#define YY_MyParser_ERROR_BODY =0
#define YY_MyParser_LEX_BODY =0
#line 7 "pcode.y"
// ------------------------------------
// dBase for Linux (c) 2012 Jens Kallup
// All Rights Reserved.
// ------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdarg.h>
#include <signal.h>
#include <iostream>
#include <fstream>
#line 23 "pcode.y"
using namespace std;
#define run_parse(x) (run_parse_mode == (x))
#define false 0
#define true 1
extern int run_parse_mode;
extern char *strlwr(char *c);
extern FILE* yyin;
extern int lineno;
#ifdef _PARSER_
FILE *file_header = NULL;
FILE *file_main = NULL;
char temp_str[2048];
char temp_object[2048];
char class_temp[2048];
char *tmp_id;
char *class_object;
char *class_methode_code;
char *class_name;
char *class_type;
char *class_local;
char *class_datalink;
char *class_element;
int no_expr = 0;
int last_token = 0;
int twisted = 0;
//typedef unsigned short bool;
bool has_object = false;
bool in_methode = false;
bool in_main_function = false;
bool compiler_flag = true;
#endif
int check_list(char *name);
void print_code(char* str, ... );
extern int errors;
#line 72 "pcode.y"
typedef union {
int type;
float val;
char* id;
char* text;
int trfa;
} yy_MyParser_stype;
#define YY_MyParser_STYPE yy_MyParser_stype
#line 73 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* %{ and %header{ and %union, during decl */
#define YY_MyParser_BISON 1
#ifndef YY_MyParser_COMPATIBILITY
#ifndef YY_USE_CLASS
#define YY_MyParser_COMPATIBILITY 1
#else
#define YY_MyParser_COMPATIBILITY 0
#endif
#endif
#if YY_MyParser_COMPATIBILITY != 0
/* backward compatibility */
#ifdef YYLTYPE
#ifndef YY_MyParser_LTYPE
#define YY_MyParser_LTYPE YYLTYPE
#endif
#endif
#ifdef YYSTYPE
#ifndef YY_MyParser_STYPE
#define YY_MyParser_STYPE YYSTYPE
#endif
#endif
#ifdef YYDEBUG
#ifndef YY_MyParser_DEBUG
#define YY_MyParser_DEBUG YYDEBUG
#endif
#endif
#ifdef YY_MyParser_STYPE
#ifndef yystype
#define yystype YY_MyParser_STYPE
#endif
#endif
/* use goto to be compatible */
#ifndef YY_MyParser_USE_GOTO
#define YY_MyParser_USE_GOTO 1
#endif
#endif
/* use no goto to be clean in C++ */
#ifndef YY_MyParser_USE_GOTO
#define YY_MyParser_USE_GOTO 0
#endif
#ifndef YY_MyParser_PURE
/* #line 117 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 210 "parser.cpp"
#line 117 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* YY_MyParser_PURE */
#endif
/* section apres lecture def, avant lecture grammaire S2 */
/* #line 121 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 219 "parser.cpp"
#line 121 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* prefix */
#ifndef YY_MyParser_DEBUG
/* #line 123 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 226 "parser.cpp"
#line 123 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* YY_MyParser_DEBUG */
#endif
#ifndef YY_MyParser_LSP_NEEDED
/* #line 128 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 236 "parser.cpp"
#line 128 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* YY_MyParser_LSP_NEEDED*/
#endif
/* DEFAULT LTYPE*/
#ifdef YY_MyParser_LSP_NEEDED
#ifndef YY_MyParser_LTYPE
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#define YY_MyParser_LTYPE yyltype
#endif
#endif
/* DEFAULT STYPE*/
/* We used to use `unsigned long' as YY_MyParser_STYPE on MSDOS,
but it seems better to be consistent.
Most programs should declare their own type anyway. */
#ifndef YY_MyParser_STYPE
#define YY_MyParser_STYPE int
#endif
/* DEFAULT MISCELANEOUS */
#ifndef YY_MyParser_PARSE
#define YY_MyParser_PARSE yyparse
#endif
#ifndef YY_MyParser_LEX
#define YY_MyParser_LEX yylex
#endif
#ifndef YY_MyParser_LVAL
#define YY_MyParser_LVAL yylval
#endif
#ifndef YY_MyParser_LLOC
#define YY_MyParser_LLOC yylloc
#endif
#ifndef YY_MyParser_CHAR
#define YY_MyParser_CHAR yychar
#endif
#ifndef YY_MyParser_NERRS
#define YY_MyParser_NERRS yynerrs
#endif
#ifndef YY_MyParser_DEBUG_FLAG
#define YY_MyParser_DEBUG_FLAG yydebug
#endif
#ifndef YY_MyParser_ERROR
#define YY_MyParser_ERROR yyerror
#endif
#ifndef YY_MyParser_PARSE_PARAM
#ifndef __STDC__
#ifndef __cplusplus
#ifndef YY_USE_CLASS
#define YY_MyParser_PARSE_PARAM
#ifndef YY_MyParser_PARSE_PARAM_DEF
#define YY_MyParser_PARSE_PARAM_DEF
#endif
#endif
#endif
#endif
#ifndef YY_MyParser_PARSE_PARAM
#define YY_MyParser_PARSE_PARAM void
#endif
#endif
#if YY_MyParser_COMPATIBILITY != 0
/* backward compatibility */
#ifdef YY_MyParser_LTYPE
#ifndef YYLTYPE
#define YYLTYPE YY_MyParser_LTYPE
#else
/* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
#endif
#endif
#ifndef YYSTYPE
#define YYSTYPE YY_MyParser_STYPE
#else
/* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
#endif
#ifdef YY_MyParser_PURE
#ifndef YYPURE
#define YYPURE YY_MyParser_PURE
#endif
#endif
#ifdef YY_MyParser_DEBUG
#ifndef YYDEBUG
#define YYDEBUG YY_MyParser_DEBUG
#endif
#endif
#ifndef YY_MyParser_ERROR_VERBOSE
#ifdef YYERROR_VERBOSE
#define YY_MyParser_ERROR_VERBOSE YYERROR_VERBOSE
#endif
#endif
#ifndef YY_MyParser_LSP_NEEDED
#ifdef YYLSP_NEEDED
#define YY_MyParser_LSP_NEEDED YYLSP_NEEDED
#endif
#endif
#endif
#ifndef YY_USE_CLASS
/* TOKEN C */
/* #line 236 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 349 "parser.cpp"
#define _NUM_ 258
#define _ID_ 259
#define _ASSIGN_ 260
#define _PLUS_ 261
#define _MINUS_ 262
#define _DIV_ 263
#define _MUL_ 264
#define _MOD_ 265
#define _POW_ 266
#define _OBR_ 267
#define _CBR_ 268
#define _NEW_ 269
#define _CLASS_ 270
#define _OF_ 271
#define _ENDCLASS_ 272
#define _WITH_ 273
#define _ENDWITH_ 274
#define _LOCAL_ 275
#define _COMMA_ 276
#define _POINT_ 277
#define _STRING_ 278
#define _FUNCTION_ 279
#define _RETURN_ 280
#define _DBPOINT_ 281
#define _MSGBOX_ 282
#define _EQUAL_ 283
#define _PARAMETER_ 284
#define _IF_ 285
#define _ELSE_ 286
#define _ENDIF_ 287
#define _NOT_ 288
#define _TRUE_ 289
#define _FALSE_ 290
#define _OBR2_ 291
#define _CBR2_ 292
#line 236 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* #defines tokens */
#else
/* CLASS */
#ifndef YY_MyParser_CLASS
#define YY_MyParser_CLASS MyParser
#endif
#ifndef YY_MyParser_INHERIT
#define YY_MyParser_INHERIT
#endif
#ifndef YY_MyParser_MEMBERS
#define YY_MyParser_MEMBERS
#endif
#ifndef YY_MyParser_LEX_BODY
#define YY_MyParser_LEX_BODY
#endif
#ifndef YY_MyParser_ERROR_BODY
#define YY_MyParser_ERROR_BODY
#endif
#ifndef YY_MyParser_CONSTRUCTOR_PARAM
#define YY_MyParser_CONSTRUCTOR_PARAM
#endif
#ifndef YY_MyParser_CONSTRUCTOR_CODE
#define YY_MyParser_CONSTRUCTOR_CODE
#endif
#ifndef YY_MyParser_CONSTRUCTOR_INIT
#define YY_MyParser_CONSTRUCTOR_INIT
#endif
/* choose between enum and const */
#ifndef YY_MyParser_USE_CONST_TOKEN
#define YY_MyParser_USE_CONST_TOKEN 0
/* yes enum is more compatible with flex, */
/* so by default we use it */
#endif
#if YY_MyParser_USE_CONST_TOKEN != 0
#ifndef YY_MyParser_ENUM_TOKEN
#define YY_MyParser_ENUM_TOKEN yy_MyParser_enum_token
#endif
#endif
class YY_MyParser_CLASS YY_MyParser_INHERIT
{
public:
#if YY_MyParser_USE_CONST_TOKEN != 0
/* static const int token ... */
/* #line 280 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 434 "parser.cpp"
static const int _NUM_;
static const int _ID_;
static const int _ASSIGN_;
static const int _PLUS_;
static const int _MINUS_;
static const int _DIV_;
static const int _MUL_;
static const int _MOD_;
static const int _POW_;
static const int _OBR_;
static const int _CBR_;
static const int _NEW_;
static const int _CLASS_;
static const int _OF_;
static const int _ENDCLASS_;
static const int _WITH_;
static const int _ENDWITH_;
static const int _LOCAL_;
static const int _COMMA_;
static const int _POINT_;
static const int _STRING_;
static const int _FUNCTION_;
static const int _RETURN_;
static const int _DBPOINT_;
static const int _MSGBOX_;
static const int _EQUAL_;
static const int _PARAMETER_;
static const int _IF_;
static const int _ELSE_;
static const int _ENDIF_;
static const int _NOT_;
static const int _TRUE_;
static const int _FALSE_;
static const int _OBR2_;
static const int _CBR2_;
#line 280 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* decl const */
#else
enum YY_MyParser_ENUM_TOKEN { YY_MyParser_NULL_TOKEN=0
/* #line 283 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 478 "parser.cpp"
,_NUM_=258
,_ID_=259
,_ASSIGN_=260
,_PLUS_=261
,_MINUS_=262
,_DIV_=263
,_MUL_=264
,_MOD_=265
,_POW_=266
,_OBR_=267
,_CBR_=268
,_NEW_=269
,_CLASS_=270
,_OF_=271
,_ENDCLASS_=272
,_WITH_=273
,_ENDWITH_=274
,_LOCAL_=275
,_COMMA_=276
,_POINT_=277
,_STRING_=278
,_FUNCTION_=279
,_RETURN_=280
,_DBPOINT_=281
,_MSGBOX_=282
,_EQUAL_=283
,_PARAMETER_=284
,_IF_=285
,_ELSE_=286
,_ENDIF_=287
,_NOT_=288
,_TRUE_=289
,_FALSE_=290
,_OBR2_=291
,_CBR2_=292
#line 283 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* enum token */
}; /* end of enum declaration */
#endif
public:
int YY_MyParser_PARSE (YY_MyParser_PARSE_PARAM);
virtual void YY_MyParser_ERROR(char *msg) YY_MyParser_ERROR_BODY;
#ifdef YY_MyParser_PURE
#ifdef YY_MyParser_LSP_NEEDED
virtual int YY_MyParser_LEX (YY_MyParser_STYPE *YY_MyParser_LVAL,YY_MyParser_LTYPE *YY_MyParser_LLOC) YY_MyParser_LEX_BODY;
#else
virtual int YY_MyParser_LEX (YY_MyParser_STYPE *YY_MyParser_LVAL) YY_MyParser_LEX_BODY;
#endif
#else
virtual int YY_MyParser_LEX() YY_MyParser_LEX_BODY;
YY_MyParser_STYPE YY_MyParser_LVAL;
#ifdef YY_MyParser_LSP_NEEDED
YY_MyParser_LTYPE YY_MyParser_LLOC;
#endif
int YY_MyParser_NERRS;
int YY_MyParser_CHAR;
#endif
#if YY_MyParser_DEBUG != 0
int YY_MyParser_DEBUG_FLAG; /* nonzero means print parse trace */
#endif
public:
YY_MyParser_CLASS(YY_MyParser_CONSTRUCTOR_PARAM);
public:
YY_MyParser_MEMBERS
};
/* other declare folow */
#if YY_MyParser_USE_CONST_TOKEN != 0
/* #line 314 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 550 "parser.cpp"
const int YY_MyParser_CLASS::_NUM_=258;
const int YY_MyParser_CLASS::_ID_=259;
const int YY_MyParser_CLASS::_ASSIGN_=260;
const int YY_MyParser_CLASS::_PLUS_=261;
const int YY_MyParser_CLASS::_MINUS_=262;
const int YY_MyParser_CLASS::_DIV_=263;
const int YY_MyParser_CLASS::_MUL_=264;
const int YY_MyParser_CLASS::_MOD_=265;
const int YY_MyParser_CLASS::_POW_=266;
const int YY_MyParser_CLASS::_OBR_=267;
const int YY_MyParser_CLASS::_CBR_=268;
const int YY_MyParser_CLASS::_NEW_=269;
const int YY_MyParser_CLASS::_CLASS_=270;
const int YY_MyParser_CLASS::_OF_=271;
const int YY_MyParser_CLASS::_ENDCLASS_=272;
const int YY_MyParser_CLASS::_WITH_=273;
const int YY_MyParser_CLASS::_ENDWITH_=274;
const int YY_MyParser_CLASS::_LOCAL_=275;
const int YY_MyParser_CLASS::_COMMA_=276;
const int YY_MyParser_CLASS::_POINT_=277;
const int YY_MyParser_CLASS::_STRING_=278;
const int YY_MyParser_CLASS::_FUNCTION_=279;
const int YY_MyParser_CLASS::_RETURN_=280;
const int YY_MyParser_CLASS::_DBPOINT_=281;
const int YY_MyParser_CLASS::_MSGBOX_=282;
const int YY_MyParser_CLASS::_EQUAL_=283;
const int YY_MyParser_CLASS::_PARAMETER_=284;
const int YY_MyParser_CLASS::_IF_=285;
const int YY_MyParser_CLASS::_ELSE_=286;
const int YY_MyParser_CLASS::_ENDIF_=287;
const int YY_MyParser_CLASS::_NOT_=288;
const int YY_MyParser_CLASS::_TRUE_=289;
const int YY_MyParser_CLASS::_FALSE_=290;
const int YY_MyParser_CLASS::_OBR2_=291;
const int YY_MyParser_CLASS::_CBR2_=292;
#line 314 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* const YY_MyParser_CLASS::token */
#endif
/*apres const */
YY_MyParser_CLASS::YY_MyParser_CLASS(YY_MyParser_CONSTRUCTOR_PARAM) YY_MyParser_CONSTRUCTOR_INIT
{
#if YY_MyParser_DEBUG != 0
YY_MyParser_DEBUG_FLAG=0;
#endif
YY_MyParser_CONSTRUCTOR_CODE;
};
#endif
/* #line 325 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 602 "parser.cpp"
#define YYFINAL 262
#define YYFLAG 32768
#define YYNTBASE 38
#define YYTRANSLATE(x) ((unsigned)(x) <= 292 ? yytranslate[x] : 114)
static const 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
};
#if YY_MyParser_DEBUG != 0
static const short yyprhs[] = { 0,
0, 1, 5, 6, 9, 12, 14, 15, 17, 19,
21, 23, 25, 27, 30, 32, 36, 37, 41, 47,
48, 57, 58, 63, 64, 71, 72, 74, 77, 78,
84, 85, 90, 91, 92, 100, 106, 113, 114, 118,
120, 121, 126, 132, 133, 141, 151, 160, 168, 169,
172, 176, 179, 183, 184, 185, 194, 195, 196, 206,
209, 210, 211, 212, 223, 224, 231, 235, 241, 249,
259, 271, 272, 273, 288, 289, 297, 298, 306, 307,
308, 315, 316, 322, 323, 329, 331, 333, 335, 337,
341, 342, 347, 348, 354, 355, 361, 362, 368, 369,
375, 376, 382, 384, 385, 390, 391, 396, 397, 402,
403, 408, 409, 414, 415, 420, 422, 424, 426, 427,
432, 433, 438, 439, 444, 445, 450, 451, 456, 457,
462, 463, 468, 470, 472, 474, 475
};
static const short yyrhs[] = { -1,
39, 44, 40, 0, 0, 41, 42, 0, 42, 43,
0, 43, 0, 0, 89, 0, 60, 0, 46, 0,
59, 0, 61, 0, 65, 0, 29, 45, 0, 4,
0, 45, 21, 45, 0, 0, 30, 47, 48, 0,
96, 28, 105, 42, 32, 0, 0, 96, 28, 105,
42, 31, 49, 42, 32, 0, 0, 4, 28, 50,
55, 0, 0, 12, 52, 4, 13, 51, 53, 0,
0, 33, 0, 42, 32, 0, 0, 42, 31, 54,
42, 32, 0, 0, 96, 56, 42, 32, 0, 0,
0, 96, 57, 42, 31, 58, 42, 32, 0, 4,
22, 4, 12, 13, 0, 4, 5, 14, 4, 12,
13, 0, 0, 20, 62, 63, 0, 4, 0, 0,
63, 21, 64, 63, 0, 15, 4, 16, 4, 17,
0, 0, 15, 4, 16, 4, 66, 70, 17, 0,
4, 22, 4, 5, 14, 4, 12, 4, 13, 0,
78, 5, 14, 4, 12, 78, 13, 19, 0, 78,
5, 14, 4, 12, 78, 13, 0, 0, 12, 13,
0, 12, 69, 13, 0, 4, 4, 0, 69, 21,
69, 0, 0, 0, 18, 12, 4, 13, 71, 79,
19, 70, 0, 0, 0, 18, 12, 78, 13, 72,
79, 19, 73, 70, 0, 67, 70, 0, 0, 0,
0, 24, 4, 68, 74, 77, 25, 75, 105, 76,
70, 0, 0, 27, 12, 23, 21, 23, 13, 0,
4, 22, 4, 0, 4, 22, 4, 22, 4, 0,
4, 22, 4, 22, 4, 22, 4, 0, 4, 22,
4, 22, 4, 22, 4, 22, 4, 0, 4, 22,
4, 22, 4, 22, 4, 22, 4, 22, 4, 0,
0, 0, 4, 5, 4, 22, 4, 22, 4, 22,
4, 36, 23, 37, 80, 79, 0, 0, 4, 5,
15, 26, 4, 81, 79, 0, 0, 4, 5, 4,
22, 4, 82, 79, 0, 0, 0, 4, 5, 83,
96, 84, 79, 0, 0, 4, 5, 87, 85, 79,
0, 0, 4, 5, 88, 86, 79, 0, 4, 0,
35, 0, 34, 0, 23, 0, 88, 6, 88, 0,
0, 4, 5, 90, 96, 0, 0, 4, 6, 5,
91, 96, 0, 0, 4, 7, 5, 92, 96, 0,
0, 4, 8, 5, 93, 96, 0, 0, 4, 9,
5, 94, 96, 0, 0, 4, 11, 5, 95, 96,
0, 4, 0, 0, 103, 6, 97, 96, 0, 0,
103, 7, 98, 96, 0, 0, 103, 9, 99, 96,
0, 0, 103, 8, 100, 96, 0, 0, 103, 10,
101, 96, 0, 0, 103, 11, 102, 96, 0, 103,
0, 3, 0, 4, 0, 0, 12, 104, 96, 13,
0, 0, 112, 6, 106, 105, 0, 0, 112, 7,
107, 105, 0, 0, 112, 9, 108, 105, 0, 0,
112, 8, 109, 105, 0, 0, 112, 10, 110, 105,
0, 0, 112, 11, 111, 105, 0, 112, 0, 3,
0, 4, 0, 0, 12, 113, 105, 13, 0
};
#endif
#if YY_MyParser_DEBUG != 0
static const short yyrline[] = { 0,
93, 101, 104, 171, 189, 190, 193, 194, 195, 196,
197, 198, 199, 203, 207, 213, 216, 217, 219, 220,
220, 221, 222, 222, 231, 233, 234, 237, 238, 238,
241, 241, 242, 242, 242, 246, 257, 270, 278, 287,
288, 289, 292, 293, 365, 375, 489, 490, 580, 581,
582, 586, 596, 606, 607, 622, 623, 628, 669, 669,
670, 678, 681, 689, 692, 693, 704, 707, 711, 716,
722, 732, 733, 750, 750, 795, 795, 811, 811, 831,
840, 840, 861, 861, 879, 882, 889, 890, 894, 900,
915, 915, 916, 916, 917, 917, 918, 918, 919, 919,
920, 920, 921, 924, 925, 925, 926, 926, 927, 927,
928, 928, 929, 929, 930, 930, 933, 934, 935, 935,
939, 940, 940, 941, 941, 942, 942, 943, 943, 944,
944, 945, 945, 948, 950, 951, 951
};
static const char * const yytname[] = { "$","error","$illegal.","_NUM_","_ID_",
"_ASSIGN_","_PLUS_","_MINUS_","_DIV_","_MUL_","_MOD_","_POW_","_OBR_","_CBR_",
"_NEW_","_CLASS_","_OF_","_ENDCLASS_","_WITH_","_ENDWITH_","_LOCAL_","_COMMA_",
"_POINT_","_STRING_","_FUNCTION_","_RETURN_","_DBPOINT_","_MSGBOX_","_EQUAL_",
"_PARAMETER_","_IF_","_ELSE_","_ENDIF_","_NOT_","_TRUE_","_FALSE_","_OBR2_",
"_CBR2_","program","@1","program_stmts","@2","stmt_seq","stmt","parameter_stmt",
"stack_parameter_list","if_stmt","@3","if_stmt2","@4","@5","@6","if_not_stmt",
"if_bool_stmt","@7","if_stmt2_equal","@8","@9","@10","local_show","id_stmt",
"local_stmt","@11","local_stmts","@12","class_stmt","@13","object_stmt","function_parameters",
"function_parameters2","class_stmts","@14","@15","@16","@17","@18","@19","function_stmts",
"with_objects","with_stmts","@20","@21","@22","@23","@24","@25","@26","false_true_expr",
"string_expr","num_id_stmt","@27","@28","@29","@30","@31","@32","expr2","@33",
"@34","@35","@36","@37","@38","expr3","@39","expr1","@40","@41","@42","@43",
"@44","@45","expr4","@46",""
};
#endif
static const short yyr1[] = { 0,
39, 38, 41, 40, 42, 42, 43, 43, 43, 43,
43, 43, 43, 44, 45, 45, 47, 46, 48, 49,
48, 50, 48, 51, 48, 52, 52, 53, 54, 53,
56, 55, 57, 58, 55, 59, 60, 62, 61, 63,
64, 63, 65, 66, 65, 67, 67, 67, 68, 68,
68, 69, 69, 70, 71, 70, 72, 73, 70, 70,
74, 75, 76, 70, 77, 77, 78, 78, 78, 78,
78, 79, 80, 79, 81, 79, 82, 79, 83, 84,
79, 85, 79, 86, 79, 87, 87, 87, 88, 88,
90, 89, 91, 89, 92, 89, 93, 89, 94, 89,
95, 89, 89, 97, 96, 98, 96, 99, 96, 100,
96, 101, 96, 102, 96, 96, 103, 103, 104, 103,
106, 105, 107, 105, 108, 105, 109, 105, 110, 105,
111, 105, 105, 112, 112, 113, 112
};
static const short yyr2[] = { 0,
0, 3, 0, 2, 2, 1, 0, 1, 1, 1,
1, 1, 1, 2, 1, 3, 0, 3, 5, 0,
8, 0, 4, 0, 6, 0, 1, 2, 0, 5,
0, 4, 0, 0, 7, 5, 6, 0, 3, 1,
0, 4, 5, 0, 7, 9, 8, 7, 0, 2,
3, 2, 3, 0, 0, 8, 0, 0, 9, 2,
0, 0, 0, 10, 0, 6, 3, 5, 7, 9,
11, 0, 0, 14, 0, 7, 0, 7, 0, 0,
6, 0, 5, 0, 5, 1, 1, 1, 1, 3,
0, 4, 0, 5, 0, 5, 0, 5, 0, 5,
0, 5, 1, 0, 4, 0, 4, 0, 4, 0,
4, 0, 4, 0, 4, 1, 1, 1, 0, 4,
0, 4, 0, 4, 0, 4, 0, 4, 0, 4,
0, 4, 1, 1, 1, 0, 4
};
static const short yydefact[] = { 1,
0, 0, 3, 15, 14, 2, 7, 0, 103, 0,
38, 17, 4, 6, 10, 11, 9, 12, 13, 8,
16, 91, 0, 0, 0, 0, 0, 0, 0, 0,
0, 5, 0, 0, 93, 95, 97, 99, 101, 0,
0, 40, 39, 117, 118, 119, 18, 0, 116, 0,
118, 119, 92, 0, 0, 0, 0, 0, 0, 44,
41, 22, 27, 0, 0, 0, 104, 106, 110, 108,
112, 114, 0, 94, 96, 98, 100, 102, 36, 43,
54, 0, 0, 0, 0, 134, 135, 136, 7, 133,
0, 0, 0, 0, 0, 0, 37, 0, 0, 0,
54, 0, 0, 42, 23, 31, 24, 120, 0, 0,
121, 123, 127, 125, 129, 131, 105, 107, 111, 109,
113, 115, 0, 0, 49, 60, 45, 0, 7, 7,
7, 0, 20, 19, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 61, 0, 0, 0, 0, 25,
137, 7, 122, 124, 128, 126, 130, 132, 0, 0,
55, 0, 57, 0, 50, 0, 65, 0, 32, 34,
29, 28, 0, 0, 68, 72, 67, 72, 52, 51,
0, 0, 0, 0, 7, 7, 21, 0, 0, 0,
0, 0, 53, 0, 62, 0, 0, 0, 0, 0,
69, 79, 54, 58, 0, 0, 48, 35, 30, 0,
0, 86, 0, 89, 88, 87, 0, 82, 84, 56,
54, 0, 63, 47, 46, 70, 0, 0, 80, 72,
0, 72, 59, 0, 54, 0, 77, 75, 72, 83,
90, 85, 66, 64, 71, 0, 72, 72, 81, 0,
78, 76, 0, 0, 0, 0, 73, 72, 74, 0,
0, 0
};
static const short yydefgoto[] = { 260,
1, 6, 7, 13, 14, 3, 5, 15, 31, 47,
152, 83, 131, 64, 150, 186, 105, 129, 130, 185,
16, 17, 18, 30, 43, 82, 19, 81, 101, 145,
166, 102, 176, 178, 221, 167, 206, 235, 183, 103,
191, 258, 248, 247, 217, 239, 230, 232, 218, 219,
20, 34, 54, 55, 56, 57, 58, 48, 91, 92,
94, 93, 95, 96, 49, 65, 89, 135, 136, 138,
137, 139, 140, 90, 109
};
static const short yypact[] = {-32768,
-2, 25,-32768,-32768, 27,-32768, 126, 25, 104, 43,
-32768,-32768, 126,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
27, 35, 46, 47, 48, 49, 67, 72, 55, 73,
1,-32768, 80, 7,-32768,-32768,-32768,-32768,-32768, 74,
83,-32768, 68,-32768, 60, 12,-32768, 79, 143, 106,
-32768,-32768,-32768, 7, 7, 7, 7, 7, 107, 105,
-32768,-32768,-32768, 117, 7, 14,-32768,-32768,-32768,-32768,
-32768,-32768, 111,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
51, 73, 7, 125, 134,-32768,-32768,-32768, 126, 155,
7, 7, 7, 7, 7, 7,-32768, 103, 145, 135,
51, 138, 153, 68,-32768, 128,-32768,-32768, 14, 63,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 163, 164, 157,-32768,-32768, 156, 126, 126,
126, 158,-32768,-32768, 14, 14, 14, 14, 14, 14,
9, -7, 159, 66,-32768, 169, 76, 26, 70,-32768,
-32768, 126,-32768,-32768,-32768,-32768,-32768,-32768, 160, 171,
-32768, 172,-32768, 173,-32768, 127, 151, 167,-32768,-32768,
-32768,-32768, 99, 176, 161, 177, 165, 177,-32768,-32768,
178, 179, 168, 184, 126, 126,-32768, 180, 185, 189,
181, 182, 174, 175,-32768, 183, 186, 112, 113, 192,
187, 5, 51,-32768, 190, 14, 188,-32768,-32768, 191,
193, 194, 195,-32768,-32768,-32768, 7,-32768, 196,-32768,
51, 197,-32768,-32768,-32768, 200, 199, 202,-32768, 177,
201, 177,-32768, 204, 51, 206, 203,-32768, 177,-32768,
196,-32768,-32768,-32768,-32768, 208, 177, 177,-32768, 205,
-32768,-32768, 209, 154, 207, 198,-32768, 177,-32768, 214,
215,-32768
};
static const short yypgoto[] = {-32768,
-32768,-32768,-32768, -87, -13,-32768, 210,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768, 137,-32768,-32768,-32768,-32768,-32768,
42, -98,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -116,
-166,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -23,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, -33,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, -102,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768
};
#define YYLAST 235
static const short yytable[] = { 32,
53, 110, 126, 44, 45, 161, 132, 143, 212, 44,
51, 192, 46, 159, 162, -26, 86, 87, 52, 213,
74, 75, 76, 77, 78, 88, 2, 214, 4, 9,
160, 85, 153, 154, 155, 156, 157, 158, 215, 216,
10, 147, 148, 149, 63, 11, 29, 8, 33, 106,
35, 36, 37, 38, 98, 12, 170, 117, 118, 119,
120, 121, 122, 240, 173, 242, 9, 197, 99, 164,
41, 39, 249, 9, 100, 40, 42, 10, 165, 9,
251, 252, 11, 50, 10, 59, 60, 62, 61, 11,
10, 259, 12, 133, 134, 11, 32, 198, 199, 12,
171, 172, 9, 223, 220, 12, 66, 169, 22, 23,
24, 25, 26, 10, 27, 9, 9, 73, 11, 79,
84, 80, 233, 97, 123, 28, 10, 10, 12, 9,
187, 11, 11, 32, 32, 32, 244, 107, 125, 180,
10, 12, 12, 208, 209, 11, 108, 181, 67, 68,
69, 70, 71, 72, 127, 12, 124, 128, -33, 32,
111, 112, 113, 114, 115, 116, 141, 142, 144, 146,
151, 163, 168, 174, 175, 177, 179, 182, 184, 188,
190, 164, 189, 229, 32, 32, 160, 196, 201, 255,
194, 200, 195, 202, 181, 210, 226, 205, 207, 203,
204, 231, 237, 225, 162, 238, 224, 241, 211, 245,
222, 250, 254, 261, 262, 227, 243, 21, 104, 234,
228, 236, 193, 214, 246, 0, 253, 0, 0, 256,
0, 0, 0, 0, 257
};
static const short yycheck[] = { 13,
34, 89, 101, 3, 4, 13, 109, 124, 4, 3,
4, 178, 12, 5, 22, 4, 3, 4, 12, 15,
54, 55, 56, 57, 58, 12, 29, 23, 4, 4,
22, 65, 135, 136, 137, 138, 139, 140, 34, 35,
15, 129, 130, 131, 33, 20, 4, 21, 14, 83,
5, 5, 5, 5, 4, 30, 31, 91, 92, 93,
94, 95, 96, 230, 152, 232, 4, 184, 18, 4,
16, 5, 239, 4, 24, 4, 4, 15, 13, 4,
247, 248, 20, 4, 15, 12, 4, 28, 21, 20,
15, 258, 30, 31, 32, 20, 110, 185, 186, 30,
31, 32, 4, 206, 203, 30, 28, 32, 5, 6,
7, 8, 9, 15, 11, 4, 4, 12, 20, 13,
4, 17, 221, 13, 22, 22, 15, 15, 30, 4,
32, 20, 20, 147, 148, 149, 235, 13, 4, 13,
15, 30, 30, 32, 32, 20, 13, 21, 6, 7,
8, 9, 10, 11, 17, 30, 12, 5, 31, 173,
6, 7, 8, 9, 10, 11, 4, 4, 12, 14,
13, 13, 4, 14, 4, 4, 4, 27, 12, 4,
4, 4, 22, 217, 198, 199, 22, 4, 4, 36,
12, 12, 25, 5, 21, 4, 4, 23, 13, 19,
19, 6, 4, 13, 22, 4, 19, 231, 22, 4,
21, 4, 4, 0, 0, 22, 13, 8, 82, 23,
26, 22, 181, 23, 22, -1, 22, -1, -1, 23,
-1, -1, -1, -1, 37
};
#line 325 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* fattrs + tables */
/* parser code folow */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Note: dollar marks section change
the next is replaced by the list of actions, each action
as one case of the switch. */
#if YY_MyParser_USE_GOTO != 0
/*
SUPRESSION OF GOTO : on some C++ compiler (sun c++)
the goto is strictly forbidden if any constructor/destructor
is used in the whole function (very stupid isn't it ?)
so goto are to be replaced with a 'while/switch/case construct'
here are the macro to keep some apparent compatibility
*/
#define YYGOTO(lb) {yy_gotostate=lb;continue;}
#define YYBEGINGOTO enum yy_labels yy_gotostate=yygotostart; \
for(;;) switch(yy_gotostate) { case yygotostart: {
#define YYLABEL(lb) } case lb: {
#define YYENDGOTO } }
#define YYBEGINDECLARELABEL enum yy_labels {yygotostart
#define YYDECLARELABEL(lb) ,lb
#define YYENDDECLARELABEL };
#else
/* macro to keep goto */
#define YYGOTO(lb) goto lb
#define YYBEGINGOTO
#define YYLABEL(lb) lb:
#define YYENDGOTO
#define YYBEGINDECLARELABEL
#define YYDECLARELABEL(lb)
#define YYENDDECLARELABEL
#endif
/* LABEL DECLARATION */
YYBEGINDECLARELABEL
YYDECLARELABEL(yynewstate)
YYDECLARELABEL(yybackup)
/* YYDECLARELABEL(yyresume) */
YYDECLARELABEL(yydefault)
YYDECLARELABEL(yyreduce)
YYDECLARELABEL(yyerrlab) /* here on detecting error */
YYDECLARELABEL(yyerrlab1) /* here on error raised explicitly by an action */
YYDECLARELABEL(yyerrdefault) /* current state does not do anything special for the error token. */
YYDECLARELABEL(yyerrpop) /* pop the current state because it cannot handle the error token */
YYDECLARELABEL(yyerrhandle)
YYENDDECLARELABEL
/* ALLOCA SIMULATION */
/* __HAVE_NO_ALLOCA */
#ifdef __HAVE_NO_ALLOCA
int __alloca_free_ptr(char *ptr,char *ref)
{if(ptr!=ref) free(ptr);
return 0;}
#define __ALLOCA_alloca(size) malloc(size)
#define __ALLOCA_free(ptr,ref) __alloca_free_ptr((char *)ptr,(char *)ref)
#ifdef YY_MyParser_LSP_NEEDED
#define __ALLOCA_return(num) \
return( __ALLOCA_free(yyss,yyssa)+\
__ALLOCA_free(yyvs,yyvsa)+\
__ALLOCA_free(yyls,yylsa)+\
(num))
#else
#define __ALLOCA_return(num) \
return( __ALLOCA_free(yyss,yyssa)+\
__ALLOCA_free(yyvs,yyvsa)+\
(num))
#endif
#else
#define __ALLOCA_return(num) return(num)
#define __ALLOCA_alloca(size) alloca(size)
#define __ALLOCA_free(ptr,ref)
#endif
/* ENDALLOCA SIMULATION */
#define yyerrok (yyerrstatus = 0)
#define yyclearin (YY_MyParser_CHAR = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT __ALLOCA_return(0)
#define YYABORT __ALLOCA_return(1)
#define YYERROR YYGOTO(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 YYGOTO(yyerrlab)
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(token, value) \
do \
if (YY_MyParser_CHAR == YYEMPTY && yylen == 1) \
{ YY_MyParser_CHAR = (token), YY_MyParser_LVAL = (value); \
yychar1 = YYTRANSLATE (YY_MyParser_CHAR); \
YYPOPSTACK; \
YYGOTO(yybackup); \
} \
else \
{ YY_MyParser_ERROR ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
#ifndef YY_MyParser_PURE
/* UNPURE */
#define YYLEX YY_MyParser_LEX()
#ifndef YY_USE_CLASS
/* If nonreentrant, and not class , generate the variables here */
int YY_MyParser_CHAR; /* the lookahead symbol */
YY_MyParser_STYPE YY_MyParser_LVAL; /* the semantic value of the */
/* lookahead symbol */
int YY_MyParser_NERRS; /* number of parse errors so far */
#ifdef YY_MyParser_LSP_NEEDED
YY_MyParser_LTYPE YY_MyParser_LLOC; /* location data for the lookahead */
/* symbol */
#endif
#endif
#else
/* PURE */
#ifdef YY_MyParser_LSP_NEEDED
#define YYLEX YY_MyParser_LEX(&YY_MyParser_LVAL, &YY_MyParser_LLOC)
#else
#define YYLEX YY_MyParser_LEX(&YY_MyParser_LVAL)
#endif
#endif
#ifndef YY_USE_CLASS
#if YY_MyParser_DEBUG != 0
int YY_MyParser_DEBUG_FLAG; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
#ifdef __cplusplus
static void __yy_bcopy (char *from, char *to, int count)
#else
#ifdef __STDC__
static void __yy_bcopy (char *from, char *to, int count)
#else
static void __yy_bcopy (from, to, count)
char *from;
char *to;
int count;
#endif
#endif
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
int
#ifdef YY_USE_CLASS
YY_MyParser_CLASS::
#endif
YY_MyParser_PARSE(YY_MyParser_PARSE_PARAM)
#ifndef __STDC__
#ifndef __cplusplus
#ifndef YY_USE_CLASS
/* parameter definition without protypes */
YY_MyParser_PARSE_PARAM_DEF
#endif
#endif
#endif
{
register int yystate;
register int yyn;
register short *yyssp;
register YY_MyParser_STYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1=0; /* lookahead token as an internal (translated) token number */
short yyssa[YYINITDEPTH]; /* the state stack */
YY_MyParser_STYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YY_MyParser_STYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
#ifdef YY_MyParser_LSP_NEEDED
YY_MyParser_LTYPE yylsa[YYINITDEPTH]; /* the location stack */
YY_MyParser_LTYPE *yyls = yylsa;
YY_MyParser_LTYPE *yylsp;
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
int yystacksize = YYINITDEPTH;
#ifdef YY_MyParser_PURE
int YY_MyParser_CHAR;
YY_MyParser_STYPE YY_MyParser_LVAL;
int YY_MyParser_NERRS;
#ifdef YY_MyParser_LSP_NEEDED
YY_MyParser_LTYPE YY_MyParser_LLOC;
#endif
#endif
YY_MyParser_STYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
/* start loop, in which YYGOTO may be used. */
YYBEGINGOTO
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Starting parse\n");
#endif
yystate = 0;
yyerrstatus = 0;
YY_MyParser_NERRS = 0;
YY_MyParser_CHAR = 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 - 1;
yyvsp = yyvs;
#ifdef YY_MyParser_LSP_NEEDED
yylsp = yyls;
#endif
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
YYLABEL(yynewstate)
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YY_MyParser_STYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#ifdef YY_MyParser_LSP_NEEDED
YY_MyParser_LTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef YY_MyParser_LSP_NEEDED
/* 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, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
#else
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
#endif
yyss = yyss1; yyvs = yyvs1;
#ifdef YY_MyParser_LSP_NEEDED
yyls = yyls1;
#endif
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
YY_MyParser_ERROR("parser stack overflow");
__ALLOCA_return(2);
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
yyss = (short *) __ALLOCA_alloca (yystacksize * sizeof (*yyssp));
__yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
__ALLOCA_free(yyss1,yyssa);
yyvs = (YY_MyParser_STYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yyvsp));
__yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
__ALLOCA_free(yyvs1,yyvsa);
#ifdef YY_MyParser_LSP_NEEDED
yyls = (YY_MyParser_LTYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yylsp));
__yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
__ALLOCA_free(yyls1,yylsa);
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YY_MyParser_LSP_NEEDED
yylsp = yyls + size - 1;
#endif
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
YYGOTO(yybackup);
YYLABEL(yybackup)
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* YYLABEL(yyresume) */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
YYGOTO(yydefault);
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (YY_MyParser_CHAR == YYEMPTY)
{
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Reading a token: ");
#endif
YY_MyParser_CHAR = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (YY_MyParser_CHAR <= 0) /* This means end of input. */
{
yychar1 = 0;
YY_MyParser_CHAR = YYEOF; /* Don't call YYLEX any more */
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(YY_MyParser_CHAR);
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
{
fprintf (stderr, "Next token is %d (%s", YY_MyParser_CHAR, yytname[yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef YYPRINT
YYPRINT (stderr, YY_MyParser_CHAR, YY_MyParser_LVAL);
#endif
fprintf (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
YYGOTO(yydefault);
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
YYGOTO(yyerrlab);
yyn = -yyn;
YYGOTO(yyreduce);
}
else if (yyn == 0)
YYGOTO(yyerrlab);
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Shifting token %d (%s), ", YY_MyParser_CHAR, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (YY_MyParser_CHAR != YYEOF)
YY_MyParser_CHAR = YYEMPTY;
*++yyvsp = YY_MyParser_LVAL;
#ifdef YY_MyParser_LSP_NEEDED
*++yylsp = YY_MyParser_LLOC;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
YYGOTO(yynewstate);
/* Do the default action for the current state. */
YYLABEL(yydefault)
yyn = yydefact[yystate];
if (yyn == 0)
YYGOTO(yyerrlab);
/* Do a reduction. yyn is the number of a rule to reduce with. */
YYLABEL(yyreduce)
yylen = yyr2[yyn];
if (yylen > 0)
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
{
int i;
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
/* #line 811 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 1413 "parser.cpp"
switch (yyn) {
case 1:
#line 93 "pcode.y"
{
if run_parse(2)
{
print_code("s",
"#define __MAIN_RUN__\n"
"#include \"first.h\"\n\n"
);
}
;
break;}
case 3:
#line 105 "pcode.y"
{
if run_parse(1) {
print_code("s",
"// ---------------------------------\n"
"// kbase 1.0 (c) 2012 by Jens Kallup\n"
"// ---------------------------------\n"
"#ifndef __PROGRAM_HEADER__\n"
"#define __PROGRAM_HEADER__\n\n"
"#include <QApplication>\n"
"#include <QWidget>\n"
"#include <QFrame>\n"
"#include <QString>\n"
"#include <QPushButton>\n"
"#include <QLineEdit>\n"
"#include <QMessageBox>\n"
"#include <QTranslator>\n"
"#include <QVector>\n"
"#include \"session.h\"\n"
"#include \"MyQLineEdit.h\"\n"
"#include \"MyQPushButton.h\"\n"
"\n"
"class MyObjectTypes {\n"
"public:\n"
" int type;\n"
" double value;\n"
" QString str;\n"
" QWidget *widget;\n"
" QVector<MyObjectTypes> next;\n"
"};\n"
"\n"
"#ifdef __MAIN_RUN__\n"
"QVector<MyObjectTypes> param_struct;\n"
"QVector<MyQLineEdit> edit_datasources;\n"
"#else\n"
"extern QVector<MyObjectTypes> param_struct;\n"
"extern QVector<MyQLineEdit> edit_datasources;\n"
"#endif\n"
);
}
else if run_parse(2)
{
in_main_function = true;
print_code("s",
"int main(int argc, char **argv)\n{\n");
print_code(
"s",
"\tQApplication app(argc,argv);\n\n"
"\tQTranslator translator;\n"
"\ttranslator.load(\"qt_de\", \"./translations\");\n"
"\tapp.installTranslator(&translator);\n\n");
//if (!strcmp(class_type,"QWidget"))
{
char buffer[2048*3];
sprintf(buffer,"my_%s *my%s_obj = new my_%s();\n",
class_name,class_name,class_name);
strcat(buffer,"\tmy");
strcat(buffer,class_name);
strcat(buffer,"_obj->my_init_");
strcat(buffer,class_name);
strcat(buffer,"();\n");
print_code("sss","\t",buffer,"\n");
}
}
;
break;}
case 4:
#line 171 "pcode.y"
{
if run_parse(1)
{
print_code("s","#endif\n");
}
else if run_parse(2) {
//char buffer[256];
//sprintf(buffer,"my%s_obj",class_name);
//print_code("sssssss","\t",buffer,"->resize(static_cast<int>(",buffer,"->width), static_cast<int>(",buffer,"->height));\n");
//print_code("sssssss","\t",buffer,"->move(static_cast<int>(",buffer,"->left), static_cast<int>(",buffer,"->top));\n");
//print_code("s","\tresize(static_cast<int>(width), static_cast<int>(height));\n");
//print_code("s","\tmove (static_cast<int>(left) , static_cast<int>(top));\n");
}
;
break;}
case 5:
#line 189 "pcode.y"
{ ;
break;}
case 14:
#line 203 "pcode.y"
{ ;
break;}
case 15:
#line 207 "pcode.y"
{
if run_parse(2)
{
print_code("sss","bool ",yyvsp[0].id,";\n");
}
;
break;}
case 17:
#line 216 "pcode.y"
{ if run_parse(2) print_code("s","\tif ("); ;
break;}
case 19:
#line 219 "pcode.y"
{ if run_parse(2) print_code("s","\t}\n"); ;
break;}
case 20:
#line 220 "pcode.y"
{ if run_parse(2) print_code("s","\t} else {\n"); ;
break;}
case 21:
#line 220 "pcode.y"
{ if run_parse(2) print_code("s","\t}\n"); ;
break;}
case 22:
#line 221 "pcode.y"
{ if run_parse(2) print_code("ss",yyvsp[-1].id," == "); ;
break;}
case 24:
#line 222 "pcode.y"
{
char buffer[2048];
sprintf(buffer,"%s",yyvsp[-1].id);
if run_parse(2)
{
print_code("ss",buffer,")\n\t{\n");
}
;
break;}
case 27:
#line 234 "pcode.y"
{ if run_parse(2) print_code("s","!"); ;
break;}
case 28:
#line 237 "pcode.y"
{ if run_parse(2) print_code("s","\t}\n"); ;
break;}
case 29:
#line 238 "pcode.y"
{ if run_parse(2) print_code("s","\t}\nelse {\n"); ;
break;}
case 30:
#line 238 "pcode.y"
{ if run_parse(2) print_code("s","\t}\n"); ;
break;}
case 31:
#line 241 "pcode.y"
{ if run_parse(2) print_code("s",") {\n"); ;
break;}
case 32:
#line 241 "pcode.y"
{ if run_parse(2) print_code("s","\t}\n"); ;
break;}
case 33:
#line 242 "pcode.y"
{ if run_parse(2) print_code("s",") {\n"); ;
break;}
case 34:
#line 242 "pcode.y"
{ if run_parse(2) print_code("s","\t} else {\n"); ;
break;}
case 35:
#line 242 "pcode.y"
{ if run_parse(2) print_code("s","\t}\n"); ;
break;}
case 36:
#line 247 "pcode.y"
{
if (last_token == _ENDCLASS_)
if run_parse(2)
{
print_code("sssss","\t",yyvsp[-4].id,".widget->",yyvsp[-2].id,"();\n\n");
}
;
break;}
case 37:
#line 258 "pcode.y"
{
if run_parse(2)
{
char buffer[2048];
sprintf(buffer,"my%s_obj",class_name);
print_code("sssss","\t",yyvsp[-5].id,".widget = ",buffer,";\n\n");
}
;
break;}
case 38:
#line 271 "pcode.y"
{
if run_parse(2)
{
print_code("s","\n\tstatic struct MyObjectTypes ");
lineno;
}
;
break;}
case 39:
#line 278 "pcode.y"
{
if run_parse(2)
{
print_code("s",";\n\n");
lineno += 2;
}
;
break;}
case 40:
#line 287 "pcode.y"
{ if run_parse(2) print_code("s",yyvsp[0].id); ;
break;}
case 41:
#line 288 "pcode.y"
{ if run_parse(2) print_code("s",", "); ;
break;}
case 43:
#line 292 "pcode.y"
{ ;
break;}
case 44:
#line 293 "pcode.y"
{
if run_parse(2)
{
if (in_main_function)
{
char buffer[2048];
sprintf(buffer,"my%s_obj",class_name);
print_code("sssssss","\t",buffer,"->resize(static_cast<int>(",buffer,"->width), static_cast<int>(",buffer,"->height));\n");
print_code("sssssss","\t",buffer,"->move (static_cast<int>(",buffer,"->left), static_cast<int>(",buffer,"->top));\n");
print_code("s","\n\treturn app.exec();\n}\n");
in_main_function = false;
}
print_code("sssss",
"\nvoid my_",
strlwr(yyvsp[-2].id),
"::my_init_",
strlwr(yyvsp[-2].id),
"(void)\n{\n"
);
print_code("sss","\tmy_init_",strlwr(yyvsp[0].id),"();\n");
}
else if run_parse(1)
{
strcpy(class_name,strlwr(yyvsp[-2].id));
char buf[2048];
char puf[2048];
if (!strcmp(strlwr(yyvsp[0].id),"form"))
sprintf(puf,"\tvoid my_init_form(void) { };\n");
else sprintf(puf,"");
if (!strcmp(strlwr(yyvsp[0].id),"form")) sprintf(buf,"%s","QWidget"); else
if (!strcmp(strlwr(yyvsp[0].id),"pushbutton")) sprintf(buf,"%s","MyQPushButton"); else
if (!strcmp(strlwr(yyvsp[0].id),"query")) sprintf(buf,"%s","MyQQuery"); else
sprintf(buf,"my_%s",strlwr(yyvsp[0].id));
char buffer2[2048];
sprintf(buffer2,"\tvoid my_init_%s(void);\n",strlwr(yyvsp[-2].id));
print_code("ssssssssss",
"\nclass my_",yyvsp[-2].id," : public ",buf,"\n{\n\tQ_OBJECT\npublic:\n",
buffer2,
puf,
"\tmy_",yyvsp[-2].id,"(void) {\n"
"\t\ttop = 100.00;\n"
"\t\tleft = 100.00;\n"
"\t\twidth = 100.00;\n"
"\t\theight = 100.00;\n"
"\t}\n\t"
"void msgbox(QString tstr, QString mstr)\n"
"\t{\n"
"\t\tQMessageBox* msgBox = new QMessageBox();\n"
"\t\tmsgBox->setWindowTitle(tstr);\n"
"\t\tmsgBox->setText(mstr);\n"
"\t\tmsgBox->exec();\n\t}\n");
strcpy(class_type,buf);
if (!strcmp(yyvsp[0].id,"form"))
{
print_code("s","public:\n");
print_code("s","\tdouble top, left, width, height;\n");
}
}
;
break;}
case 45:
#line 365 "pcode.y"
{
if run_parse(1)
print_code("s","\n};\n"); else
print_code("s","\n}\n");
last_token = _ENDCLASS_;
;
break;}
case 46:
#line 376 "pcode.y"
{
strcpy(class_element,yyvsp[-3].id);
strcpy(class_temp ,yyvsp[-6].id);
strcpy(class_object ,yyvsp[-3].id);
if run_parse(1)
{
char buffer[2038];
sprintf(buffer,"%s",yyvsp[-6].id);
strcpy (class_temp ,yyvsp[-6].id);
compiler_flag = true;
if (!strcmp(strlwr(yyvsp[-3].id),"session"))
{
print_code("sss",
"\tMyQSession *",
yyvsp[-6].id,
";\n");
compiler_flag = false;
}
else if (!strcmp(strlwr(yyvsp[-3].id),"database"))
{
print_code("sss",
"\tMyQDataBase *",
yyvsp[-6].id,
";\n");
compiler_flag = false;
}
// ninit
if (compiler_flag == true)
{
if (!strcmp(strlwr(yyvsp[-3].id),"pushbutton")) print_code("sss","\tMyQPushButton *",yyvsp[-6].id,";\n"); else
if (!strcmp(strlwr(yyvsp[-3].id),"entryfield")) print_code("sss","\tMyQLineEdit *",yyvsp[-6].id,";\n"); else
if (!strcmp(strlwr(yyvsp[-3].id),"query")) print_code("sss","\tMyQQuery *",yyvsp[-6].id,";\n"); else
if (!strcmp(strlwr(yyvsp[-3].id),"container" )) print_code("sss","\tQFrame *",yyvsp[-6].id,";\n");
print_code("ssssssssssssssssssssssssssssssssssssssss",
"\tvoid init_",buffer,"(void)\n\t{\n",
"\t\t",buffer,"_top = 0.00;\n",
"\t\t",buffer,"_left = 0.00;\n",
"\t\t",buffer,"_height = 35.00;\n",
"\t\t",buffer,"_width = 90.00;\n",
"\t\t",buffer,"_visible = true;\n",
"\t\t",buffer,"_text = QString(\"\");\n",
"\t}\n",
"\tQString ",buffer,"_text;\n",
"\tdouble ",buffer,"_top;\n",
"\tdouble ",buffer,"_left;\n",
"\tdouble ",buffer,"_width;\n",
"\tdouble ",buffer,"_height;\n",
"\tbool ",buffer,"_visible;\n"
);
}
}
else if run_parse(2)
{
//if (!strcmp($8,"this"))
{
if (!strcmp(strlwr(yyvsp[-3].id),"session"))
print_code("sss",
"\n\t",
yyvsp[-6].id,
" = new MyQSession();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"database"))
print_code("sss",
"\n\t",
yyvsp[-6].id,
" = new MyQDataBase();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"pushbutton"))
print_code("sssssss",
"\n\t",
yyvsp[-6].id,
" = new MyQPushButton(\"PushButton\",this",
");\n",
"\tinit_",
class_temp,
"();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"entryfield"))
print_code("ssssss",
"\n\t",
yyvsp[-6].id,
" = new MyQLineEdit(this);\n",
"\tinit_",
class_temp,
"();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"query"))
print_code("ssssss",
"\n\t",
yyvsp[-6].id,
" = new MyQQuery(this);\n",
"\tinit_",
class_temp,
"();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"container"))
print_code("ssssssssssss",
"\n\t",yyvsp[-6].id," = new QFrame(this);\n",
"\t" ,yyvsp[-6].id,"->setFrameStyle(QFrame::Box | QFrame::Sunken);\n",
"\t" ,yyvsp[-6].id,"->setLineWidth(2);\n",
"\tinit_",
class_temp,
"();\n"
);
}
}
;
break;}
case 47:
#line 489 "pcode.y"
{ ;
break;}
case 48:
#line 490 "pcode.y"
{
if run_parse(1)
{
if (!strcmp(strlwr(yyvsp[-3].id),"pushbutton")) print_code("sss","\tMyQPushButton *", yyvsp[-6].text, ";\n"); else
if (!strcmp(strlwr(yyvsp[-3].id),"entryfield")) print_code("sss","\tMyQLineEdit *" , yyvsp[-6].text, ";\n"); else
if (!strcmp(strlwr(yyvsp[-3].id),"query")) print_code("sss","\tMyQQuery *" , yyvsp[-6].text, ";\n"); else
if (!strcmp(strlwr(yyvsp[-3].id),"container" )) print_code("sss","\tQFrame *" , yyvsp[-6].text, ";\n");
print_code("ssssssssssssssssssssssssssssssssssssssss",
"\tvoid init_",yyvsp[-6].text,"(void)\n\t{\n",
"\t\t",yyvsp[-6].text,"_top = 0.00;\n",
"\t\t",yyvsp[-6].text,"_left = 0.00;\n",
"\t\t",yyvsp[-6].text,"_height = 35.00;\n",
"\t\t",yyvsp[-6].text,"_width = 90.00;\n",
"\t\t",yyvsp[-6].text,"_visible = true;\n",
"\t\t",yyvsp[-6].text,"_text = QString(\"\");\n",
"\t}\n",
"\tQString ",yyvsp[-6].text,"_text;\n",
"\tdouble " ,yyvsp[-6].text,"_top;\n",
"\tdouble " ,yyvsp[-6].text,"_left;\n",
"\tdouble " ,yyvsp[-6].text,"_width;\n",
"\tdouble " ,yyvsp[-6].text,"_height;\n",
"\tbool " ,yyvsp[-6].text,"_visible;\n"
);
strcpy(class_element,yyvsp[-3].id);
}
else if run_parse(2)
{
//if (!strcmp($8,"this"))
{
char buffer[2048];
sprintf(buffer,"%s",yyvsp[-6].text);
strcpy(class_object,yyvsp[-3].id);
if (!strcmp(strlwr(yyvsp[-3].id),"pushbutton"))
print_code("ssssssss",
"\n\t",
yyvsp[-6].text,
" = new MyQPushButton(\"PushButton\",",
yyvsp[-1].text,
");\n",
"\tinit_",
yyvsp[-6].text,
"();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"entryfield"))
print_code("ssssssss",
"\n\t",
yyvsp[-6].text,
" = new MyQLineEdit(",
yyvsp[-1].text,
");\n",
"\tinit_",
yyvsp[-6].text,
"();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"query"))
print_code("ssssssss",
"\n\t",
yyvsp[-6].text,
" = new MyQQuery(",
yyvsp[-1].text,
");\n",
"\tinit_",
yyvsp[-6].text,
"();\n"
); else
if (!strcmp(strlwr(yyvsp[-3].id),"container"))
print_code("sssssssssss",
"\n\t",
yyvsp[-6].text,
" = new QFrame(",
yyvsp[-1].text,
");\n\t",
yyvsp[-6].text,
"->setFrameStyle(QFrame::Box | QFrame::Sunken);\n\t",
yyvsp[-6].text,
"->setLineWidth(2);\n\tinit_",
yyvsp[-6].text,
"();\n"
);
}
}
;
break;}
case 49:
#line 580 "pcode.y"
{ yyval.text = ""; ;
break;}
case 50:
#line 581 "pcode.y"
{ yyval.text = ""; ;
break;}
case 51:
#line 582 "pcode.y"
{ yyval.text = yyvsp[-1].text; ;
break;}
case 52:
#line 586 "pcode.y"
{
if run_parse(1)
{
if (!strcmp(yyvsp[-1].id,"int"))
yyvsp[-1].id = "double";
strcat(yyval.text," ");
strcat(yyval.text, yyvsp[0].id);
}
;
break;}
case 53:
#line 596 "pcode.y"
{
if run_parse(1)
{
strcat(yyval.text,", ");
strcat(yyval.text,yyvsp[0].text);
}
;
break;}
case 55:
#line 608 "pcode.y"
{
if run_parse(2)
{
if (!strcmp(yyvsp[-1].id,"this"))
{
//strcpy(class_object,$3);
}
else {
char buffer[50];
errors++;
sprintf(buffer,"ID %s unbekannt.",yyvsp[-1].id);
yyerror(buffer);
}
}
;
break;}
case 57:
#line 624 "pcode.y"
{
strcpy(class_temp,yyvsp[-1].text);
has_object = true;
;
break;}
case 58:
#line 629 "pcode.y"
{
has_object = false;
if run_parse(2)
{
char buffer2[256];
sprintf(buffer2,"static_cast<int>(%s",yyvsp[-4].text);
compiler_flag = true;
if (!strcmp(strlwr(class_object),"session" )) compiler_flag = false; else
if (!strcmp(strlwr(class_object),"database")) compiler_flag = false; else
if (!strcmp(strlwr(class_object),"query")) compiler_flag = false;
if (compiler_flag == true)
{
print_code("sssssss","\t",yyvsp[-4].text,"->resize(",buffer2,"_width), ",buffer2,"_height));\n");
print_code("sssssss","\t",yyvsp[-4].text,"->move (",buffer2,"_left) , ",buffer2,"_top));\n\n" );
if (!strcmp(strlwr(class_object),"container")) compiler_flag = false;
if (!strcmp(strlwr(class_object),"query")) compiler_flag = false;
if (compiler_flag == true)
{
print_code("sssss","\t",yyvsp[-4].text,"->setText(",yyvsp[-4].text,"_text);\n");
print_code("sssss","\t",yyvsp[-4].text,"->setDataField(",class_datalink,");\n\n");
}
print_code("sssssss",
"\tif (",
yyvsp[-4].text,
"_visible) ",
yyvsp[-4].text,
"->show();\n\telse ",
yyvsp[-4].text,
"->hide();\n\n"
);
}
}
;
break;}
case 61:
#line 670 "pcode.y"
{
if run_parse(1) {
print_code(
"sssssss",
"\n\tQVector<MyObjectTypes>& my",class_name,"_func_",yyvsp[-1].id,"(",yyvsp[0].text,")\n\t{\n\t"
"\tMyObjectTypes vec;\n"
);
}
;
break;}
case 62:
#line 678 "pcode.y"
{
if run_parse(1)
print_code("s","\t\tvec.value = ");
;
break;}
case 63:
#line 681 "pcode.y"
{
if run_parse(1)
{
print_code("s",";\n\t\tvec.type = 1;\n");
print_code("s","\t\tparam_struct << vec;\n");
print_code("s","\t\treturn param_struct;\n\t}\n");
}
;
break;}
case 66:
#line 693 "pcode.y"
{
if run_parse(1)
{
print_code("sssss",
"\t\tmsgbox(QString(",yyvsp[-3].text,"), QString(",yyvsp[-1].text,"));\n"
);
}
;
break;}
case 67:
#line 704 "pcode.y"
{
strcpy(yyval.text,yyvsp[0].id);
;
break;}
case 68:
#line 707 "pcode.y"
{
strcpy(yyval.text,yyvsp[-2].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[0].id);
;
break;}
case 69:
#line 711 "pcode.y"
{
strcpy(yyval.text,yyvsp[-4].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[-2].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[0].id);
;
break;}
case 70:
#line 716 "pcode.y"
{
strcpy(yyval.text,yyvsp[-6].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[-4].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[-2].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[0].id );
;
break;}
case 71:
#line 722 "pcode.y"
{
strcpy(yyval.text,yyvsp[-8].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[-6].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[-4].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[-2].id); strcat(yyval.text,"_");
strcat(yyval.text,yyvsp[0].id);
;
break;}
case 73:
#line 733 "pcode.y"
{
if run_parse(2)
{
if (!strcmp(strlwr(yyvsp[-11].id),"datalink"))
{
print_code("sssssss",
"\t",
class_temp,
"->setDataLink(",
yyvsp[-7].id,
",",
yyvsp[-1].text,
");\n"
);
}
}
;
break;}
case 75:
#line 750 "pcode.y"
{
if run_parse(1)
{
if (!strcmp(strlwr(yyvsp[-4].id),"onclick"))
print_code("ssssssssss",
"public slots:\n\t",
"void ",class_temp,"_OnClick()\n\t{\n\t\t",
"my",class_name,"_func_",class_temp,"_OnClick();\n\t}\n",
"public:\n"
); else
if (!strcmp(strlwr(yyvsp[-4].id),"ontimer"))
print_code("ssssssssss",
"public slots:\n\t",
"void ",
class_temp,
"_OnTimer()\n\t{\n\t\t",
"my",
class_name,
"_func_",
class_temp,
"_OnTimer();\n\t}\n",
"public:\n"
);
} else
if run_parse(2)
{
// todo: ...
if (!strcmp(strlwr(yyvsp[-4].id),"onclick"))
print_code("sssss",
"\n\tQObject::connect(",
class_temp ,
", SIGNAL(clicked()), this, SLOT(",
class_temp,
"_OnClick()));\n\n"
); else
if (!strcmp(strlwr(yyvsp[-4].id),"ontimer"))
print_code("sssss",
"\n\tQObject::connect(",
class_temp,
"->timer, SIGNAL(timeout()), this, SLOT(",
class_temp,
"_OnTimer()));\n\n"
);
}
;
break;}
case 77:
#line 795 "pcode.y"
{
if run_parse(2)
{
if (!strcmp(strlwr(class_element),"database"))
{
if (!strcmp(strlwr(yyvsp[-4].id),"session"))
print_code("sssss",
"\t",
class_temp,
"->session = ",
yyvsp[0].id,
";\n"
);
}
}
;
break;}
case 79:
#line 811 "pcode.y"
{
if run_parse(2)
{
strcpy(temp_object,"");
if (has_object == true)
{
if (!strcmp(strlwr(class_element),"session"))
{
if (!strcmp(strlwr(yyvsp[-1].id),"timeout"))
print_code("sss","\t",class_temp,"->timeout = static_cast<int>(");
else if (!strcmp(strlwr(yyvsp[-1].id),"port"))
print_code("sss","\t",class_temp,"->port = static_cast<int>(");
}
else
print_code("sssss","\t",class_temp,"_",yyvsp[-1].id," = ");
}
else
print_code("sss" ,"\t",yyvsp[-1].id," = ");
}
;
break;}
case 80:
#line 831 "pcode.y"
{
if run_parse(2)
{
if (!strcmp(strlwr(yyvsp[-3].id),"timeout")) print_code("s",")"); else
if (!strcmp(strlwr(yyvsp[-3].id),"port")) print_code("s",")");
print_code("s",";\n");
}
;
break;}
case 82:
#line 840 "pcode.y"
{
if run_parse(2)
{
if (!strcmp(strlwr(class_element),"session"))
{
if (!strcmp(strlwr(yyvsp[-2].id),"active"))
{
if (yyvsp[0].trfa == 0) print_code("sss","\t",class_temp,"->stop();\n"); else
if (yyvsp[0].trfa == 1) print_code("sss","\t",class_temp,"->start();\n");
}
}
else if (!strcmp(strlwr(class_element),"database"))
{
if (!strcmp(strlwr(yyvsp[-2].id),"active"))
{
if (yyvsp[0].trfa == 0) print_code("sss","\t",class_temp,"->close();\n"); else
if (yyvsp[0].trfa == 1) print_code("sss","\t",class_temp,"->open();\n" );
}
}
}
;
break;}
case 84:
#line 862 "pcode.y"
{
if run_parse(2)
{
if (!strcmp(strlwr(class_element),"session"))
{
if (!strcmp(strlwr(yyvsp[-2].id),"host")) print_code("sssss","\t",class_temp,"->host = QString(",yyvsp[0].text,");\n"); else
if (!strcmp(strlwr(yyvsp[-2].id),"user")) print_code("sssss","\t",class_temp,"->user = QString(",yyvsp[0].text,");\n"); else
if (!strcmp(strlwr(yyvsp[-2].id),"pass")) print_code("sssss","\t",class_temp,"->pass = QString(",yyvsp[0].text,");\n");
}
else if (!strcmp(strlwr(class_element),"database"))
{
if (!strcmp(strlwr(yyvsp[-2].id),"databasename")) print_code("sssss","\t",class_temp,"->databaseName = QString(",yyvsp[0].text,");\n");
}
else
print_code("sssss","\t",class_temp,"_text = QString(",yyvsp[0].text,");\n");
}
;
break;}
case 86:
#line 882 "pcode.y"
{
if run_parse(2)
{
if (!strcmp(strlwr(yyvsp[0].id),"false")) yyval.trfa = 0;
if (!strcmp(strlwr(yyvsp[0].id),"true")) yyval.trfa = 1;
}
;
break;}
case 87:
#line 889 "pcode.y"
{ if run_parse(2) yyval.trfa = 0; ;
break;}
case 88:
#line 890 "pcode.y"
{ if run_parse(2) yyval.trfa = 1; ;
break;}
case 89:
#line 895 "pcode.y"
{
if (!yyval.text)
yyval.text = (char*) malloc(strlen(yyvsp[0].text)+1);
yyval.text = yyvsp[0].text;
;
break;}
case 90:
#line 901 "pcode.y"
{
char *buffer = (char*) malloc(4096);
if (!yyval.text)
yyval.text = (char*) malloc(strlen(yyvsp[-2].text)+strlen(yyvsp[0].text)+5);
strcpy(buffer,yyvsp[-2].text);
strcat(buffer,yyvsp[0].text);
yyval.text = buffer;
;
break;}
case 91:
#line 915 "pcode.y"
{ check_list(yyvsp[-1].id); if run_parse(2) print_code("sss","\t",yyvsp[-1].id," = " ); ;
break;}
case 92:
#line 915 "pcode.y"
{ if run_parse(2) print_code("s",";\n"); ;
break;}
case 93:
#line 916 "pcode.y"
{ check_list(yyvsp[-2].id); if run_parse(2) print_code("sss","\t",yyvsp[-2].id," += "); ;
break;}
case 94:
#line 916 "pcode.y"
{ if run_parse(2) print_code("s",";\n"); ;
break;}
case 95:
#line 917 "pcode.y"
{ check_list(yyvsp[-2].id); if run_parse(2) print_code("sss","\t",yyvsp[-2].id," -= "); ;
break;}
case 96:
#line 917 "pcode.y"
{ if run_parse(2) print_code("s",";\n"); ;
break;}
case 97:
#line 918 "pcode.y"
{ check_list(yyvsp[-2].id); if run_parse(2) print_code("sss","\t",yyvsp[-2].id," /= "); ;
break;}
case 98:
#line 918 "pcode.y"
{ if run_parse(2) print_code("s",";\n"); ;
break;}
case 99:
#line 919 "pcode.y"
{ check_list(yyvsp[-2].id); if run_parse(2) print_code("sss","\t",yyvsp[-2].id," *= "); ;
break;}
case 100:
#line 919 "pcode.y"
{ if run_parse(2) print_code("s",";\n"); ;
break;}
case 101:
#line 920 "pcode.y"
{ check_list(yyvsp[-2].id); if run_parse(2) print_code("sss","\t",yyvsp[-2].id," ^= "); ;
break;}
case 102:
#line 920 "pcode.y"
{ if run_parse(2) print_code("s",";\n"); ;
break;}
case 103:
#line 921 "pcode.y"
{ errors++; ;
break;}
case 104:
#line 924 "pcode.y"
{ if run_parse(2) print_code("s"," + "); ;
break;}
case 106:
#line 925 "pcode.y"
{ if run_parse(2) print_code("s"," - "); ;
break;}
case 108:
#line 926 "pcode.y"
{ if run_parse(2) print_code("s"," * "); ;
break;}
case 110:
#line 927 "pcode.y"
{ if run_parse(2) print_code("s"," / "); ;
break;}
case 112:
#line 928 "pcode.y"
{ if run_parse(2) print_code("s"," % "); ;
break;}
case 114:
#line 929 "pcode.y"
{ if run_parse(2) print_code("s"," ^ "); ;
break;}
case 117:
#line 933 "pcode.y"
{ if run_parse(2) print_code("f",yyvsp[0].val); ;
break;}
case 118:
#line 934 "pcode.y"
{ if run_parse(2) print_code("s",yyvsp[0].id); ;
break;}
case 119:
#line 935 "pcode.y"
{ if run_parse(2) print_code("s","("); ;
break;}
case 120:
#line 935 "pcode.y"
{ if run_parse(2) print_code("s",")"); ;
break;}
case 121:
#line 939 "pcode.y"
{ if run_parse(1) print_code("s"," + "); ;
break;}
case 123:
#line 940 "pcode.y"
{ if run_parse(1) print_code("s"," - "); ;
break;}
case 125:
#line 941 "pcode.y"
{ if run_parse(1) print_code("s"," * "); ;
break;}
case 127:
#line 942 "pcode.y"
{ if run_parse(1) print_code("s"," / "); ;
break;}
case 129:
#line 943 "pcode.y"
{ if run_parse(1) print_code("s"," % "); ;
break;}
case 131:
#line 944 "pcode.y"
{ if run_parse(1) print_code("s"," ^ "); ;
break;}
case 134:
#line 948 "pcode.y"
{ if run_parse(1) print_code("f",yyvsp[0].val);
;
break;}
case 135:
#line 950 "pcode.y"
{ if run_parse(1) print_code("s",yyvsp[0].id); ;
break;}
case 136:
#line 951 "pcode.y"
{ if run_parse(1) print_code("s","("); ;
break;}
case 137:
#line 951 "pcode.y"
{ if run_parse(1) print_code("s",")"); ;
break;}
}
#line 811 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc"
/* the action file gets copied in in place of this dollarsign */
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YY_MyParser_LSP_NEEDED
yylsp -= yylen;
#endif
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YY_MyParser_LSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = YY_MyParser_LLOC.first_line;
yylsp->first_column = YY_MyParser_LLOC.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
/* 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 - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
YYGOTO(yynewstate);
YYLABEL(yyerrlab) /* here on detecting error */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++YY_MyParser_NERRS;
#ifdef YY_MyParser_ERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
if (msg != 0)
{
strcpy(msg, "parse error");
if (count < 5)
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
}
}
YY_MyParser_ERROR(msg);
free(msg);
}
else
YY_MyParser_ERROR ("parse error; also virtual memory exceeded");
}
else
#endif /* YY_MyParser_ERROR_VERBOSE */
YY_MyParser_ERROR("parse error");
}
YYGOTO(yyerrlab1);
YYLABEL(yyerrlab1) /* here on error raised explicitly by an action */
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 (YY_MyParser_CHAR == YYEOF)
YYABORT;
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Discarding token %d (%s).\n", YY_MyParser_CHAR, yytname[yychar1]);
#endif
YY_MyParser_CHAR = YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
YYGOTO(yyerrhandle);
YYLABEL(yyerrdefault) /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) YYGOTO(yydefault);
#endif
YYLABEL(yyerrpop) /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YY_MyParser_LSP_NEEDED
yylsp--;
#endif
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
YYLABEL(yyerrhandle)
yyn = yypact[yystate];
if (yyn == YYFLAG)
YYGOTO(yyerrdefault);
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
YYGOTO(yyerrdefault);
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
YYGOTO(yyerrpop);
yyn = -yyn;
YYGOTO(yyreduce);
}
else if (yyn == 0)
YYGOTO(yyerrpop);
if (yyn == YYFINAL)
YYACCEPT;
#if YY_MyParser_DEBUG != 0
if (YY_MyParser_DEBUG_FLAG)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = YY_MyParser_LVAL;
#ifdef YY_MyParser_LSP_NEEDED
*++yylsp = YY_MyParser_LLOC;
#endif
yystate = yyn;
YYGOTO(yynewstate);
/* end loop, in which YYGOTO may be used. */
YYENDGOTO
}
/* END */
/* #line 1010 "M:\\kbase\\src\\release\\2A\\debug\\gnuwin32\\bin\\bison.cc" */
#line 2681 "parser.cpp"
#line 954 "pcode.y"
int symbols_count = 0;
char *ptr_symbols[2048];
int check_list(char *name)
{
bool found = false;
int i;
if run_parse(1)
{
if (!symbols_count)
{
ptr_symbols[symbols_count] = (char*)malloc(strlen(name)+1);
strcpy(ptr_symbols[symbols_count],name);
++symbols_count;
}
for (i = 0; i < symbols_count-1; i++)
{
if (!strcmp(ptr_symbols[i],name))
{
found = true;
break;
}
}
if (found == false)
{
++symbols_count;
ptr_symbols[symbols_count] = (char*)malloc(strlen(name)+1);
strcpy(ptr_symbols[symbols_count],name);
print_code("s","#ifdef __MAIN_RUN__\n");
print_code("sss","double ",name," = 0.00;\n");
print_code("s","#endif\n");
}
}
}
void print_code(char* str, ... )
{
va_list vl;
int i;
va_start(vl, str);
// Step through the list.
for( i = 0; str[i] != '\0'; ++i )
{
union Printable_t {
int i;
float f;
char c;
char *s;
} Printable;
// Type to expect ...
switch( str[i] )
{
case 'i':
Printable.i = va_arg( vl, int );
if run_parse(1)
fprintf(file_header,"%i", Printable.i); else
fprintf(file_main ,"%i", Printable.i);
break;
case 'f':
Printable.f = va_arg( vl, double);
if run_parse(1)
fprintf(file_header,"%f", Printable.f); else
fprintf(file_main ,"%f", Printable.f);
break;
case 'c':
Printable.c = va_arg( vl, int );
if run_parse(1)
fprintf(file_header,"%c", Printable.c); else
fprintf(file_main ,"%c", Printable.c);
break;
case 's':
Printable.s = va_arg( vl, char *);
if run_parse(1)
fprintf(file_header,"%s", Printable.s); else
fprintf(file_main ,"%s", Printable.s);
break;
default:
break;
}
}
va_end( vl );
}
void reset_values(void)
{
lineno = 1;
}