From: Stefan Fritsch Date: Sat, 15 Jun 2013 20:48:34 +0000 (+0000) Subject: Provide better token names for error messages X-Git-Tag: 2.5.0-alpha~5335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96131fdd9e56bd2404a63897bdb84d10e306f105;p=thirdparty%2Fapache%2Fhttpd.git Provide better token names for error messages Use either human readable names or the exact spelling from the BNF from the docs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1493414 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_expr_parse.y b/server/util_expr_parse.y index 85ed1231045..a389410b7fd 100644 --- a/server/util_expr_parse.y +++ b/server/util_expr_parse.y @@ -38,48 +38,48 @@ int num; } -%token T_TRUE -%token T_FALSE - -%token T_EXPR_BOOL -%token T_EXPR_STRING - -%token T_ERROR - -%token T_DIGIT -%token T_ID -%token T_STRING -%token T_REGEX -%token T_REGEX_I -%token T_REGEX_BACKREF -%token T_OP_UNARY -%token T_OP_BINARY - -%token T_STR_BEGIN -%token T_STR_END -%token T_VAR_BEGIN -%token T_VAR_END - -%token T_OP_EQ -%token T_OP_NE -%token T_OP_LT -%token T_OP_LE -%token T_OP_GT -%token T_OP_GE -%token T_OP_REG -%token T_OP_NRE -%token T_OP_IN -%token T_OP_STR_EQ -%token T_OP_STR_NE -%token T_OP_STR_LT -%token T_OP_STR_LE -%token T_OP_STR_GT -%token T_OP_STR_GE -%token T_OP_CONCAT - -%token T_OP_OR -%token T_OP_AND -%token T_OP_NOT +%token T_TRUE "true" +%token T_FALSE "false" + +%token T_EXPR_BOOL "boolean expression" +%token T_EXPR_STRING "string expression" + +%token T_ERROR "error token" + +%token T_DIGIT "number" +%token T_ID "identifier" +%token T_STRING "cstring" +%token T_REGEX "regex" +%token T_REGEX_I "case-indendent regex" +%token T_REGEX_BACKREF "regex back reference" +%token T_OP_UNARY "unary operator" +%token T_OP_BINARY "binary operator" + +%token T_STR_BEGIN "start of string" +%token T_STR_END "end of string" +%token T_VAR_BEGIN "start of variable name" +%token T_VAR_END "end of variable name" + +%token T_OP_EQ "integer equal" +%token T_OP_NE "integer not equal" +%token T_OP_LT "integer less than" +%token T_OP_LE "integer less or equal" +%token T_OP_GT "integer greater than" +%token T_OP_GE "integer greater or equal" +%token T_OP_REG "regex match" +%token T_OP_NRE "regex non-match" +%token T_OP_IN "contained in" +%token T_OP_STR_EQ "string equal" +%token T_OP_STR_NE "string not equal" +%token T_OP_STR_LT "string less than" +%token T_OP_STR_LE "string less or equal" +%token T_OP_STR_GT "string greater than" +%token T_OP_STR_GE "string greater or equal" +%token T_OP_CONCAT "string concatenation" + +%token T_OP_OR "logical or" +%token T_OP_AND "logical and" +%token T_OP_NOT "logical not" %right T_OP_OR %right T_OP_AND @@ -88,16 +88,16 @@ %type expr %type comparison -%type strfunccall -%type lstfunccall +%type strfunccall "function" +%type lstfunccall "listfunction" %type regex %type words %type wordlist %type word %type string -%type strpart -%type var -%type backref +%type strpart "stringpart" +%type var "variable" +%type backref "rebackref" %{ #include "util_expr_private.h"