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
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054

module MenhirBasics = struct
  
  exception Error
  
  let _eRR =
    fun _s ->
      raise Error
  
  type token = 
    | VEC
    | VARIANT
    | TYPE
    | TEXT of (
# 60 "idllib/parser.mly"
      (string)
# 18 "idllib/parser.ml"
  )
    | SERVICE
    | SEMICOLON
    | RPAR
    | RECORD
    | RCURLY
    | QUERY
    | PRINCIPAL
    | PERIOD
    | OPT
    | ONEWAY
    | NOTEQ
    | NOTCOLON
    | NAT of (
# 58 "idllib/parser.mly"
      (string)
# 35 "idllib/parser.ml"
  )
    | MINUS
    | LPAR
    | LCURLY
    | IMPORT
    | ID of (
# 59 "idllib/parser.mly"
      (string)
# 44 "idllib/parser.ml"
  )
    | FUNC
    | EQQ
    | EQ
    | EOF
    | COMPOSITE_QUERY
    | COMMA
    | COLON
    | BLOB
    | ARROW
  
end

include MenhirBasics

# 1 "idllib/parser.mly"
  

open Syntax
open Source

module Uint32 = Lib.Uint32

(* Position handling *)

let position_to_pos position =
  (* TBR: Remove assertion once the menhir bug is fixed. *)
  assert (Obj.is_block (Obj.repr position));
  { file = position.Lexing.pos_fname;
    line = position.Lexing.pos_lnum;
    column = position.Lexing.pos_cnum - position.Lexing.pos_bol
  }

let positions_to_region position1 position2 =
  { left = position_to_pos position1;
    right = position_to_pos position2
  }

let at (startpos, endpos) = positions_to_region startpos endpos

let _anon sort at = "anon-" ^ sort ^ "-" ^ string_of_pos at.left

let prim_typs = ["nat", Nat; "nat8", Nat8; "nat16", Nat16; "nat32", Nat32; "nat64", Nat64;
                 "int", Int; "int8", Int8; "int16", Int16; "int32", Int32; "int64", Int64;
                 "float32", Float32; "float64", Float64; "bool", Bool; "text", Text;
                 "null", Null; "reserved", Reserved; "empty", Empty]
let is_prim_typs t = List.assoc_opt t prim_typs

let hash = IdlHash.idl_hash
let record_fields get_label fs =
  let open Uint32 in
  let rec go start fs =
    match fs with
    | [] -> []
    | hd :: tl ->
       let field = hd start in
       let next =
         (match (get_label field.it).it with
         | Id n -> succ n
         | Named name -> succ (hash name)
         | Unnamed n -> succ n) in
       field :: (go next tl)
  in go zero fs

# 109 "idllib/parser.ml"

type ('s, 'r) _menhir_state = 
  | MenhirState001 : ('s _menhir_cell0_LPAR, _menhir_box_parse_args) _menhir_state
    (** State 001.
        Stack shape : LPAR.
        Start symbol: parse_args. *)

  | MenhirState003 : (('s, _menhir_box_parse_args) _menhir_cell1_VEC _menhir_cell0_LCURLY, _menhir_box_parse_args) _menhir_state
    (** State 003.
        Stack shape : VEC LCURLY.
        Start symbol: parse_args. *)

  | MenhirState007 : (('s, _menhir_box_parse_args) _menhir_cell1_VARIANT _menhir_cell0_LCURLY _menhir_cell0_TEXT, _menhir_box_parse_args) _menhir_state
    (** State 007.
        Stack shape : VARIANT LCURLY TEXT.
        Start symbol: parse_args. *)

  | MenhirState013 : (('s, _menhir_box_parse_args) _menhir_cell1_RECORD _menhir_cell0_LCURLY, _menhir_box_parse_args) _menhir_state
    (** State 013.
        Stack shape : RECORD LCURLY.
        Start symbol: parse_args. *)

  | MenhirState015 : (('s, _menhir_box_parse_args) _menhir_cell1_TEXT, _menhir_box_parse_args) _menhir_state
    (** State 015.
        Stack shape : TEXT.
        Start symbol: parse_args. *)

  | MenhirState019 : (('s, _menhir_box_parse_args) _menhir_cell1_OPT, _menhir_box_parse_args) _menhir_state
    (** State 019.
        Stack shape : OPT.
        Start symbol: parse_args. *)

  | MenhirState021 : (('s, _menhir_box_parse_args) _menhir_cell1_NAT _menhir_cell0_PERIOD, _menhir_box_parse_args) _menhir_state
    (** State 021.
        Stack shape : NAT PERIOD.
        Start symbol: parse_args. *)

  | MenhirState023 : (('s, _menhir_box_parse_args) _menhir_cell1_MINUS, _menhir_box_parse_args) _menhir_state
    (** State 023.
        Stack shape : MINUS.
        Start symbol: parse_args. *)

  | MenhirState042 : (('s, _menhir_box_parse_args) _menhir_cell1_NAT, _menhir_box_parse_args) _menhir_state
    (** State 042.
        Stack shape : NAT.
        Start symbol: parse_args. *)

  | MenhirState045 : (('s, _menhir_box_parse_args) _menhir_cell1_ID, _menhir_box_parse_args) _menhir_state
    (** State 045.
        Stack shape : ID.
        Start symbol: parse_args. *)

  | MenhirState051 : (('s, _menhir_box_parse_args) _menhir_cell1_field_value _menhir_cell0_SEMICOLON, _menhir_box_parse_args) _menhir_state
    (** State 051.
        Stack shape : field_value SEMICOLON.
        Start symbol: parse_args. *)

  | MenhirState055 : (('s, _menhir_box_parse_args) _menhir_cell1_VARIANT _menhir_cell0_LCURLY _menhir_cell0_NAT, _menhir_box_parse_args) _menhir_state
    (** State 055.
        Stack shape : VARIANT LCURLY NAT.
        Start symbol: parse_args. *)

  | MenhirState058 : (('s, _menhir_box_parse_args) _menhir_cell1_VARIANT _menhir_cell0_LCURLY _menhir_cell0_ID, _menhir_box_parse_args) _menhir_state
    (** State 058.
        Stack shape : VARIANT LCURLY ID.
        Start symbol: parse_args. *)

  | MenhirState063 : (('s, _menhir_box_parse_args) _menhir_cell1_value _menhir_cell0_SEMICOLON, _menhir_box_parse_args) _menhir_state
    (** State 063.
        Stack shape : value SEMICOLON.
        Start symbol: parse_args. *)

  | MenhirState072 : (('s, _menhir_box_parse_args) _menhir_cell1_annval, _menhir_box_parse_args) _menhir_state
    (** State 072.
        Stack shape : annval.
        Start symbol: parse_args. *)

  | MenhirState075 : ('s, _menhir_box_parse_prog) _menhir_state
    (** State 075.
        Stack shape : .
        Start symbol: parse_prog. *)

  | MenhirState078 : (('s, 'r) _menhir_cell1_TYPE _menhir_cell0_ID, 'r) _menhir_state
    (** State 078.
        Stack shape : TYPE ID.
        Start symbol: <undetermined>. *)

  | MenhirState079 : (('s, 'r) _menhir_cell1_VEC, 'r) _menhir_state
    (** State 079.
        Stack shape : VEC.
        Start symbol: <undetermined>. *)

  | MenhirState081 : (('s, 'r) _menhir_cell1_VARIANT _menhir_cell0_LCURLY, 'r) _menhir_state
    (** State 081.
        Stack shape : VARIANT LCURLY.
        Start symbol: <undetermined>. *)

  | MenhirState083 : (('s, 'r) _menhir_cell1_TEXT, 'r) _menhir_state
    (** State 083.
        Stack shape : TEXT.
        Start symbol: <undetermined>. *)

  | MenhirState084 : (('s, 'r) _menhir_cell1_SERVICE, 'r) _menhir_state
    (** State 084.
        Stack shape : SERVICE.
        Start symbol: <undetermined>. *)

  | MenhirState085 : (('s, 'r) _menhir_cell1_LCURLY, 'r) _menhir_state
    (** State 085.
        Stack shape : LCURLY.
        Start symbol: <undetermined>. *)

  | MenhirState087 : (('s, 'r) _menhir_cell1_TEXT, 'r) _menhir_state
    (** State 087.
        Stack shape : TEXT.
        Start symbol: <undetermined>. *)

  | MenhirState088 : (('s, 'r) _menhir_cell1_LPAR, 'r) _menhir_state
    (** State 088.
        Stack shape : LPAR.
        Start symbol: <undetermined>. *)

  | MenhirState090 : (('s, 'r) _menhir_cell1_TEXT, 'r) _menhir_state
    (** State 090.
        Stack shape : TEXT.
        Start symbol: <undetermined>. *)

  | MenhirState092 : (('s, 'r) _menhir_cell1_RECORD _menhir_cell0_LCURLY, 'r) _menhir_state
    (** State 092.
        Stack shape : RECORD LCURLY.
        Start symbol: <undetermined>. *)

  | MenhirState095 : (('s, 'r) _menhir_cell1_OPT, 'r) _menhir_state
    (** State 095.
        Stack shape : OPT.
        Start symbol: <undetermined>. *)

  | MenhirState097 : (('s, 'r) _menhir_cell1_FUNC, 'r) _menhir_state
    (** State 097.
        Stack shape : FUNC.
        Start symbol: <undetermined>. *)

  | MenhirState099 : (('s, 'r) _menhir_cell1_param_typs, 'r) _menhir_state
    (** State 099.
        Stack shape : param_typs.
        Start symbol: <undetermined>. *)

  | MenhirState100 : ((('s, 'r) _menhir_cell1_param_typs, 'r) _menhir_cell1_param_typs, 'r) _menhir_state
    (** State 100.
        Stack shape : param_typs param_typs.
        Start symbol: <undetermined>. *)

  | MenhirState105 : (('s, 'r) _menhir_cell1_func_mode, 'r) _menhir_state
    (** State 105.
        Stack shape : func_mode.
        Start symbol: <undetermined>. *)

  | MenhirState114 : (('s, 'r) _menhir_cell1_NAT, 'r) _menhir_state
    (** State 114.
        Stack shape : NAT.
        Start symbol: <undetermined>. *)

  | MenhirState117 : (('s, 'r) _menhir_cell1_ID, 'r) _menhir_state
    (** State 117.
        Stack shape : ID.
        Start symbol: <undetermined>. *)

  | MenhirState122 : (('s, 'r) _menhir_cell1_record_typ _menhir_cell0_SEMICOLON, 'r) _menhir_state
    (** State 122.
        Stack shape : record_typ SEMICOLON.
        Start symbol: <undetermined>. *)

  | MenhirState129 : (('s, 'r) _menhir_cell1_ID, 'r) _menhir_state
    (** State 129.
        Stack shape : ID.
        Start symbol: <undetermined>. *)

  | MenhirState134 : (('s, 'r) _menhir_cell1_param_typ, 'r) _menhir_state
    (** State 134.
        Stack shape : param_typ.
        Start symbol: <undetermined>. *)

  | MenhirState140 : (('s, 'r) _menhir_cell1_ID, 'r) _menhir_state
    (** State 140.
        Stack shape : ID.
        Start symbol: <undetermined>. *)

  | MenhirState146 : (('s, 'r) _menhir_cell1_meth_typ _menhir_cell0_SEMICOLON, 'r) _menhir_state
    (** State 146.
        Stack shape : meth_typ SEMICOLON.
        Start symbol: <undetermined>. *)

  | MenhirState153 : (('s, 'r) _menhir_cell1_variant_typ _menhir_cell0_SEMICOLON, 'r) _menhir_state
    (** State 153.
        Stack shape : variant_typ SEMICOLON.
        Start symbol: <undetermined>. *)

  | MenhirState167 : (('s, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_state
    (** State 167.
        Stack shape : seplist(def,SEMICOLON) SERVICE id_opt.
        Start symbol: parse_prog. *)

  | MenhirState168 : ((('s, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_ID, _menhir_box_parse_prog) _menhir_state
    (** State 168.
        Stack shape : seplist(def,SEMICOLON) SERVICE id_opt ID.
        Start symbol: parse_prog. *)

  | MenhirState172 : ((('s, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_param_typs, _menhir_box_parse_prog) _menhir_state
    (** State 172.
        Stack shape : seplist(def,SEMICOLON) SERVICE id_opt param_typs.
        Start symbol: parse_prog. *)

  | MenhirState175 : ((('s, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_actor_typ, _menhir_box_parse_prog) _menhir_state
    (** State 175.
        Stack shape : seplist(def,SEMICOLON) SERVICE id_opt actor_typ.
        Start symbol: parse_prog. *)

  | MenhirState177 : ((('s, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_actor_class_typ, _menhir_box_parse_prog) _menhir_state
    (** State 177.
        Stack shape : seplist(def,SEMICOLON) SERVICE id_opt actor_class_typ.
        Start symbol: parse_prog. *)

  | MenhirState183 : (('s, 'r) _menhir_cell1_def _menhir_cell0_SEMICOLON, 'r) _menhir_state
    (** State 183.
        Stack shape : def SEMICOLON.
        Start symbol: <undetermined>. *)

  | MenhirState185 : ('s, _menhir_box_parse_tests) _menhir_state
    (** State 185.
        Stack shape : .
        Start symbol: parse_tests. *)

  | MenhirState187 : (('s, _menhir_box_parse_tests) _menhir_cell1_endlist_def_SEMICOLON_, _menhir_box_parse_tests) _menhir_state
    (** State 187.
        Stack shape : endlist(def,SEMICOLON).
        Start symbol: parse_tests. *)

  | MenhirState188 : (('s, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_state
    (** State 188.
        Stack shape : ID.
        Start symbol: parse_tests. *)

  | MenhirState193 : ((('s, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_cell1_input, _menhir_box_parse_tests) _menhir_state
    (** State 193.
        Stack shape : ID input.
        Start symbol: parse_tests. *)

  | MenhirState197 : ((('s, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_cell1_input, _menhir_box_parse_tests) _menhir_state
    (** State 197.
        Stack shape : ID input.
        Start symbol: parse_tests. *)

  | MenhirState201 : ((('s, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_cell1_assertion, _menhir_box_parse_tests) _menhir_state
    (** State 201.
        Stack shape : ID assertion.
        Start symbol: parse_tests. *)

  | MenhirState206 : (('s, _menhir_box_parse_tests) _menhir_cell1_test _menhir_cell0_SEMICOLON, _menhir_box_parse_tests) _menhir_state
    (** State 206.
        Stack shape : test SEMICOLON.
        Start symbol: parse_tests. *)

  | MenhirState211 : (('s, _menhir_box_parse_tests) _menhir_cell1_def _menhir_cell0_SEMICOLON, _menhir_box_parse_tests) _menhir_state
    (** State 211.
        Stack shape : def SEMICOLON.
        Start symbol: parse_tests. *)


and ('s, 'r) _menhir_cell1_actor_class_typ = 
  | MenhirCell1_actor_class_typ of 's * ('s, 'r) _menhir_state * (Syntax.typ' Source.phrase)

and ('s, 'r) _menhir_cell1_actor_typ = 
  | MenhirCell1_actor_typ of 's * ('s, 'r) _menhir_state * (Syntax.typ_meth list) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_annval = 
  | MenhirCell1_annval of 's * ('s, 'r) _menhir_state * (Syntax.value)

and ('s, 'r) _menhir_cell1_assertion = 
  | MenhirCell1_assertion of 's * ('s, 'r) _menhir_state * (Syntax.test_assertion)

and ('s, 'r) _menhir_cell1_def = 
  | MenhirCell1_def of 's * ('s, 'r) _menhir_state * (Syntax.dec) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_endlist_def_SEMICOLON_ = 
  | MenhirCell1_endlist_def_SEMICOLON_ of 's * ('s, 'r) _menhir_state * (Syntax.dec list) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_field_value = 
  | MenhirCell1_field_value of 's * ('s, 'r) _menhir_state * (Uint32.t -> Syntax.field_value)

and ('s, 'r) _menhir_cell1_func_mode = 
  | MenhirCell1_func_mode of 's * ('s, 'r) _menhir_state * (Syntax.func_mode)

and 's _menhir_cell0_id_opt = 
  | MenhirCell0_id_opt of 's * (unit)

and ('s, 'r) _menhir_cell1_input = 
  | MenhirCell1_input of 's * ('s, 'r) _menhir_state * (Syntax.input)

and ('s, 'r) _menhir_cell1_meth_typ = 
  | MenhirCell1_meth_typ of 's * ('s, 'r) _menhir_state * (Syntax.typ_meth' Source.phrase)

and ('s, 'r) _menhir_cell1_param_typ = 
  | MenhirCell1_param_typ of 's * ('s, 'r) _menhir_state * (Syntax.typ)

and ('s, 'r) _menhir_cell1_param_typs = 
  | MenhirCell1_param_typs of 's * ('s, 'r) _menhir_state * (Syntax.typ list) * Lexing.position

and ('s, 'r) _menhir_cell1_record_typ = 
  | MenhirCell1_record_typ of 's * ('s, 'r) _menhir_state * (Uint32.t -> Syntax.typ_field' Source.phrase)

and ('s, 'r) _menhir_cell1_seplist_def_SEMICOLON_ = 
  | MenhirCell1_seplist_def_SEMICOLON_ of 's * ('s, 'r) _menhir_state * (Syntax.dec list) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_test = 
  | MenhirCell1_test of 's * ('s, 'r) _menhir_state * (Syntax.test' Source.phrase) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_value = 
  | MenhirCell1_value of 's * ('s, 'r) _menhir_state * (Syntax.value' Source.phrase) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_variant_typ = 
  | MenhirCell1_variant_typ of 's * ('s, 'r) _menhir_state * (Syntax.typ_field' Source.phrase)

and ('s, 'r) _menhir_cell1_FUNC = 
  | MenhirCell1_FUNC of 's * ('s, 'r) _menhir_state * Lexing.position

and ('s, 'r) _menhir_cell1_ID = 
  | MenhirCell1_ID of 's * ('s, 'r) _menhir_state * (
# 59 "idllib/parser.mly"
      (string)
# 439 "idllib/parser.ml"
) * Lexing.position * Lexing.position

and 's _menhir_cell0_ID = 
  | MenhirCell0_ID of 's * (
# 59 "idllib/parser.mly"
      (string)
# 446 "idllib/parser.ml"
) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_LCURLY = 
  | MenhirCell1_LCURLY of 's * ('s, 'r) _menhir_state * Lexing.position

and 's _menhir_cell0_LCURLY = 
  | MenhirCell0_LCURLY of 's * Lexing.position

and ('s, 'r) _menhir_cell1_LPAR = 
  | MenhirCell1_LPAR of 's * ('s, 'r) _menhir_state * Lexing.position

and 's _menhir_cell0_LPAR = 
  | MenhirCell0_LPAR of 's * Lexing.position

and ('s, 'r) _menhir_cell1_MINUS = 
  | MenhirCell1_MINUS of 's * ('s, 'r) _menhir_state * Lexing.position

and ('s, 'r) _menhir_cell1_NAT = 
  | MenhirCell1_NAT of 's * ('s, 'r) _menhir_state * (
# 58 "idllib/parser.mly"
      (string)
# 468 "idllib/parser.ml"
) * Lexing.position * Lexing.position

and 's _menhir_cell0_NAT = 
  | MenhirCell0_NAT of 's * (
# 58 "idllib/parser.mly"
      (string)
# 475 "idllib/parser.ml"
) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_OPT = 
  | MenhirCell1_OPT of 's * ('s, 'r) _menhir_state * Lexing.position

and 's _menhir_cell0_PERIOD = 
  | MenhirCell0_PERIOD of 's * Lexing.position

and ('s, 'r) _menhir_cell1_RECORD = 
  | MenhirCell1_RECORD of 's * ('s, 'r) _menhir_state * Lexing.position

and 's _menhir_cell0_SEMICOLON = 
  | MenhirCell0_SEMICOLON of 's * Lexing.position

and ('s, 'r) _menhir_cell1_SERVICE = 
  | MenhirCell1_SERVICE of 's * ('s, 'r) _menhir_state * Lexing.position

and 's _menhir_cell0_SERVICE = 
  | MenhirCell0_SERVICE of 's * Lexing.position

and ('s, 'r) _menhir_cell1_TEXT = 
  | MenhirCell1_TEXT of 's * ('s, 'r) _menhir_state * (
# 60 "idllib/parser.mly"
      (string)
# 500 "idllib/parser.ml"
) * Lexing.position * Lexing.position

and 's _menhir_cell0_TEXT = 
  | MenhirCell0_TEXT of 's * (
# 60 "idllib/parser.mly"
      (string)
# 507 "idllib/parser.ml"
) * Lexing.position * Lexing.position

and ('s, 'r) _menhir_cell1_TYPE = 
  | MenhirCell1_TYPE of 's * ('s, 'r) _menhir_state * Lexing.position

and ('s, 'r) _menhir_cell1_VARIANT = 
  | MenhirCell1_VARIANT of 's * ('s, 'r) _menhir_state * Lexing.position

and ('s, 'r) _menhir_cell1_VEC = 
  | MenhirCell1_VEC of 's * ('s, 'r) _menhir_state * Lexing.position

and _menhir_box_parse_tests = 
  | MenhirBox_parse_tests of (string -> Syntax.tests) [@@unboxed]

and _menhir_box_parse_prog = 
  | MenhirBox_parse_prog of (string -> Syntax.prog) [@@unboxed]

and _menhir_box_parse_args = 
  | MenhirBox_parse_args of (Syntax.value list Source.phrase) [@@unboxed]

let _menhir_action_003 =
  fun () ->
    (
# 195 "idllib/parser.mly"
                ( None )
# 533 "idllib/parser.ml"
     : (Syntax.typ option))

let _menhir_action_004 =
  fun _endpos_tys_ _startpos_tys_ tys ->
    let _loc_tys_ = (_startpos_tys_, _endpos_tys_) in
    (
# 197 "idllib/parser.mly"
    ( Some (ServT tys @@ at _loc_tys_) )
# 542 "idllib/parser.ml"
     : (Syntax.typ option))

let _menhir_action_005 =
  fun _endpos_id_ _startpos_id_ id ->
    let x =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 554 "idllib/parser.ml"
      
    in
    (
# 199 "idllib/parser.mly"
    ( Some (VarT x @@ x.at) )
# 560 "idllib/parser.ml"
     : (Syntax.typ option))

let _menhir_action_006 =
  fun t ->
    (
# 201 "idllib/parser.mly"
    ( Some t )
# 568 "idllib/parser.ml"
     : (Syntax.typ option))

let _menhir_action_007 =
  fun _endpos_tys_ _startpos_args_ _startpos_tys_ args tys ->
    let _endpos = _endpos_tys_ in
    let _symbolstartpos = _startpos_args_ in
    let _loc_tys_ = (_startpos_tys_, _endpos_tys_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 190 "idllib/parser.mly"
    ( ClassT (args, ServT tys @@ at _loc_tys_) @@ at _sloc )
# 580 "idllib/parser.ml"
     : (Syntax.typ' Source.phrase))

let _menhir_action_008 =
  fun _endpos_id_ _startpos_args_ _startpos_id_ args id ->
    let x =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 592 "idllib/parser.ml"
      
    in
    let _endpos_x_ = _endpos_id_ in
    let _endpos = _endpos_x_ in
    let _symbolstartpos = _startpos_args_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 192 "idllib/parser.mly"
    ( ClassT (args, VarT x @@ x.at) @@ at _sloc )
# 602 "idllib/parser.ml"
     : (Syntax.typ' Source.phrase))

let _menhir_action_009 =
  fun ds ->
    (
# 173 "idllib/parser.mly"
    ( ds )
# 610 "idllib/parser.ml"
     : (Syntax.typ_meth list))

let _menhir_action_010 =
  fun v ->
    (
# 265 "idllib/parser.mly"
            ( v )
# 618 "idllib/parser.ml"
     : (Syntax.value))

let _menhir_action_011 =
  fun input ->
    (
# 278 "idllib/parser.mly"
                         ( ParsesAs (true,  input) )
# 626 "idllib/parser.ml"
     : (Syntax.test_assertion))

let _menhir_action_012 =
  fun input ->
    (
# 279 "idllib/parser.mly"
                         ( ParsesAs (false, input) )
# 634 "idllib/parser.ml"
     : (Syntax.test_assertion))

let _menhir_action_013 =
  fun i1 i2 ->
    (
# 280 "idllib/parser.mly"
                                  ( ParsesEqual (true,  i1, i2) )
# 642 "idllib/parser.ml"
     : (Syntax.test_assertion))

let _menhir_action_014 =
  fun i1 i2 ->
    (
# 281 "idllib/parser.mly"
                                  ( ParsesEqual (false, i1, i2) )
# 650 "idllib/parser.ml"
     : (Syntax.test_assertion))

let _menhir_action_015 =
  fun _endpos_t_ _startpos__1_ t ->
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 133 "idllib/parser.mly"
                   ( OptT t @@ at _sloc )
# 661 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_016 =
  fun _endpos_t_ _startpos__1_ t ->
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 134 "idllib/parser.mly"
                   ( VecT t @@ at _sloc )
# 672 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_017 =
  fun _endpos_fs_ _startpos__1_ fs ->
    let _endpos = _endpos_fs_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 135 "idllib/parser.mly"
                          ( RecordT fs @@ at _sloc )
# 683 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_018 =
  fun _endpos_fs_ _startpos__1_ fs ->
    let _endpos = _endpos_fs_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 136 "idllib/parser.mly"
                            ( VariantT fs @@ at _sloc )
# 694 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_019 =
  fun _endpos__1_ _startpos__1_ ->
    let _endpos = _endpos__1_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 137 "idllib/parser.mly"
         ( BlobT @@ at _sloc )
# 705 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_020 =
  fun t ->
    (
# 140 "idllib/parser.mly"
               ( t )
# 713 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_021 =
  fun t ->
    (
# 141 "idllib/parser.mly"
              ( t )
# 721 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_022 =
  fun t ->
    (
# 142 "idllib/parser.mly"
               ( t )
# 729 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_023 =
  fun _endpos_id_ _endpos_t_ _startpos__1_ _startpos_id_ id t ->
    let x =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 741 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 179 "idllib/parser.mly"
    ( TypD(x, t) @@ at _sloc )
# 750 "idllib/parser.ml"
     : (Syntax.dec))

let _menhir_action_024 =
  fun _endpos_s_ _startpos__1_ _startpos_s_ s ->
    let file =
      let _endpos = _endpos_s_ in
      let _symbolstartpos = _startpos_s_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 764 "idllib/parser.ml"
      
    in
    let _endpos_file_ = _endpos_s_ in
    let _endpos = _endpos_file_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 182 "idllib/parser.mly"
    ( ImportD (file, ref "") @@ at _sloc )
# 774 "idllib/parser.ml"
     : (Syntax.dec))

let _menhir_action_025 =
  fun () ->
    (
# 71 "idllib/parser.mly"
                ( [] )
# 782 "idllib/parser.ml"
     : (Syntax.dec list))

let _menhir_action_026 =
  fun x xs ->
    (
# 72 "idllib/parser.mly"
                               ( x::xs )
# 790 "idllib/parser.ml"
     : (Syntax.dec list))

let _menhir_action_027 =
  fun _endpos_n_ _endpos_t_ _startpos_n_ n t ->
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos_n_ in
    let _loc_n_ = (_startpos_n_, _endpos_n_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 109 "idllib/parser.mly"
    ( { label = Id (Uint32.of_string n) @@ at _loc_n_; typ = t } @@ at _sloc )
# 802 "idllib/parser.ml"
     : (Syntax.typ_field' Source.phrase))

let _menhir_action_028 =
  fun _endpos_id_ _endpos_t_ _startpos_id_ id t ->
    let name =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 814 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_id_, _startpos_id_) in
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 111 "idllib/parser.mly"
    ( { label = Named name.it @@ at _loc_name_; typ = t } @@ at _sloc )
# 825 "idllib/parser.ml"
     : (Syntax.typ_field' Source.phrase))

let _menhir_action_029 =
  fun _endpos_s_ _endpos_t_ _startpos_s_ s t ->
    let name =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 840 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 850 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_s_, _startpos_s_) in
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 111 "idllib/parser.mly"
    ( { label = Named name.it @@ at _loc_name_; typ = t } @@ at _sloc )
# 861 "idllib/parser.ml"
     : (Syntax.typ_field' Source.phrase))

let _menhir_action_030 =
  fun _endpos_n_ _endpos_v_ _startpos_n_ n v ->
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos_n_ in
    let _loc_n_ = (_startpos_n_, _endpos_n_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 258 "idllib/parser.mly"
    ( fun _ -> (Id (Uint32.of_string n) @@ at _loc_n_, v) @@ at _sloc )
# 873 "idllib/parser.ml"
     : (Uint32.t -> Syntax.field_value))

let _menhir_action_031 =
  fun _endpos_id_ _endpos_v_ _startpos_id_ id v ->
    let name =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 885 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_id_, _startpos_id_) in
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 260 "idllib/parser.mly"
    ( fun _ -> (Named name.it @@ at _loc_name_, v) @@ at _sloc )
# 896 "idllib/parser.ml"
     : (Uint32.t -> Syntax.field_value))

let _menhir_action_032 =
  fun _endpos_s_ _endpos_v_ _startpos_s_ s v ->
    let name =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 911 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 921 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_s_, _startpos_s_) in
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 260 "idllib/parser.mly"
    ( fun _ -> (Named name.it @@ at _loc_name_, v) @@ at _sloc )
# 932 "idllib/parser.ml"
     : (Uint32.t -> Syntax.field_value))

let _menhir_action_033 =
  fun _endpos_v_ _startpos_v_ v ->
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos_v_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 262 "idllib/parser.mly"
    ( fun n -> (Unnamed n @@ no_region, v) @@ at _sloc )
# 943 "idllib/parser.ml"
     : (Uint32.t -> Syntax.field_value))

let _menhir_action_034 =
  fun _endpos__1_ _startpos__1_ ->
    let _endpos = _endpos__1_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 153 "idllib/parser.mly"
           ( Oneway @@ at _sloc )
# 954 "idllib/parser.ml"
     : (Syntax.func_mode))

let _menhir_action_035 =
  fun _endpos__1_ _startpos__1_ ->
    let _endpos = _endpos__1_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 154 "idllib/parser.mly"
          ( Query @@ at _sloc )
# 965 "idllib/parser.ml"
     : (Syntax.func_mode))

let _menhir_action_036 =
  fun _endpos__1_ _startpos__1_ ->
    let _endpos = _endpos__1_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 155 "idllib/parser.mly"
                    ( Composite @@ at _sloc )
# 976 "idllib/parser.ml"
     : (Syntax.func_mode))

let _menhir_action_037 =
  fun () ->
    (
# 158 "idllib/parser.mly"
                ( [] )
# 984 "idllib/parser.ml"
     : (Syntax.func_mode list))

let _menhir_action_038 =
  fun m ms ->
    (
# 159 "idllib/parser.mly"
                                  ( m::ms )
# 992 "idllib/parser.ml"
     : (Syntax.func_mode list))

let _menhir_action_039 =
  fun _endpos_ms_ _startpos_t1_ ms t1 t2 ->
    let _endpos = _endpos_ms_ in
    let _symbolstartpos = _startpos_t1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 163 "idllib/parser.mly"
    ( FuncT(ms, t1, t2) @@ at _sloc )
# 1003 "idllib/parser.ml"
     : (Syntax.typ' Source.phrase))

let _menhir_action_040 =
  fun () ->
    (
# 185 "idllib/parser.mly"
                ( )
# 1011 "idllib/parser.ml"
     : (unit))

let _menhir_action_041 =
  fun _endpos_id_ _startpos_id_ id ->
    let _1 =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1023 "idllib/parser.ml"
      
    in
    (
# 186 "idllib/parser.mly"
       ( )
# 1029 "idllib/parser.ml"
     : (unit))

let _menhir_action_042 =
  fun _endpos_s_ _startpos_s_ s ->
    let text =
      let _endpos = _endpos_s_ in
      let _symbolstartpos = _startpos_s_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1043 "idllib/parser.ml"
      
    in
    (
# 274 "idllib/parser.mly"
              ( TextualInput text )
# 1049 "idllib/parser.ml"
     : (Syntax.input))

let _menhir_action_043 =
  fun text ->
    (
# 275 "idllib/parser.mly"
                   ( BinaryInput text )
# 1057 "idllib/parser.ml"
     : (Syntax.input))

let _menhir_action_044 =
  fun _endpos_id_ _endpos_t_ _startpos_id_ id t ->
    let x =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1069 "idllib/parser.ml"
      
    in
    let _startpos_x_ = _startpos_id_ in
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos_x_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 167 "idllib/parser.mly"
    ( { var = x; meth = t } @@ at _sloc )
# 1079 "idllib/parser.ml"
     : (Syntax.typ_meth' Source.phrase))

let _menhir_action_045 =
  fun _endpos_s_ _endpos_t_ _startpos_s_ s t ->
    let x =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1094 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 1104 "idllib/parser.ml"
      
    in
    let _startpos_x_ = _startpos_s_ in
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos_x_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 167 "idllib/parser.mly"
    ( { var = x; meth = t } @@ at _sloc )
# 1114 "idllib/parser.ml"
     : (Syntax.typ_meth' Source.phrase))

let _menhir_action_046 =
  fun _endpos_id_ _endpos_id_inlined1_ _startpos_id_ _startpos_id_inlined1_ id id_inlined1 ->
    let id =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1126 "idllib/parser.ml"
      
    in
    let x =
      let (_endpos_id_, _startpos_id_, id) = (_endpos_id_inlined1_, _startpos_id_inlined1_, id_inlined1) in
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1137 "idllib/parser.ml"
      
    in
    let _startpos_x_ = _startpos_id_inlined1_ in
    let _endpos = _endpos_id_ in
    let _symbolstartpos = _startpos_x_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 169 "idllib/parser.mly"
    ( { var = x; meth = VarT id @@ at _sloc } @@ at _sloc )
# 1147 "idllib/parser.ml"
     : (Syntax.typ_meth' Source.phrase))

let _menhir_action_047 =
  fun _endpos_id_ _endpos_s_ _startpos_id_ _startpos_s_ id s ->
    let id =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1159 "idllib/parser.ml"
      
    in
    let x =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1172 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 1182 "idllib/parser.ml"
      
    in
    let _startpos_x_ = _startpos_s_ in
    let _endpos = _endpos_id_ in
    let _symbolstartpos = _startpos_x_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 169 "idllib/parser.mly"
    ( { var = x; meth = VarT id @@ at _sloc } @@ at _sloc )
# 1192 "idllib/parser.ml"
     : (Syntax.typ_meth' Source.phrase))

let _menhir_action_048 =
  fun n n2 ->
    (
# 216 "idllib/parser.mly"
                        ( n ^ "." ^ n2 )
# 1200 "idllib/parser.ml"
     : (string))

let _menhir_action_049 =
  fun n ->
    (
# 217 "idllib/parser.mly"
                 ( n ^ "." )
# 1208 "idllib/parser.ml"
     : (string))

let _menhir_action_050 =
  fun n ->
    (
# 218 "idllib/parser.mly"
          ( n )
# 1216 "idllib/parser.ml"
     : (string))

let _menhir_action_051 =
  fun () ->
    (
# 111 "<standard.mly>"
    ( None )
# 1224 "idllib/parser.ml"
     : (unit option))

let _menhir_action_052 =
  fun x ->
    (
# 114 "<standard.mly>"
    ( Some x )
# 1232 "idllib/parser.ml"
     : (unit option))

let _menhir_action_053 =
  fun () ->
    (
# 111 "<standard.mly>"
    ( None )
# 1240 "idllib/parser.ml"
     : (string option))

let _menhir_action_054 =
  fun _endpos_s_ _startpos_s_ s ->
    let x =
      let _endpos = _endpos_s_ in
      let _symbolstartpos = _startpos_s_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1254 "idllib/parser.ml"
      
    in
    (
# 114 "<standard.mly>"
    ( Some x )
# 1260 "idllib/parser.ml"
     : (string option))

let _menhir_action_055 =
  fun t ->
    (
# 149 "idllib/parser.mly"
               ( t )
# 1268 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_056 =
  fun _endpos_id_ _startpos_id_ id t ->
    let _1 =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1280 "idllib/parser.ml"
      
    in
    (
# 150 "idllib/parser.mly"
                          ( t )
# 1286 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_057 =
  fun _endpos_s_ _startpos_s_ s t ->
    let _1 =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1301 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 1311 "idllib/parser.ml"
      
    in
    (
# 150 "idllib/parser.mly"
                          ( t )
# 1317 "idllib/parser.ml"
     : (Syntax.typ))

let _menhir_action_058 =
  fun fs ->
    (
# 146 "idllib/parser.mly"
    ( fs )
# 1325 "idllib/parser.ml"
     : (Syntax.typ list))

let _menhir_action_059 =
  fun _endpos__4_ _startpos__1_ vs ->
    let _endpos = _endpos__4_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 268 "idllib/parser.mly"
                                            ( vs @@ at _sloc )
# 1336 "idllib/parser.ml"
     : (Syntax.value list Source.phrase))

let _menhir_action_060 =
  fun _endpos__3_ _endpos_actor_ _endpos_ds_ _startpos__3_ _startpos_actor_ _startpos_ds_ actor ds ->
    let _endpos = _endpos__3_ in
    let _symbolstartpos = if _startpos_ds_ != _endpos_ds_ then
      _startpos_ds_
    else
      if _startpos_actor_ != _endpos_actor_ then
        _startpos_actor_
      else
        _startpos__3_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 207 "idllib/parser.mly"
    (
      let trivia = Trivia.PosHashtbl.create 0 in
      fun filename -> {it = {decs=ds; actor=actor}; at = at _sloc; note = {filename; trivia}} )
# 1355 "idllib/parser.ml"
     : (string -> Syntax.prog))

let _menhir_action_061 =
  fun _endpos__3_ _endpos_tdecs_ _endpos_tests_ _startpos__3_ _startpos_tdecs_ _startpos_tests_ tdecs tests ->
    let _endpos = _endpos__3_ in
    let _symbolstartpos = if _startpos_tdecs_ != _endpos_tdecs_ then
      _startpos_tdecs_
    else
      if _startpos_tests_ != _endpos_tests_ then
        _startpos_tests_
      else
        _startpos__3_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 290 "idllib/parser.mly"
    ( fun filename -> {it = {tdecs; tests}; at = at _sloc; note = filename} )
# 1372 "idllib/parser.ml"
     : (string -> Syntax.tests))

let _menhir_action_062 =
  fun _endpos_id_ _startpos_id_ id ->
    let x =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1384 "idllib/parser.ml"
      
    in
    let (_endpos_x_, _startpos_x_) = (_endpos_id_, _startpos_id_) in
    let _endpos = _endpos_x_ in
    let _symbolstartpos = _startpos_x_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 98 "idllib/parser.mly"
    ( (match is_prim_typs x.it with
         None -> VarT x
       | Some t -> PrimT t) @@ at _sloc )
# 1396 "idllib/parser.ml"
     : (Syntax.typ' Source.phrase))

let _menhir_action_063 =
  fun f ->
    (
# 114 "idllib/parser.mly"
                ( fun _ -> f )
# 1404 "idllib/parser.ml"
     : (Uint32.t -> Syntax.typ_field' Source.phrase))

let _menhir_action_064 =
  fun _endpos_t_ _startpos_t_ t ->
    let _endpos = _endpos_t_ in
    let _symbolstartpos = _startpos_t_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 116 "idllib/parser.mly"
    ( fun x -> { label = Unnamed x @@ no_region; typ = t } @@ at _sloc )
# 1415 "idllib/parser.ml"
     : (Uint32.t -> Syntax.typ_field' Source.phrase))

let _menhir_action_065 =
  fun fs ->
    (
# 127 "idllib/parser.mly"
    ( record_fields (fun f -> f.label) fs )
# 1423 "idllib/parser.ml"
     : (Syntax.typ_field list))

let _menhir_action_066 =
  fun t ->
    (
# 103 "idllib/parser.mly"
                    ( t )
# 1431 "idllib/parser.ml"
     : (Syntax.typ' Source.phrase))

let _menhir_action_067 =
  fun _endpos_ts_ _startpos__1_ ts ->
    let _endpos = _endpos_ts_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 104 "idllib/parser.mly"
                         ( ServT ts @@ at _sloc )
# 1442 "idllib/parser.ml"
     : (Syntax.typ' Source.phrase))

let _menhir_action_068 =
  fun _endpos__1_ _startpos__1_ ->
    let _endpos = _endpos__1_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 105 "idllib/parser.mly"
              ( PrincipalT @@ at _sloc )
# 1453 "idllib/parser.ml"
     : (Syntax.typ' Source.phrase))

let _menhir_action_069 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1461 "idllib/parser.ml"
     : (Syntax.value list))

let _menhir_action_070 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1469 "idllib/parser.ml"
     : (Syntax.value list))

let _menhir_action_071 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1477 "idllib/parser.ml"
     : (Syntax.value list))

let _menhir_action_072 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1485 "idllib/parser.ml"
     : (Syntax.dec list))

let _menhir_action_073 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1493 "idllib/parser.ml"
     : (Syntax.dec list))

let _menhir_action_074 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1501 "idllib/parser.ml"
     : (Syntax.dec list))

let _menhir_action_075 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1509 "idllib/parser.ml"
     : ((Uint32.t -> Syntax.field_value) list))

let _menhir_action_076 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1517 "idllib/parser.ml"
     : ((Uint32.t -> Syntax.field_value) list))

let _menhir_action_077 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1525 "idllib/parser.ml"
     : ((Uint32.t -> Syntax.field_value) list))

let _menhir_action_078 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1533 "idllib/parser.ml"
     : (Syntax.typ_meth list))

let _menhir_action_079 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1541 "idllib/parser.ml"
     : (Syntax.typ_meth list))

let _menhir_action_080 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1549 "idllib/parser.ml"
     : (Syntax.typ_meth list))

let _menhir_action_081 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1557 "idllib/parser.ml"
     : (Syntax.typ list))

let _menhir_action_082 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1565 "idllib/parser.ml"
     : (Syntax.typ list))

let _menhir_action_083 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1573 "idllib/parser.ml"
     : (Syntax.typ list))

let _menhir_action_084 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1581 "idllib/parser.ml"
     : ((Uint32.t -> Syntax.typ_field' Source.phrase) list))

let _menhir_action_085 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1589 "idllib/parser.ml"
     : ((Uint32.t -> Syntax.typ_field' Source.phrase) list))

let _menhir_action_086 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1597 "idllib/parser.ml"
     : ((Uint32.t -> Syntax.typ_field' Source.phrase) list))

let _menhir_action_087 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1605 "idllib/parser.ml"
     : (Syntax.test list))

let _menhir_action_088 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1613 "idllib/parser.ml"
     : (Syntax.test list))

let _menhir_action_089 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1621 "idllib/parser.ml"
     : (Syntax.test list))

let _menhir_action_090 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1629 "idllib/parser.ml"
     : (Syntax.value list))

let _menhir_action_091 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1637 "idllib/parser.ml"
     : (Syntax.value list))

let _menhir_action_092 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1645 "idllib/parser.ml"
     : (Syntax.value list))

let _menhir_action_093 =
  fun () ->
    (
# 75 "idllib/parser.mly"
                ( [] )
# 1653 "idllib/parser.ml"
     : (Syntax.typ_field list))

let _menhir_action_094 =
  fun x ->
    (
# 76 "idllib/parser.mly"
        ( [x] )
# 1661 "idllib/parser.ml"
     : (Syntax.typ_field list))

let _menhir_action_095 =
  fun x xs ->
    (
# 77 "idllib/parser.mly"
                               ( x::xs )
# 1669 "idllib/parser.ml"
     : (Syntax.typ_field list))

let _menhir_action_096 =
  fun n ->
    (
# 221 "idllib/parser.mly"
                ( "-" ^ n )
# 1677 "idllib/parser.ml"
     : (string))

let _menhir_action_097 =
  fun n ->
    (
# 222 "idllib/parser.mly"
          ( n )
# 1685 "idllib/parser.ml"
     : (string))

let _menhir_action_098 =
  fun _endpos_desc_ _endpos_id_ _startpos_id_ assertion desc id tys ->
    let id =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1697 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_desc_ in
    let _symbolstartpos = _startpos_id_ in
    let _loc_id_ = (_startpos_id_, _endpos_id_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 285 "idllib/parser.mly"
    ( if id.it <> "assert" then raise (ParseError (at _loc_id_, id.it))
      else { ttyp=tys; assertion; desc } @@ at _sloc )
# 1708 "idllib/parser.ml"
     : (Syntax.test' Source.phrase))

let _menhir_action_099 =
  fun _endpos_n_ _startpos_n_ n ->
    let _endpos = _endpos_n_ in
    let _symbolstartpos = _startpos_n_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 225 "idllib/parser.mly"
                 ( NumV n @@ at _sloc )
# 1719 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_100 =
  fun _endpos_v_ _startpos__1_ v ->
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 226 "idllib/parser.mly"
                ( OptV v @@ at _sloc )
# 1730 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_101 =
  fun _endpos__4_ _startpos__1_ vs ->
    let _endpos = _endpos__4_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 228 "idllib/parser.mly"
    ( VecV vs @@ at _sloc )
# 1741 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_102 =
  fun _endpos_text_ _startpos__1_ text ->
    let _endpos = _endpos_text_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 229 "idllib/parser.mly"
                   ( BlobV text @@ at _sloc )
# 1752 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_103 =
  fun _endpos_text_ _startpos_text_ text ->
    let _endpos = _endpos_text_ in
    let _symbolstartpos = _startpos_text_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 230 "idllib/parser.mly"
              ( TextV text @@ at _sloc )
# 1763 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_104 =
  fun _endpos__4_ _startpos__1_ fs ->
    let _endpos = _endpos__4_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 232 "idllib/parser.mly"
    ( RecordV (record_fields (fun f -> fst f) fs) @@ at _sloc )
# 1774 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_105 =
  fun _endpos__4_ _startpos__1_ f ->
    let _endpos = _endpos__4_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 234 "idllib/parser.mly"
    ( VariantV f @@ at _sloc )
# 1785 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_106 =
  fun _endpos_id_ _startpos__1_ _startpos_id_ id ->
    let s =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1797 "idllib/parser.ml"
      
    in
    let _endpos_s_ = _endpos_id_ in
    let _endpos = _endpos_s_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 235 "idllib/parser.mly"
                   ( ServiceV s.it @@ at _sloc )
# 1807 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_107 =
  fun _endpos_s_ _startpos__1_ _startpos_s_ s ->
    let s =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1822 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 1832 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_s_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 235 "idllib/parser.mly"
                   ( ServiceV s.it @@ at _sloc )
# 1841 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_108 =
  fun _endpos_id_ _endpos_id_inlined1_ _startpos__1_ _startpos_id_ _startpos_id_inlined1_ id id_inlined1 ->
    let m =
      let (_endpos_id_, _startpos_id_, id) = (_endpos_id_inlined1_, _startpos_id_inlined1_, id_inlined1) in
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1854 "idllib/parser.ml"
      
    in
    let _endpos_m_ = _endpos_id_inlined1_ in
    let s =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1865 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_m_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 236 "idllib/parser.mly"
                              ( FuncV (s.it, m.it) @@ at _sloc )
# 1874 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_109 =
  fun _endpos_id_ _endpos_s_ _startpos__1_ _startpos_id_ _startpos_s_ id s ->
    let m =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1889 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 1899 "idllib/parser.ml"
      
    in
    let _endpos_m_ = _endpos_s_ in
    let s =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1910 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_m_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 236 "idllib/parser.mly"
                              ( FuncV (s.it, m.it) @@ at _sloc )
# 1919 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_110 =
  fun _endpos_id_ _endpos_s_ _startpos__1_ _startpos_id_ _startpos_s_ id s ->
    let m =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 1931 "idllib/parser.ml"
      
    in
    let _endpos_m_ = _endpos_id_ in
    let s =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1945 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 1955 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_m_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 236 "idllib/parser.mly"
                              ( FuncV (s.it, m.it) @@ at _sloc )
# 1964 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_111 =
  fun _endpos_s_ _endpos_s_inlined1_ _startpos__1_ _startpos_s_ _startpos_s_inlined1_ s s_inlined1 ->
    let m =
      let (_endpos_s_, _startpos_s_, s) = (_endpos_s_inlined1_, _startpos_s_inlined1_, s_inlined1) in
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 1980 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 1990 "idllib/parser.ml"
      
    in
    let _endpos_m_ = _endpos_s_inlined1_ in
    let s =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 2004 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 2014 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_m_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 236 "idllib/parser.mly"
                              ( FuncV (s.it, m.it) @@ at _sloc )
# 2023 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_112 =
  fun _endpos_id_ _startpos__1_ _startpos_id_ id ->
    let s =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 2035 "idllib/parser.ml"
      
    in
    let _endpos_s_ = _endpos_id_ in
    let _endpos = _endpos_s_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 237 "idllib/parser.mly"
                     ( PrincipalV s.it @@ at _sloc )
# 2045 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_113 =
  fun _endpos_s_ _startpos__1_ _startpos_s_ s ->
    let s =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 2060 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 2070 "idllib/parser.ml"
      
    in
    let _endpos = _endpos_s_ in
    let _symbolstartpos = _startpos__1_ in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 237 "idllib/parser.mly"
                     ( PrincipalV s.it @@ at _sloc )
# 2079 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_114 =
  fun _endpos_id_ _startpos_id_ id ->
    let b =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 88 "idllib/parser.mly"
          ( id @@ at _sloc )
# 2091 "idllib/parser.ml"
      
    in
    let (_endpos_b_, _startpos_b_) = (_endpos_id_, _startpos_id_) in
    let _endpos = _endpos_b_ in
    let _symbolstartpos = _startpos_b_ in
    let _loc_b_ = (_startpos_b_, _endpos_b_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 239 "idllib/parser.mly"
    ( match b.it with
      | "null" -> NullV @@ at _sloc
      | "true" -> BoolV true @@ at _sloc
      | "false" -> BoolV false @@ at _sloc
      | _ -> raise (ParseError (at _loc_b_, b.it))
    )
# 2107 "idllib/parser.ml"
     : (Syntax.value' Source.phrase))

let _menhir_action_115 =
  fun f ->
    (
# 119 "idllib/parser.mly"
                ( f )
# 2115 "idllib/parser.ml"
     : (Syntax.typ_field' Source.phrase))

let _menhir_action_116 =
  fun _endpos_id_ _startpos_id_ id ->
    let name =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 2127 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_id_, _startpos_id_) in
    let _endpos = _endpos_name_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 121 "idllib/parser.mly"
    ( { label = Named name.it @@ at _loc_name_; typ = PrimT Null @@ no_region } @@ at _sloc )
# 2138 "idllib/parser.ml"
     : (Syntax.typ_field' Source.phrase))

let _menhir_action_117 =
  fun _endpos_s_ _startpos_s_ s ->
    let name =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 2153 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 2163 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_s_, _startpos_s_) in
    let _endpos = _endpos_name_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 121 "idllib/parser.mly"
    ( { label = Named name.it @@ at _loc_name_; typ = PrimT Null @@ no_region } @@ at _sloc )
# 2174 "idllib/parser.ml"
     : (Syntax.typ_field' Source.phrase))

let _menhir_action_118 =
  fun _endpos_n_ _startpos_n_ n ->
    let _endpos = _endpos_n_ in
    let _symbolstartpos = _startpos_n_ in
    let _loc_n_ = (_startpos_n_, _endpos_n_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 123 "idllib/parser.mly"
    ( { label = Id (Uint32.of_string n) @@ at _loc_n_; typ = PrimT Null @@ no_region } @@ at _sloc )
# 2186 "idllib/parser.ml"
     : (Syntax.typ_field' Source.phrase))

let _menhir_action_119 =
  fun fs ->
    (
# 130 "idllib/parser.mly"
                                                     ( fs )
# 2194 "idllib/parser.ml"
     : (Syntax.typ_field list))

let _menhir_action_120 =
  fun _endpos_n_ _endpos_v_ _startpos_n_ n v ->
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos_n_ in
    let _loc_n_ = (_startpos_n_, _endpos_n_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 248 "idllib/parser.mly"
    ( (Id (Uint32.of_string n) @@ at _loc_n_, v ) @@ at _sloc )
# 2206 "idllib/parser.ml"
     : ((Syntax.field_label * Syntax.value) Source.phrase))

let _menhir_action_121 =
  fun _endpos_id_ _endpos_v_ _startpos_id_ id v ->
    let name =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 2218 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_id_, _startpos_id_) in
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 250 "idllib/parser.mly"
    ( (Named name.it @@ at _loc_name_, v) @@ at _sloc )
# 2229 "idllib/parser.ml"
     : ((Syntax.field_label * Syntax.value) Source.phrase))

let _menhir_action_122 =
  fun _endpos_s_ _endpos_v_ _startpos_s_ s v ->
    let name =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 2244 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 2254 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_s_, _startpos_s_) in
    let _endpos = _endpos_v_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 250 "idllib/parser.mly"
    ( (Named name.it @@ at _loc_name_, v) @@ at _sloc )
# 2265 "idllib/parser.ml"
     : ((Syntax.field_label * Syntax.value) Source.phrase))

let _menhir_action_123 =
  fun _endpos_n_ _startpos_n_ n ->
    let _endpos = _endpos_n_ in
    let _symbolstartpos = _startpos_n_ in
    let _loc_n_ = (_startpos_n_, _endpos_n_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 252 "idllib/parser.mly"
    ( (Id (Uint32.of_string n) @@ at _loc_n_, NullV @@ no_region) @@ at _sloc )
# 2277 "idllib/parser.ml"
     : ((Syntax.field_label * Syntax.value) Source.phrase))

let _menhir_action_124 =
  fun _endpos_id_ _startpos_id_ id ->
    let name =
      let _endpos = _endpos_id_ in
      let _symbolstartpos = _startpos_id_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 91 "idllib/parser.mly"
          ( id @@ at _sloc )
# 2289 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_id_, _startpos_id_) in
    let _endpos = _endpos_name_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 254 "idllib/parser.mly"
    ( (Named name.it @@ at _loc_name_, NullV @@ no_region) @@ at _sloc )
# 2300 "idllib/parser.ml"
     : ((Syntax.field_label * Syntax.value) Source.phrase))

let _menhir_action_125 =
  fun _endpos_s_ _startpos_s_ s ->
    let name =
      let text =
        let _endpos = _endpos_s_ in
        let _symbolstartpos = _startpos_s_ in
        let _sloc = (_symbolstartpos, _endpos) in
        
# 83 "idllib/parser.mly"
   ( try ignore (Lib.Utf8.decode s); s
     with Lib.Utf8.Utf8 -> raise (ParseError (at _sloc, "Invalid UTF-8"))
   )
# 2315 "idllib/parser.ml"
        
      in
      let (_endpos_text_, _startpos_text_) = (_endpos_s_, _startpos_s_) in
      let _endpos = _endpos_text_ in
      let _symbolstartpos = _startpos_text_ in
      let _sloc = (_symbolstartpos, _endpos) in
      
# 92 "idllib/parser.mly"
              ( text @@ at _sloc )
# 2325 "idllib/parser.ml"
      
    in
    let (_endpos_name_, _startpos_name_) = (_endpos_s_, _startpos_s_) in
    let _endpos = _endpos_name_ in
    let _symbolstartpos = _startpos_name_ in
    let _loc_name_ = (_startpos_name_, _endpos_name_) in
    let _sloc = (_symbolstartpos, _endpos) in
    (
# 254 "idllib/parser.mly"
    ( (Named name.it @@ at _loc_name_, NullV @@ no_region) @@ at _sloc )
# 2336 "idllib/parser.ml"
     : ((Syntax.field_label * Syntax.value) Source.phrase))

let _menhir_print_token : token -> string =
  fun _tok ->
    match _tok with
    | ARROW ->
        "ARROW"
    | BLOB ->
        "BLOB"
    | COLON ->
        "COLON"
    | COMMA ->
        "COMMA"
    | COMPOSITE_QUERY ->
        "COMPOSITE_QUERY"
    | EOF ->
        "EOF"
    | EQ ->
        "EQ"
    | EQQ ->
        "EQQ"
    | FUNC ->
        "FUNC"
    | ID _ ->
        "ID"
    | IMPORT ->
        "IMPORT"
    | LCURLY ->
        "LCURLY"
    | LPAR ->
        "LPAR"
    | MINUS ->
        "MINUS"
    | NAT _ ->
        "NAT"
    | NOTCOLON ->
        "NOTCOLON"
    | NOTEQ ->
        "NOTEQ"
    | ONEWAY ->
        "ONEWAY"
    | OPT ->
        "OPT"
    | PERIOD ->
        "PERIOD"
    | PRINCIPAL ->
        "PRINCIPAL"
    | QUERY ->
        "QUERY"
    | RCURLY ->
        "RCURLY"
    | RECORD ->
        "RECORD"
    | RPAR ->
        "RPAR"
    | SEMICOLON ->
        "SEMICOLON"
    | SERVICE ->
        "SERVICE"
    | TEXT _ ->
        "TEXT"
    | TYPE ->
        "TYPE"
    | VARIANT ->
        "VARIANT"
    | VEC ->
        "VEC"

let _menhir_fail : unit -> 'a =
  fun () ->
    Printf.eprintf "Internal failure -- please contact the parser generator's developers.\n%!";
    assert false

include struct
  
  [@@@ocaml.warning "-4-37"]
  
  let _menhir_run_068 : type  ttv_stack. ttv_stack _menhir_cell0_LPAR -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | EOF ->
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let MenhirCell0_LPAR (_menhir_stack, _startpos__1_) = _menhir_stack in
          let (_endpos__4_, vs) = (_endpos, _v) in
          let _v = _menhir_action_059 _endpos__4_ _startpos__1_ vs in
          MenhirBox_parse_args _v
      | _ ->
          _eRR ()
  
  let rec _menhir_run_073 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_annval -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell1_annval (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_071 x xs in
      _menhir_goto_seplist_annval_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_seplist_annval_COMMA_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState072 ->
          _menhir_run_073 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState001 ->
          _menhir_run_068 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  let rec _menhir_run_002 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_VEC (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LCURLY ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _menhir_stack = MenhirCell0_LCURLY (_menhir_stack, _startpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | TEXT _v ->
              _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState003
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | NAT _v ->
              _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState003
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | ID _v ->
              _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState003
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState003
          | RCURLY ->
              let _v = _menhir_action_090 () in
              _menhir_run_065 _menhir_stack _menhir_lexbuf _menhir_lexer _v
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_004 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_VARIANT (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LCURLY ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _menhir_stack = MenhirCell0_LCURLY (_menhir_stack, _startpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TEXT _v ->
              let _startpos_1 = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | EQ ->
                  let _menhir_stack = MenhirCell0_TEXT (_menhir_stack, _v, _startpos_1, _endpos) in
                  let _menhir_s = MenhirState007 in
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  (match (_tok : MenhirBasics.token) with
                  | VEC ->
                      _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | VARIANT ->
                      _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | TEXT _v ->
                      _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | SERVICE ->
                      _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | RECORD ->
                      _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | PRINCIPAL ->
                      _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | OPT ->
                      _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | NAT _v ->
                      _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | MINUS ->
                      _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | ID _v ->
                      _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | FUNC ->
                      _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | BLOB ->
                      _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | _ ->
                      _eRR ())
              | RCURLY ->
                  let (_endpos_s_, _startpos_s_, s) = (_endpos, _startpos_1, _v) in
                  let _v = _menhir_action_125 _endpos_s_ _startpos_s_ s in
                  _menhir_goto_variant_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
              | _ ->
                  _eRR ())
          | NAT _v ->
              let _startpos_5 = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | EQ ->
                  let _menhir_stack = MenhirCell0_NAT (_menhir_stack, _v, _startpos_5, _endpos) in
                  let _menhir_s = MenhirState055 in
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  (match (_tok : MenhirBasics.token) with
                  | VEC ->
                      _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | VARIANT ->
                      _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | TEXT _v ->
                      _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | SERVICE ->
                      _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | RECORD ->
                      _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | PRINCIPAL ->
                      _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | OPT ->
                      _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | NAT _v ->
                      _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | MINUS ->
                      _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | ID _v ->
                      _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | FUNC ->
                      _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | BLOB ->
                      _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | _ ->
                      _eRR ())
              | RCURLY ->
                  let (_endpos_n_, _startpos_n_, n) = (_endpos, _startpos_5, _v) in
                  let _v = _menhir_action_123 _endpos_n_ _startpos_n_ n in
                  _menhir_goto_variant_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
              | _ ->
                  _eRR ())
          | ID _v ->
              let _startpos_9 = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | EQ ->
                  let _menhir_stack = MenhirCell0_ID (_menhir_stack, _v, _startpos_9, _endpos) in
                  let _menhir_s = MenhirState058 in
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  (match (_tok : MenhirBasics.token) with
                  | VEC ->
                      _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | VARIANT ->
                      _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | TEXT _v ->
                      _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | SERVICE ->
                      _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | RECORD ->
                      _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | PRINCIPAL ->
                      _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | OPT ->
                      _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | NAT _v ->
                      _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | MINUS ->
                      _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | ID _v ->
                      _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
                  | FUNC ->
                      _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | BLOB ->
                      _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
                  | _ ->
                      _eRR ())
              | RCURLY ->
                  let (_endpos_id_, _startpos_id_, id) = (_endpos, _startpos_9, _v) in
                  let _v = _menhir_action_124 _endpos_id_ _startpos_id_ id in
                  _menhir_goto_variant_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
              | _ ->
                  _eRR ())
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_008 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos_text_, _startpos_text_, text) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_103 _endpos_text_ _startpos_text_ text in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_text_ _startpos_text_ _v _menhir_s _tok
  
  and _menhir_goto_value : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState072 ->
          _menhir_run_067 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState001 ->
          _menhir_run_067 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState063 ->
          _menhir_run_062 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState003 ->
          _menhir_run_062 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState058 ->
          _menhir_run_059 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState055 ->
          _menhir_run_056 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState007 ->
          _menhir_run_053 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState051 ->
          _menhir_run_047 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState013 ->
          _menhir_run_047 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState045 ->
          _menhir_run_046 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState042 ->
          _menhir_run_043 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState015 ->
          _menhir_run_040 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState019 ->
          _menhir_run_037 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_067 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let v = _v in
      let _v = _menhir_action_010 v in
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          let _menhir_stack = MenhirCell1_annval (_menhir_stack, _menhir_s, _v) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | TEXT _v_0 ->
              _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState072
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | NAT _v_1 ->
              _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState072
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | ID _v_2 ->
              _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2 MenhirState072
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState072
          | RPAR ->
              let _v_3 = _menhir_action_069 () in
              _menhir_run_073 _menhir_stack _menhir_lexbuf _menhir_lexer _v_3
          | _ ->
              _eRR ())
      | RPAR ->
          let x = _v in
          let _v = _menhir_action_070 x in
          _menhir_goto_seplist_annval_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_009 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let (_endpos_s_, _startpos_s_, s, _startpos__1_) = (_endpos, _startpos_0, _v, _startpos) in
          let _v = _menhir_action_107 _endpos_s_ _startpos__1_ _startpos_s_ s in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_s_ _startpos__1_ _v _menhir_s _tok
      | ID _v ->
          let _startpos_1 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let (_endpos_id_, _startpos_id_, id, _startpos__1_) = (_endpos, _startpos_1, _v, _startpos) in
          let _v = _menhir_action_106 _endpos_id_ _startpos__1_ _startpos_id_ id in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos__1_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_012 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_RECORD (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LCURLY ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _menhir_stack = MenhirCell0_LCURLY (_menhir_stack, _startpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | TEXT _v ->
              _menhir_run_014 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState013
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | NAT _v ->
              _menhir_run_041 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState013
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | ID _v ->
              _menhir_run_044 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState013
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState013
          | RCURLY ->
              let _v = _menhir_action_075 () in
              _menhir_run_048 _menhir_stack _menhir_lexbuf _menhir_lexer _v
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_014 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | EQ ->
          let _menhir_stack = MenhirCell1_TEXT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          let _menhir_s = MenhirState015 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | TEXT _v ->
              _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | NAT _v ->
              _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | ID _v ->
              _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | RCURLY | SEMICOLON ->
          let (_endpos_text_, _startpos_text_, text) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_103 _endpos_text_ _startpos_text_ text in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_text_ _startpos_text_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_016 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos_1 = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let (_endpos_s_, _startpos_s_, s, _startpos__1_) = (_endpos_1, _startpos_0, _v, _startpos) in
          let _v = _menhir_action_113 _endpos_s_ _startpos__1_ _startpos_s_ s in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_s_ _startpos__1_ _v _menhir_s _tok
      | ID _v ->
          let _startpos_2 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos_3 = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let (_endpos_id_, _startpos_id_, id, _startpos__1_) = (_endpos_3, _startpos_2, _v, _startpos) in
          let _v = _menhir_action_112 _endpos_id_ _startpos__1_ _startpos_id_ id in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos__1_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_019 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_OPT (_menhir_stack, _menhir_s, _startpos) in
      let _menhir_s = MenhirState019 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | VEC ->
          _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | VARIANT ->
          _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | TEXT _v ->
          _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | SERVICE ->
          _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | RECORD ->
          _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | PRINCIPAL ->
          _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | OPT ->
          _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | NAT _v ->
          _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | MINUS ->
          _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | ID _v ->
          _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | FUNC ->
          _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | BLOB ->
          _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_020 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | PERIOD ->
          let _menhir_stack = MenhirCell1_NAT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          _menhir_run_021 _menhir_stack _menhir_lexbuf _menhir_lexer
      | COMMA | RCURLY | RPAR | SEMICOLON ->
          let (_endpos_n_, _startpos_n_, n) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_050 n in
          _menhir_goto_num _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_n_ _startpos_n_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_021 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_NAT -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | NAT _v ->
          let _menhir_stack = MenhirCell0_PERIOD (_menhir_stack, _endpos) in
          _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState021
      | COMMA | RCURLY | RPAR | SEMICOLON ->
          let MenhirCell1_NAT (_menhir_stack, _menhir_s, n, _startpos_n_, _) = _menhir_stack in
          let _endpos__2_ = _endpos in
          let _v = _menhir_action_049 n in
          _menhir_goto_num _menhir_stack _menhir_lexbuf _menhir_lexer _endpos__2_ _startpos_n_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_goto_num : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState072 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState001 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState003 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState063 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState058 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState055 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState007 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState051 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState013 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState045 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState042 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState015 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState019 ->
          _menhir_run_039 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState023 ->
          _menhir_run_024 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState021 ->
          _menhir_run_022 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_039 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let (_endpos_n_, _startpos_n_, n) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_097 n in
      _menhir_goto_signed_num _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_n_ _startpos_n_ _v _menhir_s _tok
  
  and _menhir_goto_signed_num : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let (_endpos_n_, _startpos_n_, n) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_099 _endpos_n_ _startpos_n_ n in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_n_ _startpos_n_ _v _menhir_s _tok
  
  and _menhir_run_024 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_MINUS -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_MINUS (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_n_, n) = (_endpos, _v) in
      let _v = _menhir_action_096 n in
      _menhir_goto_signed_num _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_n_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_022 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_NAT _menhir_cell0_PERIOD -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell0_PERIOD (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_NAT (_menhir_stack, _menhir_s, n, _startpos_n_, _) = _menhir_stack in
      let (_endpos_n2_, n2) = (_endpos, _v) in
      let _v = _menhir_action_048 n n2 in
      _menhir_goto_num _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_n2_ _startpos_n_ _v _menhir_s _tok
  
  and _menhir_run_023 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_MINUS (_menhir_stack, _menhir_s, _startpos) in
      let _menhir_s = MenhirState023 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | NAT _v ->
          _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_025 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos_id_, _startpos_id_, id) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_114 _endpos_id_ _startpos_id_ id in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos_id_ _v _menhir_s _tok
  
  and _menhir_run_026 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | PERIOD ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | TEXT _v_2 ->
                  let _startpos_3 = _menhir_lexbuf.Lexing.lex_start_p in
                  let _endpos_4 = _menhir_lexbuf.Lexing.lex_curr_p in
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  let (_endpos_s_, _startpos_s_, s, _startpos__1_, _endpos_s_inlined1_, _startpos_s_inlined1_, s_inlined1) = (_endpos, _startpos_0, _v, _startpos, _endpos_4, _startpos_3, _v_2) in
                  let _v = _menhir_action_111 _endpos_s_ _endpos_s_inlined1_ _startpos__1_ _startpos_s_ _startpos_s_inlined1_ s s_inlined1 in
                  _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_s_inlined1_ _startpos__1_ _v _menhir_s _tok
              | ID _v_5 ->
                  let _startpos_6 = _menhir_lexbuf.Lexing.lex_start_p in
                  let _endpos_7 = _menhir_lexbuf.Lexing.lex_curr_p in
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  let (_endpos_id_, _startpos_id_, id, _endpos_s_, _startpos_s_, s, _startpos__1_) = (_endpos_7, _startpos_6, _v_5, _endpos, _startpos_0, _v, _startpos) in
                  let _v = _menhir_action_110 _endpos_id_ _endpos_s_ _startpos__1_ _startpos_id_ _startpos_s_ id s in
                  _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos__1_ _v _menhir_s _tok
              | _ ->
                  _eRR ())
          | _ ->
              _eRR ())
      | ID _v ->
          let _startpos_8 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | PERIOD ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | TEXT _v_10 ->
                  let _startpos_11 = _menhir_lexbuf.Lexing.lex_start_p in
                  let _endpos_12 = _menhir_lexbuf.Lexing.lex_curr_p in
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  let (_endpos_id_, _startpos_id_, id, _endpos_s_, _startpos_s_, s, _startpos__1_) = (_endpos, _startpos_8, _v, _endpos_12, _startpos_11, _v_10, _startpos) in
                  let _v = _menhir_action_109 _endpos_id_ _endpos_s_ _startpos__1_ _startpos_id_ _startpos_s_ id s in
                  _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_s_ _startpos__1_ _v _menhir_s _tok
              | ID _v_13 ->
                  let _startpos_14 = _menhir_lexbuf.Lexing.lex_start_p in
                  let _endpos_15 = _menhir_lexbuf.Lexing.lex_curr_p in
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  let (_endpos_id_, _startpos_id_, id, _startpos__1_, _endpos_id_inlined1_, _startpos_id_inlined1_, id_inlined1) = (_endpos, _startpos_8, _v, _startpos, _endpos_15, _startpos_14, _v_13) in
                  let _v = _menhir_action_108 _endpos_id_ _endpos_id_inlined1_ _startpos__1_ _startpos_id_ _startpos_id_inlined1_ id id_inlined1 in
                  _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_inlined1_ _startpos__1_ _v _menhir_s _tok
              | _ ->
                  _eRR ())
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_035 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          let _endpos_1 = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let (_endpos_text_, text, _startpos__1_) = (_endpos_1, _v, _startpos) in
          let _v = _menhir_action_102 _endpos_text_ _startpos__1_ text in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_text_ _startpos__1_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_041 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | PERIOD ->
          let _menhir_stack = MenhirCell1_NAT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          _menhir_run_021 _menhir_stack _menhir_lexbuf _menhir_lexer
      | EQ ->
          let _menhir_stack = MenhirCell1_NAT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          let _menhir_s = MenhirState042 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | TEXT _v ->
              _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | NAT _v ->
              _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | ID _v ->
              _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | RCURLY | SEMICOLON ->
          let (_endpos_n_, _startpos_n_, n) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_050 n in
          _menhir_goto_num _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_n_ _startpos_n_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_044 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | EQ ->
          let _menhir_stack = MenhirCell1_ID (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          let _menhir_s = MenhirState045 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | TEXT _v ->
              _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | NAT _v ->
              _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | ID _v ->
              _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | RCURLY | SEMICOLON ->
          let (_endpos_id_, _startpos_id_, id) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_114 _endpos_id_ _startpos_id_ id in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos_id_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_048 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_RECORD _menhir_cell0_LCURLY -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell0_LCURLY (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_RECORD (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos__4_, fs) = (_endpos, _v) in
      let _v = _menhir_action_104 _endpos__4_ _startpos__1_ fs in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos__4_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_062 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _menhir_stack = MenhirCell1_value (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          let _endpos_0 = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | TEXT _v_1 ->
              _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState063
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | NAT _v_2 ->
              _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2 MenhirState063
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | ID _v_3 ->
              _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v_3 MenhirState063
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState063
          | RCURLY ->
              let _v_4 = _menhir_action_090 () in
              _menhir_run_064 _menhir_stack _menhir_lexbuf _menhir_lexer _v_4
          | _ ->
              _eRR ())
      | RCURLY ->
          let x = _v in
          let _v = _menhir_action_091 x in
          _menhir_goto_seplist_value_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_064 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_value _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_value (_menhir_stack, _menhir_s, x, _, _) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_092 x xs in
      _menhir_goto_seplist_value_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_seplist_value_SEMICOLON_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState003 ->
          _menhir_run_065 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState063 ->
          _menhir_run_064 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_065 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_VEC _menhir_cell0_LCURLY -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell0_LCURLY (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_VEC (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos__4_, vs) = (_endpos, _v) in
      let _v = _menhir_action_101 _endpos__4_ _startpos__1_ vs in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos__4_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_059 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_VARIANT _menhir_cell0_LCURLY _menhir_cell0_ID -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell0_ID (_menhir_stack, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let (_endpos_v_, v) = (_endpos, _v) in
      let _v = _menhir_action_121 _endpos_id_ _endpos_v_ _startpos_id_ id v in
      _menhir_goto_variant_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
  
  and _menhir_goto_variant_value : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_VARIANT _menhir_cell0_LCURLY -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      match (_tok : MenhirBasics.token) with
      | RCURLY ->
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let MenhirCell0_LCURLY (_menhir_stack, _) = _menhir_stack in
          let MenhirCell1_VARIANT (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
          let (_endpos__4_, f) = (_endpos, _v) in
          let _v = _menhir_action_105 _endpos__4_ _startpos__1_ f in
          _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos__4_ _startpos__1_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_056 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_VARIANT _menhir_cell0_LCURLY _menhir_cell0_NAT -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell0_NAT (_menhir_stack, n, _startpos_n_, _endpos_n_) = _menhir_stack in
      let (_endpos_v_, v) = (_endpos, _v) in
      let _v = _menhir_action_120 _endpos_n_ _endpos_v_ _startpos_n_ n v in
      _menhir_goto_variant_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
  
  and _menhir_run_053 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_VARIANT _menhir_cell0_LCURLY _menhir_cell0_TEXT -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell0_TEXT (_menhir_stack, s, _startpos_s_, _endpos_s_) = _menhir_stack in
      let (_endpos_v_, v) = (_endpos, _v) in
      let _v = _menhir_action_122 _endpos_s_ _endpos_v_ _startpos_s_ s v in
      _menhir_goto_variant_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
  
  and _menhir_run_047 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let (_endpos_v_, _startpos_v_, v) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_033 _endpos_v_ _startpos_v_ v in
      _menhir_goto_field_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_field_value : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _menhir_stack = MenhirCell1_field_value (_menhir_stack, _menhir_s, _v) in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | TEXT _v_0 ->
              _menhir_run_014 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState051
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | NAT _v_1 ->
              _menhir_run_041 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState051
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | ID _v_2 ->
              _menhir_run_044 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2 MenhirState051
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState051
          | RCURLY ->
              let _v_3 = _menhir_action_075 () in
              _menhir_run_052 _menhir_stack _menhir_lexbuf _menhir_lexer _v_3
          | _ ->
              _eRR ())
      | RCURLY ->
          let x = _v in
          let _v = _menhir_action_076 x in
          _menhir_goto_seplist_field_value_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_052 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_field_value _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_field_value (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_077 x xs in
      _menhir_goto_seplist_field_value_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_seplist_field_value_SEMICOLON_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_args) _menhir_state -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState051 ->
          _menhir_run_052 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState013 ->
          _menhir_run_048 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_046 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_ID -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_ID (_menhir_stack, _menhir_s, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let (_endpos_v_, v) = (_endpos, _v) in
      let _v = _menhir_action_031 _endpos_id_ _endpos_v_ _startpos_id_ id v in
      _menhir_goto_field_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_043 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_NAT -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_NAT (_menhir_stack, _menhir_s, n, _startpos_n_, _endpos_n_) = _menhir_stack in
      let (_endpos_v_, v) = (_endpos, _v) in
      let _v = _menhir_action_030 _endpos_n_ _endpos_v_ _startpos_n_ n v in
      _menhir_goto_field_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_040 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_TEXT -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_TEXT (_menhir_stack, _menhir_s, s, _startpos_s_, _endpos_s_) = _menhir_stack in
      let (_endpos_v_, v) = (_endpos, _v) in
      let _v = _menhir_action_032 _endpos_s_ _endpos_v_ _startpos_s_ s v in
      _menhir_goto_field_value _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_037 : type  ttv_stack. (ttv_stack, _menhir_box_parse_args) _menhir_cell1_OPT -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_OPT (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_v_, v) = (_endpos, _v) in
      let _v = _menhir_action_100 _endpos_v_ _startpos__1_ v in
      _menhir_goto_value _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_v_ _startpos__1_ _v _menhir_s _tok
  
  let _menhir_run_000 : type  ttv_stack. ttv_stack -> _ -> _ -> _menhir_box_parse_args =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LPAR ->
          let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
          let _menhir_stack = MenhirCell0_LPAR (_menhir_stack, _startpos) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_002 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | VARIANT ->
              _menhir_run_004 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | TEXT _v ->
              _menhir_run_008 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState001
          | SERVICE ->
              _menhir_run_009 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | RECORD ->
              _menhir_run_012 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | PRINCIPAL ->
              _menhir_run_016 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | OPT ->
              _menhir_run_019 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | NAT _v ->
              _menhir_run_020 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState001
          | MINUS ->
              _menhir_run_023 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | ID _v ->
              _menhir_run_025 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState001
          | FUNC ->
              _menhir_run_026 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | BLOB ->
              _menhir_run_035 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState001
          | RPAR ->
              let _v = _menhir_action_069 () in
              _menhir_run_068 _menhir_stack _menhir_lexbuf _menhir_lexer _v
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  let _menhir_run_208 : type  ttv_stack. (ttv_stack, _menhir_box_parse_tests) _menhir_cell1_endlist_def_SEMICOLON_ -> _ -> _ -> _ -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _endpos _startpos _v ->
      let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos_1 = _menhir_lexbuf.Lexing.lex_curr_p in
      let MenhirCell1_endlist_def_SEMICOLON_ (_menhir_stack, _, tdecs, _startpos_tdecs_, _endpos_tdecs_) = _menhir_stack in
      let (_endpos__3_, _startpos__3_, _endpos_tests_, _startpos_tests_, tests) = (_endpos_1, _startpos_0, _endpos, _startpos, _v) in
      let _v = _menhir_action_061 _endpos__3_ _endpos_tdecs_ _endpos_tests_ _startpos__3_ _startpos_tdecs_ _startpos_tests_ tdecs tests in
      MenhirBox_parse_tests _v
  
  let _menhir_goto_actor : type  ttv_stack. (ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _endpos _startpos _v _tok ->
      match (_tok : MenhirBasics.token) with
      | EOF ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos_1 = _menhir_lexbuf.Lexing.lex_curr_p in
          let MenhirCell1_seplist_def_SEMICOLON_ (_menhir_stack, _, ds, _startpos_ds_, _endpos_ds_) = _menhir_stack in
          let (_endpos__3_, _startpos__3_, _endpos_actor_, _startpos_actor_, actor) = (_endpos_1, _startpos_0, _endpos, _startpos, _v) in
          let _v = _menhir_action_060 _endpos__3_ _endpos_actor_ _endpos_ds_ _startpos__3_ _startpos_actor_ _startpos_ds_ actor ds in
          MenhirBox_parse_prog _v
      | _ ->
          _eRR ()
  
  let _menhir_run_178 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_actor_class_typ -> _ -> _ -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _endpos _tok ->
      let MenhirCell1_actor_class_typ (_menhir_stack, _, t) = _menhir_stack in
      let MenhirCell0_id_opt (_menhir_stack, _) = _menhir_stack in
      let MenhirCell0_SERVICE (_menhir_stack, _startpos__1_) = _menhir_stack in
      let _endpos__5_ = _endpos in
      let _v = _menhir_action_006 t in
      _menhir_goto_actor _menhir_stack _menhir_lexbuf _endpos__5_ _startpos__1_ _v _tok
  
  let _menhir_run_176 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_actor_typ -> _ -> _ -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _endpos _tok ->
      let MenhirCell1_actor_typ (_menhir_stack, _, tys, _startpos_tys_, _endpos_tys_) = _menhir_stack in
      let MenhirCell0_id_opt (_menhir_stack, _) = _menhir_stack in
      let MenhirCell0_SERVICE (_menhir_stack, _startpos__1_) = _menhir_stack in
      let _endpos__5_ = _endpos in
      let _v = _menhir_action_004 _endpos_tys_ _startpos_tys_ tys in
      _menhir_goto_actor _menhir_stack _menhir_lexbuf _endpos__5_ _startpos__1_ _v _tok
  
  let _menhir_run_170 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_ID -> _ -> _ -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _endpos _tok ->
      let MenhirCell1_ID (_menhir_stack, _, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let MenhirCell0_id_opt (_menhir_stack, _) = _menhir_stack in
      let MenhirCell0_SERVICE (_menhir_stack, _startpos__1_) = _menhir_stack in
      let _endpos__5_ = _endpos in
      let _v = _menhir_action_005 _endpos_id_ _startpos_id_ id in
      _menhir_goto_actor _menhir_stack _menhir_lexbuf _endpos__5_ _startpos__1_ _v _tok
  
  let _menhir_goto_option_SEMICOLON_ : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_prog) _menhir_state -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _endpos _menhir_s _tok ->
      match _menhir_s with
      | MenhirState177 ->
          _menhir_run_178 _menhir_stack _menhir_lexbuf _endpos _tok
      | MenhirState175 ->
          _menhir_run_176 _menhir_stack _menhir_lexbuf _endpos _tok
      | MenhirState168 ->
          _menhir_run_170 _menhir_stack _menhir_lexbuf _endpos _tok
      | _ ->
          _menhir_fail ()
  
  let _menhir_run_169 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_prog) _menhir_state -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos_x_, x) = (_endpos, ()) in
      let _ = _menhir_action_052 x in
      _menhir_goto_option_SEMICOLON_ _menhir_stack _menhir_lexbuf _endpos_x_ _menhir_s _tok
  
  let rec _menhir_run_207 : type  ttv_stack. (ttv_stack, _menhir_box_parse_tests) _menhir_cell1_test _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _endpos _v ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_test (_menhir_stack, _menhir_s, x, _startpos_x_, _) = _menhir_stack in
      let (_endpos_xs_, xs) = (_endpos, _v) in
      let _v = _menhir_action_089 x xs in
      _menhir_goto_seplist_test_SEMICOLON_ _menhir_stack _menhir_lexbuf _endpos_xs_ _startpos_x_ _v _menhir_s
  
  and _menhir_goto_seplist_test_SEMICOLON_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_tests) _menhir_state -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _endpos _startpos _v _menhir_s ->
      match _menhir_s with
      | MenhirState187 ->
          _menhir_run_208 _menhir_stack _menhir_lexbuf _endpos _startpos _v
      | MenhirState206 ->
          _menhir_run_207 _menhir_stack _menhir_lexbuf _endpos _v
      | _ ->
          _menhir_fail ()
  
  let _menhir_goto_actor_class_typ : type  ttv_stack. ((ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt as 'stack) -> _ -> _ -> _ -> _ -> ('stack, _menhir_box_parse_prog) _menhir_state -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_actor_class_typ (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          _menhir_run_169 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState177
      | EOF ->
          let _ = _menhir_action_051 () in
          _menhir_run_178 _menhir_stack _menhir_lexbuf _endpos _tok
      | _ ->
          _eRR ()
  
  let _menhir_run_175 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt as 'stack) -> _ -> _ -> _ -> _ -> _ -> ('stack, _menhir_box_parse_prog) _menhir_state -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_actor_typ (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          _menhir_run_169 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState175
      | EOF ->
          let _ = _menhir_action_051 () in
          _menhir_run_176 _menhir_stack _menhir_lexbuf _endpos _tok
      | _ ->
          _eRR ()
  
  let _menhir_run_174 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt, _menhir_box_parse_prog) _menhir_cell1_param_typs -> _ -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _tok ->
      let MenhirCell1_param_typs (_menhir_stack, _menhir_s, args, _startpos_args_) = _menhir_stack in
      let (_endpos_tys_, _startpos_tys_, tys) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_007 _endpos_tys_ _startpos_args_ _startpos_tys_ args tys in
      _menhir_goto_actor_class_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok
  
  let rec _menhir_run_076 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_TYPE (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | ID _v ->
          let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_ID (_menhir_stack, _v, _startpos, _endpos) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | EQ ->
              let _menhir_s = MenhirState078 in
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | VEC ->
                  _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | VARIANT ->
                  _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | SERVICE ->
                  _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | RECORD ->
                  _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | PRINCIPAL ->
                  _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | OPT ->
                  _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | ID _v ->
                  _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
              | FUNC ->
                  _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | BLOB ->
                  _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
              | _ ->
                  _eRR ())
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_079 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_VEC (_menhir_stack, _menhir_s, _startpos) in
      let _menhir_s = MenhirState079 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | VEC ->
          _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | VARIANT ->
          _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | SERVICE ->
          _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | RECORD ->
          _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | PRINCIPAL ->
          _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | OPT ->
          _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | ID _v ->
          _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | FUNC ->
          _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | BLOB ->
          _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_080 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_VARIANT (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LCURLY ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _menhir_stack = MenhirCell0_LCURLY (_menhir_stack, _startpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TEXT _v ->
              _menhir_run_082 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState081
          | NAT _v ->
              _menhir_run_150 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState081
          | ID _v ->
              _menhir_run_151 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState081
          | RCURLY ->
              let _v = _menhir_action_093 () in
              _menhir_run_156 _menhir_stack _menhir_lexbuf _menhir_lexer _v
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_082 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _menhir_stack = MenhirCell1_TEXT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          _menhir_run_083 _menhir_stack _menhir_lexbuf _menhir_lexer
      | RCURLY | SEMICOLON ->
          let (_endpos_s_, _startpos_s_, s) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_117 _endpos_s_ _startpos_s_ s in
          _menhir_goto_variant_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_083 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_TEXT -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _menhir_s = MenhirState083 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | VEC ->
          _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | VARIANT ->
          _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | SERVICE ->
          _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | RECORD ->
          _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | PRINCIPAL ->
          _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | OPT ->
          _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | ID _v ->
          _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | FUNC ->
          _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | BLOB ->
          _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_084 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_SERVICE (_menhir_stack, _menhir_s, _startpos) in
      let _menhir_s = MenhirState084 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LCURLY ->
          _menhir_run_085 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_085 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_LCURLY (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          _menhir_run_086 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState085
      | ID _v ->
          _menhir_run_139 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState085
      | RCURLY ->
          let _v = _menhir_action_078 () in
          _menhir_run_143 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _eRR ()
  
  and _menhir_run_086 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | LPAR ->
              let _menhir_stack = MenhirCell1_TEXT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
              _menhir_run_088 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState087
          | ID _v_0 ->
              let _startpos_1 = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos_2 = _menhir_lexbuf.Lexing.lex_curr_p in
              let _tok = _menhir_lexer _menhir_lexbuf in
              let (_endpos_id_, _startpos_id_, id, _endpos_s_, _startpos_s_, s) = (_endpos_2, _startpos_1, _v_0, _endpos, _startpos, _v) in
              let _v = _menhir_action_047 _endpos_id_ _endpos_s_ _startpos_id_ _startpos_s_ id s in
              _menhir_goto_meth_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_088 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_LPAR (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | VEC ->
          _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | VARIANT ->
          _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | TEXT _v ->
          _menhir_run_089 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState088
      | SERVICE ->
          _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | RECORD ->
          _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | PRINCIPAL ->
          _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | OPT ->
          _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | ID _v ->
          _menhir_run_128 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState088
      | FUNC ->
          _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | BLOB ->
          _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState088
      | RPAR ->
          let _v = _menhir_action_081 () in
          _menhir_run_131 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _eRR ()
  
  and _menhir_run_089 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _menhir_stack = MenhirCell1_TEXT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _menhir_s = MenhirState090 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | VARIANT ->
              _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | SERVICE ->
              _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | RECORD ->
              _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | PRINCIPAL ->
              _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | OPT ->
              _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | ID _v ->
              _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | FUNC ->
              _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | BLOB ->
              _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_091 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_RECORD (_menhir_stack, _menhir_s, _startpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LCURLY ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _menhir_stack = MenhirCell0_LCURLY (_menhir_stack, _startpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | VARIANT ->
              _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | TEXT _v ->
              _menhir_run_093 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState092
          | SERVICE ->
              _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | RECORD ->
              _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | PRINCIPAL ->
              _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | OPT ->
              _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | NAT _v ->
              _menhir_run_113 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState092
          | ID _v ->
              _menhir_run_116 _menhir_stack _menhir_lexbuf _menhir_lexer _v MenhirState092
          | FUNC ->
              _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | BLOB ->
              _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState092
          | RCURLY ->
              let _v = _menhir_action_084 () in
              _menhir_run_119 _menhir_stack _menhir_lexbuf _menhir_lexer _v
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_093 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _menhir_stack = MenhirCell1_TEXT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          _menhir_run_083 _menhir_stack _menhir_lexbuf _menhir_lexer
      | _ ->
          _eRR ()
  
  and _menhir_run_094 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos__1_, _startpos__1_) = (_endpos, _startpos) in
      let _v = _menhir_action_068 _endpos__1_ _startpos__1_ in
      _menhir_goto_ref_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos__1_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_goto_ref_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let (_endpos_t_, _startpos_t_, t) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_021 t in
      _menhir_goto_data_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_t_ _startpos_t_ _v _menhir_s _tok
  
  and _menhir_goto_data_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState078 ->
          _menhir_run_160 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState079 ->
          _menhir_run_159 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState083 ->
          _menhir_run_149 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState088 ->
          _menhir_run_136 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState134 ->
          _menhir_run_136 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState129 ->
          _menhir_run_130 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState090 ->
          _menhir_run_127 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState092 ->
          _menhir_run_125 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState122 ->
          _menhir_run_125 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState117 ->
          _menhir_run_118 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState114 ->
          _menhir_run_115 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState095 ->
          _menhir_run_111 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_160 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_TYPE _menhir_cell0_ID -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell0_ID (_menhir_stack, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let MenhirCell1_TYPE (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_023 _endpos_id_ _endpos_t_ _startpos__1_ _startpos_id_ id t in
      _menhir_goto_def _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_t_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_goto_def : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState185 ->
          _menhir_run_210 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState211 ->
          _menhir_run_182 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState183 ->
          _menhir_run_182 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState075 ->
          _menhir_run_182 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_210 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_tests) _menhir_state -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_def (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _endpos_0 = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TYPE ->
              _menhir_run_076 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState211
          | IMPORT ->
              _menhir_run_161 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState211
          | EOF | ID _ ->
              let _v_1 = _menhir_action_072 () in
              _menhir_run_212 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_0 _v_1 _tok
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_161 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let (_endpos_s_, _startpos_s_, s, _startpos__1_) = (_endpos, _startpos_0, _v, _startpos) in
          let _v = _menhir_action_024 _endpos_s_ _startpos__1_ _startpos_s_ s in
          _menhir_goto_def _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_s_ _startpos__1_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_212 : type  ttv_stack. (ttv_stack, _menhir_box_parse_tests) _menhir_cell1_def _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_def (_menhir_stack, _menhir_s, x, _startpos_x_, _) = _menhir_stack in
      let (_endpos_xs_, xs) = (_endpos, _v) in
      let _v = _menhir_action_026 x xs in
      _menhir_goto_endlist_def_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_xs_ _startpos_x_ _v _menhir_s _tok
  
  and _menhir_goto_endlist_def_SEMICOLON_ : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_tests) _menhir_state -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_endlist_def_SEMICOLON_ (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      match (_tok : MenhirBasics.token) with
      | ID _v_0 ->
          _menhir_run_188 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState187
      | EOF ->
          let _v_1 = _menhir_action_087 () in
          _menhir_run_208 _menhir_stack _menhir_lexbuf _endpos _endpos _v_1
      | _ ->
          _eRR ()
  
  and _menhir_run_188 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_tests) _menhir_state -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _menhir_stack = MenhirCell1_ID (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      let _menhir_s = MenhirState188 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          _menhir_run_189 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | BLOB ->
          _menhir_run_190 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_189 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_tests) _menhir_state -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos_s_, _startpos_s_, s) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_042 _endpos_s_ _startpos_s_ s in
      _menhir_goto_input _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_input : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_tests) _menhir_state -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState197 ->
          _menhir_run_198 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState193 ->
          _menhir_run_194 _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
      | MenhirState188 ->
          _menhir_run_192 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_198 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_cell1_input -> _ -> _ -> _ -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          let MenhirCell1_input (_menhir_stack, _menhir_s, i1) = _menhir_stack in
          let i2 = _v in
          let _v = _menhir_action_013 i1 i2 in
          _menhir_goto_assertion _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_goto_assertion : type  ttv_stack. ((ttv_stack, _menhir_box_parse_tests) _menhir_cell1_ID as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_parse_tests) _menhir_state -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_assertion (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | LPAR ->
          _menhir_run_088 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState201
      | _ ->
          _eRR ()
  
  and _menhir_run_194 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_cell1_input -> _ -> _ -> _ -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          let MenhirCell1_input (_menhir_stack, _menhir_s, i1) = _menhir_stack in
          let i2 = _v in
          let _v = _menhir_action_014 i1 i2 in
          _menhir_goto_assertion _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_192 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_tests) _menhir_cell1_ID as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_parse_tests) _menhir_state -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | NOTEQ ->
          let _menhir_stack = MenhirCell1_input (_menhir_stack, _menhir_s, _v) in
          let _menhir_s = MenhirState193 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TEXT _v ->
              _menhir_run_189 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | BLOB ->
              _menhir_run_190 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | NOTCOLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          let input = _v in
          let _v = _menhir_action_012 input in
          _menhir_goto_assertion _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | EQQ ->
          let _menhir_stack = MenhirCell1_input (_menhir_stack, _menhir_s, _v) in
          let _menhir_s = MenhirState197 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TEXT _v ->
              _menhir_run_189 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | BLOB ->
              _menhir_run_190 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | COLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          let input = _v in
          let _v = _menhir_action_011 input in
          _menhir_goto_assertion _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_190 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_parse_tests) _menhir_state -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TEXT _v ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          let text = _v in
          let _v = _menhir_action_043 text in
          _menhir_goto_input _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_182 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _menhir_stack = MenhirCell1_def (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          let _endpos_0 = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TYPE ->
              _menhir_run_076 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState183
          | IMPORT ->
              _menhir_run_161 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState183
          | EOF | ID _ | SERVICE ->
              let _v_1 = _menhir_action_072 () in
              _menhir_run_184 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_0 _v_1 _tok
          | _ ->
              _eRR ())
      | EOF | ID _ | SERVICE ->
          let (_endpos_x_, _startpos_x_, x) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_073 x in
          _menhir_goto_seplist_def_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_x_ _startpos_x_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_184 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_def _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_def (_menhir_stack, _menhir_s, x, _startpos_x_, _) = _menhir_stack in
      let (_endpos_xs_, xs) = (_endpos, _v) in
      let _v = _menhir_action_074 x xs in
      _menhir_goto_seplist_def_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_xs_ _startpos_x_ _v _menhir_s _tok
  
  and _menhir_goto_seplist_def_SEMICOLON_ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState211 ->
          _menhir_run_212 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState183 ->
          _menhir_run_184 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState075 ->
          _menhir_run_163 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_163 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, _menhir_box_parse_prog) _menhir_state -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_seplist_def_SEMICOLON_ (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      match (_tok : MenhirBasics.token) with
      | SERVICE ->
          let _startpos_0 = _menhir_lexbuf.Lexing.lex_start_p in
          let _menhir_stack = MenhirCell0_SERVICE (_menhir_stack, _startpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | ID _v_1 ->
              let _startpos_2 = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos_3 = _menhir_lexbuf.Lexing.lex_curr_p in
              let _tok = _menhir_lexer _menhir_lexbuf in
              let (_endpos_id_, _startpos_id_, id) = (_endpos_3, _startpos_2, _v_1) in
              let _v = _menhir_action_041 _endpos_id_ _startpos_id_ id in
              _menhir_goto_id_opt _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
          | COLON ->
              let _v = _menhir_action_040 () in
              _menhir_goto_id_opt _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
          | _ ->
              _eRR ())
      | EOF ->
          let _v = _menhir_action_003 () in
          _menhir_goto_actor _menhir_stack _menhir_lexbuf _endpos _endpos _v _tok
      | _ ->
          _eRR ()
  
  and _menhir_goto_id_opt : type  ttv_stack. (ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE -> _ -> _ -> _ -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let _menhir_stack = MenhirCell0_id_opt (_menhir_stack, _v) in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | LPAR ->
              _menhir_run_088 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState167
          | LCURLY ->
              _menhir_run_085 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState167
          | ID _v_0 ->
              let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
              let _menhir_stack = MenhirCell1_ID (_menhir_stack, MenhirState167, _v_0, _startpos, _endpos) in
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | SEMICOLON ->
                  _menhir_run_169 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState168
              | EOF ->
                  let _ = _menhir_action_051 () in
                  _menhir_run_170 _menhir_stack _menhir_lexbuf _endpos _tok
              | _ ->
                  _eRR ())
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_159 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_VEC -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_VEC (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_016 _endpos_t_ _startpos__1_ t in
      _menhir_goto_cons_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_t_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_goto_cons_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let (_endpos_t_, _startpos_t_, t) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_020 t in
      _menhir_goto_data_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_t_ _startpos_t_ _v _menhir_s _tok
  
  and _menhir_run_149 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_TEXT -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_TEXT (_menhir_stack, _menhir_s, s, _startpos_s_, _endpos_s_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_029 _endpos_s_ _endpos_t_ _startpos_s_ s t in
      _menhir_goto_field_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_field_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState081 ->
          _menhir_run_155 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState153 ->
          _menhir_run_155 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState092 ->
          _menhir_run_124 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState122 ->
          _menhir_run_124 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_155 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let f = _v in
      let _v = _menhir_action_115 f in
      _menhir_goto_variant_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_variant_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _menhir_stack = MenhirCell1_variant_typ (_menhir_stack, _menhir_s, _v) in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TEXT _v_0 ->
              _menhir_run_082 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState153
          | NAT _v_1 ->
              _menhir_run_150 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState153
          | ID _v_2 ->
              _menhir_run_151 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2 MenhirState153
          | RCURLY ->
              let _v_3 = _menhir_action_093 () in
              _menhir_run_154 _menhir_stack _menhir_lexbuf _menhir_lexer _v_3
          | _ ->
              _eRR ())
      | RCURLY ->
          let x = _v in
          let _v = _menhir_action_094 x in
          _menhir_goto_seplist_variant_typ_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_150 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _menhir_stack = MenhirCell1_NAT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          _menhir_run_114 _menhir_stack _menhir_lexbuf _menhir_lexer
      | RCURLY | SEMICOLON ->
          let (_endpos_n_, _startpos_n_, n) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_118 _endpos_n_ _startpos_n_ n in
          _menhir_goto_variant_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_114 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_NAT -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _menhir_s = MenhirState114 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | VEC ->
          _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | VARIANT ->
          _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | SERVICE ->
          _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | RECORD ->
          _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | PRINCIPAL ->
          _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | OPT ->
          _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | ID _v ->
          _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | FUNC ->
          _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | BLOB ->
          _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_095 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_OPT (_menhir_stack, _menhir_s, _startpos) in
      let _menhir_s = MenhirState095 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | VEC ->
          _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | VARIANT ->
          _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | SERVICE ->
          _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | RECORD ->
          _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | PRINCIPAL ->
          _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | OPT ->
          _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | ID _v ->
          _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | FUNC ->
          _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | BLOB ->
          _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_096 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos_id_, _startpos_id_, id) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_062 _endpos_id_ _startpos_id_ id in
      _menhir_goto_prim_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos_id_ _v _menhir_s _tok
  
  and _menhir_goto_prim_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let (_endpos_t_, _startpos_t_, t) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_022 t in
      _menhir_goto_data_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_t_ _startpos_t_ _v _menhir_s _tok
  
  and _menhir_run_097 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _menhir_stack = MenhirCell1_FUNC (_menhir_stack, _menhir_s, _startpos) in
      let _menhir_s = MenhirState097 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | LPAR ->
          _menhir_run_088 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_108 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos__1_, _startpos__1_) = (_endpos, _startpos) in
      let _v = _menhir_action_019 _endpos__1_ _startpos__1_ in
      _menhir_goto_cons_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos__1_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_151 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _menhir_stack = MenhirCell1_ID (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          _menhir_run_117 _menhir_stack _menhir_lexbuf _menhir_lexer
      | RCURLY | SEMICOLON ->
          let (_endpos_id_, _startpos_id_, id) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_116 _endpos_id_ _startpos_id_ id in
          _menhir_goto_variant_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_117 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_ID -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _menhir_s = MenhirState117 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | VEC ->
          _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | VARIANT ->
          _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | SERVICE ->
          _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | RECORD ->
          _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | PRINCIPAL ->
          _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | OPT ->
          _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | ID _v ->
          _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | FUNC ->
          _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | BLOB ->
          _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_154 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_variant_typ _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_variant_typ (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_095 x xs in
      _menhir_goto_seplist_variant_typ_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_seplist_variant_typ_SEMICOLON_ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState081 ->
          _menhir_run_156 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState153 ->
          _menhir_run_154 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_156 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_VARIANT _menhir_cell0_LCURLY -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell0_LCURLY (_menhir_stack, _) = _menhir_stack in
      let (_endpos__3_, fs) = (_endpos, _v) in
      let _v = _menhir_action_119 fs in
      let _endpos = _endpos__3_ in
      let MenhirCell1_VARIANT (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_fs_, fs) = (_endpos, _v) in
      let _v = _menhir_action_018 _endpos_fs_ _startpos__1_ fs in
      _menhir_goto_cons_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_fs_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_124 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let f = _v in
      let _v = _menhir_action_063 f in
      _menhir_goto_record_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_record_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _menhir_stack = MenhirCell1_record_typ (_menhir_stack, _menhir_s, _v) in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | VARIANT ->
              _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | TEXT _v_0 ->
              _menhir_run_093 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState122
          | SERVICE ->
              _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | RECORD ->
              _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | PRINCIPAL ->
              _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | OPT ->
              _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | NAT _v_1 ->
              _menhir_run_113 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState122
          | ID _v_2 ->
              _menhir_run_116 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2 MenhirState122
          | FUNC ->
              _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | BLOB ->
              _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState122
          | RCURLY ->
              let _v_3 = _menhir_action_084 () in
              _menhir_run_123 _menhir_stack _menhir_lexbuf _menhir_lexer _v_3
          | _ ->
              _eRR ())
      | RCURLY ->
          let x = _v in
          let _v = _menhir_action_085 x in
          _menhir_goto_seplist_record_typ_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_113 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _menhir_stack = MenhirCell1_NAT (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          _menhir_run_114 _menhir_stack _menhir_lexbuf _menhir_lexer
      | _ ->
          _eRR ()
  
  and _menhir_run_116 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _menhir_stack = MenhirCell1_ID (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          _menhir_run_117 _menhir_stack _menhir_lexbuf _menhir_lexer
      | RCURLY | SEMICOLON ->
          let (_endpos_id_, _startpos_id_, id) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_062 _endpos_id_ _startpos_id_ id in
          _menhir_goto_prim_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos_id_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_123 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_record_typ _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_record_typ (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_086 x xs in
      _menhir_goto_seplist_record_typ_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_seplist_record_typ_SEMICOLON_ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState122 ->
          _menhir_run_123 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState092 ->
          _menhir_run_119 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_119 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_RECORD _menhir_cell0_LCURLY -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell0_LCURLY (_menhir_stack, _) = _menhir_stack in
      let (_endpos__3_, fs) = (_endpos, _v) in
      let _v = _menhir_action_065 fs in
      let _endpos = _endpos__3_ in
      let MenhirCell1_RECORD (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_fs_, fs) = (_endpos, _v) in
      let _v = _menhir_action_017 _endpos_fs_ _startpos__1_ fs in
      _menhir_goto_cons_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_fs_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_136 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      let t = _v in
      let _v = _menhir_action_055 t in
      _menhir_goto_param_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_param_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | COMMA ->
          let _menhir_stack = MenhirCell1_param_typ (_menhir_stack, _menhir_s, _v) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | VARIANT ->
              _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | TEXT _v_0 ->
              _menhir_run_089 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState134
          | SERVICE ->
              _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | RECORD ->
              _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | PRINCIPAL ->
              _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | OPT ->
              _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | ID _v_1 ->
              _menhir_run_128 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState134
          | FUNC ->
              _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | BLOB ->
              _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState134
          | RPAR ->
              let _v_2 = _menhir_action_081 () in
              _menhir_run_135 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2
          | _ ->
              _eRR ())
      | RPAR ->
          let x = _v in
          let _v = _menhir_action_082 x in
          _menhir_goto_seplist_param_typ_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_128 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _menhir_stack = MenhirCell1_ID (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          let _menhir_s = MenhirState129 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | VEC ->
              _menhir_run_079 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | VARIANT ->
              _menhir_run_080 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | SERVICE ->
              _menhir_run_084 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | RECORD ->
              _menhir_run_091 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | PRINCIPAL ->
              _menhir_run_094 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | OPT ->
              _menhir_run_095 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | ID _v ->
              _menhir_run_096 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
          | FUNC ->
              _menhir_run_097 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | BLOB ->
              _menhir_run_108 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | COMMA | RPAR ->
          let (_endpos_id_, _startpos_id_, id) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_062 _endpos_id_ _startpos_id_ id in
          _menhir_goto_prim_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_id_ _startpos_id_ _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_135 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_param_typ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell1_param_typ (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_083 x xs in
      _menhir_goto_seplist_param_typ_COMMA_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_seplist_param_typ_COMMA_ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState134 ->
          _menhir_run_135 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState088 ->
          _menhir_run_131 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_131 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_LPAR -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell1_LPAR (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let fs = _v in
      let _v = _menhir_action_058 fs in
      _menhir_goto_param_typs _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos__1_ _v _menhir_s _tok
  
  and _menhir_goto_param_typs : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState201 ->
          _menhir_run_202 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState167 ->
          _menhir_run_171 _menhir_stack _menhir_lexbuf _menhir_lexer _startpos _v _menhir_s _tok
      | MenhirState099 ->
          _menhir_run_100 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState140 ->
          _menhir_run_098 _menhir_stack _menhir_lexbuf _menhir_lexer _startpos _v _menhir_s _tok
      | MenhirState087 ->
          _menhir_run_098 _menhir_stack _menhir_lexbuf _menhir_lexer _startpos _v _menhir_s _tok
      | MenhirState097 ->
          _menhir_run_098 _menhir_stack _menhir_lexbuf _menhir_lexer _startpos _v _menhir_s _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_202 : type  ttv_stack. (((ttv_stack, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_cell1_assertion as 'stack) -> _ -> _ -> _ -> _ -> _ -> ('stack, _menhir_box_parse_tests) _menhir_state -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_param_typs (_menhir_stack, _menhir_s, _v, _startpos) in
      match (_tok : MenhirBasics.token) with
      | TEXT _v_0 ->
          let _startpos_1 = _menhir_lexbuf.Lexing.lex_start_p in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _tok = _menhir_lexer _menhir_lexbuf in
          let (_endpos_s_, _startpos_s_, s) = (_endpos, _startpos_1, _v_0) in
          let _v = _menhir_action_054 _endpos_s_ _startpos_s_ s in
          _menhir_goto_option_text_ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_s_ _v _tok
      | EOF | SEMICOLON ->
          let _v = _menhir_action_053 () in
          _menhir_goto_option_text_ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | _ ->
          _eRR ()
  
  and _menhir_goto_option_text_ : type  ttv_stack. (((ttv_stack, _menhir_box_parse_tests) _menhir_cell1_ID, _menhir_box_parse_tests) _menhir_cell1_assertion, _menhir_box_parse_tests) _menhir_cell1_param_typs -> _ -> _ -> _ -> _ -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_param_typs (_menhir_stack, _, tys, _) = _menhir_stack in
      let MenhirCell1_assertion (_menhir_stack, _, assertion) = _menhir_stack in
      let MenhirCell1_ID (_menhir_stack, _menhir_s, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let (_endpos_desc_, desc) = (_endpos, _v) in
      let _v = _menhir_action_098 _endpos_desc_ _endpos_id_ _startpos_id_ assertion desc id tys in
      let (_endpos, _startpos) = (_endpos_desc_, _startpos_id_) in
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _menhir_stack = MenhirCell1_test (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
          let _endpos_0 = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos_0) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | ID _v_1 ->
              _menhir_run_188 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState206
          | EOF ->
              let _v_2 = _menhir_action_087 () in
              _menhir_run_207 _menhir_stack _menhir_lexbuf _endpos_0 _v_2
          | _ ->
              _eRR ())
      | EOF ->
          let (_endpos_x_, _startpos_x_, x) = (_endpos, _startpos, _v) in
          let _v = _menhir_action_088 x in
          _menhir_goto_seplist_test_SEMICOLON_ _menhir_stack _menhir_lexbuf _endpos_x_ _startpos_x_ _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_171 : type  ttv_stack. ((ttv_stack, _menhir_box_parse_prog) _menhir_cell1_seplist_def_SEMICOLON_ _menhir_cell0_SERVICE _menhir_cell0_id_opt as 'stack) -> _ -> _ -> _ -> _ -> ('stack, _menhir_box_parse_prog) _menhir_state -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _startpos _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | ARROW ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | LCURLY ->
              let _menhir_stack = MenhirCell1_param_typs (_menhir_stack, _menhir_s, _v, _startpos) in
              _menhir_run_085 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState172
          | ID _v_0 ->
              let _startpos_1 = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
              let _tok = _menhir_lexer _menhir_lexbuf in
              let (_endpos_id_, _startpos_id_, id, _startpos_args_, args) = (_endpos, _startpos_1, _v_0, _startpos, _v) in
              let _v = _menhir_action_008 _endpos_id_ _startpos_args_ _startpos_id_ args id in
              _menhir_goto_actor_class_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_100 : type  ttv_stack ttv_result. ((ttv_stack, ttv_result) _menhir_cell1_param_typs as 'stack) -> _ -> _ -> _ -> _ -> _ -> ('stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_param_typs (_menhir_stack, _menhir_s, _v, _startpos) in
      match (_tok : MenhirBasics.token) with
      | QUERY ->
          _menhir_run_101 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState100
      | ONEWAY ->
          _menhir_run_102 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState100
      | COMPOSITE_QUERY ->
          _menhir_run_103 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState100
      | COMMA | EOF | ID _ | RCURLY | RPAR | SEMICOLON | SERVICE ->
          let _v_0 = _menhir_action_037 () in
          _menhir_run_104 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v_0 _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_101 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos__1_, _startpos__1_) = (_endpos, _startpos) in
      let _v = _menhir_action_035 _endpos__1_ _startpos__1_ in
      _menhir_goto_func_mode _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok
  
  and _menhir_goto_func_mode : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_func_mode (_menhir_stack, _menhir_s, _v) in
      match (_tok : MenhirBasics.token) with
      | QUERY ->
          _menhir_run_101 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState105
      | ONEWAY ->
          _menhir_run_102 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState105
      | COMPOSITE_QUERY ->
          _menhir_run_103 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState105
      | COMMA | EOF | ID _ | RCURLY | RPAR | SEMICOLON | SERVICE ->
          let _v_0 = _menhir_action_037 () in
          _menhir_run_106 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v_0 _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_102 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos__1_, _startpos__1_) = (_endpos, _startpos) in
      let _v = _menhir_action_034 _endpos__1_ _startpos__1_ in
      _menhir_goto_func_mode _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok
  
  and _menhir_run_103 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let (_endpos__1_, _startpos__1_) = (_endpos, _startpos) in
      let _v = _menhir_action_036 _endpos__1_ _startpos__1_ in
      _menhir_goto_func_mode _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok
  
  and _menhir_run_106 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_func_mode -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_func_mode (_menhir_stack, _menhir_s, m) = _menhir_stack in
      let (_endpos_ms_, ms) = (_endpos, _v) in
      let _v = _menhir_action_038 m ms in
      _menhir_goto_func_modes_opt _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_ms_ _v _menhir_s _tok
  
  and _menhir_goto_func_modes_opt : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState105 ->
          _menhir_run_106 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState100 ->
          _menhir_run_104 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_104 : type  ttv_stack ttv_result. ((ttv_stack, ttv_result) _menhir_cell1_param_typs, ttv_result) _menhir_cell1_param_typs -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_param_typs (_menhir_stack, _, t2, _) = _menhir_stack in
      let MenhirCell1_param_typs (_menhir_stack, _menhir_s, t1, _startpos_t1_) = _menhir_stack in
      let (_endpos_ms_, ms) = (_endpos, _v) in
      let _v = _menhir_action_039 _endpos_ms_ _startpos_t1_ ms t1 t2 in
      _menhir_goto_func_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_ms_ _v _menhir_s _tok
  
  and _menhir_goto_func_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState140 ->
          _menhir_run_142 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState087 ->
          _menhir_run_138 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | MenhirState097 ->
          _menhir_run_107 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_142 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_ID -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_ID (_menhir_stack, _menhir_s, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_044 _endpos_id_ _endpos_t_ _startpos_id_ id t in
      _menhir_goto_meth_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_goto_meth_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | SEMICOLON ->
          let _menhir_stack = MenhirCell1_meth_typ (_menhir_stack, _menhir_s, _v) in
          let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
          let _menhir_stack = MenhirCell0_SEMICOLON (_menhir_stack, _endpos) in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | TEXT _v_0 ->
              _menhir_run_086 _menhir_stack _menhir_lexbuf _menhir_lexer _v_0 MenhirState146
          | ID _v_1 ->
              _menhir_run_139 _menhir_stack _menhir_lexbuf _menhir_lexer _v_1 MenhirState146
          | RCURLY ->
              let _v_2 = _menhir_action_078 () in
              _menhir_run_147 _menhir_stack _menhir_lexbuf _menhir_lexer _v_2
          | _ ->
              _eRR ())
      | RCURLY ->
          let x = _v in
          let _v = _menhir_action_079 x in
          _menhir_goto_seplist_meth_typ_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_139 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _startpos = _menhir_lexbuf.Lexing.lex_start_p in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | COLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | LPAR ->
              let _menhir_stack = MenhirCell1_ID (_menhir_stack, _menhir_s, _v, _startpos, _endpos) in
              _menhir_run_088 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState140
          | ID _v_0 ->
              let _startpos_1 = _menhir_lexbuf.Lexing.lex_start_p in
              let _endpos_2 = _menhir_lexbuf.Lexing.lex_curr_p in
              let _tok = _menhir_lexer _menhir_lexbuf in
              let (_endpos_id_, _startpos_id_, id, _endpos_id_inlined1_, _startpos_id_inlined1_, id_inlined1) = (_endpos_2, _startpos_1, _v_0, _endpos, _startpos, _v) in
              let _v = _menhir_action_046 _endpos_id_ _endpos_id_inlined1_ _startpos_id_ _startpos_id_inlined1_ id id_inlined1 in
              _menhir_goto_meth_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_147 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_meth_typ _menhir_cell0_SEMICOLON -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let MenhirCell0_SEMICOLON (_menhir_stack, _) = _menhir_stack in
      let MenhirCell1_meth_typ (_menhir_stack, _menhir_s, x) = _menhir_stack in
      let xs = _v in
      let _v = _menhir_action_080 x xs in
      _menhir_goto_seplist_meth_typ_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
  
  and _menhir_goto_seplist_meth_typ_SEMICOLON_ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      match _menhir_s with
      | MenhirState146 ->
          _menhir_run_147 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | MenhirState085 ->
          _menhir_run_143 _menhir_stack _menhir_lexbuf _menhir_lexer _v
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_143 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_LCURLY -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      let MenhirCell1_LCURLY (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos__3_, ds) = (_endpos, _v) in
      let _v = _menhir_action_009 ds in
      _menhir_goto_actor_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos__3_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_goto_actor_typ : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState167 ->
          _menhir_run_175 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok
      | MenhirState172 ->
          _menhir_run_174 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _tok
      | MenhirState084 ->
          _menhir_run_148 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok
      | _ ->
          _menhir_fail ()
  
  and _menhir_run_148 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_SERVICE -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_SERVICE (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_ts_, ts) = (_endpos, _v) in
      let _v = _menhir_action_067 _endpos_ts_ _startpos__1_ ts in
      _menhir_goto_ref_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_ts_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_138 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_TEXT -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_TEXT (_menhir_stack, _menhir_s, s, _startpos_s_, _endpos_s_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_045 _endpos_s_ _endpos_t_ _startpos_s_ s t in
      _menhir_goto_meth_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_107 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_FUNC -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_FUNC (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_066 t in
      _menhir_goto_ref_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_t_ _startpos__1_ _v _menhir_s _tok
  
  and _menhir_run_098 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _startpos _v _menhir_s _tok ->
      let _menhir_stack = MenhirCell1_param_typs (_menhir_stack, _menhir_s, _v, _startpos) in
      match (_tok : MenhirBasics.token) with
      | ARROW ->
          let _menhir_s = MenhirState099 in
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | LPAR ->
              _menhir_run_088 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_run_130 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_ID -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_ID (_menhir_stack, _menhir_s, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let t = _v in
      let _v = _menhir_action_056 _endpos_id_ _startpos_id_ id t in
      _menhir_goto_param_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_127 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_TEXT -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
      let MenhirCell1_TEXT (_menhir_stack, _menhir_s, s, _startpos_s_, _endpos_s_) = _menhir_stack in
      let t = _v in
      let _v = _menhir_action_057 _endpos_s_ _startpos_s_ s t in
      _menhir_goto_param_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_125 : type  ttv_stack ttv_result. ttv_stack -> _ -> _ -> _ -> _ -> _ -> (ttv_stack, ttv_result) _menhir_state -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _startpos _v _menhir_s _tok ->
      let (_endpos_t_, _startpos_t_, t) = (_endpos, _startpos, _v) in
      let _v = _menhir_action_064 _endpos_t_ _startpos_t_ t in
      _menhir_goto_record_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_118 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_ID -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_ID (_menhir_stack, _menhir_s, id, _startpos_id_, _endpos_id_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_028 _endpos_id_ _endpos_t_ _startpos_id_ id t in
      _menhir_goto_field_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_115 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_NAT -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_NAT (_menhir_stack, _menhir_s, n, _startpos_n_, _endpos_n_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_027 _endpos_n_ _endpos_t_ _startpos_n_ n t in
      _menhir_goto_field_typ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_111 : type  ttv_stack ttv_result. (ttv_stack, ttv_result) _menhir_cell1_OPT -> _ -> _ -> _ -> _ -> _ -> ttv_result =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _v _tok ->
      let MenhirCell1_OPT (_menhir_stack, _menhir_s, _startpos__1_) = _menhir_stack in
      let (_endpos_t_, t) = (_endpos, _v) in
      let _v = _menhir_action_015 _endpos_t_ _startpos__1_ t in
      _menhir_goto_cons_typ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos_t_ _startpos__1_ _v _menhir_s _tok
  
  let _menhir_run_075 : type  ttv_stack. ttv_stack -> _ -> _ -> _menhir_box_parse_prog =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TYPE ->
          _menhir_run_076 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState075
      | IMPORT ->
          _menhir_run_161 _menhir_stack _menhir_lexbuf _menhir_lexer MenhirState075
      | EOF | SERVICE ->
          let _v = _menhir_action_072 () in
          _menhir_run_163 _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _endpos _v MenhirState075 _tok
      | _ ->
          _eRR ()
  
  let _menhir_run_185 : type  ttv_stack. ttv_stack -> _ -> _ -> _menhir_box_parse_tests =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _menhir_s = MenhirState185 in
      let _endpos = _menhir_lexbuf.Lexing.lex_curr_p in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | TYPE ->
          _menhir_run_076 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | IMPORT ->
          _menhir_run_161 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | EOF | ID _ ->
          let _v = _menhir_action_025 () in
          _menhir_goto_endlist_def_SEMICOLON_ _menhir_stack _menhir_lexbuf _menhir_lexer _endpos _endpos _v _menhir_s _tok
      | _ ->
          _eRR ()
  
end

let parse_tests =
  fun _menhir_lexer _menhir_lexbuf ->
    let _menhir_stack = () in
    let MenhirBox_parse_tests v = _menhir_run_185 _menhir_stack _menhir_lexbuf _menhir_lexer in
    v

let parse_prog =
  fun _menhir_lexer _menhir_lexbuf ->
    let _menhir_stack = () in
    let MenhirBox_parse_prog v = _menhir_run_075 _menhir_stack _menhir_lexbuf _menhir_lexer in
    v

let parse_args =
  fun _menhir_lexer _menhir_lexbuf ->
    let _menhir_stack = () in
    let MenhirBox_parse_args v = _menhir_run_000 _menhir_stack _menhir_lexbuf _menhir_lexer in
    v

# 292 "idllib/parser.mly"
  

# 5055 "idllib/parser.ml"