diff --git a/CHANGELOG.md b/CHANGELOG.md index f23c555e..898854f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ * Validation of types and CLI expansion * Example extended with inclusion of iana-if-type RFC 7224 interface identities * Applications which have not strictly enforced the identities may now have problems with validation and may need to be modified. + ### Minor changes: +* CDATA xml support (patch by David Cornejo, Netgate) * Validation of yang bits type space-separated list value * Added -U command line to clixon_cli and clixon_netconf for NACM pseudo-user tests * Added a generated CLI show command that works on the generated parse tree with auto completion. diff --git a/configure b/configure index cdc7a30b..88710c13 100755 --- a/configure +++ b/configure @@ -2157,7 +2157,8 @@ CLIXON_VERSION_MAJOR="3" CLIXON_VERSION_MINOR="7" CLIXON_VERSION_PATCH="0" CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\"" -# Fix to specific version (eg 3.5) or head (3) + +# Fix to specific CLIgen version (eg 3.5) or head (3) CLIGEN_VERSION="3" if test "$prefix" = "NONE"; then CLIGEN_PREFIX="$ac_default_prefix" diff --git a/configure.ac b/configure.ac index 433291fb..6c122768 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,8 @@ CLIXON_VERSION_MAJOR="3" CLIXON_VERSION_MINOR="7" CLIXON_VERSION_PATCH="0" CLIXON_VERSION="\"${CLIXON_VERSION_MAJOR}.${CLIXON_VERSION_MINOR}.${CLIXON_VERSION_PATCH}.PRE\"" -# Fix to specific version (eg 3.5) or head (3) + +# Fix to specific CLIgen version (eg 3.5) or head (3) CLIGEN_VERSION="3" if test "$prefix" = "NONE"; then CLIGEN_PREFIX="$ac_default_prefix" diff --git a/example/example.yang b/example/example.yang index fbb1c738..e90bfdef 100644 --- a/example/example.yang +++ b/example/example.yang @@ -10,7 +10,7 @@ module example { prefix rt; } import iana-if-type { - prefix ianaift; + prefix ianaift; } description "Example code that includes ietf-ip and ietf-routing"; diff --git a/lib/src/clixon_xml_parse.l b/lib/src/clixon_xml_parse.l index e0c39884..029baa8f 100644 --- a/lib/src/clixon_xml_parse.l +++ b/lib/src/clixon_xml_parse.l @@ -77,6 +77,7 @@ int clixon_xml_parsewrap(void) %x START %s STATEA %s AMPERSAND +%s CDATA %s CMNT %s STR %s TEXTDECL @@ -106,7 +107,9 @@ int clixon_xml_parsewrap(void) \< { BEGIN(START); return *clixon_xml_parsetext; } & { _YA->ya_lex_state =STATEA;BEGIN(AMPERSAND);} \n { clixon_xml_parselval.string = yytext;_YA->ya_linenum++; return (CHARDATA);} +"ya_lex_state = STATEA; clixon_xml_parselval.string = yytext; return CHARDATA;} . { clixon_xml_parselval.string = yytext; return CHARDATA; /*XXX:optimize*/} + /* @see xml_chardata_encode */ "amp; " {BEGIN(_YA->ya_lex_state); clixon_xml_parselval.string = "&"; return CHARDATA;} "lt; " {BEGIN(_YA->ya_lex_state); clixon_xml_parselval.string = "<"; return CHARDATA;} @@ -114,6 +117,9 @@ int clixon_xml_parsewrap(void) "apos; " {BEGIN(_YA->ya_lex_state); clixon_xml_parselval.string = "'"; return CHARDATA;} "aquot; " {BEGIN(_YA->ya_lex_state); clixon_xml_parselval.string = "'"; return CHARDATA;} +. { clixon_xml_parselval.string = yytext; return CHARDATA;} +\n { clixon_xml_parselval.string = yytext;_YA->ya_linenum++; return (CHARDATA);} +"]]>" { BEGIN(_YA->ya_lex_state); clixon_xml_parselval.string = yytext; return CHARDATA;} "-->" { BEGIN(START); return ECOMMENT; } \n _YA->ya_linenum++;