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/semok/two.stp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 testsuite/semok/two.stp (limited to 'testsuite/semok/two.stp') diff --git a/testsuite/semok/two.stp b/testsuite/semok/two.stp new file mode 100755 index 00000000..f3c6046e --- /dev/null +++ b/testsuite/semok/two.stp @@ -0,0 +1,13 @@ +#! semtest + +global bar, baz; + +function koo (p) { + baz [p, "p", p] ++; + return p + 2; +} + +probe foo { + bar = 2 + koo (4); + foo = bar + koo; +} -- cgit