Commit 47777942 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'math_exp_not'

d427f12b math(EXPR): Implement ~(exp_NOT) expression as documented
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3582
parents a96363f8 d427f12b
This diff is collapsed.
......@@ -151,6 +151,9 @@ unary:
| exp_MINUS unary {
$<Number>$ = - $<Number>2;
}
| exp_NOT unary {
$<Number>$ = ~ $<Number>2;
}
factor:
exp_NUMBER {
......
......@@ -16,6 +16,8 @@ set(expressions
"1000 -12*5"
"1000 +12*-5"
"1000 -12*-5"
"~~1"
"1000 & ~0"
)
set(FILE_EXPRESSIONS "extern void test_expression(int x, int y, const char * text);\n")
......
^CMake Error at MATH-InvalidExpression.cmake:1 \(math\):
math cannot parse the expression: "INVALID": syntax error, unexpected \$end,
expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER \(7\).
math cannot parse the expression: "INVALID": syntax error, unexpected \$end
\(7\).
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment