diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-10-17 16:53:11 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-10-17 16:53:11 -0400 |
commit | f6c00e74c29ca35f7311aa6e79b9f363263f2fbd (patch) | |
tree | 90dc3640281ad92860c4bbd346758e28d18f3af6 /Source/cmExprParser.y | |
parent | 985d092d4d9f6d38c794755c3c64405ef7ec8d35 (diff) | |
download | cmake-f6c00e74c29ca35f7311aa6e79b9f363263f2fbd.tar.gz |
ENH: Fix precedence
Diffstat (limited to 'Source/cmExprParser.y')
-rw-r--r-- | Source/cmExprParser.y | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y index 485972cb13..27935f6593 100644 --- a/Source/cmExprParser.y +++ b/Source/cmExprParser.y @@ -118,13 +118,24 @@ bitwisexor exp_AND bitwiseand {$<Number>$ = $<Number>1 & $<Number>3;} bitwiseand: +shift +{$<Number>$ = $<Number>1;} +| +bitwiseand exp_SHIFTLEFT shift +{$<Number>$ = $<Number>1 << $<Number>3;} +| +bitwiseand exp_SHIFTRIGHT shift +{$<Number>$ = $<Number>1 >> $<Number>3;} + + +shift: term {$<Number>$ = $<Number>1;} | -bitwiseand exp_PLUS term +shift exp_PLUS term {$<Number>$ = $<Number>1 + $<Number>3;} | -bitwiseand exp_MINUS term +shift exp_MINUS term {$<Number>$ = $<Number>1 - $<Number>3;} term: @@ -141,17 +152,6 @@ term exp_MOD factor {$<Number>$ = $<Number>1 % $<Number>3;} factor: -shift -{$<Number>$ = $<Number>1;} -| -factor exp_SHIFTLEFT shift -{$<Number>$ = $<Number>1 << $<Number>3;} -| -factor exp_SHIFTRIGHT shift -{$<Number>$ = $<Number>1 >> $<Number>3;} - - -shift: exp_NUMBER {$<Number>$ = $<Number>1;} | |