mirror of
https://github.com/apache/httpd.git
synced 2025-08-13 14:40:20 +00:00
Improve error message by removing 'unexpected T_ERROR' in one case.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181230 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -123,6 +123,7 @@ expr : T_TRUE { $$ = ap_expr_make(op_True, NUL
|
|||||||
| T_OP_UNARY word { $$ = ap_expr_unary_op_make( $1, $2, ctx); }
|
| T_OP_UNARY word { $$ = ap_expr_unary_op_make( $1, $2, ctx); }
|
||||||
| word T_OP_BINARY word { $$ = ap_expr_binary_op_make($2, $1, $3, ctx); }
|
| word T_OP_BINARY word { $$ = ap_expr_binary_op_make($2, $1, $3, ctx); }
|
||||||
| '(' expr ')' { $$ = $2; }
|
| '(' expr ')' { $$ = $2; }
|
||||||
|
| T_ERROR { YYABORT; }
|
||||||
;
|
;
|
||||||
|
|
||||||
comparison: word T_OP_EQ word { $$ = ap_expr_make(op_EQ, $1, $3, ctx); }
|
comparison: word T_OP_EQ word { $$ = ap_expr_make(op_EQ, $1, $3, ctx); }
|
||||||
@ -208,7 +209,7 @@ strfunccall : T_ID '(' word ')' { $$ = ap_expr_str_func_make($1, $3, ctx); }
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
void yyerror(ap_expr_parse_ctx_t *ctx, char *s)
|
void yyerror(ap_expr_parse_ctx_t *ctx, const char *s)
|
||||||
{
|
{
|
||||||
/* s is allocated on the stack */
|
/* s is allocated on the stack */
|
||||||
ctx->error = apr_pstrdup(ctx->ptemp, s);
|
ctx->error = apr_pstrdup(ctx->ptemp, s);
|
||||||
|
@ -111,7 +111,7 @@ typedef struct {
|
|||||||
|
|
||||||
/* flex/bison functions */
|
/* flex/bison functions */
|
||||||
int ap_expr_yyparse(ap_expr_parse_ctx_t *context);
|
int ap_expr_yyparse(ap_expr_parse_ctx_t *context);
|
||||||
void ap_expr_yyerror(ap_expr_parse_ctx_t *context, char *err);
|
void ap_expr_yyerror(ap_expr_parse_ctx_t *context, const char *err);
|
||||||
int ap_expr_yylex_init(void **scanner);
|
int ap_expr_yylex_init(void **scanner);
|
||||||
int ap_expr_yylex_destroy(void *scanner);
|
int ap_expr_yylex_destroy(void *scanner);
|
||||||
void ap_expr_yyset_extra(ap_expr_parse_ctx_t *context, void *scanner);
|
void ap_expr_yyset_extra(ap_expr_parse_ctx_t *context, void *scanner);
|
||||||
|
Reference in New Issue
Block a user