![]() |
yumapro
25.10-1
YumaPro SDK
|
one member of a range definition – stored in simple.rangeQ More...
#include <typ.h>

Data Fields | |
| dlq_hdr_t | qhdr |
| queue header | |
| xmlChar * | rangestr |
| saved in YANG only | |
| ncx_num_t | lb |
| lower bound | |
| ncx_num_t | ub |
| upper bound | |
| ncx_btype_t | btyp |
| base type | |
| xmlChar * | lbstr |
| saved if range deferred | |
| xmlChar * | ubstr |
| saved if range deferred | |
| ncx_error_t | tkerr |
| file and line infor for compiler | |
| uint8 | flags |
| internal processing flags | |
one member of a range definition – stored in simple.rangeQ
range components in YANG are not allowed to appear out of order and they are not allowed to overlap.
A single number component is represented as a range where lower bound == upper bound
(1 | 5 | 10) saved as (1..1 | 5..5 | 10..10)
symbolic range terms are stored in flags, and processed in the 2nd pass of the compiler:
lower bound:
min TYP_FL_LBMIN
max TYP_FL_LBMAX
-INF TYP_FL_LBINF
INF TYP_FL_LBINF2
upper bound:
min TYP_FL_UBMIN
max TYP_FL_UBMAX
INF TYP_FL_UBINF
-INF TYP_FL_UBINF2
If range parsed with btyp == NCX_BT_NONE, then lbstr and ubstr will be used (for numbers). Otherwise the number bounds of the range part are stored in lb and ub
The entire range string is saved in rangestr for ncxdump and yangcli help text
The token associated with the range part is saved for error messages in YANG phase 2 compiling