diff options
author | dsmith <dsmith> | 2006-05-24 18:37:50 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2006-05-24 18:37:50 +0000 |
commit | a477f3f17daab73993ce765900e95cddc3463586 (patch) | |
tree | 7f8184c086e4d831255f86ecc1b3cc095f01259d /parse.cxx | |
parent | 357134252c66425e159c9eff011e35a70faf3e11 (diff) | |
download | systemtap-steved-a477f3f17daab73993ce765900e95cddc3463586.tar.gz systemtap-steved-a477f3f17daab73993ce765900e95cddc3463586.tar.xz systemtap-steved-a477f3f17daab73993ce765900e95cddc3463586.zip |
2006-05-24 David Smith <dsmith@redhat.com>
* elaborate.cxx (isglob): New function.
(match_key::globmatch): New function.
(match_node::find_and_build): Uses isglob() and
match_key::globmatch() to provide support for wildcards such as
"kernel.syscall.*read*" (Bugzilla #1928).
* elaborate.h (match_key::globmatch): Added function declaration.
* parse.cxx (parser::parse_probe_point): Collects one or more
tokens into a single probe-point functor string.
* testsuite/parseko/twentytwo.stp: New file.
* testsuite/parseok/sixteen.stp: New file.
Diffstat (limited to 'parse.cxx')
-rw-r--r-- | parse.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1129,7 +1129,28 @@ parser::parse_probe_point () pl->components.push_back (c); // NB though we still may add c->arg soon + const token* last_t = t; t = peek (); + + // We need to keep going until we find something other than a + // '*' or identifier, since a probe point wildcard can be + // something like "*a", "*a*", "a*b", "a*b*", etc. + while (t && + // case 1: '*{identifier}' + ((last_t->type == tok_operator && last_t->content == "*" + && (t->type == tok_identifier || t->type == tok_keyword)) + // case 2: '{identifier}*' + || ((last_t->type == tok_identifier + || last_t->type == tok_keyword) + && t->type == tok_operator && t->content == "*"))) + { + c->functor += t->content; + next (); // consume the identifier or '*' + + last_t = t; + t = peek (); + } + if (t && t->type == tok_operator && (t->content == "{" || t->content == "," || t->content == "=" || t->content == "+=" )) |