Commit be717ecc authored by Lev Walkin's avatar Lev Walkin

better semantics

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