aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1parser/asn1p_y.y
diff options
context:
space:
mode:
Diffstat (limited to 'libasn1parser/asn1p_y.y')
-rw-r--r--libasn1parser/asn1p_y.y21
1 files changed, 15 insertions, 6 deletions
diff --git a/libasn1parser/asn1p_y.y b/libasn1parser/asn1p_y.y
index ae63090e..1fe3c910 100644
--- a/libasn1parser/asn1p_y.y
+++ b/libasn1parser/asn1p_y.y
@@ -250,6 +250,7 @@ static asn1p_value_t *
%type <tv_str> TypeRefName
%type <tv_str> ObjectClassReference
%type <tv_str> Identifier
+%type <tv_str> optIdentifier
%type <a_parg> ParameterArgumentName
%type <a_plist> ParameterArgumentList
%type <a_expr> ActualParameter
@@ -1076,23 +1077,25 @@ TypeDeclaration:
$$->expr_type = ASN_CONSTR_SET;
$$->meta_type = AMT_TYPE;
}
- | TOK_SEQUENCE optConstraints TOK_OF optTag TypeDeclaration {
+ | TOK_SEQUENCE optConstraints TOK_OF optIdentifier optTag TypeDeclaration {
$$ = asn1p_expr_new(yylineno);
checkmem($$);
$$->constraints = $2;
$$->expr_type = ASN_CONSTR_SEQUENCE_OF;
$$->meta_type = AMT_TYPE;
- $5->tag = $4;
- asn1p_expr_add($$, $5);
+ $6->Identifier = $4;
+ $6->tag = $5;
+ asn1p_expr_add($$, $6);
}
- | TOK_SET optConstraints TOK_OF optTag TypeDeclaration {
+ | TOK_SET optConstraints TOK_OF optIdentifier optTag TypeDeclaration {
$$ = asn1p_expr_new(yylineno);
checkmem($$);
$$->constraints = $2;
$$->expr_type = ASN_CONSTR_SET_OF;
$$->meta_type = AMT_TYPE;
- $5->tag = $4;
- asn1p_expr_add($$, $5);
+ $6->Identifier = $4;
+ $6->tag = $5;
+ asn1p_expr_add($$, $6);
}
| TOK_ANY {
$$ = asn1p_expr_new(yylineno);
@@ -1955,6 +1958,12 @@ ObjectClassReference:
}
;
+optIdentifier:
+ { $$ = 0; }
+ | Identifier {
+ $$ = $1;
+ }
+
Identifier:
TOK_identifier {
checkmem($1);