From 56099f083d7a68722ace316be4d288d21caabaee Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 2 Mar 2005 01:28:50 +0000 Subject: * some semantic analysis 2005-03-01 Frank Ch. Eigler * parse.cxx: Implement left-associativity for several types of operators. Add some more statement types. Parse functions. Be able to print tokens. Simplify error generating functions. Save tokens in all parse tree nodes. * parse.h: Corresponding changes. * staptree.cxx: Move tree-printing functions here. Add many new functions for symbol and type resolution. * staptree.h: Corresponding changes. * semtest.cxx: New semantic analysis pass & test driver. * testsuite/sem*/*: New tests. * parsetest.cxx: Separated parse test driver. * testsuite/parse*/*: Adapt tests to parsetest driver. * Makefile.am: Build semtest. Run its tests. * Makefile.in: Regenerated. * parse.cxx, parse.h: New files: parser. --- testsuite/parseok/one.stp | 3 ++- testsuite/parseok/two.stp | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'testsuite/parseok') diff --git a/testsuite/parseok/one.stp b/testsuite/parseok/one.stp index b3ca32b2..5b69767d 100755 --- a/testsuite/parseok/one.stp +++ b/testsuite/parseok/one.stp @@ -1,2 +1,3 @@ -#! stap +#! parsetest # test +function k () { } diff --git a/testsuite/parseok/two.stp b/testsuite/parseok/two.stp index 3776633b..6ab3823e 100755 --- a/testsuite/parseok/two.stp +++ b/testsuite/parseok/two.stp @@ -1,4 +1,4 @@ -#! stap +#! parsetest probe kernel:systemcall("foo") { @@ -6,7 +6,12 @@ probe kernel:systemcall("foo") if (global > 5) { global -- } else ; } +function foo () { + delete array[4]; + return 0; +} + probe systemtap:end { - function("value", 4+8); + foo ("value", 4+8); } -- cgit