Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
bc55d234
Commit
bc55d234
authored
Aug 13, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed multiple imports problem
parent
d83fae9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
253 additions
and
251 deletions
+253
-251
libasn1parser/asn1p_y.c
libasn1parser/asn1p_y.c
+246
-245
libasn1parser/asn1p_y.h
libasn1parser/asn1p_y.h
+3
-3
libasn1parser/asn1p_y.y
libasn1parser/asn1p_y.y
+4
-3
No files found.
libasn1parser/asn1p_y.c
View file @
bc55d234
...
...
@@ -359,7 +359,7 @@ typedef union {
}
tv_nametag
;
}
yystype
;
/* Line 193 of /usr/local/share/bison/yacc.c. */
#line 363 "
y.tab
.c"
#line 363 "
asn1p_y
.c"
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
...
...
@@ -380,7 +380,7 @@ typedef struct yyltype
/* Line 213 of /usr/local/share/bison/yacc.c. */
#line 384 "
y.tab
.c"
#line 384 "
asn1p_y
.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
...
...
@@ -648,29 +648,29 @@ static const unsigned short yyrline[] =
{
0
,
297
,
297
,
303
,
309
,
325
,
350
,
352
,
355
,
359
,
364
,
371
,
379
,
384
,
388
,
397
,
399
,
407
,
411
,
419
,
423
,
426
,
429
,
437
,
439
,
448
,
452
,
47
7
,
481
,
490
,
49
7
,
510
,
521
,
534
,
541
,
546
,
552
,
558
,
567
,
573
,
5
79
,
586
,
594
,
598
,
601
,
608
,
614
,
620
,
627
,
636
,
64
6
,
654
,
662
,
664
,
676
,
688
,
695
,
711
,
721
,
731
,
74
1
,
746
,
753
,
763
,
769
,
775
,
779
,
791
,
797
,
803
,
81
3
,
815
,
818
,
826
,
832
,
841
,
846
,
863
,
865
,
872
,
87
0
,
879
,
884
,
890
,
894
,
919
,
926
,
931
,
939
,
948
,
95
7
,
968
,
972
,
978
,
986
,
1010
,
1017
,
1031
,
1040
,
1050
,
106
0
,
1068
,
1089
,
1098
,
1107
,
1108
,
1110
,
1117
,
1129
,
1140
,
11
39
,
1146
,
1150
,
1154
,
1158
,
1161
,
1166
,
1178
,
1194
,
1205
,
12
19
,
1221
,
1222
,
1223
,
1224
,
1225
,
1226
,
1227
,
1228
,
1229
,
123
0
,
1231
,
1237
,
1239
,
1240
,
1243
,
1250
,
1262
,
1264
,
1268
,
127
2
,
1273
,
1274
,
1275
,
1276
,
1280
,
1281
,
1282
,
1283
,
1287
,
128
8
,
1291
,
1298
,
1304
,
1310
,
1318
,
1326
,
1332
,
1348
,
1350
,
135
3
,
1353
,
1354
,
1354
,
1355
,
1357
,
1370
,
1373
,
1378
,
1384
,
138
8
,
1395
,
1403
,
1408
,
1417
,
1419
,
1421
,
1426
,
1428
,
1434
,
143
6
,
1441
,
1448
,
1455
,
1463
,
1466
,
1471
,
1473
,
1474
,
1475
,
147
8
,
1482
,
1487
,
1491
,
1502
,
1506
,
1511
,
1516
,
1521
,
1528
,
153
4
,
1538
,
1543
,
1549
,
1561
,
1563
,
1566
,
1570
,
1573
,
1578
,
158
2
,
1590
,
1605
,
1611
,
1618
,
1631
,
1643
,
1658
,
1662
,
1679
,
168
1
,
1684
,
1688
,
1694
,
1697
,
1699
,
1699
,
1719
,
1724
,
1729
,
173
5
,
1741
,
1749
,
1757
,
1765
,
1772
,
1782
,
1787
,
1817
,
1819
,
182
2
,
1827
,
1831
,
1837
,
1842
,
1848
,
1855
,
1862
,
1867
423
,
426
,
429
,
437
,
439
,
448
,
452
,
47
8
,
482
,
491
,
49
8
,
511
,
522
,
535
,
542
,
547
,
553
,
559
,
568
,
574
,
5
80
,
587
,
595
,
599
,
602
,
609
,
615
,
621
,
628
,
637
,
64
7
,
655
,
663
,
665
,
677
,
689
,
696
,
712
,
722
,
732
,
74
2
,
747
,
754
,
764
,
770
,
776
,
780
,
792
,
798
,
804
,
81
4
,
816
,
819
,
827
,
833
,
842
,
847
,
864
,
866
,
873
,
87
1
,
880
,
885
,
891
,
895
,
920
,
927
,
932
,
940
,
949
,
95
8
,
969
,
973
,
979
,
987
,
1011
,
1018
,
1032
,
1041
,
1051
,
106
1
,
1069
,
1090
,
1099
,
1108
,
1109
,
1111
,
1118
,
1130
,
1141
,
11
40
,
1147
,
1151
,
1155
,
1159
,
1162
,
1167
,
1179
,
1195
,
1206
,
12
20
,
1222
,
1223
,
1224
,
1225
,
1226
,
1227
,
1228
,
1229
,
1230
,
123
1
,
1232
,
1238
,
1240
,
1241
,
1244
,
1251
,
1263
,
1265
,
1269
,
127
3
,
1274
,
1275
,
1276
,
1277
,
1281
,
1282
,
1283
,
1284
,
1288
,
128
9
,
1292
,
1299
,
1305
,
1311
,
1319
,
1327
,
1333
,
1349
,
1351
,
135
4
,
1354
,
1355
,
1355
,
1356
,
1358
,
1371
,
1374
,
1379
,
1385
,
138
9
,
1396
,
1404
,
1409
,
1418
,
1420
,
1422
,
1427
,
1429
,
1435
,
143
7
,
1442
,
1449
,
1456
,
1464
,
1467
,
1472
,
1474
,
1475
,
1476
,
147
9
,
1483
,
1488
,
1492
,
1503
,
1507
,
1512
,
1517
,
1522
,
1529
,
153
5
,
1539
,
1544
,
1550
,
1562
,
1564
,
1567
,
1571
,
1574
,
1579
,
158
3
,
1591
,
1606
,
1612
,
1619
,
1632
,
1644
,
1659
,
1663
,
1680
,
168
2
,
1685
,
1689
,
1695
,
1698
,
1700
,
1700
,
1720
,
1725
,
1730
,
173
6
,
1742
,
1750
,
1758
,
1766
,
1773
,
1783
,
1788
,
1818
,
1820
,
182
3
,
1828
,
1832
,
1838
,
1843
,
1849
,
1856
,
1863
,
1868
};
#endif
...
...
@@ -1893,12 +1893,13 @@ yyreduce:
#error MY_IMPORT DEFINED ELSEWHERE!
#endif
#define MY_IMPORT(foo,field) do { \
if
(TQ_FIRST(&(yyvsp[0].a_module->foo))) { \
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)
} \
assert(TQ_FIRST(&(yyvsp[0].a_module->foo)) == 0); \
} while(0)
MY_IMPORT
(
imports
,
xp_next
);
MY_IMPORT
(
exports
,
xp_next
);
...
...
@@ -1909,14 +1910,14 @@ yyreduce:
break
;
case
27
:
#line 47
8
"asn1p_y.y"
#line 47
9
"asn1p_y.y"
{
yyval
.
a_module
=
yyvsp
[
0
].
a_module
;
}
break
;
case
28
:
#line 48
1
"asn1p_y.y"
#line 48
2
"asn1p_y.y"
{
yyval
.
a_module
=
asn1p_module_new
();
checkmem
(
yyval
.
a_module
);
...
...
@@ -1929,7 +1930,7 @@ yyreduce:
break
;
case
29
:
#line 49
0
"asn1p_y.y"
#line 49
1
"asn1p_y.y"
{
yyval
.
a_module
=
asn1p_module_new
();
checkmem
(
yyval
.
a_module
);
...
...
@@ -1940,7 +1941,7 @@ yyreduce:
break
;
case
30
:
#line 49
7
"asn1p_y.y"
#line 49
8
"asn1p_y.y"
{
yyval
.
a_module
=
asn1p_module_new
();
checkmem
(
yyval
.
a_module
);
...
...
@@ -1951,7 +1952,7 @@ yyreduce:
break
;
case
31
:
#line 51
0
"asn1p_y.y"
#line 51
1
"asn1p_y.y"
{
yyval
.
a_module
=
asn1p_module_new
();
checkmem
(
yyval
.
a_module
);
...
...
@@ -1962,7 +1963,7 @@ yyreduce:
break
;
case
32
:
#line 52
1
"asn1p_y.y"
#line 52
2
"asn1p_y.y"
{
return
yyerror
(
"Attempt to redefine a standard basic type, "
...
...
@@ -1972,21 +1973,21 @@ yyreduce:
break
;
case
33
:
#line 53
5
"asn1p_y.y"
#line 53
6
"asn1p_y.y"
{
yyval
.
a_module
=
yyvsp
[
-
1
].
a_module
;
}
break
;
case
34
:
#line 54
1
"asn1p_y.y"
#line 54
2
"asn1p_y.y"
{
return
yyerror
(
"Empty IMPORTS list"
);
}
break
;
case
35
:
#line 54
7
"asn1p_y.y"
#line 54
8
"asn1p_y.y"
{
yyval
.
a_module
=
asn1p_module_new
();
checkmem
(
yyval
.
a_module
);
...
...
@@ -1995,7 +1996,7 @@ yyreduce:
break
;
case
36
:
#line 55
2
"asn1p_y.y"
#line 55
3
"asn1p_y.y"
{
yyval
.
a_module
=
yyvsp
[
-
1
].
a_module
;
TQ_ADD
(
&
(
yyval
.
a_module
->
imports
),
yyvsp
[
0
].
a_xports
,
xp_next
);
...
...
@@ -2003,7 +2004,7 @@ yyreduce:
break
;
case
37
:
#line 5
59
"asn1p_y.y"
#line 5
60
"asn1p_y.y"
{
yyval
.
a_xports
=
yyvsp
[
-
3
].
a_xports
;
yyval
.
a_xports
->
from
=
yyvsp
[
-
1
].
tv_str
;
...
...
@@ -2013,7 +2014,7 @@ yyreduce:
break
;
case
38
:
#line 56
8
"asn1p_y.y"
#line 56
9
"asn1p_y.y"
{
yyval
.
a_xports
=
asn1p_xports_new
();
checkmem
(
yyval
.
a_xports
);
...
...
@@ -2022,7 +2023,7 @@ yyreduce:
break
;
case
39
:
#line 57
3
"asn1p_y.y"
#line 57
4
"asn1p_y.y"
{
yyval
.
a_xports
=
yyvsp
[
-
2
].
a_xports
;
TQ_ADD
(
&
(
yyval
.
a_xports
->
members
),
yyvsp
[
0
].
a_expr
,
next
);
...
...
@@ -2030,7 +2031,7 @@ yyreduce:
break
;
case
40
:
#line 58
0
"asn1p_y.y"
#line 58
1
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2040,7 +2041,7 @@ yyreduce:
break
;
case
41
:
#line 58
6
"asn1p_y.y"
#line 58
7
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2050,21 +2051,21 @@ yyreduce:
break
;
case
42
:
#line 59
5
"asn1p_y.y"
#line 59
6
"asn1p_y.y"
{
yyval
.
a_xports
=
yyvsp
[
-
1
].
a_xports
;
}
break
;
case
43
:
#line 59
8
"asn1p_y.y"
#line 59
9
"asn1p_y.y"
{
yyval
.
a_xports
=
0
;
}
break
;
case
44
:
#line 60
1
"asn1p_y.y"
#line 60
2
"asn1p_y.y"
{
/* Empty EXPORTS clause effectively prohibits export. */
yyval
.
a_xports
=
asn1p_xports_new
();
...
...
@@ -2073,7 +2074,7 @@ yyreduce:
break
;
case
45
:
#line 6
09
"asn1p_y.y"
#line 6
10
"asn1p_y.y"
{
yyval
.
a_xports
=
asn1p_xports_new
();
assert
(
yyval
.
a_xports
);
...
...
@@ -2082,7 +2083,7 @@ yyreduce:
break
;
case
46
:
#line 61
4
"asn1p_y.y"
#line 61
5
"asn1p_y.y"
{
yyval
.
a_xports
=
yyvsp
[
-
2
].
a_xports
;
TQ_ADD
(
&
(
yyval
.
a_xports
->
members
),
yyvsp
[
0
].
a_expr
,
next
);
...
...
@@ -2090,7 +2091,7 @@ yyreduce:
break
;
case
47
:
#line 62
1
"asn1p_y.y"
#line 62
2
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2100,7 +2101,7 @@ yyreduce:
break
;
case
48
:
#line 62
7
"asn1p_y.y"
#line 62
8
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2110,7 +2111,7 @@ yyreduce:
break
;
case
49
:
#line 63
7
"asn1p_y.y"
#line 63
8
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
4
].
a_expr
;
assert
(
yyval
.
a_expr
->
Identifier
==
0
);
...
...
@@ -2121,7 +2122,7 @@ yyreduce:
break
;
case
50
:
#line 64
7
"asn1p_y.y"
#line 64
8
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2132,7 +2133,7 @@ yyreduce:
break
;
case
51
:
#line 65
4
"asn1p_y.y"
#line 65
5
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2142,18 +2143,18 @@ yyreduce:
break
;
case
52
:
#line 66
3
"asn1p_y.y"
#line 66
4
"asn1p_y.y"
{
}
break
;
case
53
:
#line 66
4
"asn1p_y.y"
#line 66
5
"asn1p_y.y"
{
}
break
;
case
54
:
#line 68
0
"asn1p_y.y"
#line 68
1
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2165,7 +2166,7 @@ yyreduce:
break
;
case
55
:
#line 68
8
"asn1p_y.y"
#line 68
9
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
yyval
.
a_expr
->
Identifier
=
yyvsp
[
-
3
].
tv_str
;
...
...
@@ -2176,7 +2177,7 @@ yyreduce:
break
;
case
56
:
#line 69
5
"asn1p_y.y"
#line 69
6
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
yyval
.
a_expr
->
Identifier
=
yyvsp
[
-
2
].
tv_str
;
...
...
@@ -2186,7 +2187,7 @@ yyreduce:
break
;
case
57
:
#line 71
2
"asn1p_y.y"
#line 71
3
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
assert
(
yyval
.
a_expr
->
Identifier
==
0
);
...
...
@@ -2197,7 +2198,7 @@ yyreduce:
break
;
case
58
:
#line 72
2
"asn1p_y.y"
#line 72
3
"asn1p_y.y"
{
int
ret
;
yyval
.
a_plist
=
asn1p_paramlist_new
(
yylineno
);
...
...
@@ -2210,7 +2211,7 @@ yyreduce:
break
;
case
59
:
#line 73
1
"asn1p_y.y"
#line 73
2
"asn1p_y.y"
{
int
ret
;
yyval
.
a_plist
=
yyvsp
[
-
2
].
a_plist
;
...
...
@@ -2222,7 +2223,7 @@ yyreduce:
break
;
case
60
:
#line 74
2
"asn1p_y.y"
#line 74
3
"asn1p_y.y"
{
yyval
.
a_parg
.
governor
=
NULL
;
yyval
.
a_parg
.
argument
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -2230,7 +2231,7 @@ yyreduce:
break
;
case
61
:
#line 74
6
"asn1p_y.y"
#line 74
7
"asn1p_y.y"
{
int
ret
;
yyval
.
a_parg
.
governor
=
asn1p_ref_new
(
yylineno
);
...
...
@@ -2241,7 +2242,7 @@ yyreduce:
break
;
case
62
:
#line 75
3
"asn1p_y.y"
#line 75
4
"asn1p_y.y"
{
int
ret
;
yyval
.
a_parg
.
governor
=
asn1p_ref_new
(
yylineno
);
...
...
@@ -2253,7 +2254,7 @@ yyreduce:
break
;
case
63
:
#line 76
4
"asn1p_y.y"
#line 76
5
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2262,7 +2263,7 @@ yyreduce:
break
;
case
64
:
#line 7
69
"asn1p_y.y"
#line 7
70
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
2
].
a_expr
;
TQ_ADD
(
&
(
yyval
.
a_expr
->
members
),
yyvsp
[
0
].
a_expr
,
next
);
...
...
@@ -2270,14 +2271,14 @@ yyreduce:
break
;
case
65
:
#line 77
6
"asn1p_y.y"
#line 77
7
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
}
break
;
case
66
:
#line 7
79
"asn1p_y.y"
#line 7
80
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2288,7 +2289,7 @@ yyreduce:
break
;
case
67
:
#line 79
2
"asn1p_y.y"
#line 79
3
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2297,7 +2298,7 @@ yyreduce:
break
;
case
68
:
#line 79
7
"asn1p_y.y"
#line 79
8
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
2
].
a_expr
;
TQ_ADD
(
&
(
yyval
.
a_expr
->
members
),
yyvsp
[
0
].
a_expr
,
next
);
...
...
@@ -2305,7 +2306,7 @@ yyreduce:
break
;
case
69
:
#line 80
4
"asn1p_y.y"
#line 80
5
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
2
].
a_expr
;
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2316,17 +2317,17 @@ yyreduce:
break
;
case
70
:
#line 81
4
"asn1p_y.y"
#line 81
5
"asn1p_y.y"
{
yyval
.
a_int
=
0
;
}
break
;
case
71
:
#line 81
5
"asn1p_y.y"
#line 81
6
"asn1p_y.y"
{
yyval
.
a_int
=
1
;
}
break
;
case
72
:
#line 8
19
"asn1p_y.y"
#line 8
20
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2337,7 +2338,7 @@ yyreduce:
break
;
case
73
:
#line 82
6
"asn1p_y.y"
#line 82
7
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
2
].
a_expr
;
TQ_ADD
(
&
(
yyval
.
a_expr
->
members
),
yyvsp
[
0
].
a_expr
,
next
);
...
...
@@ -2345,7 +2346,7 @@ yyreduce:
break
;
case
74
:
#line 83
3
"asn1p_y.y"
#line 83
4
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2357,7 +2358,7 @@ yyreduce:
break
;
case
75
:
#line 84
1
"asn1p_y.y"
#line 84
2
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
1
].
a_expr
;
yyval
.
a_expr
->
Identifier
=
yyvsp
[
-
2
].
a_refcomp
.
name
;
...
...
@@ -2366,7 +2367,7 @@ yyreduce:
break
;
case
76
:
#line 84
6
"asn1p_y.y"
#line 84
7
"asn1p_y.y"
{
int
ret
;
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
...
...
@@ -2385,31 +2386,31 @@ yyreduce:
break
;
case
77
:
#line 86
4
"asn1p_y.y"
#line 86
5
"asn1p_y.y"
{
yyval
.
a_wsynt
=
0
;
}
break
;
case
78
:
#line 86
5
"asn1p_y.y"
#line 86
6
"asn1p_y.y"
{
yyval
.
a_wsynt
=
yyvsp
[
0
].
a_wsynt
;
}
break
;
case
79
:
#line 87
2
"asn1p_y.y"
#line 87
3
"asn1p_y.y"
{
asn1p_lexer_hack_enable_with_syntax
();
}
break
;
case
80
:
#line 87
4
"asn1p_y.y"
#line 87
5
"asn1p_y.y"
{
yyval
.
a_wsynt
=
yyvsp
[
-
1
].
a_wsynt
;
}
break
;
case
81
:
#line 88
0
"asn1p_y.y"
#line 88
1
"asn1p_y.y"
{
yyval
.
a_wsynt
=
asn1p_wsyntx_new
();
TQ_ADD
(
&
(
yyval
.
a_wsynt
->
chunks
),
yyvsp
[
0
].
a_wchunk
,
next
);
...
...
@@ -2417,7 +2418,7 @@ yyreduce:
break
;
case
82
:
#line 88
4
"asn1p_y.y"
#line 88
5
"asn1p_y.y"
{
yyval
.
a_wsynt
=
yyvsp
[
-
1
].
a_wsynt
;
TQ_ADD
(
&
(
yyval
.
a_wsynt
->
chunks
),
yyvsp
[
0
].
a_wchunk
,
next
);
...
...
@@ -2425,14 +2426,14 @@ yyreduce:
break
;
case
83
:
#line 89
1
"asn1p_y.y"
#line 89
2
"asn1p_y.y"
{
yyval
.
a_wchunk
=
asn1p_wsyntx_chunk_frombuf
(
yyvsp
[
0
].
tv_opaque
.
buf
,
yyvsp
[
0
].
tv_opaque
.
len
,
0
);
}
break
;
case
84
:
#line 89
4
"asn1p_y.y"
#line 89
5
"asn1p_y.y"
{
asn1p_ref_t
*
ref
;
int
ret
;
...
...
@@ -2445,7 +2446,7 @@ yyreduce:
break
;
case
85
:
#line 92
0
"asn1p_y.y"
#line 92
1
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
assert
(
yyval
.
a_expr
->
Identifier
==
0
);
...
...
@@ -2455,14 +2456,14 @@ yyreduce:
break
;
case
86
:
#line 92
6
"asn1p_y.y"
#line 92
7
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
}
break
;
case
87
:
#line 93
2
"asn1p_y.y"
#line 93
3
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
2
].
a_expr
;
yyval
.
a_expr
->
constraints
=
yyvsp
[
-
1
].
a_constr
;
...
...
@@ -2471,7 +2472,7 @@ yyreduce:
break
;
case
88
:
#line 94
0
"asn1p_y.y"
#line 94
1
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2483,7 +2484,7 @@ yyreduce:
break
;
case
89
:
#line 94
8
"asn1p_y.y"
#line 94
9
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2496,7 +2497,7 @@ yyreduce:
break
;
case
90
:
#line 95
7
"asn1p_y.y"
#line 95
8
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2509,14 +2510,14 @@ yyreduce:
break
;
case
91
:
#line 9
69
"asn1p_y.y"
#line 9
70
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
}
break
;
case
92
:
#line 97
2
"asn1p_y.y"
#line 97
3
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2526,7 +2527,7 @@ yyreduce:
break
;
case
93
:
#line 97
8
"asn1p_y.y"
#line 97
9
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2535,7 +2536,7 @@ yyreduce:
break
;
case
94
:
#line 98
6
"asn1p_y.y"
#line 98
7
"asn1p_y.y"
{
int
ret
;
yyval
.
a_expr
=
yyvsp
[
-
1
].
a_expr
;
...
...
@@ -2553,7 +2554,7 @@ yyreduce:
break
;
case
95
:
#line 101
0
"asn1p_y.y"
#line 101
1
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2564,7 +2565,7 @@ yyreduce:
break
;
case
96
:
#line 101
7
"asn1p_y.y"
#line 101
8
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
yylineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2575,7 +2576,7 @@ yyreduce:
break
;
case
97
:
#line 103
2
"asn1p_y.y"
#line 103
3
"asn1p_y.y"
{
int
ret
;
yyval
.
a_ref
=
asn1p_ref_new
(
yylineno
);
...
...
@@ -2587,7 +2588,7 @@ yyreduce:
break
;
case
98
:
#line 104
0
"asn1p_y.y"
#line 104
1
"asn1p_y.y"
{
int
ret
;
yyval
.
a_ref
=
asn1p_ref_new
(
yylineno
);
...
...
@@ -2601,7 +2602,7 @@ yyreduce:
break
;
case
99
:
#line 105
0
"asn1p_y.y"
#line 105
1
"asn1p_y.y"
{
int
ret
;
yyval
.
a_ref
=
asn1p_ref_new
(
yylineno
);
...
...
@@ -2615,7 +2616,7 @@ yyreduce:
break
;
case
100
:
#line 106
0
"asn1p_y.y"
#line 106
1
"asn1p_y.y"
{
int
ret
;
yyval
.
a_ref
=
asn1p_ref_new
(
yylineno
);
...
...
@@ -2627,7 +2628,7 @@ yyreduce:
break
;
case
101
:
#line 106
8
"asn1p_y.y"
#line 106
9
"asn1p_y.y"
{
int
ret
;
yyval
.
a_ref
=
yyvsp
[
0
].
a_ref
;
...
...
@@ -2650,7 +2651,7 @@ yyreduce:
break
;
case
102
:
#line 109
0
"asn1p_y.y"
#line 109
1
"asn1p_y.y"
{
int
ret
;
yyval
.
a_ref
=
asn1p_ref_new
(
yylineno
);
...
...
@@ -2662,7 +2663,7 @@ yyreduce:
break
;
case
103
:
#line 109
8
"asn1p_y.y"
#line 109
9
"asn1p_y.y"
{
int
ret
;
yyval
.
a_ref
=
yyvsp
[
-
2
].
a_ref
;
...
...
@@ -2673,7 +2674,7 @@ yyreduce:
break
;
case
106
:
#line 111
2
"asn1p_y.y"
#line 111
3
"asn1p_y.y"
{
yyval
.
a_refcomp
.
lex_type
=
RLT_AmpUppercase
;
yyval
.
a_refcomp
.
name
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -2681,7 +2682,7 @@ yyreduce:
break
;
case
107
:
#line 111
7
"asn1p_y.y"
#line 111
8
"asn1p_y.y"
{
yyval
.
a_refcomp
.
lex_type
=
RLT_Amplowercase
;
yyval
.
a_refcomp
.
name
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -2689,7 +2690,7 @@ yyreduce:
break
;
case
108
:
#line 113
0
"asn1p_y.y"
#line 113
1
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
2
].
a_expr
;
assert
(
yyval
.
a_expr
->
Identifier
==
NULL
);
...
...
@@ -2700,12 +2701,12 @@ yyreduce:
break
;
case
109
:
#line 114
0
"asn1p_y.y"
#line 114
1
"asn1p_y.y"
{
asn1p_lexer_hack_push_opaque_state
();
}
break
;
case
110
:
#line 114
1
"asn1p_y.y"
#line 114
2
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_frombuf
(
yyvsp
[
0
].
tv_opaque
.
buf
,
yyvsp
[
0
].
tv_opaque
.
len
,
0
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -2714,7 +2715,7 @@ yyreduce:
break
;
case
111
:
#line 114
6
"asn1p_y.y"
#line 114
7
"asn1p_y.y"
{
yyval
.
a_value
=
_convert_bitstring2binary
(
yyvsp
[
0
].
tv_str
,
'B'
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -2722,7 +2723,7 @@ yyreduce:
break
;
case
112
:
#line 115
0
"asn1p_y.y"
#line 115
1
"asn1p_y.y"
{
yyval
.
a_value
=
_convert_bitstring2binary
(
yyvsp
[
0
].
tv_str
,
'H'
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -2730,7 +2731,7 @@ yyreduce:
break
;
case
113
:
#line 115
4
"asn1p_y.y"
#line 115
5
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_frombuf
(
yyvsp
[
0
].
tv_opaque
.
buf
,
yyvsp
[
0
].
tv_opaque
.
len
,
0
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -2738,21 +2739,21 @@ yyreduce:
break
;
case
114
:
#line 115
8
"asn1p_y.y"
#line 115
9
"asn1p_y.y"
{
yyval
.
a_value
=
yyvsp
[
0
].
a_value
;
}
break
;
case
115
:
#line 116
1
"asn1p_y.y"
#line 116
2
"asn1p_y.y"
{
yyval
.
a_value
=
yyvsp
[
0
].
a_value
;
}
break
;
case
116
:
#line 116
7
"asn1p_y.y"
#line 116
8
"asn1p_y.y"
{
asn1p_ref_t
*
ref
;
int
ret
;
...
...
@@ -2767,7 +2768,7 @@ yyreduce:
break
;
case
117
:
#line 117
8
"asn1p_y.y"
#line 117
9
"asn1p_y.y"
{
asn1p_ref_t
*
ref
;
int
ret
;
...
...
@@ -2785,7 +2786,7 @@ yyreduce:
break
;
case
118
:
#line 119
5
"asn1p_y.y"
#line 119
6
"asn1p_y.y"
{
yyval
.
tv_opaque
.
len
=
yyvsp
[
0
].
tv_opaque
.
len
+
2
;
yyval
.
tv_opaque
.
buf
=
malloc
(
yyval
.
tv_opaque
.
len
+
1
);
...
...
@@ -2799,7 +2800,7 @@ yyreduce:
break
;
case
119
:
#line 120
5
"asn1p_y.y"
#line 120
6
"asn1p_y.y"
{
int
newsize
=
yyvsp
[
-
1
].
tv_opaque
.
len
+
yyvsp
[
0
].
tv_opaque
.
len
;
char
*
p
=
malloc
(
newsize
+
1
);
...
...
@@ -2815,82 +2816,82 @@ yyreduce:
break
;
case
120
:
#line 122
0
"asn1p_y.y"
#line 122
1
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_BOOLEAN
;
}
break
;
case
121
:
#line 122
1
"asn1p_y.y"
#line 122
2
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_NULL
;
}
break
;
case
122
:
#line 122
2
"asn1p_y.y"
#line 122
3
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_REAL
;
}
break
;
case
123
:
#line 122
3
"asn1p_y.y"
#line 122
4
"asn1p_y.y"
{
yyval
.
a_type
=
yyvsp
[
0
].
a_type
;
}
break
;
case
124
:
#line 122
4
"asn1p_y.y"
#line 122
5
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_OCTET_STRING
;
}
break
;
case
125
:
#line 122
5
"asn1p_y.y"
#line 122
6
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_OBJECT_IDENTIFIER
;
}
break
;
case
126
:
#line 122
6
"asn1p_y.y"
#line 122
7
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_RELATIVE_OID
;
}
break
;
case
127
:
#line 122
7
"asn1p_y.y"
#line 122
8
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_EXTERNAL
;
}
break
;
case
128
:
#line 122
8
"asn1p_y.y"
#line 122
9
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_EMBEDDED_PDV
;
}
break
;
case
129
:
#line 12
29
"asn1p_y.y"
#line 12
30
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_CHARACTER_STRING
;
}
break
;
case
130
:
#line 123
0
"asn1p_y.y"
#line 123
1
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_UTCTime
;
}
break
;
case
131
:
#line 123
1
"asn1p_y.y"
#line 123
2
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_GeneralizedTime
;
}
break
;
case
132
:
#line 123
8
"asn1p_y.y"
#line 123
9
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_INTEGER
;
}
break
;
case
133
:
#line 12
39
"asn1p_y.y"
#line 12
40
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_ENUMERATED
;
}
break
;
case
134
:
#line 124
0
"asn1p_y.y"
#line 124
1
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_BASIC_BIT_STRING
;
}
break
;
case
135
:
#line 124
4
"asn1p_y.y"
#line 124
5
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -2900,7 +2901,7 @@ yyreduce:
break
;
case
136
:
#line 125
0
"asn1p_y.y"
#line 125
1
"asn1p_y.y"
{
if
(
yyvsp
[
0
].
a_expr
)
{
yyval
.
a_expr
=
yyvsp
[
0
].
a_expr
;
...
...
@@ -2914,12 +2915,12 @@ yyreduce:
break
;
case
137
:
#line 126
3
"asn1p_y.y"
#line 126
4
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_BMPString
;
}
break
;
case
138
:
#line 126
4
"asn1p_y.y"
#line 126
5
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_GeneralString
;
return
yyerror
(
"GeneralString is not supported"
);
...
...
@@ -2927,7 +2928,7 @@ yyreduce:
break
;
case
139
:
#line 126
8
"asn1p_y.y"
#line 126
9
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_GraphicString
;
return
yyerror
(
"GraphicString is not supported"
);
...
...
@@ -2935,27 +2936,27 @@ yyreduce:
break
;
case
140
:
#line 127
2
"asn1p_y.y"
#line 127
3
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_IA5String
;
}
break
;
case
141
:
#line 127
3
"asn1p_y.y"
#line 127
4
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_ISO646String
;
}
break
;
case
142
:
#line 127
4
"asn1p_y.y"
#line 127
5
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_NumericString
;
}
break
;
case
143
:
#line 127
5
"asn1p_y.y"
#line 127
6
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_PrintableString
;
}
break
;
case
144
:
#line 127
6
"asn1p_y.y"
#line 127
7
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_T61String
;
return
yyerror
(
"T61String not implemented yet"
);
...
...
@@ -2963,22 +2964,22 @@ yyreduce:
break
;
case
145
:
#line 128
0
"asn1p_y.y"
#line 128
1
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_TeletexString
;
}
break
;
case
146
:
#line 128
1
"asn1p_y.y"
#line 128
2
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_UniversalString
;
}
break
;
case
147
:
#line 128
2
"asn1p_y.y"
#line 128
3
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_UTF8String
;
}
break
;
case
148
:
#line 128
3
"asn1p_y.y"
#line 128
4
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_VideotexString
;
return
yyerror
(
"VideotexString is no longer supported"
);
...
...
@@ -2986,17 +2987,17 @@ yyreduce:
break
;
case
149
:
#line 128
7
"asn1p_y.y"
#line 128
8
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_VisibleString
;
}
break
;
case
150
:
#line 128
8
"asn1p_y.y"
#line 128
9
"asn1p_y.y"
{
yyval
.
a_type
=
ASN_STRING_ObjectDescriptor
;
}
break
;
case
151
:
#line 129
2
"asn1p_y.y"
#line 129
3
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
1
].
a_expr
;
assert
(
yyval
.
a_expr
->
expr_type
==
A1TC_INVALID
);
...
...
@@ -3006,7 +3007,7 @@ yyreduce:
break
;
case
152
:
#line 129
8
"asn1p_y.y"
#line 129
9
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
1
].
a_expr
;
assert
(
yyval
.
a_expr
->
expr_type
==
A1TC_INVALID
);
...
...
@@ -3016,7 +3017,7 @@ yyreduce:
break
;
case
153
:
#line 130
4
"asn1p_y.y"
#line 130
5
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
1
].
a_expr
;
assert
(
yyval
.
a_expr
->
expr_type
==
A1TC_INVALID
);
...
...
@@ -3026,7 +3027,7 @@ yyreduce:
break
;
case
154
:
#line 131
0
"asn1p_y.y"
#line 131
1
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3038,7 +3039,7 @@ yyreduce:
break
;
case
155
:
#line 131
8
"asn1p_y.y"
#line 131
9
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3050,7 +3051,7 @@ yyreduce:
break
;
case
156
:
#line 132
6
"asn1p_y.y"
#line 132
7
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3060,7 +3061,7 @@ yyreduce:
break
;
case
157
:
#line 133
2
"asn1p_y.y"
#line 133
3
"asn1p_y.y"
{
int
ret
;
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
...
...
@@ -3075,17 +3076,17 @@ yyreduce:
break
;
case
158
:
#line 13
49
"asn1p_y.y"
#line 13
50
"asn1p_y.y"
{
yyval
.
a_constr
=
0
;
}
break
;
case
159
:
#line 135
0
"asn1p_y.y"
#line 135
1
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
165
:
#line 135
8
"asn1p_y.y"
#line 135
9
"asn1p_y.y"
{
/*
* This is a special case, for compatibility purposes.
...
...
@@ -3101,35 +3102,35 @@ yyreduce:
break
;
case
166
:
#line 137
0
"asn1p_y.y"
#line 137
1
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CA_SET
,
yyvsp
[
0
].
a_constr
,
0
);
}
break
;
case
167
:
#line 137
3
"asn1p_y.y"
#line 137
4
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CA_SET
,
yyvsp
[
-
1
].
a_constr
,
yyvsp
[
0
].
a_constr
);
}
break
;
case
168
:
#line 13
79
"asn1p_y.y"
#line 13
80
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
-
1
].
a_constr
;
}
break
;
case
169
:
#line 138
5
"asn1p_y.y"
#line 138
6
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
170
:
#line 138
8
"asn1p_y.y"
#line 138
9
"asn1p_y.y"
{
asn1p_constraint_t
*
ct
;
ct
=
asn1p_constraint_new
(
yylineno
);
...
...
@@ -3140,7 +3141,7 @@ yyreduce:
break
;
case
171
:
#line 139
5
"asn1p_y.y"
#line 139
6
"asn1p_y.y"
{
asn1p_constraint_t
*
ct
;
ct
=
asn1p_constraint_new
(
yylineno
);
...
...
@@ -3152,7 +3153,7 @@ yyreduce:
break
;
case
172
:
#line 140
3
"asn1p_y.y"
#line 140
4
"asn1p_y.y"
{
yyval
.
a_constr
=
asn1p_constraint_new
(
yylineno
);
checkmem
(
yyval
.
a_constr
);
...
...
@@ -3161,7 +3162,7 @@ yyreduce:
break
;
case
173
:
#line 140
8
"asn1p_y.y"
#line 140
9
"asn1p_y.y"
{
asn1p_constraint_t
*
ct
;
ct
=
asn1p_constraint_new
(
yylineno
);
...
...
@@ -3172,48 +3173,48 @@ yyreduce:
break
;
case
174
:
#line 141
7
"asn1p_y.y"
#line 141
8
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
175
:
#line 142
0
"asn1p_y.y"
#line 142
1
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
176
:
#line 142
1
"asn1p_y.y"
#line 142
2
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CA_UNI
,
yyvsp
[
-
2
].
a_constr
,
yyvsp
[
0
].
a_constr
);
}
break
;
case
177
:
#line 142
7
"asn1p_y.y"
#line 142
8
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
178
:
#line 14
29
"asn1p_y.y"
#line 14
30
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CA_INT
,
yyvsp
[
-
2
].
a_constr
,
yyvsp
[
0
].
a_constr
);
}
break
;
case
179
:
#line 143
5
"asn1p_y.y"
#line 143
6
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
180
:
#line 143
6
"asn1p_y.y"
#line 143
7
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CA_EXC
,
yyvsp
[
-
2
].
a_constr
,
yyvsp
[
0
].
a_constr
);
}
break
;
case
181
:
#line 144
2
"asn1p_y.y"
#line 144
3
"asn1p_y.y"
{
yyval
.
a_constr
=
asn1p_constraint_new
(
yylineno
);
checkmem
(
yyval
.
a_constr
);
...
...
@@ -3223,7 +3224,7 @@ yyreduce:
break
;
case
182
:
#line 144
8
"asn1p_y.y"
#line 144
9
"asn1p_y.y"
{
yyval
.
a_constr
=
asn1p_constraint_new
(
yylineno
);
checkmem
(
yyval
.
a_constr
);
...
...
@@ -3234,7 +3235,7 @@ yyreduce:
break
;
case
183
:
#line 145
5
"asn1p_y.y"
#line 145
6
"asn1p_y.y"
{
int
ret
;
yyval
.
a_constr
=
asn1p_constraint_new
(
yylineno
);
...
...
@@ -3246,62 +3247,62 @@ yyreduce:
break
;
case
184
:
#line 146
3
"asn1p_y.y"
#line 146
4
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
185
:
#line 146
6
"asn1p_y.y"
#line 146
7
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
186
:
#line 147
2
"asn1p_y.y"
#line 147
3
"asn1p_y.y"
{
yyval
.
a_ctype
=
ACT_EL_RANGE
;
}
break
;
case
187
:
#line 147
3
"asn1p_y.y"
#line 147
4
"asn1p_y.y"
{
yyval
.
a_ctype
=
ACT_EL_RLRANGE
;
}
break
;
case
188
:
#line 147
4
"asn1p_y.y"
#line 147
5
"asn1p_y.y"
{
yyval
.
a_ctype
=
ACT_EL_LLRANGE
;
}
break
;
case
189
:
#line 147
5
"asn1p_y.y"
#line 147
6
"asn1p_y.y"
{
yyval
.
a_ctype
=
ACT_EL_ULRANGE
;
}
break
;
case
190
:
#line 14
79
"asn1p_y.y"
#line 14
80
"asn1p_y.y"
{
yyval
.
a_ctype
=
ACT_CT_SIZE
;
}
break
;
case
191
:
#line 148
2
"asn1p_y.y"
#line 148
3
"asn1p_y.y"
{
yyval
.
a_ctype
=
ACT_CT_FROM
;
}
break
;
case
192
:
#line 148
8
"asn1p_y.y"
#line 148
9
"asn1p_y.y"
{
yyval
.
a_value
=
yyvsp
[
0
].
a_value
;
}
break
;
case
193
:
#line 149
1
"asn1p_y.y"
#line 149
2
"asn1p_y.y"
{
asn1p_ref_t
*
ref
;
int
ret
;
...
...
@@ -3316,7 +3317,7 @@ yyreduce:
break
;
case
194
:
#line 150
2
"asn1p_y.y"
#line 150
3
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_frombuf
(
yyvsp
[
0
].
tv_opaque
.
buf
,
yyvsp
[
0
].
tv_opaque
.
len
,
0
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -3324,7 +3325,7 @@ yyreduce:
break
;
case
195
:
#line 150
6
"asn1p_y.y"
#line 150
7
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_fromint
(
123
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -3333,7 +3334,7 @@ yyreduce:
break
;
case
196
:
#line 151
1
"asn1p_y.y"
#line 151
2
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_fromint
(
321
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -3342,7 +3343,7 @@ yyreduce:
break
;
case
197
:
#line 151
6
"asn1p_y.y"
#line 151
7
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_fromint
(
0
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -3351,7 +3352,7 @@ yyreduce:
break
;
case
198
:
#line 152
1
"asn1p_y.y"
#line 152
2
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_fromint
(
1
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -3360,28 +3361,28 @@ yyreduce:
break
;
case
199
:
#line 15
29
"asn1p_y.y"
#line 15
30
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CT_WCOMPS
,
yyvsp
[
-
1
].
a_constr
,
0
);
}
break
;
case
200
:
#line 153
5
"asn1p_y.y"
#line 153
6
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
201
:
#line 153
8
"asn1p_y.y"
#line 153
9
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CT_WCOMPS
,
yyvsp
[
-
2
].
a_constr
,
yyvsp
[
0
].
a_constr
);
}
break
;
case
202
:
#line 154
4
"asn1p_y.y"
#line 154
5
"asn1p_y.y"
{
yyval
.
a_constr
=
asn1p_constraint_new
(
yylineno
);
checkmem
(
yyval
.
a_constr
);
...
...
@@ -3390,7 +3391,7 @@ yyreduce:
break
;
case
203
:
#line 15
49
"asn1p_y.y"
#line 15
50
"asn1p_y.y"
{
yyval
.
a_constr
=
asn1p_constraint_new
(
yylineno
);
checkmem
(
yyval
.
a_constr
);
...
...
@@ -3401,52 +3402,52 @@ yyreduce:
break
;
case
204
:
#line 156
2
"asn1p_y.y"
#line 156
3
"asn1p_y.y"
{
yyval
.
a_pres
=
ACPRES_DEFAULT
;
}
break
;
case
205
:
#line 156
3
"asn1p_y.y"
#line 156
4
"asn1p_y.y"
{
yyval
.
a_pres
=
yyvsp
[
0
].
a_pres
;
}
break
;
case
206
:
#line 156
7
"asn1p_y.y"
#line 156
8
"asn1p_y.y"
{
yyval
.
a_pres
=
ACPRES_PRESENT
;
}
break
;
case
207
:
#line 157
0
"asn1p_y.y"
#line 157
1
"asn1p_y.y"
{
yyval
.
a_pres
=
ACPRES_ABSENT
;
}
break
;
case
208
:
#line 157
3
"asn1p_y.y"
#line 157
4
"asn1p_y.y"
{
yyval
.
a_pres
=
ACPRES_OPTIONAL
;
}
break
;
case
209
:
#line 15
79
"asn1p_y.y"
#line 15
80
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
210
:
#line 158
2
"asn1p_y.y"
#line 158
3
"asn1p_y.y"
{
yyval
.
a_constr
=
yyvsp
[
0
].
a_constr
;
}
break
;
case
211
:
#line 159
1
"asn1p_y.y"
#line 159
2
"asn1p_y.y"
{
asn1p_ref_t
*
ref
=
asn1p_ref_new
(
yylineno
);
asn1p_constraint_t
*
ct
;
...
...
@@ -3462,14 +3463,14 @@ yyreduce:
break
;
case
212
:
#line 160
6
"asn1p_y.y"
#line 160
7
"asn1p_y.y"
{
CONSTRAINT_INSERT
(
yyval
.
a_constr
,
ACT_CA_CRC
,
yyvsp
[
-
3
].
a_constr
,
yyvsp
[
-
1
].
a_constr
);
}
break
;
case
213
:
#line 161
2
"asn1p_y.y"
#line 161
3
"asn1p_y.y"
{
yyval
.
a_constr
=
asn1p_constraint_new
(
yylineno
);
checkmem
(
yyval
.
a_constr
);
...
...
@@ -3479,7 +3480,7 @@ yyreduce:
break
;
case
214
:
#line 161
8
"asn1p_y.y"
#line 161
9
"asn1p_y.y"
{
asn1p_constraint_t
*
ct
;
ct
=
asn1p_constraint_new
(
yylineno
);
...
...
@@ -3491,7 +3492,7 @@ yyreduce:
break
;
case
215
:
#line 163
2
"asn1p_y.y"
#line 163
3
"asn1p_y.y"
{
char
*
p
=
malloc
(
strlen
(
yyvsp
[
0
].
tv_str
)
+
2
);
int
ret
;
...
...
@@ -3506,7 +3507,7 @@ yyreduce:
break
;
case
216
:
#line 164
3
"asn1p_y.y"
#line 164
4
"asn1p_y.y"
{
char
*
p
=
malloc
(
strlen
(
yyvsp
[
0
].
tv_str
)
+
3
);
int
ret
;
...
...
@@ -3522,14 +3523,14 @@ yyreduce:
break
;
case
217
:
#line 16
59
"asn1p_y.y"
#line 16
60
"asn1p_y.y"
{
yyval
.
tv_str
=
yyvsp
[
0
].
tv_str
;
}
break
;
case
218
:
#line 166
2
"asn1p_y.y"
#line 166
3
"asn1p_y.y"
{
int
l1
=
strlen
(
yyvsp
[
-
2
].
tv_str
);
int
l3
=
strlen
(
yyvsp
[
0
].
tv_str
);
...
...
@@ -3542,24 +3543,24 @@ yyreduce:
break
;
case
219
:
#line 168
0
"asn1p_y.y"
#line 168
1
"asn1p_y.y"
{
yyval
.
a_marker
=
EM_NOMARK
;
}
break
;
case
220
:
#line 168
1
"asn1p_y.y"
#line 168
2
"asn1p_y.y"
{
yyval
.
a_marker
=
yyvsp
[
0
].
a_marker
;
}
break
;
case
221
:
#line 168
5
"asn1p_y.y"
#line 168
6
"asn1p_y.y"
{
yyval
.
a_marker
=
EM_OPTIONAL
;
}
break
;
case
222
:
#line 168
8
"asn1p_y.y"
#line 168
9
"asn1p_y.y"
{
yyval
.
a_marker
=
EM_DEFAULT
;
/* FIXME: store DefaultValue somewhere */
...
...
@@ -3567,30 +3568,30 @@ yyreduce:
break
;
case
223
:
#line 169
5
"asn1p_y.y"
#line 169
6
"asn1p_y.y"
{
}
break
;
case
224
:
#line 169
7
"asn1p_y.y"
#line 169
8
"asn1p_y.y"
{
}
break
;
case
225
:
#line 1
699
"asn1p_y.y"
#line 1
700
"asn1p_y.y"
{
asn1p_lexer_hack_push_opaque_state
();
}
break
;
case
226
:
#line 1
699
"asn1p_y.y"
#line 1
700
"asn1p_y.y"
{
}
break
;
case
227
:
#line 172
0
"asn1p_y.y"
#line 172
1
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3598,14 +3599,14 @@ yyreduce:
break
;
case
228
:
#line 172
4
"asn1p_y.y"
#line 172
5
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
1
].
a_expr
;
}
break
;
case
229
:
#line 173
0
"asn1p_y.y"
#line 173
1
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3614,7 +3615,7 @@ yyreduce:
break
;
case
230
:
#line 173
5
"asn1p_y.y"
#line 173
6
"asn1p_y.y"
{
yyval
.
a_expr
=
yyvsp
[
-
2
].
a_expr
;
TQ_ADD
(
&
(
yyval
.
a_expr
->
members
),
yyvsp
[
0
].
a_expr
,
next
);
...
...
@@ -3622,7 +3623,7 @@ yyreduce:
break
;
case
231
:
#line 174
2
"asn1p_y.y"
#line 174
3
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3633,7 +3634,7 @@ yyreduce:
break
;
case
232
:
#line 17
49
"asn1p_y.y"
#line 17
50
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3645,7 +3646,7 @@ yyreduce:
break
;
case
233
:
#line 175
7
"asn1p_y.y"
#line 175
8
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3657,7 +3658,7 @@ yyreduce:
break
;
case
234
:
#line 176
5
"asn1p_y.y"
#line 176
6
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3668,7 +3669,7 @@ yyreduce:
break
;
case
235
:
#line 177
2
"asn1p_y.y"
#line 177
3
"asn1p_y.y"
{
yyval
.
a_expr
=
asn1p_expr_new
(
asn1p_lineno
);
checkmem
(
yyval
.
a_expr
);
...
...
@@ -3680,7 +3681,7 @@ yyreduce:
break
;
case
236
:
#line 178
3
"asn1p_y.y"
#line 178
4
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_fromint
(
yyvsp
[
0
].
a_int
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -3688,7 +3689,7 @@ yyreduce:
break
;
case
237
:
#line 178
7
"asn1p_y.y"
#line 178
8
"asn1p_y.y"
{
yyval
.
a_value
=
asn1p_value_fromint
(
yyvsp
[
0
].
a_int
);
checkmem
(
yyval
.
a_value
);
...
...
@@ -3696,17 +3697,17 @@ yyreduce:
break
;
case
238
:
#line 181
8
"asn1p_y.y"
#line 181
9
"asn1p_y.y"
{
memset
(
&
yyval
.
a_tag
,
0
,
sizeof
(
yyval
.
a_tag
));
}
break
;
case
239
:
#line 18
19
"asn1p_y.y"
#line 18
20
"asn1p_y.y"
{
yyval
.
a_tag
=
yyvsp
[
0
].
a_tag
;
}
break
;
case
240
:
#line 182
3
"asn1p_y.y"
#line 182
4
"asn1p_y.y"
{
yyval
.
a_tag
=
yyvsp
[
0
].
a_tag
;
yyval
.
a_tag
.
tag_mode
=
TM_DEFAULT
;
...
...
@@ -3714,7 +3715,7 @@ yyreduce:
break
;
case
241
:
#line 182
7
"asn1p_y.y"
#line 182
8
"asn1p_y.y"
{
yyval
.
a_tag
=
yyvsp
[
-
1
].
a_tag
;
yyval
.
a_tag
.
tag_mode
=
TM_IMPLICIT
;
...
...
@@ -3722,7 +3723,7 @@ yyreduce:
break
;
case
242
:
#line 183
1
"asn1p_y.y"
#line 183
2
"asn1p_y.y"
{
yyval
.
a_tag
=
yyvsp
[
-
1
].
a_tag
;
yyval
.
a_tag
.
tag_mode
=
TM_EXPLICIT
;
...
...
@@ -3730,7 +3731,7 @@ yyreduce:
break
;
case
243
:
#line 183
8
"asn1p_y.y"
#line 183
9
"asn1p_y.y"
{
checkmem
(
yyvsp
[
0
].
tv_str
);
yyval
.
tv_str
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -3738,7 +3739,7 @@ yyreduce:
break
;
case
244
:
#line 184
2
"asn1p_y.y"
#line 184
3
"asn1p_y.y"
{
checkmem
(
yyvsp
[
0
].
tv_str
);
yyval
.
tv_str
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -3746,7 +3747,7 @@ yyreduce:
break
;
case
245
:
#line 18
49
"asn1p_y.y"
#line 18
50
"asn1p_y.y"
{
checkmem
(
yyvsp
[
0
].
tv_str
);
yyval
.
tv_str
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -3754,7 +3755,7 @@ yyreduce:
break
;
case
246
:
#line 185
6
"asn1p_y.y"
#line 185
7
"asn1p_y.y"
{
checkmem
(
yyvsp
[
0
].
tv_str
);
yyval
.
tv_str
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -3762,7 +3763,7 @@ yyreduce:
break
;
case
247
:
#line 186
3
"asn1p_y.y"
#line 186
4
"asn1p_y.y"
{
memset
(
&
yyval
.
tv_nametag
,
0
,
sizeof
(
yyval
.
tv_nametag
));
yyval
.
tv_nametag
.
name
=
yyvsp
[
0
].
tv_str
;
...
...
@@ -3770,7 +3771,7 @@ yyreduce:
break
;
case
248
:
#line 186
7
"asn1p_y.y"
#line 186
8
"asn1p_y.y"
{
yyval
.
tv_nametag
.
name
=
yyvsp
[
-
1
].
tv_str
;
yyval
.
tv_nametag
.
tag
=
yyvsp
[
0
].
a_tag
;
...
...
@@ -3781,7 +3782,7 @@ yyreduce:
}
/* Line 1016 of /usr/local/share/bison/yacc.c. */
#line 378
5 "y.tab
.c"
#line 378
6 "asn1p_y
.c"
yyvsp
-=
yylen
;
yyssp
-=
yylen
;
...
...
@@ -4000,7 +4001,7 @@ yyreturn:
}
#line 187
4
"asn1p_y.y"
#line 187
5
"asn1p_y.y"
...
...
libasn1parser/asn1p_y.h
View file @
bc55d234
...
...
@@ -23,8 +23,8 @@
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#ifndef BISON_
Y_TAB
_H
# define BISON_
Y_TAB
_H
#ifndef BISON_
ASN_P_Y
_H
# define BISON_
ASN_P_Y
_H
/* Tokens. */
#ifndef YYTOKENTYPE
...
...
@@ -274,5 +274,5 @@ typedef union {
extern
YYSTYPE
asn1p_lval
;
#endif
/* not BISON_
Y_TAB
_H */
#endif
/* not BISON_
ASN_P_Y
_H */
libasn1parser/asn1p_y.y
View file @
bc55d234
...
...
@@ -456,12 +456,13 @@ ModuleSpecificationBody:
#error MY_IMPORT DEFINED ELSEWHERE!
#endif
#define MY_IMPORT(foo,field) do { \
if
(TQ_FIRST(&($2->foo))) { \
while
(TQ_FIRST(&($2->foo))) { \
TQ_ADD(&($$->foo), \
TQ_REMOVE(&($2->foo), field), \
field); \
assert(TQ_FIRST(&($2->foo)) == 0); \
} } while(0)
} \
assert(TQ_FIRST(&($2->foo)) == 0); \
} while(0)
MY_IMPORT(imports, xp_next);
MY_IMPORT(exports, xp_next);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment