Commit ec208e6c authored by Lev Walkin's avatar Lev Walkin

support of tags after SET OF/SEQUENCE OF: SET OF [1] INTEGER

parent af120f75
This diff is collapsed.
...@@ -1076,21 +1076,23 @@ TypeDeclaration: ...@@ -1076,21 +1076,23 @@ TypeDeclaration:
$$->expr_type = ASN_CONSTR_SET; $$->expr_type = ASN_CONSTR_SET;
$$->meta_type = AMT_TYPE; $$->meta_type = AMT_TYPE;
} }
| TOK_SEQUENCE optConstraints TOK_OF TypeDeclaration { | TOK_SEQUENCE optConstraints TOK_OF optTag TypeDeclaration {
$$ = asn1p_expr_new(yylineno); $$ = asn1p_expr_new(yylineno);
checkmem($$); checkmem($$);
$$->constraints = $2; $$->constraints = $2;
$$->expr_type = ASN_CONSTR_SEQUENCE_OF; $$->expr_type = ASN_CONSTR_SEQUENCE_OF;
$$->meta_type = AMT_TYPE; $$->meta_type = AMT_TYPE;
asn1p_expr_add($$, $4); $5->tag = $4;
asn1p_expr_add($$, $5);
} }
| TOK_SET optConstraints TOK_OF TypeDeclaration { | TOK_SET optConstraints TOK_OF optTag TypeDeclaration {
$$ = asn1p_expr_new(yylineno); $$ = asn1p_expr_new(yylineno);
checkmem($$); checkmem($$);
$$->constraints = $2; $$->constraints = $2;
$$->expr_type = ASN_CONSTR_SET_OF; $$->expr_type = ASN_CONSTR_SET_OF;
$$->meta_type = AMT_TYPE; $$->meta_type = AMT_TYPE;
asn1p_expr_add($$, $4); $5->tag = $4;
asn1p_expr_add($$, $5);
} }
| TOK_ANY { | TOK_ANY {
$$ = asn1p_expr_new(yylineno); $$ = asn1p_expr_new(yylineno);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment