yumapro  22.10T-2
YumaPro SDK
YANG Parser Support

YANG Language Parser. More...

Collaboration diagram for YANG Parser Support:


 Parser Utilities
 YANG Parser Control Block and General Access Functions.


status_t yang_parse_from_filespec (const xmlChar *filespec, yang_pcb_t *pcb, yang_parsetype_t ptyp, boolean isyang)
 Parse a file as a YANG module. More...

Detailed Description

YANG Language Parser.

YANG Language Parser Entry Function.

Function Documentation

◆ yang_parse_from_filespec()

status_t yang_parse_from_filespec ( const xmlChar *  filespec,
yang_pcb_t pcb,
yang_parsetype_t  ptyp,
boolean  isyang 

Parse a file as a YANG module.

Error messages are printed by this function!!

On successful return: An ncx_module is filled out and validated as the file is parsed. If no errors:

      TOP, IMPORT:
         the module is loaded into the definition registry with
         the ncx_add_to_registry function
         the submodule is loaded into the top-level module,
         specified in the pcb
filespecabsolute path or relative path
This string is used as-is without adjustment.
pcbparser control block used as very top-level struct
ptypparser call type
         YANG_PT_TOP == called from top-level file
         YANG_PT_INCLUDE == called from an include-stmt in a file
         YANG_PT_IMPORT == called from an import-stmt in a file
isyangTRUE if a YANG file is expected
FALSE if a YIN file is expected
status of the operation
Here is the call graph for this function: