Jacek Caban : vbscript: Move sign expression to a separated rule.
Alexandre Julliard
julliard at winehq.org
Mon Oct 28 16:43:36 CDT 2019
Module: wine
Branch: master
Commit: aa95d8a9bcc39fe66fc80eac3b359d05fbc3c83d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=aa95d8a9bcc39fe66fc80eac3b359d05fbc3c83d
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Oct 28 18:39:38 2019 +0100
vbscript: Move sign expression to a separated rule.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/vbscript/parser.y | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y
index 8ecdf47c08..000ab5bf33 100644
--- a/dlls/vbscript/parser.y
+++ b/dlls/vbscript/parser.y
@@ -126,7 +126,7 @@ static statement_t *link_statements(statement_t*,statement_t*);
%type <statement> Statement SimpleStatement StatementNl StatementsNl StatementsNl_opt BodyStatements IfStatement Else_opt
%type <expression> Expression LiteralExpression PrimaryExpression EqualityExpression CallExpression ExpressionNl_opt
%type <expression> ConcatExpression AdditiveExpression ModExpression IntdivExpression MultiplicativeExpression ExpExpression
-%type <expression> NotExpression UnaryExpression AndExpression OrExpression XorExpression EqvExpression
+%type <expression> NotExpression UnaryExpression AndExpression OrExpression XorExpression EqvExpression SignExpression
%type <expression> ConstExpression NumericLiteralExpression
%type <member> MemberExpression
%type <expression> Arguments_opt ArgumentList ArgumentList_opt Step_opt ExpressionList
@@ -369,15 +369,18 @@ MultiplicativeExpression
{ $$ = new_binary_expression(ctx, EXPR_DIV, $1, $3); CHECK_ERROR; }
ExpExpression
- : UnaryExpression { $$ = $1; }
- | ExpExpression '^' UnaryExpression { $$ = new_binary_expression(ctx, EXPR_EXP, $1, $3); CHECK_ERROR; }
+ : SignExpression { $$ = $1; }
+ | ExpExpression '^' SignExpression { $$ = new_binary_expression(ctx, EXPR_EXP, $1, $3); CHECK_ERROR; }
+
+SignExpression
+ : UnaryExpression { $$ = $1; }
+ | '-' SignExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
+ | '+' SignExpression { $$ = $2; }
UnaryExpression
: LiteralExpression { $$ = $1; }
| CallExpression { $$ = $1; }
| tNEW Identifier { $$ = new_new_expression(ctx, $2); CHECK_ERROR; }
- | '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
- | '+' UnaryExpression { $$ = $2; }
CallExpression
: PrimaryExpression { $$ = $1; }
More information about the wine-cvs
mailing list