yylval->str = str_new(state->pool, 32); \
} STMT_END
+#ifndef VAR_EXPAND_PARSER_error
+# define VAR_EXPAND_PARSER_error 256
+#endif
+
static int scanner_error(void *yyscanner, const char *msg);
static bool append_valid_utf8(void *yyscanner, YYSTYPE *state, const char *value);
#define append_valid_utf8(state, value) \
expression: VALUE { i_zero(&tmp_value); tmp_value.str = str_c($1); push_argument(state, VAR_EXPAND_PARAMETER_VALUE_TYPE_STRING, &tmp_value); push_function(state, "literal"); state->p->only_literal = TRUE;}
| OCBRACE filter_list CCBRACE
| PERC { i_zero(&tmp_value); tmp_value.str = "%"; push_argument(state, VAR_EXPAND_PARAMETER_VALUE_TYPE_STRING, &tmp_value); push_function(state, "literal"); state->p->only_literal = TRUE; }
+ | error { return -1; }
;
filter_list: filter_list PIPE filter
;
funcname : NAME { $$ = p_strdup(state->plist->pool, str_c($1)); }
+ | error { return -1; }
;
arguments:
| key EQ number { i_zero(&tmp_value); tmp_value.num = $3; push_named_argument(state, $1, VAR_EXPAND_PARAMETER_VALUE_TYPE_INT, &tmp_value); }
| key EQ NAME { i_zero(&tmp_value); tmp_value.str = str_c($3); push_named_argument(state, $1, VAR_EXPAND_PARAMETER_VALUE_TYPE_VARIABLE, &tmp_value); }
| key EQ VALUE { i_zero(&tmp_value); tmp_value.str = str_c($3); push_named_argument(state, $1, VAR_EXPAND_PARAMETER_VALUE_TYPE_STRING, &tmp_value); }
+ | error { return -1; }
;
key : NAME { $$ = p_strdup(state->plist->pool, str_c($1)); }
+ | error { return -1; }
;
%%