/[Apache-SVN]
ViewVC logotype

Revision 1810605


Jump to revision: Previous Next
Author: ylavic
Date: Mon Oct 2 21:57:26 2017 UTC (6 years, 6 months ago)
Changed paths: 9
Log Message:
ap_expr: open string expressions to the <word>.

Introduces the syntax "%{:<word>:}", borrowed from the <var>'s one, and which
likewise can be embedded anywhere in a string expression (the same reserved
character ':' gets reused in an unambiguous manner).

This allows the two types of expressions (boolean and string) to now share
fully the same language set, namely: strings, lists, vars, regexes, backrefs,
functions with multiple or complex arguments, and especially combinations
thereof.

Most of them were reserved to boolean expressions only, while complex string
constructions can also benefit to, well, strings. The <word> construct allows
that (say the syntax "%{:<word>:}" looks like a temporary variable constructed
in a string).

Since string expressions may now have to deal with lists (arrays), they also
need a way to produce/extract strings from list and vice versa. This can be
done with the new "join" and "split" operators, while the new substitution
regexes (like "s/<pattern>/<substitute>/<flags>") may be used to manipulate
strings in place. All this of course available for both string and boolean
expressions.

Tests and doc updates upcoming..



Changed paths

Path Details
Directoryhttpd/httpd/trunk/include/ap_regex.h modified , text changed
Directoryhttpd/httpd/trunk/server/util_expr_eval.c modified , text changed
Directoryhttpd/httpd/trunk/server/util_expr_parse.c modified , text changed
Directoryhttpd/httpd/trunk/server/util_expr_parse.h modified , text changed
Directoryhttpd/httpd/trunk/server/util_expr_parse.y modified , text changed
Directoryhttpd/httpd/trunk/server/util_expr_private.h modified , text changed
Directoryhttpd/httpd/trunk/server/util_expr_scan.c modified , text changed
Directoryhttpd/httpd/trunk/server/util_expr_scan.l modified , text changed
Directoryhttpd/httpd/trunk/server/util_pcre.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26