better semantics

This commit is contained in:
Lev Walkin 2004-08-25 02:03:59 +00:00
parent 0e22b981aa
commit be717ecc31
1 changed files with 6 additions and 9 deletions

View File

@ -33,11 +33,10 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
etype = _find_terminal_type(arg);
r_value=asn1constraint_compute_PER_range(etype, ct, ACT_EL_RANGE, 0, 0);
r_size = asn1constraint_compute_PER_range(etype, ct, ACT_CT_SIZE, 0, 0);
r_value=asn1constraint_compute_PER_range(etype, ct, ACT_EL_RANGE,0,0,0);
r_size = asn1constraint_compute_PER_range(etype, ct, ACT_CT_SIZE,0,0,0);
if(r_value) {
if(r_value->not_PER_visible
|| r_value->extensible
if(r_value->incompatible
|| r_value->empty_constraint
|| (r_value->left.type == ARE_MIN
&& r_value->right.type == ARE_MAX)
@ -50,8 +49,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
}
}
if(r_size) {
if(r_size->not_PER_visible
|| r_size->extensible
if(r_size->incompatible
|| r_size->empty_constraint
|| (r_size->left.value == 0 /* or .type == MIN */
&& r_size->right.type == ARE_MAX)
@ -200,11 +198,10 @@ asn1c_emit_constraint_tables(arg_t *arg, int got_size) {
etype = _find_terminal_type(arg);
range = asn1constraint_compute_PER_range(etype, ct, ACT_CT_FROM, 0, 0);
range = asn1constraint_compute_PER_range(etype, ct, ACT_CT_FROM, 0,0,0);
if(!range) return 0;
if(range->not_PER_visible
|| range->extensible
if(range->incompatible
|| range->empty_constraint) {
asn1constraint_range_free(range);
return 0;