summaryrefslogtreecommitdiffstats
path: root/Source/cmExprParser.y
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-14 19:25:14 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-14 19:30:50 (GMT)
commit834f52a6f41ec5ae8429afa2d374f96458963cf3 (patch)
tree168bae0d556ac762c0c6afae24d9d02453823c55 /Source/cmExprParser.y
parent7aaed265ade4c3b38967e83095497280a7a55153 (diff)
downloadCMake-834f52a6f41ec5ae8429afa2d374f96458963cf3.zip
CMake-834f52a6f41ec5ae8429afa2d374f96458963cf3.tar.gz
CMake-834f52a6f41ec5ae8429afa2d374f96458963cf3.tar.bz2
cmExprParser: Revise indentation style to match rest of CMake
Diffstat (limited to 'Source/cmExprParser.y')
-rw-r--r--Source/cmExprParser.y112
1 files changed, 58 insertions, 54 deletions
diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y
index b511fa7..ce467cf 100644
--- a/Source/cmExprParser.y
+++ b/Source/cmExprParser.y
@@ -66,76 +66,80 @@ static void cmExpr_yyerror(yyscan_t yyscanner, const char* message);
%%
-Start:
-exp
-{
- cmExpr_yyget_extra(yyscanner)->SetResult($<Number>1);
-}
+start:
+ exp {
+ cmExpr_yyget_extra(yyscanner)->SetResult($<Number>1);
+ }
exp:
-bitwiseor
-{$<Number>$ = $<Number>1;}
-|
-exp exp_OR bitwiseor
-{$<Number>$ = $<Number>1 | $<Number>3;}
+ bitwiseor {
+ $<Number>$ = $<Number>1;
+ }
+| exp exp_OR bitwiseor {
+ $<Number>$ = $<Number>1 | $<Number>3;
+ }
bitwiseor:
-bitwisexor
-{$<Number>$ = $<Number>1;}
-|
-bitwiseor exp_XOR bitwisexor
-{$<Number>$ = $<Number>1 ^ $<Number>3;}
+ bitwisexor {
+ $<Number>$ = $<Number>1;
+ }
+| bitwiseor exp_XOR bitwisexor {
+ $<Number>$ = $<Number>1 ^ $<Number>3;
+ }
bitwisexor:
-bitwiseand
-{$<Number>$ = $<Number>1;}
-|
-bitwisexor exp_AND bitwiseand
-{$<Number>$ = $<Number>1 & $<Number>3;}
+ bitwiseand {
+ $<Number>$ = $<Number>1;
+ }
+| 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 {
+ $<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;}
-|
-shift exp_PLUS term
-{$<Number>$ = $<Number>1 + $<Number>3;}
-|
-shift exp_MINUS term
-{$<Number>$ = $<Number>1 - $<Number>3;}
+ term {
+ $<Number>$ = $<Number>1;
+ }
+| shift exp_PLUS term {
+ $<Number>$ = $<Number>1 + $<Number>3;
+ }
+| shift exp_MINUS term {
+ $<Number>$ = $<Number>1 - $<Number>3;
+ }
term:
-factor
-{$<Number>$ = $<Number>1;}
-|
-term exp_TIMES factor
-{$<Number>$ = $<Number>1 * $<Number>3;}
-|
-term exp_DIVIDE factor
-{$<Number>$ = $<Number>1 / $<Number>3;}
-|
-term exp_MOD factor
-{$<Number>$ = $<Number>1 % $<Number>3;}
+ factor {
+ $<Number>$ = $<Number>1;
+ }
+| term exp_TIMES factor {
+ $<Number>$ = $<Number>1 * $<Number>3;
+ }
+| term exp_DIVIDE factor {
+ $<Number>$ = $<Number>1 / $<Number>3;
+ }
+| term exp_MOD factor {
+ $<Number>$ = $<Number>1 % $<Number>3;
+ }
factor:
-exp_NUMBER
-{$<Number>$ = $<Number>1;}
-|
-exp_OPENPARENT exp exp_CLOSEPARENT
-{$<Number>$ = $<Number>2;}
+ exp_NUMBER {
+ $<Number>$ = $<Number>1;
+ }
+| exp_OPENPARENT exp exp_CLOSEPARENT {
+ $<Number>$ = $<Number>2;
+ }
;
-
%%
/* End of grammar */