NordicSemiconductor / zcbor

Low footprint C/C++ CBOR library and Python tool providing code generation from CDDL descriptions.
Apache License 2.0
118 stars 37 forks source link

zcbor.py: Fix range_types when used together in range_types_regexes #441

Closed oyvindronningstad closed 3 months ago

oyvindronningstad commented 3 months ago

The solution using ?R (regression) didn't work when the regexes were put together into one regex, because ?R implicitly references the "whole regex", which becomes something different when merging many separate regexes into one. Instead use subroutines which are more general and can be used to implement ?R. Use differently named subroutines so they are unambiguous no matter which regex they are a part of.

Fixes #440