yumapro  23.10T-8
YumaPro SDK
No Matches

one member of a range definition – stored in simple.rangeQ More...

#include <typ.h>

Collaboration diagram for typ_rangedef_t:

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

Detailed Description

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

  upper bound:
     min   TYP_FL_UBMIN
     max   TYP_FL_UBMAX

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

The documentation for this struct was generated from the following file: