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
c8092cb2
Commit
c8092cb2
authored
Feb 18, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ContainedSubtype parsing
parent
843a2460
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
834 additions
and
771 deletions
+834
-771
libasn1parser/asn1p_expr.h
libasn1parser/asn1p_expr.h
+1
-2
libasn1parser/asn1p_y.c
libasn1parser/asn1p_y.c
+791
-756
libasn1parser/asn1p_y.y
libasn1parser/asn1p_y.y
+42
-13
No files found.
libasn1parser/asn1p_expr.h
View file @
c8092cb2
...
...
@@ -31,7 +31,6 @@ typedef enum asn1p_expr_type {
A1TC_REFERENCE
,
/* Reference to the type defined elsewhere */
A1TC_EXPORTVAR
,
/* We're exporting this definition */
A1TC_UNIVERVAL
,
/* A value of an ENUMERATED, INTEGER or BS */
A1TC_BOOLBITPOS
,
/* A bit position in a BIT STRING */
A1TC_BITVECTOR
,
/* A plain collection of bits */
A1TC_OPAQUE
,
/* Opaque data encoded as a bitvector */
A1TC_EXTENSIBLE
,
/* An extension marker "..." */
...
...
@@ -122,7 +121,7 @@ typedef struct asn1p_expr_s {
asn1p_expr_type_e
expr_type
;
/*
* Referenced type,
if
defined elsewhere.
* Referenced type, defined elsewhere.
* (If expr_type == A1TC_REFERENCE)
*/
asn1p_ref_t
*
reference
;
...
...
libasn1parser/asn1p_y.c
View file @
c8092cb2
This diff is collapsed.
Click to expand it.
libasn1parser/asn1p_y.y
View file @
c8092cb2
...
...
@@ -816,6 +816,13 @@ ParameterArgumentName:
checkmem(ret == 0);
$$.argument = $3;
}
| TypeRefName ':' TypeRefName {
int ret;
$$.governor = asn1p_ref_new(yylineno);
ret = asn1p_ref_add_component($$.governor, $1, 0);
checkmem(ret == 0);
$$.argument = $3;
}
| BasicTypeId ':' Identifier {
int ret;
$$.governor = asn1p_ref_new(yylineno);
...
...
@@ -851,6 +858,17 @@ ActualParameter:
}
;
/*
| '{' ActualParameter '}' {
$$ = asn1p_expr_new(yylineno);
checkmem($$);
asn1p_expr_add($$, $2);
$$->expr_type = A1TC_PARAMETRIZED;
$$->meta_type = AMT_TYPE;
}
;
*/
/*
* A collection of constructed data type members.
*/
...
...
@@ -1622,9 +1640,23 @@ ConstraintSpec:
;
ConstraintValue:
SignedNumber {
TOK_FALSE {
$$ = asn1p_value_fromint(0);
checkmem($$);
$$->type = ATV_FALSE;
}
| TOK_TRUE {
$$ = asn1p_value_fromint(1);
checkmem($$);
$$->type = ATV_TRUE;
}
| SignedNumber {
$$ = $1;
}
| TOK_cstring {
$$ = asn1p_value_frombuf($1.buf, $1.len, 0);
checkmem($$);
}
| Identifier {
asn1p_ref_t *ref;
int ret;
...
...
@@ -1636,19 +1668,16 @@ ConstraintValue:
checkmem($$);
free($1);
}
| TOK_cstring {
$$ = asn1p_value_frombuf($1.buf, $1.len, 0);
checkmem($$);
}
| TOK_FALSE {
$$ = asn1p_value_fromint(0);
checkmem($$);
$$->type = ATV_FALSE;
}
| TOK_TRUE {
$$ = asn1p_value_fromint(1);
| TypeRefName {
asn1p_ref_t *ref;
int ret;
ref = asn1p_ref_new(yylineno);
checkmem(ref);
ret = asn1p_ref_add_component(ref, $1, RLT_UNKNOWN);
checkmem(ret == 0);
$$ = asn1p_value_fromref(ref, 0);
checkmem($$);
$$->type = ATV_TRUE
;
free($1)
;
}
;
...
...
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