summaryrefslogtreecommitdiffstats
path: root/Source/cmExprParser.y
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-10-17 20:53:11 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-10-17 20:53:11 (GMT)
commitf6c00e74c29ca35f7311aa6e79b9f363263f2fbd (patch)
tree90dc3640281ad92860c4bbd346758e28d18f3af6 /Source/cmExprParser.y
parent985d092d4d9f6d38c794755c3c64405ef7ec8d35 (diff)
downloadCMake-f6c00e74c29ca35f7311aa6e79b9f363263f2fbd.zip
CMake-f6c00e74c29ca35f7311aa6e79b9f363263f2fbd.tar.gz
CMake-f6c00e74c29ca35f7311aa6e79b9f363263f2fbd.tar.bz2
ENH: Fix precedence
Diffstat (limited to 'Source/cmExprParser.y')
-rw-r--r--Source/cmExprParser.y26
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y
index 485972c..27935f6 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;}
|