* C-API: Added xpath_first_localonly() as an xpath function that skips prefix and namespace checks.
* Added experimental code for optizing XPath search using binary search. * Enable with XPATH_LIST_OPTIMIZE * Changed `clicon_rpc_generate_error(msg, xerr)` to `clicon_rpc_generate_error(xerr, msg, arg)`
This commit is contained in:
parent
ab46ce9820
commit
7ad16bd84b
56 changed files with 602 additions and 227 deletions
|
|
@ -85,6 +85,10 @@ digit [0-9]
|
|||
integer {digit}+
|
||||
real ({digit}+[.]{digit}*)|({digit}*[.]{digit}+)
|
||||
|
||||
namestart [A-Z_a-z]
|
||||
namechar [A-Z_a-z\-\.0-9]
|
||||
ncname {namestart}{namechar}*
|
||||
|
||||
%x TOKEN
|
||||
%s QLITERAL
|
||||
%s ALITERAL
|
||||
|
|
@ -141,9 +145,9 @@ real ({digit}+[.]{digit}*)|({digit}*[.]{digit}+)
|
|||
<TOKEN>\" { BEGIN(QLITERAL); return QUOTE; }
|
||||
<TOKEN>\' { BEGIN(ALITERAL); return APOST; }
|
||||
<TOKEN>\-?({integer}|{real}) { clixon_xpath_parselval.string = strdup(yytext); return NUMBER; }
|
||||
<TOKEN>[0-9A-Za-z_\-]+ { clixon_xpath_parselval.string = strdup(yytext);
|
||||
<TOKEN>{ncname} { clixon_xpath_parselval.string = strdup(yytext);
|
||||
return NAME; /* rather be catch-all */
|
||||
}
|
||||
}
|
||||
<TOKEN>. { fprintf(stderr,"LEXICAL ERROR\n"); return -1; }
|
||||
|
||||
<QLITERAL>\" { BEGIN(TOKEN); return QUOTE; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue