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
e596bf05
Commit
e596bf05
authored
Mar 28, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WITH COMPONENT[S] pretty-printing
parent
8638f0d6
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
404 additions
and
363 deletions
+404
-363
ChangeLog
ChangeLog
+2
-1
libasn1parser/asn1p_y.c
libasn1parser/asn1p_y.c
+364
-355
libasn1parser/asn1p_y.y
libasn1parser/asn1p_y.y
+9
-4
libasn1print/asn1print.c
libasn1print/asn1print.c
+29
-3
No files found.
ChangeLog
View file @
e596bf05
0.9.13: 2005-Mar-2
4
0.9.13: 2005-Mar-2
8
* Added extra const qualifiers into the support code.
* More RFC variations supported in crfc2asn1.pl.
...
...
@@ -8,6 +8,7 @@
* Parsing support for CONSTRAINED BY. (Test case 79).
* Support for CharsDefn (Quadruple and Tuple, most used in
ASN1-CHARACTER-MODULE) (Test case 80).
* Pretty-printing support for WITH COMPONENT[S]. (Test case 82).
0.9.12: 2005-Mar-10
...
...
libasn1parser/asn1p_y.c
View file @
e596bf05
This diff is collapsed.
Click to expand it.
libasn1parser/asn1p_y.y
View file @
e596bf05
...
...
@@ -278,7 +278,7 @@ static asn1p_value_t *
%type <a_constr> ConstraintSubtypeElement /* 1..2 */
%type <a_constr> SimpleTableConstraint
%type <a_constr> TableConstraint
%type <a_constr>
WithComponents
%type <a_constr>
InnerTypeConstraint
%type <a_constr> WithComponentsList
%type <a_constr> WithComponentsElement
%type <a_constr> ComponentRelationConstraint
...
...
@@ -1668,7 +1668,7 @@ ConstraintSubtypeElement:
| TableConstraint {
$$ = $1;
}
|
WithComponents
{
|
InnerTypeConstraint
{
$$ = $1;
}
| TOK_CONSTRAINED TOK_BY '{'
...
...
@@ -1742,8 +1742,11 @@ ContainedSubtype:
}
;
WithComponents:
TOK_WITH TOK_COMPONENTS '{' WithComponentsList '}' {
InnerTypeConstraint:
TOK_WITH TOK_COMPONENT SetOfConstraints {
CONSTRAINT_INSERT($$, ACT_CT_WCOMP, $3, 0);
}
| TOK_WITH TOK_COMPONENTS '{' WithComponentsList '}' {
CONSTRAINT_INSERT($$, ACT_CT_WCOMPS, $4, 0);
}
;
...
...
@@ -1762,6 +1765,7 @@ WithComponentsElement:
$$ = asn1p_constraint_new(yylineno);
checkmem($$);
$$->type = ACT_EL_EXT;
$$->value = asn1p_value_frombuf("...", 3, 0);
}
| Identifier optConstraints optPresenceConstraint {
$$ = asn1p_constraint_new(yylineno);
...
...
@@ -1769,6 +1773,7 @@ WithComponentsElement:
$$->type = ACT_EL_VALUE;
$$->value = asn1p_value_frombuf($1, strlen($1), 0);
$$->presence = $3;
if($2) asn1p_constraint_insert($$, $2);
}
;
...
...
libasn1print/asn1print.c
View file @
e596bf05
...
...
@@ -333,10 +333,36 @@ asn1print_constraint(asn1p_constraint_t *ct, enum asn1print_flags flags) {
printf
(
")"
);
break
;
case
ACT_CT_WCOMP
:
printf
(
"WITH COMPONENT ???"
);
assert
(
ct
->
el_count
!=
0
);
assert
(
ct
->
el_count
==
1
);
printf
(
"WITH COMPONENT ("
);
asn1print_constraint
(
ct
->
elements
[
0
],
flags
);
printf
(
")"
);
break
;
case
ACT_CT_WCOMPS
:
printf
(
"WITH COMPONENTS { ??? }"
);
case
ACT_CT_WCOMPS
:
{
unsigned
int
i
;
printf
(
"WITH COMPONENTS { "
);
for
(
i
=
0
;
i
<
ct
->
el_count
;
i
++
)
{
asn1p_constraint_t
*
cel
=
ct
->
elements
[
i
];
if
(
i
)
printf
(
", "
);
fwrite
(
cel
->
value
->
value
.
string
.
buf
,
1
,
cel
->
value
->
value
.
string
.
size
,
stdout
);
if
(
cel
->
el_count
)
{
assert
(
cel
->
el_count
==
1
);
printf
(
" "
);
asn1print_constraint
(
cel
->
elements
[
0
],
flags
);
}
switch
(
cel
->
presence
)
{
case
ACPRES_DEFAULT
:
break
;
case
ACPRES_PRESENT
:
printf
(
" PRESENT"
);
break
;
case
ACPRES_ABSENT
:
printf
(
" ABSENT"
);
break
;
case
ACPRES_OPTIONAL
:
printf
(
" OPTIONAL"
);
break
;
}
}
printf
(
" }"
);
}
break
;
case
ACT_CT_CTDBY
:
printf
(
"CONSTRAINED BY "
);
...
...
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