projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4a0ed3
)
more operator precedence
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 13 Jun 2021 03:46:15 +0000
(20:46 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 13 Jun 2021 03:46:15 +0000
(20:46 -0700)
tests/language/control/define.at
patch
|
blob
|
history
diff --git
a/tests/language/control/define.at
b/tests/language/control/define.at
index 30fd080ba0454b178b65bfb307cfbbd1eb077d95..1f57851732df3367dd6fe76043d52dbfd4247526 100644
(file)
--- a/
tests/language/control/define.at
+++ b/
tests/language/control/define.at
@@
-666,9
+666,14
@@
DEFINE !test_unary(!positional !tokens(1))
!if $3 !1 !then true !else false !ifend.
!ENDDEFINE.
!if $3 !1 !then true !else false !ifend.
!ENDDEFINE.
-* This is ((not A) and B) or C.
+* These are:
+ ((not A) and B) or C
+ not (A and B) or C
+ not A and (B or C)
DEFINE !test_prec(!pos !tokens(1)/!pos !tokens(1)/!pos !tokens(1))
!if $3 !1 $1 !2 $2 !3 !then true !else false !ifend
DEFINE !test_prec(!pos !tokens(1)/!pos !tokens(1)/!pos !tokens(1))
!if $3 !1 $1 !2 $2 !3 !then true !else false !ifend
+!if $3 (!1 $1 !2) $2 !3 !then true !else false !ifend
+!if $3 !1 $1 (!2 $2 !3) !then true !else false !ifend
!ENDDEFINE.
DEBUG EXPAND.
!ENDDEFINE.
DEBUG EXPAND.
@@
-695,15
+700,15
@@
true.
false.
false.
-false
-true
-true
-true
+false
true false
+true
true true
+true
true true
+true
true true
-false
-true
-false
-true
+false
true false
+true
true false
+false
false false
+true
true false
])
done
AT_CLEANUP
])
done
AT_CLEANUP