Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 68BB9200D23 for ; Wed, 4 Oct 2017 19:09:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6713A160BD7; Wed, 4 Oct 2017 17:09:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8584C1609DD for ; Wed, 4 Oct 2017 19:09:06 +0200 (CEST) Received: (qmail 68127 invoked by uid 500); 4 Oct 2017 17:09:05 -0000 Mailing-List: contact docs-help@httpd.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@httpd.apache.org List-Id: Delivered-To: mailing list docs@httpd.apache.org Received: (qmail 67979 invoked by uid 99); 4 Oct 2017 17:09:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Oct 2017 17:09:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 78F241A1FAE; Wed, 4 Oct 2017 17:09:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.179 X-Spam-Level: ** X-Spam-Status: No, score=2.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id E-vccRDVw8Vu; Wed, 4 Oct 2017 17:09:02 +0000 (UTC) Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DC87F5FE43; Wed, 4 Oct 2017 17:09:01 +0000 (UTC) Received: by mail-qk0-f179.google.com with SMTP id x82so2259075qkb.12; Wed, 04 Oct 2017 10:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PQzURQkrF3Vbw0wAFDU+Y2w70Vq1dv700oVYaoOqfhA=; b=mZp+/gPcFe89iMObawYECz7VYybKNlEKQW0MDTF4AwgzimeFgb81TlqgQji/xuTWYL oQ9pwJxuOD1G4JfOsbABw60/amKDWqzjmn9yG3CDQDtRWVsThW7F1BMXoubNYwUkkY3X hYi8eI7KoY6FAaYthoihYAUPH43fwGtyt6lBQVGjxfFvPoDhDFIRmNvZhy0f5xbjqhEK kgy5bFvnN/dVQgbN9xgef8EDh6adlD70bBO2AhvDV87X8qxv/8okUxSOPMvXQ39TQwut Og6wr3axAnOKaBoRGulXb2goPsNnYZPq9NpeFT0Ym4nk15aEHDjA76rI9tt7HpgXTAzP shyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PQzURQkrF3Vbw0wAFDU+Y2w70Vq1dv700oVYaoOqfhA=; b=JgH6BIwTrw53UU9SD4gVQsvyaLsJn3yMzGcfFZerPjNc574rfct55QygNiJKweDCJR 8WOZtfa8h9pr3PPA0BWg7C11HPpu42+D65O8hlPpHZlMcFGJ3LLvVcaIrmQRlbPqf11m oZbL4tIeqP/uWUncps3SAQ2tkad1+GguFkv6A+d1wd2HIa/lJhcZOVvm0jhM/xnqZcMH lf2GmMvNmNpHIyi2cv49GaKGmCblrsBg452fODY4FLqCX6bjUO6xHPt6yzp0IrEzTHQf lQpZcw7x3l9uE55Ny6gxel7X38RqbZui4Pq5yZKWVnN78/dXO/ODFJIMtSiC84+hFER/ 13+g== X-Gm-Message-State: AMCzsaWmqRFSf1LzQpTXfj0kcIbxkvlMg0MIQ6BSp8UFxWUKKD9+PQ4c 6O6fMPcKFWxbWfwSMtyEWUgm9uU7p0l8tOJz0BYLYfUE X-Google-Smtp-Source: AOwi7QA3B+awv9sD45SlgqELp2vpZaZNsdVXMy86ZJXKzkf36rcITsWAsD8+aHpwSRlH1RLmq3AeAvInFnqFXASCYiE= X-Received: by 10.55.197.9 with SMTP id p9mr688431qki.113.1507136940359; Wed, 04 Oct 2017 10:09:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.23.37 with HTTP; Wed, 4 Oct 2017 10:08:59 -0700 (PDT) In-Reply-To: References: <20171003134537.F11943A02CB@svn01-us-west.apache.org> From: Yann Ylavic Date: Wed, 4 Oct 2017 19:08:59 +0200 Message-ID: Subject: Re: svn commit: r1811010 - in /httpd/httpd/trunk/server: util_expr_parse.c util_expr_parse.y To: httpd-dev Cc: docs@httpd.apache.org Content-Type: text/plain; charset="UTF-8" archived-at: Wed, 04 Oct 2017 17:09:07 -0000 First try in r1811111. On Tue, Oct 3, 2017 at 3:54 PM, Yann Ylavic wrote: > Last but not least, I'm on it ;) > > On Tue, Oct 3, 2017 at 3:49 PM, Eric Covener wrote: >> Still need something in expr.xml (incl an example or two) >> >> On Tue, Oct 3, 2017 at 9:45 AM, wrote: >>> Author: ylavic >>> Date: Tue Oct 3 13:45:34 2017 >>> New Revision: 1811010 >>> >>> URL: http://svn.apache.org/viewvc?rev=1811010&view=rev >>> Log: >>> ap_expr: follow up to r1810605. >>> >>> Better token/type descriptors for better parsing error messages. >>> >>> >>> Modified: >>> httpd/httpd/trunk/server/util_expr_parse.c >>> httpd/httpd/trunk/server/util_expr_parse.y >>> >>> Modified: httpd/httpd/trunk/server/util_expr_parse.c >>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_parse.c?rev=1811010&r1=1811009&r2=1811010&view=diff >>> ============================================================================== >>> --- httpd/httpd/trunk/server/util_expr_parse.c (original) >>> +++ httpd/httpd/trunk/server/util_expr_parse.c Tue Oct 3 13:45:34 2017 >>> @@ -551,11 +551,12 @@ static const char *const yytname[] = >>> { >>> "$end", "error", "$undefined", "\"true\"", "\"false\"", >>> "\"boolean expression\"", "\"string expression\"", "\"error token\"", >>> - "\"number\"", "\"identifier\"", "\"string\"", "\"match regex\"", >>> - "\"substitution regex\"", "\"match pattern of the regex\"", >>> - "\"substitution pattern of the regex\"", "\"flags of the regex\"", >>> - "\"regex back reference\"", "\"unary operator\"", "\"binary operator\"", >>> - "\"start of string\"", "\"end of string\"", "\"start of variable name\"", >>> + "\"number\"", "\"identifier\"", "\"string literal\"", >>> + "\"matching regex\"", "\"substitution regex\"", >>> + "\"pattern of the regex\"", "\"replacement of the regex\"", >>> + "\"pattern flags of the regex\"", "\"capture reference in the regex\"", >>> + "\"unary operator\"", "\"binary operator\"", "\"start of string\"", >>> + "\"end of string\"", "\"start of variable name\"", >>> "\"end of variable name\"", "\"start of variable expression\"", >>> "\"end of variable expression\"", "\"integer equal\"", >>> "\"integer not equal\"", "\"integer less than\"", >>> @@ -567,14 +568,12 @@ static const char *const yytname[] = >>> "\"string concatenation\"", "\"split operator\"", "\"join operator\"", >>> "\"logical or\"", "\"logical and\"", "\"logical not\"", "\"condition\"", >>> "\"comparison\"", "\"string function\"", "\"list function\"", >>> - "\"list of words\"", "\"tuple of words\"", "\"word expression\"", >>> - "\"any string expression\"", "\"variable expression\"", >>> - "\"regular expression match\"", "\"regular expression substitution\"", >>> - "\"regular expression split\"", "\"any regular expression\"", >>> - "\"regular expression back reference\"", "'('", "')'", "'{'", "'}'", >>> - "','", "':'", "$accept", "root", "cond", "comp", "wordlist", "words", >>> - "string", "strany", "var", "word", "regex", "regsub", "regsplit", >>> - "regany", "regref", "lstfunc", "strfunc", YY_NULL >>> + "\"list of words\"", "\"tuple of words\"", "\"word\"", "\"string\"", >>> + "\"substring\"", "\"variable\"", "\"regex substitution\"", >>> + "\"regex split\"", "\"regex any\"", "\"regex capture reference\"", "'('", >>> + "')'", "'{'", "'}'", "','", "':'", "$accept", "root", "cond", "comp", >>> + "wordlist", "words", "string", "substr", "var", "word", "regex", >>> + "regsub", "regsplit", "regany", "regref", "lstfunc", "strfunc", YY_NULL >>> }; >>> #endif >>> >>> @@ -2023,7 +2022,7 @@ yyreduce: >>> >>> >>> /* Line 1787 of yacc.c */ >>> -#line 2027 "util_expr_parse.c" >>> +#line 2026 "util_expr_parse.c" >>> default: break; >>> } >>> /* User semantic actions sometimes alter yychar, and that requires >>> >>> Modified: httpd/httpd/trunk/server/util_expr_parse.y >>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_parse.y?rev=1811010&r1=1811009&r2=1811010&view=diff >>> ============================================================================== >>> --- httpd/httpd/trunk/server/util_expr_parse.y (original) >>> +++ httpd/httpd/trunk/server/util_expr_parse.y Tue Oct 3 13:45:34 2017 >>> @@ -48,14 +48,14 @@ >>> >>> %token T_DIGIT "number" >>> %token T_ID "identifier" >>> -%token T_STRING "string" >>> +%token T_STRING "string literal" >>> >>> -%token T_REGEX "match regex" >>> +%token T_REGEX "matching regex" >>> %token T_REGSUB "substitution regex" >>> -%token T_REG_MATCH "match pattern of the regex" >>> -%token T_REG_SUBST "substitution pattern of the regex" >>> -%token T_REG_FLAGS "flags of the regex" >>> -%token T_REG_REF "regex back reference" >>> +%token T_REG_MATCH "pattern of the regex" >>> +%token T_REG_SUBST "replacement of the regex" >>> +%token T_REG_FLAGS "pattern flags of the regex" >>> +%token T_REG_REF "capture reference in the regex" >>> >>> %token T_OP_UNARY "unary operator" >>> %token T_OP_BINARY "binary operator" >>> @@ -103,15 +103,15 @@ >>> %type lstfunc "list function" >>> %type wordlist "list of words" >>> %type words "tuple of words" >>> -%type word "word expression" >>> -%type string "string expression" >>> -%type strany "any string expression" >>> -%type var "variable expression" >>> -%type regex "regular expression match" >>> -%type regsub "regular expression substitution" >>> -%type regsplit "regular expression split" >>> -%type regany "any regular expression" >>> -%type regref "regular expression back reference" >>> +%type word "word" >>> +%type string "string" >>> +%type substr "substring" >>> +%type var "variable" >>> +%type regex "regex match" >>> +%type regsub "regex substitution" >>> +%type regsplit "regex split" >>> +%type regany "regex any" >>> +%type regref "regex capture reference" >>> >>> %{ >>> #include "util_expr_private.h" >>> @@ -168,12 +168,12 @@ words : word >>> | word ',' words { $$ = ap_expr_make(op_ListElement, $1, $3, ctx); } >>> ; >>> >>> -string : strany { $$ = $1; } >>> - | string strany { $$ = ap_expr_concat_make($1, $2, ctx); } >>> +string : substr { $$ = $1; } >>> + | string substr { $$ = ap_expr_concat_make($1, $2, ctx); } >>> | T_ERROR { YYABORT; } >>> ; >>> >>> -strany : T_STRING { $$ = ap_expr_make(op_String, $1, NULL, ctx); } >>> +substr : T_STRING { $$ = ap_expr_make(op_String, $1, NULL, ctx); } >>> | var { $$ = $1; } >>> | regref { $$ = $1; } >>> ; >>> >>> >> >> >> >> -- >> Eric Covener >> covener@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org For additional commands, e-mail: docs-help@httpd.apache.org