Robert Shearman : widl: Use the same precendence rule for the conditional operator as in wpp.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 26 11:46:34 CST 2005


Module: wine
Branch: refs/heads/master
Commit: e59dcf53fcd5fbe2cabb500330090bff62480336
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=e59dcf53fcd5fbe2cabb500330090bff62480336

Author: Robert Shearman <rob at codeweavers.com>
Date:   Mon Dec 26 13:07:08 2005 +0100

widl: Use the same precendence rule for the conditional operator as in wpp.
Fixes several shift/reduce warnings.

---

 tools/widl/parser.y |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 4fc19fb..a556108 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -216,7 +216,7 @@ static type_t std_uhyper = { "MIDL_uhype
 %type <str> libraryhdr
 
 %left ','
-%right COND
+%right '?' ':'
 %left '|'
 %left '&'
 %left '-' '+'
@@ -480,7 +480,7 @@ m_expr:						{ $$ = make_expr(EXPR_VOID)
 expr:	  aNUM					{ $$ = make_exprl(EXPR_NUM, $1); }
 	| aHEXNUM				{ $$ = make_exprl(EXPR_HEXNUM, $1); }
 	| aIDENTIFIER				{ $$ = make_exprs(EXPR_IDENTIFIER, $1); }
-	| expr '?' expr ':' expr %prec COND	{ $$ = make_expr3(EXPR_COND, $1, $3, $5); }
+	| expr '?' expr ':' expr		{ $$ = make_expr3(EXPR_COND, $1, $3, $5); }
 	| expr '|' expr				{ $$ = make_expr2(EXPR_OR , $1, $3); }
 	| expr '&' expr				{ $$ = make_expr2(EXPR_AND, $1, $3); }
 	| expr '+' expr				{ $$ = make_expr2(EXPR_ADD, $1, $3); }




More information about the wine-cvs mailing list