From: Joe Orton Date: Wed, 13 Nov 2019 08:01:13 +0000 (+0000) Subject: Non terminal cannot have string aliases (only tokens appear in error X-Git-Tag: 2.5.0-alpha2-ci-test-only~1798 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11ec7b0061b1c31eaeab94b767b5d4af76a24444;p=thirdparty%2Fapache%2Fhttpd.git Non terminal cannot have string aliases (only tokens appear in error messages). %token is used to define tokens, and %nterm non terminals. The hidden %type (which was only recently documented) is meant for both tokens and non terminals. Yet %type expr "expression" is actually more or less equivalent to %nterm expr %token "expression" which is clearly not the intention of the author here. * server/util_expr_parse.y: Remove useless string-literal only tokens. Prefer %nterm to %type to avoid this error. PR: #72 Submitted by: Akim Demaille git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869724 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_expr_parse.y b/server/util_expr_parse.y index b6d586c614e..e570cc0128d 100644 --- a/server/util_expr_parse.y +++ b/server/util_expr_parse.y @@ -98,22 +98,22 @@ %right T_OP_NOT %right T_OP_CONCAT -%type cond "condition" -%type comp "comparison" -%type strfunc "string function" -%type listfunc "list function" -%type list "list" -%type words "words" -%type word "word" -%type string "string" -%type substr "substring" -%type var "variable" -%type regex "match regex" -%type regsub "substitution regex" -%type regany "any regex" -%type split "split" -%type join "join" -%type sub "sub" +%nterm cond +%nterm comp +%nterm strfunc +%nterm listfunc +%nterm list +%nterm words +%nterm word +%nterm string +%nterm substr +%nterm var +%nterm regex +%nterm regsub +%nterm regany +%nterm split +%nterm join +%nterm sub %{ #include "util_expr_private.h"