This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

CMake math() and unary operators

By: a guest on Mar 6th, 2012  |  syntax: Diff  |  size: 0.43 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y
  2. index 317b0ba..57820ec 100644
  3. --- a/Source/cmExprParser.y
  4. +++ b/Source/cmExprParser.y
  5. @@ -150,6 +150,16 @@ term exp_MOD factor
  6.  {$<Number>$ = $<Number>1 % $<Number>3;}
  7.  
  8.  factor:
  9. +value
  10. +{$<Number>$ = $<Number>1;}
  11. +|
  12. +exp_MINUS factor
  13. +{$<Number>$ = -$<Number>2;}
  14. +|
  15. +exp_NOT factor
  16. +{$<Number>$ = ~$<Number>2;}
  17. +
  18. +value:
  19.  exp_NUMBER
  20.  {$<Number>$ = $<Number>1;}
  21.  |
clone this paste RAW Paste Data