httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1181230 - in /httpd/httpd/trunk/server: util_expr_parse.y util_expr_private.h
Date Mon, 10 Oct 2011 20:41:26 GMT
Author: sf
Date: Mon Oct 10 20:41:26 2011
New Revision: 1181230

URL: http://svn.apache.org/viewvc?rev=1181230&view=rev
Log:
Improve error message by removing 'unexpected T_ERROR' in one case.

Modified:
    httpd/httpd/trunk/server/util_expr_parse.y
    httpd/httpd/trunk/server/util_expr_private.h

Modified: httpd/httpd/trunk/server/util_expr_parse.y
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_parse.y?rev=1181230&r1=1181229&r2=1181230&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_parse.y (original)
+++ httpd/httpd/trunk/server/util_expr_parse.y Mon Oct 10 20:41:26 2011
@@ -123,6 +123,7 @@ expr      : T_TRUE                      
           | 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); }
           | '(' expr ')'                 { $$ = $2; }
+          | T_ERROR                      { YYABORT; }
           ;
 
 comparison: word T_OP_EQ word            { $$ = ap_expr_make(op_EQ,      $1, $3, ctx); }
@@ -208,7 +209,7 @@ strfunccall : T_ID '(' word ')' { $$ = a
 
 %%
 
-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 */
     ctx->error = apr_pstrdup(ctx->ptemp, s);

Modified: httpd/httpd/trunk/server/util_expr_private.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_private.h?rev=1181230&r1=1181229&r2=1181230&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_private.h (original)
+++ httpd/httpd/trunk/server/util_expr_private.h Mon Oct 10 20:41:26 2011
@@ -111,7 +111,7 @@ typedef struct {
 
 /* flex/bison functions */
 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_destroy(void *scanner);
 void ap_expr_yyset_extra(ap_expr_parse_ctx_t *context, void *scanner);



Mime
View raw message