Commit 144db9ba authored by Lev Walkin's avatar Lev Walkin

small fixes

parent bbd9325d
0.9.7.2: 2004-Oct-12
* Empty SEQUENCE and SET clauses are now allowed.
0.9.7.1: 2004-Oct-12
* Fixed automatic tagging for extensions of compound types.
* Fixed ParametrizedReference parsing: {} are now recognized.
0.9.7: 2004-Oct-11 0.9.7: 2004-Oct-11
* Finished CANONICAL-XER implementation by adding SET and SET OF * Finished CANONICAL-XER implementation by adding SET and SET OF
......
...@@ -12,7 +12,11 @@ which is already completed. ...@@ -12,7 +12,11 @@ which is already completed.
Support for slicing the IOCs to produce "views" Support for slicing the IOCs to produce "views"
is not yet designed. is not yet designed.
MINOR: MEDIUM:
1. Support for DEFAULT encoding and decoding, at least in INTEGER/ENUMERATED types. 1. Support for DEFAULT encoding and decoding, at least in INTEGER/ENUMERATED types.
3. Support for EXTERNAL, EMBEDDED-PDV and CHARACTER STRING types. 2. Support for EXTERNAL, EMBEDDED-PDV and CHARACTER STRING types.
MINOR:
1. Parsing of CONSTRAINED BY clauses
...@@ -1881,7 +1881,7 @@ fi ...@@ -1881,7 +1881,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=asn1c PACKAGE=asn1c
VERSION=0.9.7 VERSION=0.9.7.2
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
......
...@@ -3,7 +3,7 @@ AC_INIT(libasn1parser/asn1p_y.y) ...@@ -3,7 +3,7 @@ AC_INIT(libasn1parser/asn1p_y.y)
AC_CANONICAL_BUILD AC_CANONICAL_BUILD
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
AC_PREREQ(2.53) AC_PREREQ(2.53)
AM_INIT_AUTOMAKE(asn1c, 0.9.7) AM_INIT_AUTOMAKE(asn1c, 0.9.7.2)
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
......
...@@ -302,8 +302,10 @@ asn1f_fix_constr_autotag(arg_t *arg) { ...@@ -302,8 +302,10 @@ asn1f_fix_constr_autotag(arg_t *arg) {
TQ_FOR(v, &(expr->members), next) { TQ_FOR(v, &(expr->members), next) {
int must_explicit; int must_explicit;
if(v->expr_type == A1TC_EXTENSIBLE) if(v->expr_type == A1TC_EXTENSIBLE) {
break; /* 28.5, d) */
continue;
}
if(0) { if(0) {
/* This may be not true in case COMPONENTS OF */ /* This may be not true in case COMPONENTS OF */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -76,7 +76,7 @@ static asn1p_value_t * ...@@ -76,7 +76,7 @@ static asn1p_value_t *
asn1p_paramlist_t *a_plist; /* A pargs list */ asn1p_paramlist_t *a_plist; /* A pargs list */
struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */ struct asn1p_expr_marker_s a_marker; /* OPTIONAL/DEFAULT */
enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */ enum asn1p_constr_pres_e a_pres; /* PRESENT/ABSENT/OPTIONAL */
asn1_integer_t a_int; asn1c_integer_t a_int;
char *tv_str; char *tv_str;
struct { struct {
char *buf; char *buf;
...@@ -239,6 +239,7 @@ static asn1p_value_t * ...@@ -239,6 +239,7 @@ static asn1p_value_t *
%type <a_value> Value %type <a_value> Value
%type <a_value> DefinedValue %type <a_value> DefinedValue
%type <a_value> SignedNumber %type <a_value> SignedNumber
%type <a_expr> optComponentTypeLists
%type <a_expr> ComponentTypeLists %type <a_expr> ComponentTypeLists
%type <a_expr> ComponentType %type <a_expr> ComponentType
%type <a_expr> AlternativeTypeLists %type <a_expr> AlternativeTypeLists
...@@ -618,6 +619,12 @@ ImportsElement: ...@@ -618,6 +619,12 @@ ImportsElement:
$$->Identifier = $1; $$->Identifier = $1;
$$->expr_type = A1TC_REFERENCE; $$->expr_type = A1TC_REFERENCE;
} }
| TypeRefName '{' '}' { /* Completely equivalent to above */
$$ = asn1p_expr_new(yylineno);
checkmem($$);
$$->Identifier = $1;
$$->expr_type = A1TC_REFERENCE;
}
| Identifier { | Identifier {
$$ = asn1p_expr_new(yylineno); $$ = asn1p_expr_new(yylineno);
checkmem($$); checkmem($$);
...@@ -659,6 +666,12 @@ ExportsElement: ...@@ -659,6 +666,12 @@ ExportsElement:
$$->Identifier = $1; $$->Identifier = $1;
$$->expr_type = A1TC_EXPORTVAR; $$->expr_type = A1TC_EXPORTVAR;
} }
| TypeRefName '{' '}' {
$$ = asn1p_expr_new(yylineno);
checkmem($$);
$$->Identifier = $1;
$$->expr_type = A1TC_EXPORTVAR;
}
| Identifier { | Identifier {
$$ = asn1p_expr_new(yylineno); $$ = asn1p_expr_new(yylineno);
checkmem($$); checkmem($$);
...@@ -841,6 +854,10 @@ ActualParameter: ...@@ -841,6 +854,10 @@ ActualParameter:
/* /*
* A collection of constructed data type members. * A collection of constructed data type members.
*/ */
optComponentTypeLists:
{ $$ = asn1p_expr_new(yylineno); }
| ComponentTypeLists { $$ = $1; };
ComponentTypeLists: ComponentTypeLists:
ComponentType { ComponentType {
$$ = asn1p_expr_new(yylineno); $$ = asn1p_expr_new(yylineno);
...@@ -1065,13 +1082,13 @@ TypeDeclaration: ...@@ -1065,13 +1082,13 @@ TypeDeclaration:
$$->expr_type = ASN_CONSTR_CHOICE; $$->expr_type = ASN_CONSTR_CHOICE;
$$->meta_type = AMT_TYPE; $$->meta_type = AMT_TYPE;
} }
| TOK_SEQUENCE '{' ComponentTypeLists '}' { | TOK_SEQUENCE '{' optComponentTypeLists '}' {
$$ = $3; $$ = $3;
assert($$->expr_type == A1TC_INVALID); assert($$->expr_type == A1TC_INVALID);
$$->expr_type = ASN_CONSTR_SEQUENCE; $$->expr_type = ASN_CONSTR_SEQUENCE;
$$->meta_type = AMT_TYPE; $$->meta_type = AMT_TYPE;
} }
| TOK_SET '{' ComponentTypeLists '}' { | TOK_SET '{' optComponentTypeLists '}' {
$$ = $3; $$ = $3;
assert($$->expr_type == A1TC_INVALID); assert($$->expr_type == A1TC_INVALID);
$$->expr_type = ASN_CONSTR_SET; $$->expr_type = ASN_CONSTR_SET;
......
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