From 829198553c89ca7f2da93559c61c04ee89079ea1 Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 5 May 2005 20:31:53 +0000 Subject: * preliminaries for code generation logic 2005-05-05 Frank Ch. Eigler * parse.cxx (parse): Add helper methods. (lexer::scan, parse_assignment): Parse "<<<" operator. Fix assignment associativity. (parse_symbol): Permit function with empty arg list. (parse_global, parse_statement, parse_functiondecl): Expect unconsumed leading keyword. (parse_global): Don't use ";" termination. * parse.h: Corresponding changes. * staptree.cxx (binary_expression::resolve_types): Fix <<< type inference. (translator_output): Improve pretty-printing. (*): Add general visitors to statement/expression types. * staptree.h: Corresponding changes. Tweak symresolution_info fields. Add semantic_error class. * semtest.cxx: Adapt to this. * testsuite/parseok/two.stp, semok/*.stp: Adapt to syntax changes. --- testsuite/semok/five.stp | 4 ++-- testsuite/semok/four.stp | 2 +- testsuite/semok/one.stp | 2 +- testsuite/semok/six.stp | 2 +- testsuite/semok/three.stp | 4 ++-- testsuite/semok/two.stp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'testsuite/semok') diff --git a/testsuite/semok/five.stp b/testsuite/semok/five.stp index c8b59e73..2bb656b1 100755 --- a/testsuite/semok/five.stp +++ b/testsuite/semok/five.stp @@ -1,7 +1,7 @@ -#! parsetest +#! semtest probe foo { array[1] = array[2] = 3; - statvar << value << 4; + statvar <<< value <<< 4; } diff --git a/testsuite/semok/four.stp b/testsuite/semok/four.stp index c3b2a7d0..eb87f3f9 100755 --- a/testsuite/semok/four.stp +++ b/testsuite/semok/four.stp @@ -2,7 +2,7 @@ # these will ultimately be somehow associated with "providers" # and have a syntax of their own -global kernel_jiffies, kernel_current_comm; +global kernel_jiffies, kernel_current_comm function kernel_netlink(a, b) { # this should be a builtin function diff --git a/testsuite/semok/one.stp b/testsuite/semok/one.stp index 336e57d2..764bd476 100755 --- a/testsuite/semok/one.stp +++ b/testsuite/semok/one.stp @@ -2,7 +2,7 @@ # these will ultimately be somehow associated with "providers" # and have a syntax of their own -global kernel_jiffies, kernel_current_comm; +global kernel_jiffies, kernel_current_comm function kernel_netlink(a, b) { # this should be a builtin function diff --git a/testsuite/semok/six.stp b/testsuite/semok/six.stp index 53d69503..72b7e065 100755 --- a/testsuite/semok/six.stp +++ b/testsuite/semok/six.stp @@ -1,4 +1,4 @@ -#! parsetest +#! semtest probe foo { diff --git a/testsuite/semok/three.stp b/testsuite/semok/three.stp index 6ae531a2..100a5f2b 100755 --- a/testsuite/semok/three.stp +++ b/testsuite/semok/three.stp @@ -1,6 +1,6 @@ #! semtest probe foo { - a << 2; - b[4] << 4; + a <<< 2; + b[4] <<< 4; } diff --git a/testsuite/semok/two.stp b/testsuite/semok/two.stp index f3c6046e..5a124474 100755 --- a/testsuite/semok/two.stp +++ b/testsuite/semok/two.stp @@ -1,6 +1,6 @@ #! semtest -global bar, baz; +global bar, baz function koo (p) { baz [p, "p", p] ++; -- cgit