From f3c26ea55e2f2c1d222312bf75035359c439ed21 Mon Sep 17 00:00:00 2001 From: fche Date: Sun, 5 Jun 2005 16:35:28 +0000 Subject: 2005-06-05 Frank Ch. Eigler Implement for/next/continue/break/while statements. * staptree.h: Declare new 0-arity statement types. Tweak for_loop. * parse.cxx: Parse them all. * translate.cxx (c_unparser): Maintain break/continue label stack. (visit_for_loop, *_statement): New implementations. * elaborate.*, staptree.cxx: Mechanical changes. * testsuite/parseok/ten.stp, semko/twelve.stp, transko/two.stp, transok/five.stp: New tests. --- testsuite/parseok/ten.stp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 testsuite/parseok/ten.stp (limited to 'testsuite/parseok') diff --git a/testsuite/parseok/ten.stp b/testsuite/parseok/ten.stp new file mode 100755 index 00000000..25d16e62 --- /dev/null +++ b/testsuite/parseok/ten.stp @@ -0,0 +1,17 @@ +#! stap -p1 + +probe two +{ + for (;;) ; + for (a=0;;) { a + 4; break } + for (;a>0;) { a + 5; continue } + for (;;a++) { a + 5 } + for (a=0;a>0;) { a + 4 } + for (;a>0;a++) { a + 5 } + for (a=0;;a++) { a + 5 } + for (a=0; a<=4; a++) ; + for (a=0; a<=4; a++) { b = a } + next + while (99) ; + while (99) { break continue } +} -- cgit