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
557f27de
Commit
557f27de
authored
Mar 21, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
valuesettypeassignment parsing
parent
171487e6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
660 additions
and
646 deletions
+660
-646
ChangeLog
ChangeLog
+1
-0
libasn1parser/asn1p_y.c
libasn1parser/asn1p_y.c
+647
-639
libasn1parser/asn1p_y.y
libasn1parser/asn1p_y.y
+8
-6
libasn1print/asn1print.c
libasn1print/asn1print.c
+4
-1
No files found.
ChangeLog
View file @
557f27de
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
* Refactored Information Object Classes parsing.
* Refactored Information Object Classes parsing.
* Refactored Parameterization support.
* Refactored Parameterization support.
* [typedef enum foo {}] foo_e; is now e_foo, see #1287989
* [typedef enum foo {}] foo_e; is now e_foo, see #1287989
* Refactored ValueSetTypeAssignment parsing.
0.9.20: 2006-Mar-06
0.9.20: 2006-Mar-06
...
...
libasn1parser/asn1p_y.c
View file @
557f27de
This diff is collapsed.
Click to expand it.
libasn1parser/asn1p_y.y
View file @
557f27de
...
@@ -251,7 +251,8 @@ static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
...
@@ -251,7 +251,8 @@ static void _fixup_anonymous_identifier(asn1p_expr_t *expr);
%type <a_expr> Type
%type <a_expr> Type
%type <a_expr> DataTypeReference /* Type1 ::= Type2 */
%type <a_expr> DataTypeReference /* Type1 ::= Type2 */
%type <a_expr> DefinedType
%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_expr> ValueDefinition /* val INTEGER ::= 1*/
%type <a_value> Value
%type <a_value> Value
%type <a_value> SimpleValue
%type <a_value> SimpleValue
...
@@ -554,7 +555,7 @@ ModuleSpecificationElement:
...
@@ -554,7 +555,7 @@ ModuleSpecificationElement:
* EvenNumbers INTEGER ::= { 2 | 4 | 6 | 8 }
* EvenNumbers INTEGER ::= { 2 | 4 | 6 | 8 }
* === EOF ===
* === EOF ===
*/
*/
| ValueSet
Definition
{
| ValueSet
TypeAssignment
{
$$ = asn1p_module_new();
$$ = asn1p_module_new();
checkmem($$);
checkmem($$);
assert($1->expr_type != A1TC_INVALID);
assert($1->expr_type != A1TC_INVALID);
...
@@ -712,14 +713,15 @@ ExportsElement:
...
@@ -712,14 +713,15 @@ ExportsElement:
;
;
ValueSetDefinition:
ValueSet: '{' ElementSetSpecs '}' { $$ = $2; }
TypeRefName DefinedType TOK_PPEQ
'{' { asn1p_lexer_hack_push_opaque_state(); } Opaque /* '}' */ {
ValueSetTypeAssignment:
TypeRefName DefinedType TOK_PPEQ ValueSet {
$$ = $2;
$$ = $2;
assert($$->Identifier == 0);
assert($$->Identifier == 0);
$$->Identifier = $1;
$$->Identifier = $1;
$$->meta_type = AMT_VALUESET;
$$->meta_type = AMT_VALUESET;
/* take care of ValueSet body */
$$->constraints = $4;
}
}
;
;
...
...
libasn1print/asn1print.c
View file @
557f27de
...
@@ -607,7 +607,6 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
...
@@ -607,7 +607,6 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
*/
*/
if
(
TQ_FIRST
(
&
(
tc
->
members
))
if
(
TQ_FIRST
(
&
(
tc
->
members
))
||
(
tc
->
expr_type
&
ASN_CONSTR_MASK
)
||
(
tc
->
expr_type
&
ASN_CONSTR_MASK
)
||
tc
->
meta_type
==
AMT_VALUESET
||
tc
->
meta_type
==
AMT_OBJECT
||
tc
->
meta_type
==
AMT_OBJECT
||
tc
->
meta_type
==
AMT_OBJECTCLASS
||
tc
->
meta_type
==
AMT_OBJECTCLASS
||
tc
->
meta_type
==
AMT_OBJECTFIELD
||
tc
->
meta_type
==
AMT_OBJECTFIELD
...
@@ -675,7 +674,11 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
...
@@ -675,7 +674,11 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
if
(
!
SEQ_OF
&&
tc
->
constraints
)
{
if
(
!
SEQ_OF
&&
tc
->
constraints
)
{
printf
(
" "
);
printf
(
" "
);
if
(
tc
->
meta_type
==
AMT_VALUESET
)
printf
(
"{"
);
asn1print_constraint
(
tc
->
constraints
,
flags
);
asn1print_constraint
(
tc
->
constraints
,
flags
);
if
(
tc
->
meta_type
==
AMT_VALUESET
)
printf
(
"}"
);
}
}
if
(
tc
->
unique
)
{
if
(
tc
->
unique
)
{
...
...
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