{
"$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\"",
"\"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
/* 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
%token <cpVal> T_DIGIT "number"
%token <cpVal> T_ID "identifier"
-%token <cpVal> T_STRING "string"
+%token <cpVal> T_STRING "string literal"
-%token T_REGEX "match regex"
+%token T_REGEX "matching regex"
%token T_REGSUB "substitution regex"
-%token <cpVal> T_REG_MATCH "match pattern of the regex"
-%token <cpVal> T_REG_SUBST "substitution pattern of the regex"
-%token <cpVal> T_REG_FLAGS "flags of the regex"
-%token <num> T_REG_REF "regex back reference"
+%token <cpVal> T_REG_MATCH "pattern of the regex"
+%token <cpVal> T_REG_SUBST "replacement of the regex"
+%token <cpVal> T_REG_FLAGS "pattern flags of the regex"
+%token <num> T_REG_REF "capture reference in the regex"
%token <cpVal> T_OP_UNARY "unary operator"
%token <cpVal> T_OP_BINARY "binary operator"
%type <exVal> lstfunc "list function"
%type <exVal> wordlist "list of words"
%type <exVal> words "tuple of words"
-%type <exVal> word "word expression"
-%type <exVal> string "string expression"
-%type <exVal> strany "any string expression"
-%type <exVal> var "variable expression"
-%type <exVal> regex "regular expression match"
-%type <exVal> regsub "regular expression substitution"
-%type <exVal> regsplit "regular expression split"
-%type <exVal> regany "any regular expression"
-%type <exVal> regref "regular expression back reference"
+%type <exVal> word "word"
+%type <exVal> string "string"
+%type <exVal> substr "substring"
+%type <exVal> var "variable"
+%type <exVal> regex "regex match"
+%type <exVal> regsub "regex substitution"
+%type <exVal> regsplit "regex split"
+%type <exVal> regany "regex any"
+%type <exVal> regref "regex capture reference"
%{
#include "util_expr_private.h"
| 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; }
;