1
0
mirror of https://github.com/apache/httpd.git synced 2025-04-18 22:24:07 +03:00

21 Commits

Author SHA1 Message Date
Joe Orton
e8da666beb * server/util_expr_parse.c (yyparse): Fix typo in comment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915543 13f79535-47bb-0310-9956-ffa450edef68
2024-02-02 14:49:06 +00:00
Stefan Eissing
4fc2fd7dd5 Make sources build with latest clang version
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909450 13f79535-47bb-0310-9956-ffa450edef68
2023-04-27 07:14:36 +00:00
Joe Orton
bcfd0565d4 * server/util_expr_parse.[ch]: Regenerate after r1869724.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869725 13f79535-47bb-0310-9956-ffa450edef68
2019-11-13 08:02:43 +00:00
Yann Ylavic
4cd394061b Follow up to rr1810605 and r1811104.
Generated parser files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1811105 13f79535-47bb-0310-9956-ffa450edef68
2017-10-04 16:20:02 +00:00
Yann Ylavic
c0954b0bd4 ap_expr: follow up to r1810605.
Better token/type descriptors for better parsing error messages.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1811010 13f79535-47bb-0310-9956-ffa450edef68
2017-10-03 13:45:34 +00:00
Yann Ylavic
08ddf7ad0a 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..



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810605 13f79535-47bb-0310-9956-ffa450edef68
2017-10-02 21:57:26 +00:00
Yann Ylavic
3f0d0a66bd util_expr: sync bison generated source files with according
to changes on server/util_expr_parse.y from r1642154.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643929 13f79535-47bb-0310-9956-ffa450edef68
2014-12-08 21:20:50 +00:00
Yann Ylavic
8b77d7e81f Revert r1643900.
May someone with a bison version closer to the original one make this change.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643901 13f79535-47bb-0310-9956-ffa450edef68
2014-12-08 20:06:24 +00:00
Yann Ylavic
3415691b45 util_expr: sync bison generated source files with
server/util_expr_parse.y from r1642154.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643900 13f79535-47bb-0310-9956-ffa450edef68
2014-12-08 19:46:53 +00:00
Stefan Fritsch
93b299891f update auto-generated code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1493422 13f79535-47bb-0310-9956-ffa450edef68
2013-06-15 21:20:09 +00:00
Stefan Fritsch
2da3e9b560 Update auto-generated source
Now using bison 2.7.12


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1493416 13f79535-47bb-0310-9956-ffa450edef68
2013-06-15 20:49:40 +00:00
Stefan Fritsch
92663b1e32 Limit recursion in ap_expr evaluation to avoid unbounded stack usage
* evaluate chains of ||, &&, and string concatenation non-recursively
* limit other types of recursion to 20 levels
* avoid some string copies if concatenating more than 2 strings


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204087 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 21:58:48 +00:00
Stefan Fritsch
f6982bf4c5 Update autogenerated code. Now generated with bison 2.5 instead of 2.4.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181231 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 20:44:40 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
5566a6b476 Update auto-generated code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157363 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 10:00:45 +00:00
Stefan Fritsch
ef10673c8e Update auto-generated code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142165 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 07:48:12 +00:00
Stefan Fritsch
b93e49391b Rename ap_expr's typedef names:
ap_expr            ->  ap_expr_t
ap_expr_parse_ctx  ->  ap_expr_parse_ctx_t
ap_expr_eval_ctx   ->  ap_expr_eval_ctx_t
ap_expr_lookup_fn  ->  ap_expr_lookup_fn_t
ap_expr_node_op    ->  ap_expr_node_op_e


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042146 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 11:22:30 +00:00
Stefan Fritsch
fc7b453ebc update flex/bison autogenerated code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039901 13f79535-47bb-0310-9956-ffa450edef68
2010-11-28 16:35:49 +00:00
Stefan Fritsch
cf0e2c3a46 Fix some Windows build issues
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039204 13f79535-47bb-0310-9956-ffa450edef68
2010-11-25 22:27:17 +00:00
Stefan Fritsch
6ef1911acc ap_expr related fixes/enhancements:
- implement regex backreferences and make them available for setting 
  envvars in SetEnvIfExpr
- implement nested function calls in %-syntax: %{func1:%{func2:arg}} 
- actually implement evaluation of concatenation operator (oops...)
- Fix <If ... > treating an internal error as success


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037504 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 17:22:26 +00:00
Stefan Fritsch
35cdba6976 Replace ap_expr with a parser derived from mod_ssl's parser. Make mod_ssl use
the new parser. Rework ap_expr's public interface and provide hooks for modules
to add variables and functions.

The Netware and Windows build files still need to be adjusted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032073 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 14:31:16 +00:00