aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1parser/asn1p_y.c
blob: b5c625626716b73e1e348629f7da5f26f9c45291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
/*  A Bison parser, made from asn1p_y.y
    by GNU Bison version 1.28  */

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

#define yyparse asn1p_parse
#define yylex asn1p_lex
#define yyerror asn1p_error
#define yylval asn1p_lval
#define yychar asn1p_char
#define yydebug asn1p_debug
#define yynerrs asn1p_nerrs
#define	TOK_PPEQ	257
#define	TOK_opaque	258
#define	TOK_bstring	259
#define	TOK_cstring	260
#define	TOK_hstring	261
#define	TOK_identifier	262
#define	TOK_number	263
#define	TOK_tuple	264
#define	TOK_quadruple	265
#define	TOK_number_negative	266
#define	TOK_typereference	267
#define	TOK_capitalreference	268
#define	TOK_typefieldreference	269
#define	TOK_valuefieldreference	270
#define	TOK_Literal	271
#define	TOK_ABSENT	272
#define	TOK_ABSTRACT_SYNTAX	273
#define	TOK_ALL	274
#define	TOK_ANY	275
#define	TOK_APPLICATION	276
#define	TOK_AUTOMATIC	277
#define	TOK_BEGIN	278
#define	TOK_BIT	279
#define	TOK_BMPString	280
#define	TOK_BOOLEAN	281
#define	TOK_BY	282
#define	TOK_CHARACTER	283
#define	TOK_CHOICE	284
#define	TOK_CLASS	285
#define	TOK_COMPONENT	286
#define	TOK_COMPONENTS	287
#define	TOK_CONSTRAINED	288
#define	TOK_CONTAINING	289
#define	TOK_DEFAULT	290
#define	TOK_DEFINITIONS	291
#define	TOK_DEFINED	292
#define	TOK_EMBEDDED	293
#define	TOK_ENCODED	294
#define	TOK_ENCODING_CONTROL	295
#define	TOK_END	296
#define	TOK_ENUMERATED	297
#define	TOK_EXPLICIT	298
#define	TOK_EXPORTS	299
#define	TOK_EXTENSIBILITY	300
#define	TOK_EXTERNAL	301
#define	TOK_FALSE	302
#define	TOK_FROM	303
#define	TOK_GeneralizedTime	304
#define	TOK_GeneralString	305
#define	TOK_GraphicString	306
#define	TOK_IA5String	307
#define	TOK_IDENTIFIER	308
#define	TOK_IMPLICIT	309
#define	TOK_IMPLIED	310
#define	TOK_IMPORTS	311
#define	TOK_INCLUDES	312
#define	TOK_INSTANCE	313
#define	TOK_INSTRUCTIONS	314
#define	TOK_INTEGER	315
#define	TOK_ISO646String	316
#define	TOK_MAX	317
#define	TOK_MIN	318
#define	TOK_MINUS_INFINITY	319
#define	TOK_NULL	320
#define	TOK_NumericString	321
#define	TOK_OBJECT	322
#define	TOK_ObjectDescriptor	323
#define	TOK_OCTET	324
#define	TOK_OF	325
#define	TOK_OPTIONAL	326
#define	TOK_PATTERN	327
#define	TOK_PDV	328
#define	TOK_PLUS_INFINITY	329
#define	TOK_PRESENT	330
#define	TOK_PrintableString	331
#define	TOK_PRIVATE	332
#define	TOK_REAL	333
#define	TOK_RELATIVE_OID	334
#define	TOK_SEQUENCE	335
#define	TOK_SET	336
#define	TOK_SIZE	337
#define	TOK_STRING	338
#define	TOK_SYNTAX	339
#define	TOK_T61String	340
#define	TOK_TAGS	341
#define	TOK_TeletexString	342
#define	TOK_TRUE	343
#define	TOK_TYPE_IDENTIFIER	344
#define	TOK_UNIQUE	345
#define	TOK_UNIVERSAL	346
#define	TOK_UniversalString	347
#define	TOK_UTCTime	348
#define	TOK_UTF8String	349
#define	TOK_VideotexString	350
#define	TOK_VisibleString	351
#define	TOK_WITH	352
#define	TOK_EXCEPT	353
#define	TOK_INTERSECTION	354
#define	TOK_UNION	355
#define	TOK_TwoDots	356
#define	TOK_ThreeDots	357

#line 1 "asn1p_y.y"


#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <assert.h>

#include "asn1parser.h"

#define YYPARSE_PARAM	param
#define YYPARSE_PARAM_TYPE	void **
#define YYERROR_VERBOSE

int yylex(void);
int yyerror(const char *msg);
#ifdef	YYBYACC
int yyparse(void **param);	/* byacc does not produce a prototype */
#endif
void asn1p_lexer_hack_push_opaque_state(void);
void asn1p_lexer_hack_enable_with_syntax(void);
void asn1p_lexer_hack_push_encoding_control(void);
#define	yylineno	asn1p_lineno
extern int asn1p_lineno;

/*
 * Process directives as <ASN1C:RepresentAsPointer>
 */
extern int asn1p_as_pointer;

/*
 * This temporary variable is used to solve the shortcomings of 1-lookahead
 * parser.
 */
static struct AssignedIdentifier *saved_aid;

static asn1p_value_t *_convert_bitstring2binary(char *str, int base);
static void _fixup_anonymous_identifier(asn1p_expr_t *expr);

#define	checkmem(ptr)	do {						\
		if(!(ptr))						\
		return yyerror("Memory failure");			\
	} while(0)

#define	CONSTRAINT_INSERT(root, constr_type, arg1, arg2) do {		\
		if(arg1->type != constr_type) {				\
			int __ret;					\
			root = asn1p_constraint_new(yylineno);		\
			checkmem(root);					\
			root->type = constr_type;			\
			__ret = asn1p_constraint_insert(root,		\
				arg1);					\
			checkmem(__ret == 0);				\
		} else {						\
			root = arg1;					\
		}							\
		if(arg2) {						\
			int __ret					\
			= asn1p_constraint_insert(root, arg2);		\
			checkmem(__ret == 0);				\
		}							\
	} while(0)


#line 72 "asn1p_y.y"
typedef union {
	asn1p_t			*a_grammar;
	asn1p_module_flags_e	 a_module_flags;
	asn1p_module_t		*a_module;
	asn1p_expr_type_e	 a_type;	/* ASN.1 Type */
	asn1p_expr_t		*a_expr;	/* Constructed collection */
	asn1p_constraint_t	*a_constr;	/* Constraint */
	enum asn1p_constraint_type_e	a_ctype;/* Constraint type */
	asn1p_xports_t		*a_xports;	/* IMports/EXports */
	struct AssignedIdentifier a_aid;	/* Assigned Identifier */
	asn1p_oid_t		*a_oid;		/* Object Identifier */
	asn1p_oid_arc_t		 a_oid_arc;	/* Single OID's arc */
	struct asn1p_type_tag_s	 a_tag;		/* A tag */
	asn1p_ref_t		*a_ref;		/* Reference to custom type */
	asn1p_wsyntx_t		*a_wsynt;	/* WITH SYNTAX contents */
	asn1p_wsyntx_chunk_t	*a_wchunk;	/* WITH SYNTAX chunk */
	struct asn1p_ref_component_s a_refcomp;	/* Component of a reference */
	asn1p_value_t		*a_value;	/* Number, DefinedValue, etc */
	struct asn1p_param_s	 a_parg;	/* A parameter argument */
	asn1p_paramlist_t	*a_plist;	/* A pargs list */
	struct asn1p_expr_marker_s a_marker;	/* OPTIONAL/DEFAULT */
	enum asn1p_constr_pres_e a_pres;	/* PRESENT/ABSENT/OPTIONAL */
	asn1c_integer_t		 a_int;
	char	*tv_str;
	struct {
		char *buf;
		int len;
	}	tv_opaque;
	struct {
		char *name;
		struct asn1p_type_tag_s tag;
	} tv_nametag;
} YYSTYPE;
#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		446
#define	YYFLAG		-32768
#define	YYNTBASE	119

#define YYTRANSLATE(x) ((unsigned)(x) <= 357 ? yytranslate[x] : 226)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,   115,     2,     2,     2,     2,     2,     2,   108,
   109,     2,     2,   111,     2,   116,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,   112,   110,   117,
     2,     2,     2,   118,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
   113,     2,   114,   100,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,   106,   102,   107,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     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,   101,   103,   104,   105
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     2,     4,     7,    16,    17,    19,    23,    26,    28,
    31,    33,    38,    40,    41,    43,    45,    48,    51,    54,
    57,    60,    63,    64,    66,    68,    71,    73,    75,    77,
    79,    81,    82,    86,    88,    92,    95,    97,   100,   101,
   103,   108,   110,   114,   116,   120,   122,   126,   130,   133,
   135,   139,   141,   145,   147,   148,   155,   157,   159,   163,
   167,   174,   176,   180,   182,   186,   190,   194,   196,   200,
   202,   204,   205,   207,   209,   213,   217,   220,   224,   226,
   228,   232,   235,   237,   239,   245,   246,   248,   250,   254,
   257,   262,   266,   270,   274,   278,   282,   283,   285,   286,
   293,   295,   298,   300,   302,   304,   308,   310,   314,   318,
   322,   323,   326,   328,   333,   338,   343,   350,   357,   359,
   364,   369,   371,   375,   377,   381,   385,   389,   391,   395,
   397,   401,   403,   405,   407,   409,   411,   415,   419,   421,
   426,   430,   431,   435,   437,   439,   441,   443,   445,   447,
   449,   451,   453,   457,   459,   461,   463,   465,   468,   470,
   472,   474,   476,   479,   482,   484,   486,   489,   492,   494,
   496,   498,   500,   502,   505,   507,   510,   512,   514,   516,
   518,   520,   522,   524,   526,   528,   530,   532,   534,   536,
   538,   540,   542,   544,   546,   548,   549,   551,   553,   558,
   562,   567,   569,   573,   579,   581,   585,   589,   593,   597,
   602,   606,   608,   610,   614,   618,   622,   626,   628,   630,
   631,   637,   639,   642,   645,   649,   651,   653,   655,   657,
   659,   661,   663,   665,   669,   675,   677,   681,   683,   687,
   688,   690,   692,   694,   696,   698,   700,   704,   709,   711,
   715,   718,   722,   724,   728,   729,   731,   733,   736,   739,
   743,   745,   749,   751,   756,   761,   763,   765,   767,   769,
   770,   772,   775,   780,   781,   783,   785,   787,   788,   790,
   792,   794,   796,   798,   799,   801
};

static const short yyrhs[] = {   120,
     0,   121,     0,   120,   121,     0,   222,   122,    37,   126,
     3,    24,   129,    42,     0,     0,   123,     0,   106,   124,
   107,     0,   106,   107,     0,   125,     0,   124,   125,     0,
   225,     0,   225,   108,     9,   109,     0,     9,     0,     0,
   127,     0,   128,     0,   127,   128,     0,    44,    87,     0,
    55,    87,     0,    23,    87,     0,    46,    56,     0,    14,
    60,     0,     0,   130,     0,   131,     0,   130,   131,     0,
   133,     0,   139,     0,   145,     0,   176,     0,   142,     0,
     0,    41,    14,   132,     0,   185,     0,    57,   134,   110,
     0,    57,    49,     0,   136,     0,   134,   136,     0,     0,
   123,     0,   137,    49,   222,   135,     0,   138,     0,   137,
   111,   138,     0,   222,     0,   222,   106,   107,     0,   225,
     0,    45,   140,   110,     0,    45,    20,   110,     0,    45,
   110,     0,   141,     0,   140,   111,   141,     0,   222,     0,
   222,   106,   107,     0,   225,     0,     0,   222,   144,     3,
   106,   143,   181,     0,   169,     0,   182,     0,   222,     3,
   165,     0,   222,     3,   155,     0,   222,   106,   146,   107,
     3,   165,     0,   147,     0,   146,   111,   147,     0,   222,
     0,   222,   112,   225,     0,   222,   112,   222,     0,   182,
   112,   225,     0,   149,     0,   148,   111,   149,     0,   165,
     0,   225,     0,     0,   151,     0,   152,     0,   151,   111,
   152,     0,   225,   165,   211,     0,   165,   211,     0,    33,
    71,   165,     0,   164,     0,   154,     0,   153,   111,   154,
     0,   225,   165,     0,   164,     0,   165,     0,    31,   106,
   157,   107,   159,     0,     0,    91,     0,   158,     0,   157,
   111,   158,     0,    15,   211,     0,    16,   165,   156,   211,
     0,    16,   174,   211,     0,    16,   175,   211,     0,    15,
   174,   211,     0,    15,   165,   211,     0,    15,   175,   211,
     0,     0,   160,     0,     0,    98,    85,   106,   161,   162,
   107,     0,   163,     0,   162,   163,     0,     4,     0,    17,
     0,   172,     0,   113,   162,   114,     0,   105,     0,   105,
   115,   179,     0,   105,   115,   216,     0,   217,   167,   189,
     0,     0,   166,   168,     0,   184,     0,    30,   106,   153,
   107,     0,    81,   106,   150,   107,     0,    82,   106,   150,
   107,     0,    81,   189,    71,   224,   217,   167,     0,    82,
   189,    71,   224,   217,   167,     0,    21,     0,    21,    38,
    28,   225,     0,   222,   106,   148,   107,     0,   169,     0,
    59,    71,   169,     0,    13,     0,    13,   116,   222,     0,
   223,   116,   222,     0,    13,   116,   225,     0,   223,     0,
   223,   116,   170,     0,   171,     0,   170,   116,   171,     0,
   173,     0,   173,     0,    15,     0,    16,     0,    15,     0,
   174,   116,    15,     0,   174,   116,    16,     0,    14,     0,
   225,   144,     3,   177,     0,   225,   112,   177,     0,     0,
   106,   178,   181,     0,    66,     0,    48,     0,    89,     0,
     5,     0,     7,     0,   180,     0,   216,     0,   179,     0,
   225,     0,   222,   116,   225,     0,     6,     0,    10,     0,
    11,     0,     4,     0,   181,     4,     0,    27,     0,    66,
     0,    79,     0,   183,     0,    70,    84,     0,    68,    54,
     0,    80,     0,    47,     0,    39,    74,     0,    29,    84,
     0,    94,     0,    50,     0,   185,     0,    61,     0,    43,
     0,    25,    84,     0,   182,     0,   183,   213,     0,    26,
     0,    51,     0,    52,     0,    53,     0,    62,     0,    67,
     0,    77,     0,    86,     0,    88,     0,    93,     0,    95,
     0,    96,     0,    97,     0,    69,     0,   102,     0,   103,
     0,   100,     0,   101,     0,    99,     0,     0,   190,     0,
   191,     0,    83,   108,   192,   109,     0,   108,   192,   109,
     0,   191,   108,   192,   109,     0,   193,     0,   193,   111,
   105,     0,   193,   111,   105,   111,   193,     0,   194,     0,
    20,    99,   194,     0,   193,   186,   194,     0,   193,   187,
   194,     0,   194,   188,   194,     0,   197,   108,   192,   109,
     0,   108,   192,   109,     0,   198,     0,   199,     0,   198,
   196,   198,     0,    64,   196,   198,     0,   198,   196,    63,
     0,    64,   196,    63,     0,   205,     0,   200,     0,     0,
    34,    28,   106,   195,   181,     0,   104,     0,   104,   117,
     0,   117,   104,     0,   117,   104,   117,     0,    83,     0,
    49,     0,    48,     0,    89,     0,   216,     0,   180,     0,
   225,     0,   222,     0,    98,    32,   191,     0,    98,    33,
   106,   201,   107,     0,   202,     0,   201,   111,   202,     0,
   105,     0,   225,   189,   203,     0,     0,   204,     0,    76,
     0,    18,     0,    72,     0,   206,     0,   207,     0,   106,
   222,   107,     0,   206,   106,   208,   107,     0,   209,     0,
   208,   111,   209,     0,   118,   210,     0,   118,   116,   210,
     0,   225,     0,   210,   116,   225,     0,     0,   212,     0,
    72,     0,    36,   177,     0,   106,   107,     0,   106,   214,
   107,     0,   215,     0,   214,   111,   215,     0,   225,     0,
   225,   108,   216,   109,     0,   225,   108,   179,   109,     0,
   216,     0,   105,     0,     9,     0,    12,     0,     0,   218,
     0,   219,   221,     0,   113,   220,     9,   114,     0,     0,
    92,     0,    22,     0,    78,     0,     0,    55,     0,    44,
     0,    13,     0,    14,     0,    14,     0,     0,   225,     0,
     8,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   323,   329,   335,   351,   376,   378,   381,   385,   390,   397,
   405,   410,   414,   423,   425,   433,   437,   445,   449,   452,
   455,   459,   479,   481,   489,   493,   525,   529,   538,   545,
   558,   565,   567,   579,   591,   602,   607,   613,   619,   621,
   624,   635,   641,   647,   654,   660,   668,   672,   675,   682,
   688,   694,   701,   707,   716,   718,   727,   735,   749,   759,
   775,   784,   794,   804,   809,   816,   823,   833,   839,   845,
   849,   872,   874,   876,   882,   888,   896,   902,   909,   914,
   920,   926,   932,   935,   941,   951,   953,   956,   964,   971,
   984,   995,  1005,  1016,  1026,  1037,  1048,  1050,  1055,  1059,
  1064,  1069,  1075,  1079,  1082,  1091,  1096,  1105,  1114,  1125,
  1147,  1154,  1173,  1177,  1183,  1189,  1195,  1205,  1215,  1221,
  1235,  1259,  1266,  1280,  1289,  1299,  1309,  1319,  1327,  1348,
  1357,  1366,  1367,  1369,  1376,  1383,  1389,  1393,  1399,  1419,
  1429,  1437,  1437,  1442,  1447,  1452,  1457,  1461,  1465,  1468,
  1471,  1476,  1488,  1505,  1510,  1515,  1548,  1558,  1572,  1574,
  1575,  1576,  1577,  1578,  1579,  1580,  1581,  1582,  1583,  1584,
  1585,  1591,  1593,  1594,  1597,  1604,  1616,  1618,  1622,  1626,
  1627,  1628,  1629,  1630,  1634,  1635,  1636,  1637,  1641,  1642,
  1649,  1649,  1650,  1650,  1651,  1653,  1655,  1660,  1664,  1673,
  1677,  1682,  1686,  1692,  1702,  1706,  1709,  1712,  1715,  1720,
  1729,  1737,  1743,  1749,  1756,  1764,  1772,  1781,  1784,  1787,
  1788,  1798,  1800,  1801,  1802,  1805,  1809,  1814,  1820,  1825,
  1828,  1831,  1844,  1858,  1862,  1867,  1871,  1876,  1883,  1896,
  1898,  1901,  1905,  1908,  1913,  1917,  1925,  1940,  1946,  1953,
  1966,  1978,  1993,  1997,  2014,  2019,  2022,  2027,  2049,  2054,
  2059,  2065,  2071,  2079,  2087,  2095,  2102,  2112,  2117,  2147,
  2149,  2152,  2159,  2165,  2167,  2168,  2169,  2172,  2174,  2175,
  2178,  2183,  2190,  2197,  2199,  2204
};
#endif


#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)

static const char * const yytname[] = {   "$","error","$undefined.","TOK_PPEQ",
"TOK_opaque","TOK_bstring","TOK_cstring","TOK_hstring","TOK_identifier","TOK_number",
"TOK_tuple","TOK_quadruple","TOK_number_negative","TOK_typereference","TOK_capitalreference",
"TOK_typefieldreference","TOK_valuefieldreference","TOK_Literal","TOK_ABSENT",
"TOK_ABSTRACT_SYNTAX","TOK_ALL","TOK_ANY","TOK_APPLICATION","TOK_AUTOMATIC",
"TOK_BEGIN","TOK_BIT","TOK_BMPString","TOK_BOOLEAN","TOK_BY","TOK_CHARACTER",
"TOK_CHOICE","TOK_CLASS","TOK_COMPONENT","TOK_COMPONENTS","TOK_CONSTRAINED",
"TOK_CONTAINING","TOK_DEFAULT","TOK_DEFINITIONS","TOK_DEFINED","TOK_EMBEDDED",
"TOK_ENCODED","TOK_ENCODING_CONTROL","TOK_END","TOK_ENUMERATED","TOK_EXPLICIT",
"TOK_EXPORTS","TOK_EXTENSIBILITY","TOK_EXTERNAL","TOK_FALSE","TOK_FROM","TOK_GeneralizedTime",
"TOK_GeneralString","TOK_GraphicString","TOK_IA5String","TOK_IDENTIFIER","TOK_IMPLICIT",
"TOK_IMPLIED","TOK_IMPORTS","TOK_INCLUDES","TOK_INSTANCE","TOK_INSTRUCTIONS",
"TOK_INTEGER","TOK_ISO646String","TOK_MAX","TOK_MIN","TOK_MINUS_INFINITY","TOK_NULL",
"TOK_NumericString","TOK_OBJECT","TOK_ObjectDescriptor","TOK_OCTET","TOK_OF",
"TOK_OPTIONAL","TOK_PATTERN","TOK_PDV","TOK_PLUS_INFINITY","TOK_PRESENT","TOK_PrintableString",
"TOK_PRIVATE","TOK_REAL","TOK_RELATIVE_OID","TOK_SEQUENCE","TOK_SET","TOK_SIZE",
"TOK_STRING","TOK_SYNTAX","TOK_T61String","TOK_TAGS","TOK_TeletexString","TOK_TRUE",
"TOK_TYPE_IDENTIFIER","TOK_UNIQUE","TOK_UNIVERSAL","TOK_UniversalString","TOK_UTCTime",
"TOK_UTF8String","TOK_VideotexString","TOK_VisibleString","TOK_WITH","TOK_EXCEPT",
"'^'","TOK_INTERSECTION","'|'","TOK_UNION","TOK_TwoDots","TOK_ThreeDots","'{'",
"'}'","'('","')'","';'","','","':'","'['","']'","'!'","'.'","'<'","'@'","ParsedGrammar",
"ModuleList","ModuleSpecification","optObjectIdentifier","ObjectIdentifier",
"ObjectIdentifierBody","ObjectIdentifierElement","optModuleSpecificationFlags",
"ModuleSpecificationFlags","ModuleSpecificationFlag","optModuleSpecificationBody",
"ModuleSpecificationBody","ModuleSpecificationElement","@1","ImportsDefinition",
"ImportsBundleSet","AssignedIdentifier","ImportsBundle","ImportsList","ImportsElement",
"ExportsDefinition","ExportsBody","ExportsElement","ValueSetDefinition","@2",
"DefinedTypeRef","DataTypeReference","ParameterArgumentList","ParameterArgumentName",
"ActualParameterList","ActualParameter","optComponentTypeLists","ComponentTypeLists",
"ComponentType","AlternativeTypeLists","AlternativeType","ObjectClass","optUnique",
"FieldSpec","ClassField","optWithSyntax","WithSyntax","@3","WithSyntaxList",
"WithSyntaxToken","ExtensionAndException","Type","NSTD_IndirectMarker","TypeDeclaration",
"TypeDeclarationSet","ComplexTypeReference","ComplexTypeReferenceAmpList","ComplexTypeReferenceElement",
"ClassFieldIdentifier","ClassFieldName","FieldName","DefinedObjectClass","ValueDefinition",
"Value","@4","DefinedValue","RestrictedCharacterStringValue","Opaque","BasicTypeId",
"BasicTypeId_UniverationCompatible","BasicType","BasicString","Union","Intersection",
"Except","optConstraints","Constraints","SetOfConstraints","ElementSetSpecs",
"ElementSetSpec","ConstraintSubtypeElement","@5","ConstraintRangeSpec","ConstraintSpec",
"SingleValue","ContainedSubtype","InnerTypeConstraint","WithComponentsList",
"WithComponentsElement","optPresenceConstraint","PresenceConstraint","TableConstraint",
"SimpleTableConstraint","ComponentRelationConstraint","AtNotationList","AtNotationElement",
"ComponentIdList","optMarker","Marker","UniverationDefinition","UniverationList",
"UniverationElement","SignedNumber","optTag","Tag","TagTypeValue","TagClass",
"TagPlicit","TypeRefName","ObjectClassReference","optIdentifier","Identifier", NULL
};
#endif

static const short yyr1[] = {     0,
   119,   120,   120,   121,   122,   122,   123,   123,   124,   124,
   125,   125,   125,   126,   126,   127,   127,   128,   128,   128,
   128,   128,   129,   129,   130,   130,   131,   131,   131,   131,
   131,   132,   131,   131,   133,   133,   134,   134,   135,   135,
   136,   137,   137,   138,   138,   138,   139,   139,   139,   140,
   140,   141,   141,   141,   143,   142,   144,   144,   145,   145,
   145,   146,   146,   147,   147,   147,   147,   148,   148,   149,
   149,   150,   150,   151,   151,   152,   152,   152,   152,   153,
   153,   154,   154,   154,   155,   156,   156,   157,   157,   158,
   158,   158,   158,   158,   158,   158,   159,   159,   161,   160,
   162,   162,   163,   163,   163,   163,   164,   164,   164,   165,
   166,   167,   168,   168,   168,   168,   168,   168,   168,   168,
   168,   168,   168,   169,   169,   169,   169,   169,   169,   170,
   170,   171,   172,   173,   173,   174,   174,   174,   175,   176,
   177,   178,   177,   177,   177,   177,   177,   177,   177,   177,
   177,   179,   179,   180,   180,   180,   181,   181,   182,   182,
   182,   182,   182,   182,   182,   182,   182,   182,   182,   182,
   182,   183,   183,   183,   184,   184,   185,   185,   185,   185,
   185,   185,   185,   185,   185,   185,   185,   185,   185,   185,
   186,   186,   187,   187,   188,   189,   189,   190,   190,   191,
   191,   192,   192,   192,   193,   193,   193,   193,   193,   194,
   194,   194,   194,   194,   194,   194,   194,   194,   194,   195,
   194,   196,   196,   196,   196,   197,   197,   198,   198,   198,
   198,   198,   199,   200,   200,   201,   201,   202,   202,   203,
   203,   204,   204,   204,   205,   205,   206,   207,   208,   208,
   209,   209,   210,   210,   211,   211,   212,   212,   213,   213,
   214,   214,   215,   215,   215,   215,   215,   216,   216,   217,
   217,   218,   219,   220,   220,   220,   220,   221,   221,   221,
   222,   222,   223,   224,   224,   225
};

static const short yyr2[] = {     0,
     1,     1,     2,     8,     0,     1,     3,     2,     1,     2,
     1,     4,     1,     0,     1,     1,     2,     2,     2,     2,
     2,     2,     0,     1,     1,     2,     1,     1,     1,     1,
     1,     0,     3,     1,     3,     2,     1,     2,     0,     1,
     4,     1,     3,     1,     3,     1,     3,     3,     2,     1,
     3,     1,     3,     1,     0,     6,     1,     1,     3,     3,
     6,     1,     3,     1,     3,     3,     3,     1,     3,     1,
     1,     0,     1,     1,     3,     3,     2,     3,     1,     1,
     3,     2,     1,     1,     5,     0,     1,     1,     3,     2,
     4,     3,     3,     3,     3,     3,     0,     1,     0,     6,
     1,     2,     1,     1,     1,     3,     1,     3,     3,     3,
     0,     2,     1,     4,     4,     4,     6,     6,     1,     4,
     4,     1,     3,     1,     3,     3,     3,     1,     3,     1,
     3,     1,     1,     1,     1,     1,     3,     3,     1,     4,
     3,     0,     3,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     3,     1,     1,     1,     1,     2,     1,     1,
     1,     1,     2,     2,     1,     1,     2,     2,     1,     1,
     1,     1,     1,     2,     1,     2,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     0,     1,     1,     4,     3,
     4,     1,     3,     5,     1,     3,     3,     3,     3,     4,
     3,     1,     1,     3,     3,     3,     3,     1,     1,     0,
     5,     1,     2,     2,     3,     1,     1,     1,     1,     1,
     1,     1,     1,     3,     5,     1,     3,     1,     3,     0,
     1,     1,     1,     1,     1,     1,     3,     4,     1,     3,
     2,     3,     1,     3,     0,     1,     1,     2,     2,     3,
     1,     3,     1,     4,     4,     1,     1,     1,     1,     0,
     1,     2,     4,     0,     1,     1,     1,     0,     1,     1,
     1,     1,     1,     0,     1,     1
};

static const short yydefact[] = {     0,
   281,   282,     1,     2,     5,     3,     0,     0,     6,   286,
    13,     8,     0,     9,    11,    14,     7,    10,     0,     0,
     0,     0,     0,     0,     0,    15,    16,     0,    22,    20,
    18,    21,    19,     0,    17,    12,    23,   177,     0,     0,
   178,   179,   180,     0,   181,   182,   190,   183,   184,   185,
   186,   187,   188,   189,     0,    24,    25,    27,    28,    31,
    29,    30,    34,     0,     0,    32,     0,    49,     0,    50,
    52,    54,    36,     0,    37,     0,    42,    44,    46,     4,
    26,   270,   124,   283,     0,   159,     0,     0,   173,   166,
   170,   172,   160,     0,     0,   161,   165,   169,     0,     0,
    57,    58,   162,   171,   128,     0,    33,    48,    47,     0,
     0,    35,    38,     0,     0,     0,     0,   274,    60,    59,
   111,   271,   278,     0,   174,   168,   167,   164,   163,     0,
    62,     0,    64,     0,     0,     0,    51,    53,    39,    43,
    45,     0,   276,   277,   275,     0,     0,   196,   280,   279,
   272,   125,   127,     0,     0,     0,     0,    55,   134,   135,
   129,   130,   132,   126,   147,   154,   148,   268,   155,   156,
   269,   145,   144,   146,   142,   140,   151,   149,   150,     0,
   152,    40,    41,   270,   270,     0,    88,     0,   124,   283,
   119,     0,     0,   196,   196,   112,   122,   175,   162,   113,
     0,     0,     0,   110,   197,   198,   270,    63,    67,    66,
    65,     0,     0,     0,     0,     0,   139,   136,     0,   257,
   255,   255,   255,    90,   256,    86,   255,   255,    97,     0,
   273,     0,   270,     0,   270,     0,   270,     0,     0,   176,
   270,     0,     0,     0,   228,   227,     0,   226,   229,     0,
     0,     0,   231,     0,   202,   205,     0,   212,   213,   219,
   218,   245,   246,   230,   233,   232,     0,    61,   157,    56,
   131,   143,   153,   141,   258,    95,     0,    94,    96,    87,
   255,    92,    93,     0,    85,    98,    89,     0,   107,     0,
    80,    83,    84,   270,   123,     0,     0,    73,    74,    79,
   255,   270,   284,     0,   284,   267,   259,     0,   261,   266,
   263,     0,    68,    70,    71,     0,     0,     0,   222,     0,
     0,     0,     0,     0,     0,   200,   193,   194,   191,   192,
     0,     0,     0,   195,     0,     0,     0,     0,     0,   158,
   137,   138,    91,     0,   120,     0,   114,   270,    82,   270,
   115,   270,    77,   255,   270,   285,   116,   270,   260,     0,
     0,   121,   270,   199,   206,   220,   223,   224,   217,   215,
   234,     0,   247,   211,   203,   207,   208,   209,     0,   216,
   214,     0,     0,   249,   201,    99,   108,   109,   152,    81,
    78,    75,    76,   111,   111,   262,     0,     0,    69,     0,
   225,   238,     0,   236,   196,     0,   210,     0,   251,   253,
   248,     0,     0,   117,   118,   265,   264,   221,   235,     0,
   240,   204,   252,     0,   250,   103,   104,     0,     0,   101,
   105,   133,   237,   243,   244,   242,   239,   241,   254,     0,
   100,   102,   106,     0,     0,     0
};

static const short yydefgoto[] = {   444,
     3,     4,     8,     9,    13,    14,    25,    26,    27,    55,
    56,    57,   107,    58,    74,   183,    75,    76,    77,    59,
    69,    70,    60,   212,   100,    61,   130,   131,   312,   313,
   297,   298,   299,   290,   291,   119,   281,   186,   187,   285,
   286,   413,   429,   430,   300,   301,   147,   148,   196,   101,
   161,   162,   431,   432,   222,   223,    62,   176,   214,   177,
   253,   270,   102,   103,   200,   104,   332,   333,   335,   204,
   205,   206,   254,   255,   256,   400,   321,   257,   258,   259,
   260,   403,   404,   437,   438,   261,   262,   263,   383,   384,
   409,   224,   225,   240,   308,   309,   264,   121,   122,   123,
   146,   151,   265,   105,   355,   266
};

static const short yypact[] = {    76,
-32768,-32768,    76,-32768,   -55,-32768,    23,    59,-32768,-32768,
-32768,-32768,    31,-32768,    32,   350,-32768,-32768,   101,   120,
   136,   144,   131,   152,   192,   350,-32768,   139,-32768,-32768,
-32768,-32768,-32768,   233,-32768,-32768,   394,-32768,   275,    34,
-32768,-32768,-32768,   133,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,   258,   394,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,   224,   547,-32768,   197,-32768,    63,-32768,
   203,-32768,-32768,    45,-32768,    24,-32768,   205,-32768,-32768,
-32768,    21,   206,-32768,   240,-32768,   254,   266,-32768,-32768,
-32768,-32768,-32768,   288,   260,-32768,-32768,-32768,   623,   343,
-32768,-32768,-32768,-32768,   236,   352,-32768,-32768,-32768,   248,
   251,-32768,-32768,    76,   248,   252,   257,   106,-32768,-32768,
-32768,-32768,    43,   248,-32768,-32768,-32768,-32768,-32768,   100,
-32768,   249,   256,   261,   300,   158,-32768,-32768,   -55,-32768,
-32768,   189,-32768,-32768,-32768,   351,   471,   -27,-32768,-32768,
-32768,-32768,-32768,   363,   623,   361,   248,-32768,-32768,-32768,
   269,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   277,
   262,-32768,-32768,    70,    62,   108,-32768,   263,    80,   264,
   357,   291,   327,   -13,    -9,-32768,-32768,-32768,   293,-32768,
   294,   295,   323,-32768,-32768,   301,   297,-32768,-32768,-32768,
-32768,   407,   250,   407,   361,   158,-32768,-32768,   158,-32768,
    14,     7,    14,-32768,-32768,   324,     7,    14,   316,   189,
-32768,   388,     8,   265,    47,   353,    47,   354,    52,-32768,
     9,   323,   328,   395,-32768,-32768,   -16,-32768,-32768,   255,
    76,   323,-32768,   313,    99,   331,   318,   -16,-32768,-32768,
-32768,   326,-32768,-32768,-32768,-32768,   323,-32768,-32768,   429,
-32768,   429,-32768,-32768,-32768,-32768,   333,-32768,-32768,-32768,
    14,-32768,-32768,   355,-32768,-32768,-32768,   361,   321,   118,
-32768,-32768,-32768,   297,-32768,   366,   334,   337,-32768,-32768,
    14,   297,   361,   335,   361,-32768,-32768,   162,-32768,-32768,
   330,   173,-32768,-32768,-32768,   340,   370,   338,   341,   346,
   234,   344,   348,   358,   364,-32768,-32768,-32768,-32768,-32768,
   359,   370,   370,-32768,   370,   323,   380,   339,   365,-32768,
-32768,-32768,-32768,   349,-32768,   246,-32768,     8,-32768,   297,
-32768,    38,-32768,    14,   297,-32768,-32768,   297,-32768,    57,
   246,-32768,     9,-32768,-32768,-32768,-32768,   345,-32768,-32768,
   301,     2,-32768,-32768,   356,-32768,-32768,-32768,   368,-32768,
-32768,    17,   188,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,   372,   374,-32768,   407,
-32768,-32768,   195,-32768,   -27,   323,-32768,   361,   377,-32768,
-32768,   339,    11,-32768,-32768,-32768,-32768,   429,-32768,     2,
   121,   225,   377,   361,-32768,-32768,-32768,    11,    19,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,     5,
-32768,-32768,-32768,   460,   466,-32768
};

static const short yypgoto[] = {-32768,
-32768,   467,-32768,   336,-32768,   459,-32768,-32768,   453,-32768,
-32768,   430,-32768,-32768,-32768,-32768,   414,-32768,   379,-32768,
-32768,   385,-32768,-32768,   434,-32768,-32768,   347,-32768,   140,
   267,-32768,   153,-32768,   159,-32768,-32768,-32768,   276,-32768,
-32768,-32768,    81,  -250,  -228,   -80,-32768,   -44,-32768,  -103,
-32768,   298,-32768,  -111,   332,   342,-32768,    -3,-32768,  -278,
  -107,  -211,    86,   369,-32768,    26,-32768,-32768,-32768,  -187,
-32768,   186,   -64,   107,  -141,-32768,   268,-32768,  -259,-32768,
-32768,-32768,    92,-32768,-32768,-32768,-32768,-32768,-32768,   103,
   111,  -209,-32768,-32768,-32768,   160,  -125,   -50,-32768,-32768,
-32768,-32768,     1,-32768,   220,    -7
};


#define	YYLAST		720


static const short yytable[] = {    15,
     5,   120,   272,     5,   292,    15,   236,   238,   426,    10,
   179,   276,   278,   279,   426,    10,    10,   282,   283,   159,
   160,   427,   426,   163,    10,   159,   160,   427,   178,    65,
    10,    11,    72,   159,   160,   427,    79,    64,    10,    11,
    71,    10,   219,   197,    78,    10,     1,     2,    65,   219,
     7,   117,    10,    67,    10,   202,    64,     1,     2,    10,
   168,   370,    63,   171,    10,   168,    79,   387,   171,   202,
   296,   343,   114,   202,    78,   217,   218,   381,   220,   296,
   203,    63,   397,   217,   218,   220,   149,   319,     1,     2,
   179,   353,   235,   179,   203,    16,   237,   150,   203,   133,
   320,   163,    72,   221,   226,   219,   402,    79,   178,    28,
    71,   178,   289,   310,   139,    78,   153,   428,   443,   292,
   118,   118,   277,   428,   152,   441,   268,   143,   181,    12,
   295,   428,   408,   118,   115,   164,   180,    17,   434,    19,
    10,   220,   289,    68,   393,     1,     2,   201,   209,   211,
   118,   289,   293,   -72,   112,   133,   306,   210,   307,   118,
   314,   306,   165,   166,   167,    10,   168,   169,   170,   171,
     1,     2,   109,   110,   118,   365,  -255,   316,   442,    29,
  -255,    73,   118,   144,   132,  -281,    32,   325,   418,   442,
   376,   377,   435,   378,    34,   124,   436,   145,   327,   328,
   329,   330,   339,   184,   185,   172,   154,   273,   181,   331,
   155,   181,   274,   349,   229,   275,   180,   421,   230,   180,
   388,   354,    30,   173,   347,   294,    82,   302,   348,   302,
    31,   311,   198,   315,   310,   398,    83,    84,    33,   166,
   132,    10,   168,   169,   170,   171,   174,    36,    85,    38,
    86,   324,    87,    10,   168,    10,    37,   171,     1,     2,
     1,     2,    88,   175,   159,   160,    89,   293,   359,   391,
    90,   379,   360,    91,    41,    42,    43,    83,    84,   362,
   345,   245,   314,   363,    92,    45,   322,   323,    66,    93,
    46,    94,    47,    95,   411,   356,   369,   356,   412,    80,
    48,   419,    96,    97,   394,   420,   108,   395,   111,    49,
   116,    50,     1,     2,   159,   160,    51,    98,    52,    53,
    54,   124,   249,   125,   327,   328,   329,   330,   166,    99,
    10,   168,   169,   170,   171,     1,     2,   126,   389,   127,
   294,   128,   243,   129,   302,   134,   180,   341,   342,   414,
   415,   135,   311,   389,   136,   315,   244,   138,   141,   188,
   156,   180,   142,    20,   405,   207,   158,   157,    10,  -282,
   245,   246,    21,   216,   410,   166,   231,    10,   168,   169,
   170,   171,     1,     2,   213,   166,   247,    10,   168,   169,
   170,   171,   215,    22,   232,    23,   233,   234,   239,   241,
   410,    10,   242,   244,    24,   248,     1,     2,   267,   118,
   269,   249,   405,   284,   280,   288,   439,   245,   246,    38,
   250,   326,   318,   303,   305,   336,   317,   245,   251,   334,
   252,   338,   340,   247,    39,   346,   350,   361,    40,   344,
   351,   357,   380,   366,    41,    42,    43,   352,   364,   368,
    44,   203,   248,   372,   386,    45,   382,   367,   249,   445,
    46,   401,    47,   375,   373,   446,   406,   250,   249,     6,
    48,    18,   374,   385,   182,   251,   407,   252,    35,    49,
   416,    50,   417,   189,   190,    81,    51,   113,    52,    53,
    54,   191,   424,   140,   137,    85,    38,    86,   106,    87,
   192,   208,   399,   304,   392,   287,   390,   371,   440,    88,
   271,   433,   422,    89,   425,   199,   227,    90,   423,   396,
    91,    41,    42,    43,   358,   337,   228,     0,     0,   193,
     0,    92,    45,     0,     0,     0,    93,    46,    94,    47,
    95,     0,     0,     0,     0,     0,     0,    48,     0,    96,
    97,   194,   195,     0,     0,     0,    49,     0,    50,    83,
    84,     0,     0,    51,    98,    52,    53,    54,     0,     0,
     0,    85,    38,    86,     0,    87,     0,     0,     0,     0,
     0,     0,     0,     0,     0,    88,     0,     0,     0,    89,
     0,     0,     0,    90,     0,     0,    91,    41,    42,    43,
     0,     0,     0,     0,     0,     0,     0,    92,    45,     0,
     0,     0,    93,    46,    94,    47,    95,     0,     0,     0,
     0,     0,     0,    48,     0,    96,    97,     0,     0,     0,
     0,     0,    49,     0,    50,     1,     2,     0,     0,    51,
    98,    52,    53,    54,     0,     0,     0,    85,    38,    86,
     0,    87,     0,     0,     0,     0,     0,     0,     0,     0,
     0,    88,     0,     0,     0,    89,     0,     0,     0,    90,
     0,     0,    91,    41,    42,    43,     0,     0,     0,     0,
     0,     0,     0,    92,    45,     0,     0,     0,    93,    46,
    94,    47,    95,     0,     0,     0,     0,     0,     0,    48,
     0,    96,    97,     0,     0,     0,     0,     0,    49,     0,
    50,     0,     0,     0,     0,    51,    98,    52,    53,    54
};

static const short yycheck[] = {     7,
     0,    82,   214,     3,   233,    13,   194,   195,     4,     8,
   136,   221,   222,   223,     4,     8,     8,   227,   228,    15,
    16,    17,     4,   135,     8,    15,    16,    17,   136,    37,
     8,     9,    40,    15,    16,    17,    44,    37,     8,     9,
    40,     8,    36,   147,    44,     8,    13,    14,    56,    36,
   106,    31,     8,    20,     8,    83,    56,    13,    14,     8,
     9,   321,    37,    12,     8,     9,    74,   346,    12,    83,
    33,   281,    49,    83,    74,    14,    15,   337,    72,    33,
   108,    56,   361,    14,    15,    72,    44,   104,    13,    14,
   216,   301,   106,   219,   108,    37,   106,    55,   108,    99,
   117,   213,   110,   184,   185,    36,   105,   115,   216,     9,
   110,   219,   105,   239,   114,   115,   124,   113,   114,   348,
   113,   113,   116,   113,   124,   107,   207,    22,   136,   107,
   234,   113,   116,   113,   111,   135,   136,   107,    18,   108,
     8,    72,   105,   110,   354,    13,    14,   147,   156,   157,
   113,   105,   233,   107,   110,   155,   105,   157,   107,   113,
   241,   105,     5,     6,     7,     8,     9,    10,    11,    12,
    13,    14,   110,   111,   113,   317,   107,   242,   429,    60,
   111,    49,   113,    78,    99,   106,    56,   252,   400,   440,
   332,   333,    72,   335,     3,   116,    76,    92,   100,   101,
   102,   103,   267,    15,    16,    48,   107,   215,   216,   111,
   111,   219,   216,   294,   107,   219,   216,   405,   111,   219,
   346,   302,    87,    66,   107,   233,     3,   235,   111,   237,
    87,   239,   147,   241,   360,   361,    13,    14,    87,     6,
   155,     8,     9,    10,    11,    12,    89,   109,    25,    26,
    27,   251,    29,     8,     9,     8,    24,    12,    13,    14,
    13,    14,    39,   106,    15,    16,    43,   348,   107,   350,
    47,   336,   111,    50,    51,    52,    53,    13,    14,   107,
   288,    48,   363,   111,    61,    62,    32,    33,    14,    66,
    67,    68,    69,    70,   107,   303,    63,   305,   111,    42,
    77,   107,    79,    80,   355,   111,   110,   358,   106,    86,
   106,    88,    13,    14,    15,    16,    93,    94,    95,    96,
    97,   116,    89,    84,   100,   101,   102,   103,     6,   106,
     8,     9,    10,    11,    12,    13,    14,    84,   346,    74,
   348,    54,    20,    84,   352,     3,   346,    15,    16,   394,
   395,   116,   360,   361,     3,   363,    34,   107,   107,     9,
   112,   361,   106,    14,   372,     3,   106,   112,     8,   106,
    48,    49,    23,   112,   382,     6,   114,     8,     9,    10,
    11,    12,    13,    14,   116,     6,    64,     8,     9,    10,
    11,    12,   116,    44,    38,    46,   106,    71,   106,   106,
   408,     8,   108,    34,    55,    83,    13,    14,   108,   113,
     4,    89,   420,    98,    91,    28,   424,    48,    49,    26,
    98,   109,    28,    71,    71,   108,    99,    48,   106,    99,
   108,   106,     4,    64,    41,   115,    71,   108,    45,    85,
   107,   107,    63,   106,    51,    52,    53,   111,   109,   104,
    57,   108,    83,   106,   106,    62,   118,   117,    89,     0,
    67,   117,    69,   105,   107,     0,   111,    98,    89,     3,
    77,    13,   109,   109,   139,   106,   109,   108,    26,    86,
   109,    88,   109,    13,    14,    56,    93,    74,    95,    96,
    97,    21,   116,   115,   110,    25,    26,    27,    65,    29,
    30,   155,   363,   237,   352,   230,   348,   322,   428,    39,
   213,   420,   406,    43,   412,   147,   185,    47,   408,   360,
    50,    51,    52,    53,   305,   258,   185,    -1,    -1,    59,
    -1,    61,    62,    -1,    -1,    -1,    66,    67,    68,    69,
    70,    -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,    79,
    80,    81,    82,    -1,    -1,    -1,    86,    -1,    88,    13,
    14,    -1,    -1,    93,    94,    95,    96,    97,    -1,    -1,
    -1,    25,    26,    27,    -1,    29,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    39,    -1,    -1,    -1,    43,
    -1,    -1,    -1,    47,    -1,    -1,    50,    51,    52,    53,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    61,    62,    -1,
    -1,    -1,    66,    67,    68,    69,    70,    -1,    -1,    -1,
    -1,    -1,    -1,    77,    -1,    79,    80,    -1,    -1,    -1,
    -1,    -1,    86,    -1,    88,    13,    14,    -1,    -1,    93,
    94,    95,    96,    97,    -1,    -1,    -1,    25,    26,    27,
    -1,    29,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    39,    -1,    -1,    -1,    43,    -1,    -1,    -1,    47,
    -1,    -1,    50,    51,    52,    53,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    61,    62,    -1,    -1,    -1,    66,    67,
    68,    69,    70,    -1,    -1,    -1,    -1,    -1,    -1,    77,
    -1,    79,    80,    -1,    -1,    -1,    -1,    -1,    86,    -1,
    88,    -1,    -1,    -1,    -1,    93,    94,    95,    96,    97
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/share/bison.simple"
/* This file comes from bison-1.28.  */

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

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

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

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

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

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

#ifndef YYSTACK_USE_ALLOCA
#ifdef alloca
#define YYSTACK_USE_ALLOCA
#else /* alloca not defined */
#ifdef __GNUC__
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
#define YYSTACK_USE_ALLOCA
#include <alloca.h>
#else /* not sparc */
/* We think this test detects Watcom and Microsoft C.  */
/* This used to test MSDOS, but that is a bad idea
   since that symbol is in the user namespace.  */
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
#if 0 /* No need for malloc.h, which pollutes the namespace;
	 instead, just don't use alloca.  */
#include <malloc.h>
#endif
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
/* I don't know what this was needed for, but it pollutes the namespace.
   So I turned it off.   rms, 2 May 1997.  */
/* #include <malloc.h>  */
 #pragma alloca
#define YYSTACK_USE_ALLOCA
#else /* not MSDOS, or __TURBOC__, or _AIX */
#if 0
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
		 and on HPUX 10.  Eventually we can turn this on.  */
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#endif /* __hpux */
#endif
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc */
#endif /* not GNU C */
#endif /* alloca not defined */
#endif /* YYSTACK_USE_ALLOCA not defined */

#ifdef YYSTACK_USE_ALLOCA
#define YYSTACK_ALLOC alloca
#else
#define YYSTACK_ALLOC malloc
#endif

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	goto yyacceptlab
#define YYABORT 	goto yyabortlab
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

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

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Define __yy_memcpy.  Note that the size argument
   should be passed with type unsigned int, because that is what the non-GCC
   definitions require.  With GCC, __builtin_memcpy takes an arg
   of type size_t, but it can handle unsigned int.  */

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (to, from, count)
     char *to;
     char *from;
     unsigned int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (char *to, char *from, unsigned int count)
{
  register char *t = to;
  register char *f = from;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 217 "/usr/share/bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
#ifdef YYPARSE_PARAM
int yyparse (void *);
#else
int yyparse (void);
#endif
#endif

int
yyparse(YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;
  int yyfree_stacks = 0;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

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

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

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

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

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

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

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  if (yyfree_stacks)
	    {
	      free (yyss);
	      free (yyvs);
#ifdef YYLSP_NEEDED
	      free (yyls);
#endif
	    }
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
#ifndef YYSTACK_USE_ALLOCA
      yyfree_stacks = 1;
#endif
      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
      __yy_memcpy ((char *)yyss, (char *)yyss1,
		   size * (unsigned int) sizeof (*yyssp));
      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
		   size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls, (char *)yyls1,
		   size * (unsigned int) sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

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

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

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

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

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

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

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

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

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

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

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 1:
#line 324 "asn1p_y.y"
{
		*(void **)param = yyvsp[0].a_grammar;
	;
    break;}
case 2:
#line 330 "asn1p_y.y"
{
		yyval.a_grammar = asn1p_new();
		checkmem(yyval.a_grammar);
		TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
	;
    break;}
case 3:
#line 335 "asn1p_y.y"
{
		yyval.a_grammar = yyvsp[-1].a_grammar;
		TQ_ADD(&(yyval.a_grammar->modules), yyvsp[0].a_module, mod_next);
	;
    break;}
case 4:
#line 356 "asn1p_y.y"
{

		if(yyvsp[-1].a_module) {
			yyval.a_module = yyvsp[-1].a_module;
		} else {
			/* There's a chance that a module is just plain empty */
			yyval.a_module = asn1p_module_new();
		}
		checkmem(yyval.a_module);

		yyval.a_module->ModuleName = yyvsp[-7].tv_str;
		yyval.a_module->module_oid = yyvsp[-6].a_oid;
		yyval.a_module->module_flags = yyvsp[-4].a_module_flags;
	;
    break;}
case 5:
#line 377 "asn1p_y.y"
{ yyval.a_oid = 0; ;
    break;}
case 6:
#line 378 "asn1p_y.y"
{ yyval.a_oid = yyvsp[0].a_oid; ;
    break;}
case 7:
#line 382 "asn1p_y.y"
{
		yyval.a_oid = yyvsp[-1].a_oid;
	;
    break;}
case 8:
#line 385 "asn1p_y.y"
{
		yyval.a_oid = 0;
	;
    break;}
case 9:
#line 391 "asn1p_y.y"
{
		yyval.a_oid = asn1p_oid_new();
		asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
		if(yyvsp[0].a_oid_arc.name)
			free(yyvsp[0].a_oid_arc.name);
	;
    break;}
case 10:
#line 397 "asn1p_y.y"
{
		yyval.a_oid = yyvsp[-1].a_oid;
		asn1p_oid_add_arc(yyval.a_oid, &yyvsp[0].a_oid_arc);
		if(yyvsp[0].a_oid_arc.name)
			free(yyvsp[0].a_oid_arc.name);
	;
    break;}
case 11:
#line 406 "asn1p_y.y"
{					/* iso */
		yyval.a_oid_arc.name = yyvsp[0].tv_str;
		yyval.a_oid_arc.number = -1;
	;
    break;}
case 12:
#line 410 "asn1p_y.y"
{		/* iso(1) */
		yyval.a_oid_arc.name = yyvsp[-3].tv_str;
		yyval.a_oid_arc.number = yyvsp[-1].a_int;
	;
    break;}
case 13:
#line 414 "asn1p_y.y"
{					/* 1 */
		yyval.a_oid_arc.name = 0;
		yyval.a_oid_arc.number = yyvsp[0].a_int;
	;
    break;}
case 14:
#line 424 "asn1p_y.y"
{ yyval.a_module_flags = MSF_NOFLAGS; ;
    break;}
case 15:
#line 425 "asn1p_y.y"
{
		yyval.a_module_flags = yyvsp[0].a_module_flags;
	;
    break;}
case 16:
#line 434 "asn1p_y.y"
{
		yyval.a_module_flags = yyvsp[0].a_module_flags;
	;
    break;}
case 17:
#line 437 "asn1p_y.y"
{
		yyval.a_module_flags = yyvsp[-1].a_module_flags | yyvsp[0].a_module_flags;
	;
    break;}
case 18:
#line 446 "asn1p_y.y"
{
		yyval.a_module_flags = MSF_EXPLICIT_TAGS;
	;
    break;}
case 19:
#line 449 "asn1p_y.y"
{
		yyval.a_module_flags = MSF_IMPLICIT_TAGS;
	;
    break;}
case 20:
#line 452 "asn1p_y.y"
{
		yyval.a_module_flags = MSF_AUTOMATIC_TAGS;
	;
    break;}
case 21:
#line 455 "asn1p_y.y"
{
		yyval.a_module_flags = MSF_EXTENSIBILITY_IMPLIED;
	;
    break;}
case 22:
#line 459 "asn1p_y.y"
{
		/* X.680Amd1 specifies TAG and XER */
		if(strcmp(yyvsp[-1].tv_str, "TAG") == 0) {
		 	yyval.a_module_flags = MSF_TAG_INSTRUCTIONS;
		} else if(strcmp(yyvsp[-1].tv_str, "XER") == 0) {
		 	yyval.a_module_flags = MSF_XER_INSTRUCTIONS;
		} else {
			fprintf(stderr,
				"WARNING: %s INSTRUCTIONS at line %d: "
				"Unrecognized encoding reference\n",
				yyvsp[-1].tv_str, yylineno);
		 	yyval.a_module_flags = MSF_unk_INSTRUCTIONS;
		}
		free(yyvsp[-1].tv_str);
	;
    break;}
case 23:
#line 480 "asn1p_y.y"
{ yyval.a_module = 0; ;
    break;}
case 24:
#line 481 "asn1p_y.y"
{
		yyval.a_module = yyvsp[0].a_module;
	;
    break;}
case 25:
#line 490 "asn1p_y.y"
{
		yyval.a_module = yyvsp[0].a_module;
	;
    break;}
case 26:
#line 493 "asn1p_y.y"
{
		yyval.a_module = yyvsp[-1].a_module;

		/* Behave well when one of them is skipped. */
		if(!(yyvsp[-1].a_module)) {
			if(yyvsp[0].a_module) yyval.a_module = yyvsp[0].a_module;
			break;
		}

#ifdef	MY_IMPORT
#error	MY_IMPORT DEFINED ELSEWHERE!
#endif
#define	MY_IMPORT(foo,field)	do {				\
		while(TQ_FIRST(&(yyvsp[0].a_module->foo))) {			\
			TQ_ADD(&(yyval.a_module->foo),			\
				TQ_REMOVE(&(yyvsp[0].a_module->foo), field),	\
				field);				\
		}						\
		assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0);		\
	} while(0)

		MY_IMPORT(imports, xp_next);
		MY_IMPORT(exports, xp_next);
		MY_IMPORT(members, next);
#undef	MY_IMPORT

	;
    break;}
case 27:
#line 526 "asn1p_y.y"
{
		yyval.a_module = yyvsp[0].a_module;
	;
    break;}
case 28:
#line 529 "asn1p_y.y"
{
		yyval.a_module = asn1p_module_new();
		checkmem(yyval.a_module);
		if(yyvsp[0].a_xports) {
			TQ_ADD(&(yyval.a_module->exports), yyvsp[0].a_xports, xp_next);
		} else {
			/* "EXPORTS ALL;" ? */
		}
	;
    break;}
case 29:
#line 538 "asn1p_y.y"
{
		yyval.a_module = asn1p_module_new();
		checkmem(yyval.a_module);
		assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
		assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
		TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
	;
    break;}
case 30:
#line 545 "asn1p_y.y"
{
		yyval.a_module = asn1p_module_new();
		checkmem(yyval.a_module);
		assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
		assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
		TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
	;
    break;}
case 31:
#line 558 "asn1p_y.y"
{
		yyval.a_module = asn1p_module_new();
		checkmem(yyval.a_module);
		assert(yyvsp[0].a_expr->expr_type != A1TC_INVALID);
		assert(yyvsp[0].a_expr->meta_type != AMT_INVALID);
		TQ_ADD(&(yyval.a_module->members), yyvsp[0].a_expr, next);
	;
    break;}
case 32:
#line 566 "asn1p_y.y"
{ asn1p_lexer_hack_push_encoding_control(); ;
    break;}
case 33:
#line 567 "asn1p_y.y"
{
		fprintf(stderr,
			"WARNING: ENCODING-CONTROL %s "
			"specification at line %d ignored\n",
			yyvsp[-1].tv_str, yylineno);
		free(yyvsp[-1].tv_str);
		yyval.a_module = 0;
	;
    break;}
case 34:
#line 579 "asn1p_y.y"
{
		return yyerror(
			"Attempt to redefine a standard basic string type, "
			"please comment out or remove this type redefinition.");
	;
    break;}
case 35:
#line 592 "asn1p_y.y"
{
		if(!saved_aid && 0)
			return yyerror("Unterminated IMPORTS FROM, "
					"expected semicolon ';'");
		saved_aid = 0;
		yyval.a_module = yyvsp[-1].a_module;
	;
    break;}
case 36:
#line 602 "asn1p_y.y"
{
		return yyerror("Empty IMPORTS list");
	;
    break;}
case 37:
#line 608 "asn1p_y.y"
{
		yyval.a_module = asn1p_module_new();
		checkmem(yyval.a_module);
		TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
	;
    break;}
case 38:
#line 613 "asn1p_y.y"
{
		yyval.a_module = yyvsp[-1].a_module;
		TQ_ADD(&(yyval.a_module->imports), yyvsp[0].a_xports, xp_next);
	;
    break;}
case 39:
#line 620 "asn1p_y.y"
{ memset(&yyval.a_aid, 0, sizeof(yyval.a_aid)); ;
    break;}
case 40:
#line 621 "asn1p_y.y"
{ yyval.a_aid.oid = yyvsp[0].a_oid; ;
    break;}
case 41:
#line 625 "asn1p_y.y"
{
		yyval.a_xports = yyvsp[-3].a_xports;
		yyval.a_xports->fromModuleName = yyvsp[-1].tv_str;
		yyval.a_xports->identifier = yyvsp[0].a_aid;
		/* This stupid thing is used for look-back hack. */
		saved_aid = yyval.a_xports->identifier.oid ? 0 : &(yyval.a_xports->identifier);
		checkmem(yyval.a_xports);
	;
    break;}
case 42:
#line 636 "asn1p_y.y"
{
		yyval.a_xports = asn1p_xports_new();
		checkmem(yyval.a_xports);
		TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
	;
    break;}
case 43:
#line 641 "asn1p_y.y"
{
		yyval.a_xports = yyvsp[-2].a_xports;
		TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
	;
    break;}
case 44:
#line 648 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[0].tv_str;
		yyval.a_expr->expr_type = A1TC_REFERENCE;
	;
    break;}
case 45:
#line 654 "asn1p_y.y"
{		/* Completely equivalent to above */
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyval.a_expr->expr_type = A1TC_REFERENCE;
	;
    break;}
case 46:
#line 660 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[0].tv_str;
		yyval.a_expr->expr_type = A1TC_REFERENCE;
	;
    break;}
case 47:
#line 669 "asn1p_y.y"
{
		yyval.a_xports = yyvsp[-1].a_xports;
	;
    break;}
case 48:
#line 672 "asn1p_y.y"
{
		yyval.a_xports = 0;
	;
    break;}
case 49:
#line 675 "asn1p_y.y"
{
		/* Empty EXPORTS clause effectively prohibits export. */
		yyval.a_xports = asn1p_xports_new();
		checkmem(yyval.a_xports);
	;
    break;}
case 50:
#line 683 "asn1p_y.y"
{
		yyval.a_xports = asn1p_xports_new();
		assert(yyval.a_xports);
		TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
	;
    break;}
case 51:
#line 688 "asn1p_y.y"
{
		yyval.a_xports = yyvsp[-2].a_xports;
		TQ_ADD(&(yyval.a_xports->members), yyvsp[0].a_expr, next);
	;
    break;}
case 52:
#line 695 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[0].tv_str;
		yyval.a_expr->expr_type = A1TC_EXPORTVAR;
	;
    break;}
case 53:
#line 701 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyval.a_expr->expr_type = A1TC_EXPORTVAR;
	;
    break;}
case 54:
#line 707 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[0].tv_str;
		yyval.a_expr->expr_type = A1TC_EXPORTVAR;
	;
    break;}
case 55:
#line 718 "asn1p_y.y"
{ asn1p_lexer_hack_push_opaque_state(); ;
    break;}
case 56:
#line 718 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-4].a_expr;
		assert(yyval.a_expr->Identifier == 0);
		yyval.a_expr->Identifier = yyvsp[-5].tv_str;
		yyval.a_expr->meta_type = AMT_VALUESET;
		// take care of ValueSet body
	;
    break;}
case 57:
#line 728 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->reference = yyvsp[0].a_ref;
		yyval.a_expr->expr_type = A1TC_REFERENCE;
		yyval.a_expr->meta_type = AMT_TYPEREF;
	;
    break;}
case 58:
#line 735 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = yyvsp[0].a_type;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 59:
#line 753 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		assert(yyval.a_expr->expr_type);
		assert(yyval.a_expr->meta_type);
	;
    break;}
case 60:
#line 759 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
		assert(yyval.a_expr->meta_type == AMT_OBJECTCLASS);
	;
    break;}
case 61:
#line 775 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
		assert(yyval.a_expr->Identifier == 0);
		yyval.a_expr->Identifier = yyvsp[-5].tv_str;
		yyval.a_expr->params = yyvsp[-3].a_plist;
		yyval.a_expr->meta_type = AMT_PARAMTYPE;
	;
    break;}
case 62:
#line 785 "asn1p_y.y"
{
		int ret;
		yyval.a_plist = asn1p_paramlist_new(yylineno);
		checkmem(yyval.a_plist);
		ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
		checkmem(ret == 0);
		if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
		if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
	;
    break;}
case 63:
#line 794 "asn1p_y.y"
{
		int ret;
		yyval.a_plist = yyvsp[-2].a_plist;
		ret = asn1p_paramlist_add_param(yyval.a_plist, yyvsp[0].a_parg.governor, yyvsp[0].a_parg.argument);
		checkmem(ret == 0);
		if(yyvsp[0].a_parg.governor) asn1p_ref_free(yyvsp[0].a_parg.governor);
		if(yyvsp[0].a_parg.argument) free(yyvsp[0].a_parg.argument);
	;
    break;}
case 64:
#line 805 "asn1p_y.y"
{
		yyval.a_parg.governor = NULL;
		yyval.a_parg.argument = yyvsp[0].tv_str;
	;
    break;}
case 65:
#line 809 "asn1p_y.y"
{
		int ret;
		yyval.a_parg.governor = asn1p_ref_new(yylineno);
		ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
		checkmem(ret == 0);
		yyval.a_parg.argument = yyvsp[0].tv_str;
	;
    break;}
case 66:
#line 816 "asn1p_y.y"
{
		int ret;
		yyval.a_parg.governor = asn1p_ref_new(yylineno);
		ret = asn1p_ref_add_component(yyval.a_parg.governor, yyvsp[-2].tv_str, 0);
		checkmem(ret == 0);
		yyval.a_parg.argument = yyvsp[0].tv_str;
	;
    break;}
case 67:
#line 823 "asn1p_y.y"
{
		int ret;
		yyval.a_parg.governor = asn1p_ref_new(yylineno);
		ret = asn1p_ref_add_component(yyval.a_parg.governor,
			ASN_EXPR_TYPE2STR(yyvsp[-2].a_type), 1);
		checkmem(ret == 0);
		yyval.a_parg.argument = yyvsp[0].tv_str;
	;
    break;}
case 68:
#line 834 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 69:
#line 839 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-2].a_expr;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 70:
#line 846 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
	;
    break;}
case 71:
#line 849 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[0].tv_str;
		yyval.a_expr->expr_type = A1TC_REFERENCE;
		yyval.a_expr->meta_type = AMT_VALUE;
	;
    break;}
case 72:
#line 873 "asn1p_y.y"
{ yyval.a_expr = asn1p_expr_new(yylineno); ;
    break;}
case 73:
#line 874 "asn1p_y.y"
{ yyval.a_expr = yyvsp[0].a_expr; ;
    break;}
case 74:
#line 877 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 75:
#line 882 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-2].a_expr;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 76:
#line 889 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-1].a_expr;
		assert(yyval.a_expr->Identifier == 0);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyvsp[0].a_marker.flags |= yyval.a_expr->marker.flags;
		yyval.a_expr->marker = yyvsp[0].a_marker;
	;
    break;}
case 77:
#line 896 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-1].a_expr;
		yyvsp[0].a_marker.flags |= yyval.a_expr->marker.flags;
		yyval.a_expr->marker = yyvsp[0].a_marker;
		_fixup_anonymous_identifier(yyval.a_expr);
	;
    break;}
case 78:
#line 902 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->meta_type = yyvsp[0].a_expr->meta_type;
		yyval.a_expr->expr_type = A1TC_COMPONENTS_OF;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 79:
#line 909 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
	;
    break;}
case 80:
#line 915 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 81:
#line 920 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-2].a_expr;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 82:
#line 927 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
		assert(yyval.a_expr->Identifier == 0);
		yyval.a_expr->Identifier = yyvsp[-1].tv_str;
	;
    break;}
case 83:
#line 932 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
	;
    break;}
case 84:
#line 935 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
		_fixup_anonymous_identifier(yyval.a_expr);
	;
    break;}
case 85:
#line 942 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-2].a_expr;
		checkmem(yyval.a_expr);
		yyval.a_expr->with_syntax = yyvsp[0].a_wsynt;
		assert(yyval.a_expr->expr_type == A1TC_CLASSDEF);
		assert(yyval.a_expr->meta_type == AMT_OBJECTCLASS);
	;
    break;}
case 86:
#line 952 "asn1p_y.y"
{ yyval.a_int = 0; ;
    break;}
case 87:
#line 953 "asn1p_y.y"
{ yyval.a_int = 1; ;
    break;}
case 88:
#line 957 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = A1TC_CLASSDEF;
		yyval.a_expr->meta_type = AMT_OBJECTCLASS;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 89:
#line 964 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-2].a_expr;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 90:
#line 974 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[-1].tv_str;
		yyval.a_expr->meta_type = AMT_OBJECTFIELD;
		yyval.a_expr->expr_type = A1TC_CLASSFIELD_TFS;	/* TypeFieldSpec */
		yyval.a_expr->marker = yyvsp[0].a_marker;
	;
    break;}
case 91:
#line 984 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		yyval.a_expr->Identifier = yyvsp[-3].tv_str;
		yyval.a_expr->meta_type = AMT_OBJECTFIELD;
		yyval.a_expr->expr_type = A1TC_CLASSFIELD_FTVFS;	/* FixedTypeValueFieldSpec */
		yyval.a_expr->unique = yyvsp[-1].a_int;
		yyval.a_expr->marker = yyvsp[0].a_marker;
		asn1p_expr_add(yyval.a_expr, yyvsp[-2].a_expr);
	;
    break;}
case 92:
#line 995 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyval.a_expr->meta_type = AMT_OBJECTFIELD;
		yyval.a_expr->expr_type = A1TC_CLASSFIELD_VTVFS;
		yyval.a_expr->reference = yyvsp[-1].a_ref;
		yyval.a_expr->marker = yyvsp[0].a_marker;
	;
    break;}
case 93:
#line 1005 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyval.a_expr->reference = yyvsp[-1].a_ref;
		yyval.a_expr->meta_type = AMT_OBJECTFIELD;
		yyval.a_expr->expr_type = A1TC_CLASSFIELD_OFS;
		yyval.a_expr->marker = yyvsp[0].a_marker;
	;
    break;}
case 94:
#line 1016 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyval.a_expr->meta_type = AMT_OBJECTFIELD;
		yyval.a_expr->expr_type = A1TC_CLASSFIELD_VTVSFS;
		yyval.a_expr->reference = yyvsp[-1].a_ref;
		yyval.a_expr->marker = yyvsp[0].a_marker;
	;
    break;}
case 95:
#line 1026 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyval.a_expr->meta_type = AMT_OBJECTFIELD;
		yyval.a_expr->expr_type = A1TC_CLASSFIELD_FTVSFS;
		asn1p_expr_add(yyval.a_expr, yyvsp[-1].a_expr);
		yyval.a_expr->marker = yyvsp[0].a_marker;
	;
    break;}
case 96:
#line 1037 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = yyvsp[-2].tv_str;
		yyval.a_expr->reference = yyvsp[-1].a_ref;
		yyval.a_expr->meta_type = AMT_OBJECTFIELD;
		yyval.a_expr->expr_type = A1TC_CLASSFIELD_OSFS;
		yyval.a_expr->marker = yyvsp[0].a_marker;
	;
    break;}
case 97:
#line 1049 "asn1p_y.y"
{ yyval.a_wsynt = 0; ;
    break;}
case 98:
#line 1050 "asn1p_y.y"
{
		yyval.a_wsynt = yyvsp[0].a_wsynt;
	;
    break;}
case 99:
#line 1057 "asn1p_y.y"
{ asn1p_lexer_hack_enable_with_syntax(); ;
    break;}
case 100:
#line 1059 "asn1p_y.y"
{
		yyval.a_wsynt = yyvsp[-1].a_wsynt;
	;
    break;}
case 101:
#line 1065 "asn1p_y.y"
{
		yyval.a_wsynt = asn1p_wsyntx_new();
		TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
	;
    break;}
case 102:
#line 1069 "asn1p_y.y"
{
		yyval.a_wsynt = yyvsp[-1].a_wsynt;
		TQ_ADD(&(yyval.a_wsynt->chunks), yyvsp[0].a_wchunk, next);
	;
    break;}
case 103:
#line 1076 "asn1p_y.y"
{
		yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
	;
    break;}
case 104:
#line 1079 "asn1p_y.y"
{
		yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_str, strlen(yyvsp[0].tv_str), 0);
	;
    break;}
case 105:
#line 1082 "asn1p_y.y"
{
		asn1p_ref_t *ref;
		int ret;
		ref = asn1p_ref_new(yylineno);
		checkmem(ref);
		ret = asn1p_ref_add_component(ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
		checkmem(ret == 0);
		yyval.a_wchunk = asn1p_wsyntx_chunk_fromref(ref, 0);
	;
    break;}
case 106:
#line 1091 "asn1p_y.y"
{
		yyval.a_wchunk = asn1p_wsyntx_chunk_fromsyntax(yyvsp[-1].a_wsynt);
	;
    break;}
case 107:
#line 1097 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = strdup("...");
		checkmem(yyval.a_expr->Identifier);
		yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 108:
#line 1105 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = strdup("...");
		checkmem(yyval.a_expr->Identifier);
		yyval.a_expr->value = yyvsp[0].a_value;
		yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 109:
#line 1114 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = strdup("...");
		yyval.a_expr->value = yyvsp[0].a_value;
		checkmem(yyval.a_expr->Identifier);
		yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 110:
#line 1126 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-1].a_expr;
		yyval.a_expr->tag = yyvsp[-2].a_tag;
		/*
		 * Outer constraint for SEQUENCE OF and SET OF applies
		 * to the inner type.
		 */
		if(yyval.a_expr->expr_type == ASN_CONSTR_SEQUENCE_OF
		|| yyval.a_expr->expr_type == ASN_CONSTR_SET_OF) {
			assert(!TQ_FIRST(&(yyval.a_expr->members))->constraints);
			TQ_FIRST(&(yyval.a_expr->members))->constraints = yyvsp[0].a_constr;
		} else {
			if(yyval.a_expr->constraints) {
				assert(!yyvsp[-1].a_expr);
			} else {
				yyval.a_expr->constraints = yyvsp[0].a_constr;
			}
		}
	;
    break;}
case 111:
#line 1148 "asn1p_y.y"
{
		yyval.a_int = asn1p_as_pointer ? EM_INDIRECT : 0;
		asn1p_as_pointer = 0;
	;
    break;}
case 112:
#line 1155 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
		yyval.a_expr->marker.flags |= yyvsp[-1].a_int;

		if((yyval.a_expr->marker.flags & EM_INDIRECT)
		&& (yyval.a_expr->marker.flags & EM_OPTIONAL) != EM_OPTIONAL) {
			fprintf(stderr,
				"INFO: Directive <ASN1C:RepresentAsPointer> "
				"applied to %s at line %d\n",
				ASN_EXPR_TYPE2STR(yyval.a_expr->expr_type)
					?  ASN_EXPR_TYPE2STR(yyval.a_expr->expr_type)
					: "member",
				yyval.a_expr->_lineno
			);
		}
	;
    break;}
case 113:
#line 1174 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[0].a_expr;
	;
    break;}
case 114:
#line 1177 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-1].a_expr;
		assert(yyval.a_expr->expr_type == A1TC_INVALID);
		yyval.a_expr->expr_type = ASN_CONSTR_CHOICE;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 115:
#line 1183 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-1].a_expr;
		assert(yyval.a_expr->expr_type == A1TC_INVALID);
		yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 116:
#line 1189 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-1].a_expr;
		assert(yyval.a_expr->expr_type == A1TC_INVALID);
		yyval.a_expr->expr_type = ASN_CONSTR_SET;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 117:
#line 1195 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->constraints = yyvsp[-4].a_constr;
		yyval.a_expr->expr_type = ASN_CONSTR_SEQUENCE_OF;
		yyval.a_expr->meta_type = AMT_TYPE;
		yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
		yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 118:
#line 1205 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->constraints = yyvsp[-4].a_constr;
		yyval.a_expr->expr_type = ASN_CONSTR_SET_OF;
		yyval.a_expr->meta_type = AMT_TYPE;
		yyvsp[0].a_expr->Identifier = yyvsp[-2].tv_str;
		yyvsp[0].a_expr->tag = yyvsp[-1].a_tag;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 119:
#line 1215 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = ASN_TYPE_ANY;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 120:
#line 1221 "asn1p_y.y"
{
		int ret;
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->reference = asn1p_ref_new(yylineno);
		ret = asn1p_ref_add_component(yyval.a_expr->reference,
			yyvsp[0].tv_str, RLT_lowercase);
		checkmem(ret == 0);
		yyval.a_expr->expr_type = ASN_TYPE_ANY;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 121:
#line 1235 "asn1p_y.y"
{
		int ret;
		yyval.a_expr = yyvsp[-1].a_expr;
		assert(yyval.a_expr->expr_type == 0);
		assert(yyval.a_expr->meta_type == 0);
		assert(yyval.a_expr->reference == 0);
		yyval.a_expr->reference = asn1p_ref_new(yylineno);
		checkmem(yyval.a_expr->reference);
		ret = asn1p_ref_add_component(yyval.a_expr->reference, yyvsp[-3].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		free(yyvsp[-3].tv_str);
		yyval.a_expr->expr_type = A1TC_PARAMETRIZED;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 122:
#line 1259 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->reference = yyvsp[0].a_ref;
		yyval.a_expr->expr_type = A1TC_REFERENCE;
		yyval.a_expr->meta_type = AMT_TYPEREF;
	;
    break;}
case 123:
#line 1266 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->reference = yyvsp[0].a_ref;
		yyval.a_expr->expr_type = A1TC_INSTANCE;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 124:
#line 1281 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = asn1p_ref_new(yylineno);
		checkmem(yyval.a_ref);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		free(yyvsp[0].tv_str);
	;
    break;}
case 125:
#line 1289 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = asn1p_ref_new(yylineno);
		checkmem(yyval.a_ref);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		free(yyvsp[-2].tv_str);
	;
    break;}
case 126:
#line 1299 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = asn1p_ref_new(yylineno);
		checkmem(yyval.a_ref);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		free(yyvsp[-2].tv_str);
	;
    break;}
case 127:
#line 1309 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = asn1p_ref_new(yylineno);
		checkmem(yyval.a_ref);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_lowercase);
		checkmem(ret == 0);
		free(yyvsp[-2].tv_str);
	;
    break;}
case 128:
#line 1319 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = asn1p_ref_new(yylineno);
		checkmem(yyval.a_ref);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
		free(yyvsp[0].tv_str);
		checkmem(ret == 0);
	;
    break;}
case 129:
#line 1327 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = yyvsp[0].a_ref;
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[-2].tv_str, RLT_CAPITALS);
		free(yyvsp[-2].tv_str);
		checkmem(ret == 0);
		/*
		 * Move the last element infront.
		 */
		{
			struct asn1p_ref_component_s tmp_comp;
			tmp_comp = yyval.a_ref->components[yyval.a_ref->comp_count-1];
			memmove(&yyval.a_ref->components[1],
				&yyval.a_ref->components[0],
				sizeof(yyval.a_ref->components[0])
				* (yyval.a_ref->comp_count - 1));
			yyval.a_ref->components[0] = tmp_comp;
		}
	;
    break;}
case 130:
#line 1349 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = asn1p_ref_new(yylineno);
		checkmem(yyval.a_ref);
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
		free(yyvsp[0].a_refcomp.name);
		checkmem(ret == 0);
	;
    break;}
case 131:
#line 1357 "asn1p_y.y"
{
		int ret;
		yyval.a_ref = yyvsp[-2].a_ref;
		ret = asn1p_ref_add_component(yyval.a_ref, yyvsp[0].a_refcomp.name, yyvsp[0].a_refcomp.lex_type);
		free(yyvsp[0].a_refcomp.name);
		checkmem(ret == 0);
	;
    break;}
case 134:
#line 1371 "asn1p_y.y"
{
		yyval.a_refcomp.lex_type = RLT_AmpUppercase;
		yyval.a_refcomp.name = yyvsp[0].tv_str;
	;
    break;}
case 135:
#line 1376 "asn1p_y.y"
{
		yyval.a_refcomp.lex_type = RLT_Amplowercase;
		yyval.a_refcomp.name = yyvsp[0].tv_str;
	;
    break;}
case 136:
#line 1385 "asn1p_y.y"
{
		yyval.a_ref = asn1p_ref_new(yylineno);
		asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_AmpUppercase);
	;
    break;}
case 137:
#line 1389 "asn1p_y.y"
{
		yyval.a_ref = yyval.a_ref;
		asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_AmpUppercase);
	;
    break;}
case 138:
#line 1393 "asn1p_y.y"
{
		yyval.a_ref = yyval.a_ref;
		asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_Amplowercase);
	;
    break;}
case 139:
#line 1400 "asn1p_y.y"
{
		yyval.a_ref = asn1p_ref_new(yylineno);
		asn1p_ref_add_component(yyval.a_ref, yyvsp[0].tv_str, RLT_CAPITALS);
	;
    break;}
case 140:
#line 1420 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-2].a_expr;
		assert(yyval.a_expr->Identifier == NULL);
		yyval.a_expr->Identifier = yyvsp[-3].tv_str;
		yyval.a_expr->meta_type = AMT_VALUE;
		yyval.a_expr->value = yyvsp[0].a_value;
	;
    break;}
case 141:
#line 1430 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(0);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_CHOICE_IDENTIFIER;
		yyval.a_value->value.choice_identifier.identifier = yyvsp[-2].tv_str;
		yyval.a_value->value.choice_identifier.value = yyvsp[0].a_value;
	;
    break;}
case 142:
#line 1437 "asn1p_y.y"
{ asn1p_lexer_hack_push_opaque_state(); ;
    break;}
case 143:
#line 1437 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_UNPARSED;
	;
    break;}
case 144:
#line 1442 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(0);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_NULL;
	;
    break;}
case 145:
#line 1447 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(0);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_FALSE;
	;
    break;}
case 146:
#line 1452 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(0);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_TRUE;
	;
    break;}
case 147:
#line 1457 "asn1p_y.y"
{
		yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'B');
		checkmem(yyval.a_value);
	;
    break;}
case 148:
#line 1461 "asn1p_y.y"
{
		yyval.a_value = _convert_bitstring2binary(yyvsp[0].tv_str, 'H');
		checkmem(yyval.a_value);
	;
    break;}
case 149:
#line 1465 "asn1p_y.y"
{
		yyval.a_value = yyval.a_value;
	;
    break;}
case 150:
#line 1468 "asn1p_y.y"
{
		yyval.a_value = yyvsp[0].a_value;
	;
    break;}
case 151:
#line 1471 "asn1p_y.y"
{
		yyval.a_value = yyvsp[0].a_value;
	;
    break;}
case 152:
#line 1477 "asn1p_y.y"
{
		asn1p_ref_t *ref;
		int ret;
		ref = asn1p_ref_new(yylineno);
		checkmem(ref);
		ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
		checkmem(ret == 0);
		yyval.a_value = asn1p_value_fromref(ref, 0);
		checkmem(yyval.a_value);
		free(yyvsp[0].tv_str);
	;
    break;}
case 153:
#line 1488 "asn1p_y.y"
{
		asn1p_ref_t *ref;
		int ret;
		ref = asn1p_ref_new(yylineno);
		checkmem(ref);
		ret = asn1p_ref_add_component(ref, yyvsp[-2].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
		checkmem(ret == 0);
		yyval.a_value = asn1p_value_fromref(ref, 0);
		checkmem(yyval.a_value);
		free(yyvsp[-2].tv_str);
		free(yyvsp[0].tv_str);
	;
    break;}
case 154:
#line 1506 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
		checkmem(yyval.a_value);
	;
    break;}
case 155:
#line 1510 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_TUPLE;
	;
    break;}
case 156:
#line 1515 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_QUADRUPLE;
	;
    break;}
case 157:
#line 1549 "asn1p_y.y"
{
		yyval.tv_opaque.len = yyvsp[0].tv_opaque.len + 1;
		yyval.tv_opaque.buf = malloc(yyval.tv_opaque.len + 1);
		checkmem(yyval.tv_opaque.buf);
		yyval.tv_opaque.buf[0] = '{';
		memcpy(yyval.tv_opaque.buf + 1, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
		yyval.tv_opaque.buf[yyval.tv_opaque.len] = '\0';
		free(yyvsp[0].tv_opaque.buf);
	;
    break;}
case 158:
#line 1558 "asn1p_y.y"
{
		int newsize = yyvsp[-1].tv_opaque.len + yyvsp[0].tv_opaque.len;
		char *p = malloc(newsize + 1);
		checkmem(p);
		memcpy(p         , yyvsp[-1].tv_opaque.buf, yyvsp[-1].tv_opaque.len);
		memcpy(p + yyvsp[-1].tv_opaque.len, yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len);
		p[newsize] = '\0';
		free(yyvsp[-1].tv_opaque.buf);
		free(yyvsp[0].tv_opaque.buf);
		yyval.tv_opaque.buf = p;
		yyval.tv_opaque.len = newsize;
	;
    break;}
case 159:
#line 1573 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_BOOLEAN; ;
    break;}
case 160:
#line 1574 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_NULL; ;
    break;}
case 161:
#line 1575 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_REAL; ;
    break;}
case 162:
#line 1576 "asn1p_y.y"
{ yyval.a_type = yyvsp[0].a_type; ;
    break;}
case 163:
#line 1577 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_OCTET_STRING; ;
    break;}
case 164:
#line 1578 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_OBJECT_IDENTIFIER; ;
    break;}
case 165:
#line 1579 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_RELATIVE_OID; ;
    break;}
case 166:
#line 1580 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_EXTERNAL; ;
    break;}
case 167:
#line 1581 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_EMBEDDED_PDV; ;
    break;}
case 168:
#line 1582 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_CHARACTER_STRING; ;
    break;}
case 169:
#line 1583 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_UTCTime; ;
    break;}
case 170:
#line 1584 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_GeneralizedTime; ;
    break;}
case 171:
#line 1585 "asn1p_y.y"
{ yyval.a_type = yyvsp[0].a_type; ;
    break;}
case 172:
#line 1592 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_INTEGER; ;
    break;}
case 173:
#line 1593 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_ENUMERATED; ;
    break;}
case 174:
#line 1594 "asn1p_y.y"
{ yyval.a_type = ASN_BASIC_BIT_STRING; ;
    break;}
case 175:
#line 1598 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = yyvsp[0].a_type;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 176:
#line 1604 "asn1p_y.y"
{
		if(yyvsp[0].a_expr) {
			yyval.a_expr = yyvsp[0].a_expr;
		} else {
			yyval.a_expr = asn1p_expr_new(yylineno);
			checkmem(yyval.a_expr);
		}
		yyval.a_expr->expr_type = yyvsp[-1].a_type;
		yyval.a_expr->meta_type = AMT_TYPE;
	;
    break;}
case 177:
#line 1617 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_BMPString; ;
    break;}
case 178:
#line 1618 "asn1p_y.y"
{
		yyval.a_type = ASN_STRING_GeneralString;
		fprintf(stderr, "WARNING: GeneralString is not fully supported\n");
	;
    break;}
case 179:
#line 1622 "asn1p_y.y"
{
		yyval.a_type = ASN_STRING_GraphicString;
		fprintf(stderr, "WARNING: GraphicString is not fully supported\n");
	;
    break;}
case 180:
#line 1626 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_IA5String; ;
    break;}
case 181:
#line 1627 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_ISO646String; ;
    break;}
case 182:
#line 1628 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_NumericString; ;
    break;}
case 183:
#line 1629 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_PrintableString; ;
    break;}
case 184:
#line 1630 "asn1p_y.y"
{
		yyval.a_type = ASN_STRING_T61String;
		fprintf(stderr, "WARNING: T61String is not fully supported\n");
	;
    break;}
case 185:
#line 1634 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_TeletexString; ;
    break;}
case 186:
#line 1635 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_UniversalString; ;
    break;}
case 187:
#line 1636 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_UTF8String; ;
    break;}
case 188:
#line 1637 "asn1p_y.y"
{
		yyval.a_type = ASN_STRING_VideotexString;
		fprintf(stderr, "WARNING: VideotexString is not fully supported\n");
	;
    break;}
case 189:
#line 1641 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_VisibleString; ;
    break;}
case 190:
#line 1642 "asn1p_y.y"
{ yyval.a_type = ASN_STRING_ObjectDescriptor; ;
    break;}
case 196:
#line 1654 "asn1p_y.y"
{ yyval.a_constr = 0; ;
    break;}
case 197:
#line 1655 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 198:
#line 1661 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[0].a_constr, 0);
	;
    break;}
case 199:
#line 1664 "asn1p_y.y"
{
		/*
		 * This is a special case, for compatibility purposes.
		 * It goes without parentheses.
		 */
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_SIZE, yyvsp[-1].a_constr, 0);
	;
    break;}
case 200:
#line 1674 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[-1].a_constr;
	;
    break;}
case 201:
#line 1677 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_SET, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
	;
    break;}
case 202:
#line 1683 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 203:
#line 1686 "asn1p_y.y"
{
		asn1p_constraint_t *ct;
		ct = asn1p_constraint_new(yylineno);
		ct->type = ACT_EL_EXT;
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
	;
    break;}
case 204:
#line 1692 "asn1p_y.y"
{
		asn1p_constraint_t *ct;
		ct = asn1p_constraint_new(yylineno);
		ct->type = ACT_EL_EXT;
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-4].a_constr, ct);
		ct = yyval.a_constr;
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, ct, yyvsp[0].a_constr);
	;
    break;}
case 205:
#line 1703 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 206:
#line 1706 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_AEX, yyvsp[0].a_constr, 0);
	;
    break;}
case 207:
#line 1709 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_UNI, yyvsp[-2].a_constr, yyvsp[0].a_constr);
	;
    break;}
case 208:
#line 1712 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_INT, yyvsp[-2].a_constr, yyvsp[0].a_constr);
	;
    break;}
case 209:
#line 1715 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_EXC, yyvsp[-2].a_constr, yyvsp[0].a_constr);
	;
    break;}
case 210:
#line 1721 "asn1p_y.y"
{
		int ret;
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = yyvsp[-3].a_ctype;
		ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
		checkmem(ret == 0);
	;
    break;}
case 211:
#line 1729 "asn1p_y.y"
{
		int ret;
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = ACT_CA_SET;
		ret = asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
		checkmem(ret == 0);
	;
    break;}
case 212:
#line 1737 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = ACT_EL_VALUE;
		yyval.a_constr->value = yyvsp[0].a_value;
	;
    break;}
case 213:
#line 1743 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = ACT_EL_TYPE;
		yyval.a_constr->containedSubtype = yyvsp[0].a_value;
	;
    break;}
case 214:
#line 1749 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = yyvsp[-1].a_ctype;
		yyval.a_constr->range_start = yyvsp[-2].a_value;
		yyval.a_constr->range_stop = yyvsp[0].a_value;
	;
    break;}
case 215:
#line 1756 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = yyvsp[-1].a_ctype;
		yyval.a_constr->range_start = asn1p_value_fromint(-123);
		yyval.a_constr->range_stop = yyvsp[0].a_value;
		yyval.a_constr->range_start->type = ATV_MIN;
	;
    break;}
case 216:
#line 1764 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = yyvsp[-1].a_ctype;
		yyval.a_constr->range_start = yyvsp[-2].a_value;
		yyval.a_constr->range_stop = asn1p_value_fromint(321);
		yyval.a_constr->range_stop->type = ATV_MAX;
	;
    break;}
case 217:
#line 1772 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = yyvsp[-1].a_ctype;
		yyval.a_constr->range_start = asn1p_value_fromint(-123);
		yyval.a_constr->range_stop = asn1p_value_fromint(321);
		yyval.a_constr->range_start->type = ATV_MIN;
		yyval.a_constr->range_stop->type = ATV_MAX;
	;
    break;}
case 218:
#line 1781 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 219:
#line 1784 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 220:
#line 1788 "asn1p_y.y"
{ asn1p_lexer_hack_push_opaque_state(); ;
    break;}
case 221:
#line 1788 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = ACT_CT_CTDBY;
		yyval.a_constr->value = asn1p_value_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0);
		checkmem(yyval.a_constr->value);
		yyval.a_constr->value->type = ATV_UNPARSED;
	;
    break;}
case 222:
#line 1799 "asn1p_y.y"
{ yyval.a_ctype = ACT_EL_RANGE; ;
    break;}
case 223:
#line 1800 "asn1p_y.y"
{ yyval.a_ctype = ACT_EL_RLRANGE; ;
    break;}
case 224:
#line 1801 "asn1p_y.y"
{ yyval.a_ctype = ACT_EL_LLRANGE; ;
    break;}
case 225:
#line 1802 "asn1p_y.y"
{ yyval.a_ctype = ACT_EL_ULRANGE; ;
    break;}
case 226:
#line 1806 "asn1p_y.y"
{
		yyval.a_ctype = ACT_CT_SIZE;
	;
    break;}
case 227:
#line 1809 "asn1p_y.y"
{
		yyval.a_ctype = ACT_CT_FROM;
	;
    break;}
case 228:
#line 1815 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(0);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_FALSE;
	;
    break;}
case 229:
#line 1820 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(1);
		checkmem(yyval.a_value);
		yyval.a_value->type = ATV_TRUE;
	;
    break;}
case 230:
#line 1825 "asn1p_y.y"
{
		yyval.a_value = yyvsp[0].a_value;
	;
    break;}
case 231:
#line 1828 "asn1p_y.y"
{
		yyval.a_value = yyvsp[0].a_value;
	;
    break;}
case 232:
#line 1831 "asn1p_y.y"
{
		asn1p_ref_t *ref;
		int ret;
		ref = asn1p_ref_new(yylineno);
		checkmem(ref);
		ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_lowercase);
		checkmem(ret == 0);
		yyval.a_value = asn1p_value_fromref(ref, 0);
		checkmem(yyval.a_value);
		free(yyvsp[0].tv_str);
	;
    break;}
case 233:
#line 1845 "asn1p_y.y"
{
		asn1p_ref_t *ref;
		int ret;
		ref = asn1p_ref_new(yylineno);
		checkmem(ref);
		ret = asn1p_ref_add_component(ref, yyvsp[0].tv_str, RLT_UNKNOWN);
		checkmem(ret == 0);
		yyval.a_value = asn1p_value_fromref(ref, 0);
		checkmem(yyval.a_value);
		free(yyvsp[0].tv_str);
	;
    break;}
case 234:
#line 1859 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMP, yyvsp[0].a_constr, 0);
	;
    break;}
case 235:
#line 1862 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-1].a_constr, 0);
	;
    break;}
case 236:
#line 1868 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 237:
#line 1871 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CT_WCOMPS, yyvsp[-2].a_constr, yyvsp[0].a_constr);
	;
    break;}
case 238:
#line 1877 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = ACT_EL_EXT;
		yyval.a_constr->value = asn1p_value_frombuf("...", 3, 0);
	;
    break;}
case 239:
#line 1883 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = ACT_EL_VALUE;
		yyval.a_constr->value = asn1p_value_frombuf(yyvsp[-2].tv_str, strlen(yyvsp[-2].tv_str), 0);
		yyval.a_constr->presence = yyvsp[0].a_pres;
		if(yyvsp[-1].a_constr) asn1p_constraint_insert(yyval.a_constr, yyvsp[-1].a_constr);
	;
    break;}
case 240:
#line 1897 "asn1p_y.y"
{ yyval.a_pres = ACPRES_DEFAULT; ;
    break;}
case 241:
#line 1898 "asn1p_y.y"
{ yyval.a_pres = yyvsp[0].a_pres; ;
    break;}
case 242:
#line 1902 "asn1p_y.y"
{
		yyval.a_pres = ACPRES_PRESENT;
	;
    break;}
case 243:
#line 1905 "asn1p_y.y"
{
		yyval.a_pres = ACPRES_ABSENT;
	;
    break;}
case 244:
#line 1908 "asn1p_y.y"
{
		yyval.a_pres = ACPRES_OPTIONAL;
	;
    break;}
case 245:
#line 1914 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 246:
#line 1917 "asn1p_y.y"
{
		yyval.a_constr = yyvsp[0].a_constr;
	;
    break;}
case 247:
#line 1926 "asn1p_y.y"
{
		asn1p_ref_t *ref = asn1p_ref_new(yylineno);
		asn1p_constraint_t *ct;
		int ret;
		ret = asn1p_ref_add_component(ref, yyvsp[-1].tv_str, 0);
		checkmem(ret == 0);
		ct = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		ct->type = ACT_EL_VALUE;
		ct->value = asn1p_value_fromref(ref, 0);
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, ct, 0);
	;
    break;}
case 248:
#line 1941 "asn1p_y.y"
{
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CRC, yyvsp[-3].a_constr, yyvsp[-1].a_constr);
	;
    break;}
case 249:
#line 1947 "asn1p_y.y"
{
		yyval.a_constr = asn1p_constraint_new(yylineno);
		checkmem(yyval.a_constr);
		yyval.a_constr->type = ACT_EL_VALUE;
		yyval.a_constr->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
	;
    break;}
case 250:
#line 1953 "asn1p_y.y"
{
		asn1p_constraint_t *ct;
		ct = asn1p_constraint_new(yylineno);
		checkmem(ct);
		ct->type = ACT_EL_VALUE;
		ct->value = asn1p_value_fromref(yyvsp[0].a_ref, 0);
		CONSTRAINT_INSERT(yyval.a_constr, ACT_CA_CSV, yyvsp[-2].a_constr, ct);
	;
    break;}
case 251:
#line 1967 "asn1p_y.y"
{
		char *p = malloc(strlen(yyvsp[0].tv_str) + 2);
		int ret;
		*p = '@';
		strcpy(p + 1, yyvsp[0].tv_str);
		yyval.a_ref = asn1p_ref_new(yylineno);
		ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
		checkmem(ret == 0);
		free(p);
		free(yyvsp[0].tv_str);
	;
    break;}
case 252:
#line 1978 "asn1p_y.y"
{
		char *p = malloc(strlen(yyvsp[0].tv_str) + 3);
		int ret;
		p[0] = '@';
		p[1] = '.';
		strcpy(p + 2, yyvsp[0].tv_str);
		yyval.a_ref = asn1p_ref_new(yylineno);
		ret = asn1p_ref_add_component(yyval.a_ref, p, 0);
		checkmem(ret == 0);
		free(p);
		free(yyvsp[0].tv_str);
	;
    break;}
case 253:
#line 1994 "asn1p_y.y"
{
		yyval.tv_str = yyvsp[0].tv_str;
	;
    break;}
case 254:
#line 1997 "asn1p_y.y"
{
		int l1 = strlen(yyvsp[-2].tv_str);
		int l3 = strlen(yyvsp[0].tv_str);
		yyval.tv_str = malloc(l1 + 1 + l3 + 1);
		memcpy(yyval.tv_str, yyvsp[-2].tv_str, l1);
		yyval.tv_str[l1] = '.';
		memcpy(yyval.tv_str + l1 + 1, yyvsp[0].tv_str, l3);
		yyval.tv_str[l1 + 1 + l3] = '\0';
	;
    break;}
case 255:
#line 2015 "asn1p_y.y"
{
		yyval.a_marker.flags = EM_NOMARK;
		yyval.a_marker.default_value = 0;
	;
    break;}
case 256:
#line 2019 "asn1p_y.y"
{ yyval.a_marker = yyvsp[0].a_marker; ;
    break;}
case 257:
#line 2023 "asn1p_y.y"
{
		yyval.a_marker.flags = EM_OPTIONAL | EM_INDIRECT;
		yyval.a_marker.default_value = 0;
	;
    break;}
case 258:
#line 2027 "asn1p_y.y"
{
		yyval.a_marker.flags = EM_DEFAULT;
		yyval.a_marker.default_value = yyvsp[0].a_value;
	;
    break;}
case 259:
#line 2050 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
	;
    break;}
case 260:
#line 2054 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-1].a_expr;
	;
    break;}
case 261:
#line 2060 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 262:
#line 2065 "asn1p_y.y"
{
		yyval.a_expr = yyvsp[-2].a_expr;
		asn1p_expr_add(yyval.a_expr, yyvsp[0].a_expr);
	;
    break;}
case 263:
#line 2072 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = A1TC_UNIVERVAL;
		yyval.a_expr->meta_type = AMT_VALUE;
		yyval.a_expr->Identifier = yyvsp[0].tv_str;
	;
    break;}
case 264:
#line 2079 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = A1TC_UNIVERVAL;
		yyval.a_expr->meta_type = AMT_VALUE;
		yyval.a_expr->Identifier = yyvsp[-3].tv_str;
		yyval.a_expr->value = yyvsp[-1].a_value;
	;
    break;}
case 265:
#line 2087 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = A1TC_UNIVERVAL;
		yyval.a_expr->meta_type = AMT_VALUE;
		yyval.a_expr->Identifier = yyvsp[-3].tv_str;
		yyval.a_expr->value = yyvsp[-1].a_value;
	;
    break;}
case 266:
#line 2095 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->expr_type = A1TC_UNIVERVAL;
		yyval.a_expr->meta_type = AMT_VALUE;
		yyval.a_expr->value = yyvsp[0].a_value;
	;
    break;}
case 267:
#line 2102 "asn1p_y.y"
{
		yyval.a_expr = asn1p_expr_new(yylineno);
		checkmem(yyval.a_expr);
		yyval.a_expr->Identifier = strdup("...");
		checkmem(yyval.a_expr->Identifier);
		yyval.a_expr->expr_type = A1TC_EXTENSIBLE;
		yyval.a_expr->meta_type = AMT_VALUE;
	;
    break;}
case 268:
#line 2113 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
		checkmem(yyval.a_value);
	;
    break;}
case 269:
#line 2117 "asn1p_y.y"
{
		yyval.a_value = asn1p_value_fromint(yyvsp[0].a_int);
		checkmem(yyval.a_value);
	;
    break;}
case 270:
#line 2148 "asn1p_y.y"
{ memset(&yyval.a_tag, 0, sizeof(yyval.a_tag)); ;
    break;}
case 271:
#line 2149 "asn1p_y.y"
{ yyval.a_tag = yyvsp[0].a_tag; ;
    break;}
case 272:
#line 2153 "asn1p_y.y"
{
		yyval.a_tag = yyvsp[-1].a_tag;
		yyval.a_tag.tag_mode = yyvsp[0].a_tag.tag_mode;
	;
    break;}
case 273:
#line 2160 "asn1p_y.y"
{
		yyval.a_tag = yyvsp[-2].a_tag;
		yyval.a_tag.tag_value = yyvsp[-1].a_int;
	;
    break;}
case 274:
#line 2166 "asn1p_y.y"
{ yyval.a_tag.tag_class = TC_CONTEXT_SPECIFIC; ;
    break;}
case 275:
#line 2167 "asn1p_y.y"
{ yyval.a_tag.tag_class = TC_UNIVERSAL; ;
    break;}
case 276:
#line 2168 "asn1p_y.y"
{ yyval.a_tag.tag_class = TC_APPLICATION; ;
    break;}
case 277:
#line 2169 "asn1p_y.y"
{ yyval.a_tag.tag_class = TC_PRIVATE; ;
    break;}
case 278:
#line 2173 "asn1p_y.y"
{ yyval.a_tag.tag_mode = TM_DEFAULT; ;
    break;}
case 279:
#line 2174 "asn1p_y.y"
{ yyval.a_tag.tag_mode = TM_IMPLICIT; ;
    break;}
case 280:
#line 2175 "asn1p_y.y"
{ yyval.a_tag.tag_mode = TM_EXPLICIT; ;
    break;}
case 281:
#line 2179 "asn1p_y.y"
{
		checkmem(yyvsp[0].tv_str);
		yyval.tv_str = yyvsp[0].tv_str;
	;
    break;}
case 282:
#line 2183 "asn1p_y.y"
{
		checkmem(yyvsp[0].tv_str);
		yyval.tv_str = yyvsp[0].tv_str;
	;
    break;}
case 283:
#line 2191 "asn1p_y.y"
{
		checkmem(yyvsp[0].tv_str);
		yyval.tv_str = yyvsp[0].tv_str;
	;
    break;}
case 284:
#line 2198 "asn1p_y.y"
{ yyval.tv_str = 0; ;
    break;}
case 285:
#line 2199 "asn1p_y.y"
{
		yyval.tv_str = yyvsp[0].tv_str;
	;
    break;}
case 286:
#line 2205 "asn1p_y.y"
{
		checkmem(yyvsp[0].tv_str);
		yyval.tv_str = yyvsp[0].tv_str;
	;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 543 "/usr/share/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

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

  yyn = yyr1[yyn];

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

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (int)(sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (int)(sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

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

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

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

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;

 yyacceptlab:
  /* YYACCEPT comes here.  */
  if (yyfree_stacks)
    {
      free (yyss);
      free (yyvs);
#ifdef YYLSP_NEEDED
      free (yyls);
#endif
    }
  return 0;

 yyabortlab:
  /* YYABORT comes here.  */
  if (yyfree_stacks)
    {
      free (yyss);
      free (yyvs);
#ifdef YYLSP_NEEDED
      free (yyls);
#endif
    }
  return 1;
}
#line 2211 "asn1p_y.y"



/*
 * Convert Xstring ('0101'B or '5'H) to the binary vector.
 */
static asn1p_value_t *
_convert_bitstring2binary(char *str, int base) {
	asn1p_value_t *val;
	int slen;
	int memlen;
	int baselen;
	int bits;
	uint8_t *binary_vector;
	uint8_t *bv_ptr;
	uint8_t cur_val;

	assert(str);
	assert(str[0] == '\'');

	switch(base) {
	case 'B':
		baselen = 1;
		break;
	case 'H':
		baselen = 4;
		break;
	default:
		assert(base == 'B' || base == 'H');
		errno = EINVAL;
		return NULL;
	}

	slen = strlen(str);
	assert(str[slen - 1] == base);
	assert(str[slen - 2] == '\'');

	memlen = slen / (8 / baselen);	/* Conservative estimate */

	bv_ptr = binary_vector = malloc(memlen + 1);
	if(bv_ptr == NULL)
		/* ENOMEM */
		return NULL;

	cur_val = 0;
	bits = 0;
	while(*(++str) != '\'') {
		switch(baselen) {
		case 1:
			switch(*str) {
			case '1':
				cur_val |= 1 << (7 - (bits % 8));
			case '0':
				break;
			default:
				assert(!"_y UNREACH1");
			case ' ': case '\r': case '\n':
				continue;
			}
			break;
		case 4:
			switch(*str) {
			case '0': case '1': case '2': case '3': case '4':
			case '5': case '6': case '7': case '8': case '9':
				cur_val |= (*str - '0') << (4 - (bits % 8));
				break;
			case 'A': case 'B': case 'C':
			case 'D': case 'E': case 'F':
				cur_val |= ((*str - 'A') + 10)
					<< (4 - (bits % 8));
				break;
			default:
				assert(!"_y UNREACH2");
			case ' ': case '\r': case '\n':
				continue;
			}
			break;
		}

		bits += baselen;
		if((bits % 8) == 0) {
			*bv_ptr++ = cur_val;
			cur_val = 0;
		}
	}

	*bv_ptr = cur_val;
	assert((bv_ptr - binary_vector) <= memlen);

	val = asn1p_value_frombits(binary_vector, bits, 0);
	if(val == NULL) {
		free(binary_vector);
	}

	return val;
}

/*
 * For unnamed types (used in old X.208 compliant modules)
 * generate some sort of interim names, to not to force human being to fix
 * the specification's compliance to modern ASN.1 standards.
 */
static void
_fixup_anonymous_identifier(asn1p_expr_t *expr) {
	char *p;
	assert(expr->Identifier == 0);

	/*
	 * Try to figure out the type name
	 * without going too much into details
	 */
	expr->Identifier = ASN_EXPR_TYPE2STR(expr->expr_type);
	if(expr->reference && expr->reference->comp_count > 0)
		expr->Identifier = expr->reference->components[0].name;

	fprintf(stderr,
		"WARNING: Line %d: expected lower-case member identifier, "
		"found an unnamed %s.\n"
		"WARNING: Obsolete X.208 syntax detected, "
		"please give the member a name.\n",
		yylineno, expr->Identifier ? expr->Identifier : "type");

	if(!expr->Identifier)
		expr->Identifier = "unnamed";
	expr->Identifier = strdup(expr->Identifier);
	assert(expr->Identifier);
	/* Make a lowercase identifier from the type name */
	for(p = expr->Identifier; *p; p++) {
		switch(*p) {
		case 'A' ... 'Z': *p += 32; break;
		case ' ': *p = '_'; break;
		case '-': *p = '_'; break;
		}
	}
	fprintf(stderr, "NOTE: Assigning temporary identifier \"%s\". "
			"Name clash may occur later.\n",
		expr->Identifier);
}

int
yyerror(const char *msg) {
	extern char *asn1p_text;
	fprintf(stderr,
		"ASN.1 grammar parse error "
		"near line %d (token \"%s\"): %s\n",
		yylineno, asn1p_text, msg);
	return -1;
}