summaryrefslogtreecommitdiffstats
path: root/testsuite/parseok
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-02-24 17:12:09 -0800
committerJosh Stone <jistone@redhat.com>2010-02-24 17:12:09 -0800
commit1cb79a7245a86f563a8e54a0b47937f253636bde (patch)
tree95c4c65fd54f54e71c521705af07764e965df6d7 /testsuite/parseok
parenta7e58d4c674003f192c4c8a834e80a3c23f9ec2e (diff)
downloadsystemtap-steved-1cb79a7245a86f563a8e54a0b47937f253636bde.tar.gz
systemtap-steved-1cb79a7245a86f563a8e54a0b47937f253636bde.tar.xz
systemtap-steved-1cb79a7245a86f563a8e54a0b47937f253636bde.zip
Permit chained unary operators
The operand of a unary may be yet another unary. This is useful for things like boolean normalization, !!x. * parse.cxx (parser::parse_unary): Recurse the operand. * testsuite/parseok/eleven.stp: Add chained unary operators.
Diffstat (limited to 'testsuite/parseok')
-rwxr-xr-xtestsuite/parseok/eleven.stp8
1 files changed, 7 insertions, 1 deletions
diff --git a/testsuite/parseok/eleven.stp b/testsuite/parseok/eleven.stp
index 737a2e14..5ee0f921 100755
--- a/testsuite/parseok/eleven.stp
+++ b/testsuite/parseok/eleven.stp
@@ -53,5 +53,11 @@ probe two
- a
# grammar glitch
- a % b ; -- a ; ++ a ; a ++ ; a --
+ a % b ; -- a ; ++ a ; a ++ ; a -- ;
+
+ # chained unary operators
+ + + a ; + - a ; + ! a ; + ~ a ;
+ - + a ; - - a ; - ! a ; - ~ a ;
+ ! + a ; ! - a ; ! ! a ; ! ~ a ;
+ ~ + a ; ~ - a ; ~ ! a ; ~ ~ a ;
}