diff options
author | Brad King <brad.king@kitware.com> | 2016-10-14 19:25:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-14 19:30:50 (GMT) |
commit | 834f52a6f41ec5ae8429afa2d374f96458963cf3 (patch) | |
tree | 168bae0d556ac762c0c6afae24d9d02453823c55 /Source/cmExprParser.y | |
parent | 7aaed265ade4c3b38967e83095497280a7a55153 (diff) | |
download | CMake-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.y | 112 |
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 */ |