Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asn1c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gaoridong
asn1c
Commits
557f27de
Commit
557f27de
authored
19 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
valuesettypeassignment parsing
parent
171487e6
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ChangeLog
+1
-0
1 addition, 0 deletions
ChangeLog
libasn1parser/asn1p_y.c
+647
-639
647 additions, 639 deletions
libasn1parser/asn1p_y.c
libasn1parser/asn1p_y.y
+8
-6
8 additions, 6 deletions
libasn1parser/asn1p_y.y
libasn1print/asn1print.c
+4
-1
4 additions, 1 deletion
libasn1print/asn1print.c
with
660 additions
and
646 deletions
ChangeLog
+
1
−
0
View file @
557f27de
...
...
@@ -7,6 +7,7 @@
* Refactored Information Object Classes parsing.
* Refactored Parameterization support.
* [typedef enum foo {}] foo_e; is now e_foo, see #1287989
* Refactored ValueSetTypeAssignment parsing.
0.9.20: 2006-Mar-06
...
...
This diff is collapsed.
Click to expand it.
libasn1parser/asn1p_y.c
+
647
−
639
View file @
557f27de
This diff is collapsed.
Click to expand it.
libasn1parser/asn1p_y.y
+
8
−
6
View file @
557f27de
...
...
@@ -251,7 +251,8 @@ static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
%type <a_expr> Type
%type <a_expr> DataTypeReference /* Type1 ::= Type2 */
%type <a_expr> DefinedType
%type <a_expr> ValueSetDefinition /* Val INTEGER ::= {1|2} */
%type <a_constr> ValueSet /* {a|b|c}*/
%type <a_expr> ValueSetTypeAssignment /* Val INTEGER ::= {1|2} */
%type <a_expr> ValueDefinition /* val INTEGER ::= 1*/
%type <a_value> Value
%type <a_value> SimpleValue
...
...
@@ -554,7 +555,7 @@ ModuleSpecificationElement:
* EvenNumbers INTEGER ::= { 2 | 4 | 6 | 8 }
* === EOF ===
*/
| ValueSet
Definition
{
| ValueSet
TypeAssignment
{
$$ = asn1p_module_new();
checkmem($$);
assert($1->expr_type != A1TC_INVALID);
...
...
@@ -712,14 +713,15 @@ ExportsElement:
;
ValueSetDefinition:
TypeRefName DefinedType TOK_PPEQ
'{' { asn1p_lexer_hack_push_opaque_state(); } Opaque /* '}' */ {
ValueSet: '{' ElementSetSpecs '}' { $$ = $2; }
ValueSetTypeAssignment:
TypeRefName DefinedType TOK_PPEQ ValueSet {
$$ = $2;
assert($$->Identifier == 0);
$$->Identifier = $1;
$$->meta_type = AMT_VALUESET;
/* take care of ValueSet body */
$$->constraints = $4;
}
;
...
...
This diff is collapsed.
Click to expand it.
libasn1print/asn1print.c
+
4
−
1
View file @
557f27de
...
...
@@ -607,7 +607,6 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
*/
if
(
TQ_FIRST
(
&
(
tc
->
members
))
||
(
tc
->
expr_type
&
ASN_CONSTR_MASK
)
||
tc
->
meta_type
==
AMT_VALUESET
||
tc
->
meta_type
==
AMT_OBJECT
||
tc
->
meta_type
==
AMT_OBJECTCLASS
||
tc
->
meta_type
==
AMT_OBJECTFIELD
...
...
@@ -675,7 +674,11 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
if
(
!
SEQ_OF
&&
tc
->
constraints
)
{
printf
(
" "
);
if
(
tc
->
meta_type
==
AMT_VALUESET
)
printf
(
"{"
);
asn1print_constraint
(
tc
->
constraints
,
flags
);
if
(
tc
->
meta_type
==
AMT_VALUESET
)
printf
(
"}"
);
}
if
(
tc
->
unique
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment