diff options
author | fche <fche> | 2005-03-02 01:28:50 +0000 |
---|---|---|
committer | fche <fche> | 2005-03-02 01:28:50 +0000 |
commit | 56099f083d7a68722ace316be4d288d21caabaee (patch) | |
tree | 3e67ec78134a358c1f90f701c165c4c577d62177 /testsuite/semko | |
parent | 2f1a1aead38c1dcd329a694dd8d3290b37320466 (diff) | |
download | systemtap-steved-56099f083d7a68722ace316be4d288d21caabaee.tar.gz systemtap-steved-56099f083d7a68722ace316be4d288d21caabaee.tar.xz systemtap-steved-56099f083d7a68722ace316be4d288d21caabaee.zip |
* some semantic analysis
2005-03-01 Frank Ch. Eigler <fche@redhat.com>
* 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.
Diffstat (limited to 'testsuite/semko')
-rwxr-xr-x | testsuite/semko/four.stp | 12 | ||||
-rwxr-xr-x | testsuite/semko/one.stp | 8 | ||||
-rwxr-xr-x | testsuite/semko/three.stp | 6 | ||||
-rwxr-xr-x | testsuite/semko/two.stp | 8 |
4 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/semko/four.stp b/testsuite/semko/four.stp new file mode 100755 index 00000000..e73cc88d --- /dev/null +++ b/testsuite/semko/four.stp @@ -0,0 +1,12 @@ +#! semtest + +global a, b; # types unknown + +function bar () +{ + # no return statement +} + +probe foo { + a = b; +} diff --git a/testsuite/semko/one.stp b/testsuite/semko/one.stp new file mode 100755 index 00000000..994bb451 --- /dev/null +++ b/testsuite/semko/one.stp @@ -0,0 +1,8 @@ +#! semtest + +function stamp (syscall) +{ + # no return expression => unknown function type +} + +probe kernel:syscall:read { stamp ("read"); } diff --git a/testsuite/semko/three.stp b/testsuite/semko/three.stp new file mode 100755 index 00000000..bfdeec66 --- /dev/null +++ b/testsuite/semko/three.stp @@ -0,0 +1,6 @@ +#! semtest + +probe foo { + a << 2; + b[a] = 4; # must not index with stats variable +} diff --git a/testsuite/semko/two.stp b/testsuite/semko/two.stp new file mode 100755 index 00000000..39b77f6a --- /dev/null +++ b/testsuite/semko/two.stp @@ -0,0 +1,8 @@ +#! semtest + +function zoo (p) { p << 5; return 0 } # passing stats as function arg + +probe foo { + bar = 2 + "string"; # mixing integer+string arithmetic + zoo (car) +} |