mirror of https://gerrit.osmocom.org/asn1c
better semantics
This commit is contained in:
parent
0e22b981aa
commit
be717ecc31
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue