diff options
author | guanglei <guanglei> | 2006-05-08 04:23:14 +0000 |
---|---|---|
committer | guanglei <guanglei> | 2006-05-08 04:23:14 +0000 |
commit | 972662787b66d69b199c5e52488c55491e9880f3 (patch) | |
tree | 5496c30d16fc70aa63d6bc82122b4ba764956dcd /parse.cxx | |
parent | b56337bc0b2696c549af2b9ce7df63e8832adb07 (diff) | |
download | systemtap-steved-972662787b66d69b199c5e52488c55491e9880f3.tar.gz systemtap-steved-972662787b66d69b199c5e52488c55491e9880f3.tar.xz systemtap-steved-972662787b66d69b199c5e52488c55491e9880f3.zip |
epilogue mode probe aliases support
Diffstat (limited to 'parse.cxx')
-rw-r--r-- | parse.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -782,6 +782,8 @@ parser::parse_probe (std::vector<probe *> & probe_ret, bool equals_ok = true; + int epilogue_alias = 0; + while (1) { probe_point * pp = parse_probe_point (); @@ -794,6 +796,15 @@ parser::parse_probe (std::vector<probe *> & probe_ret, next (); continue; } + else if (equals_ok && t + && t->type == tok_operator && t->content == "+=") + { + aliases.push_back(pp); + epilogue_alias = 1; + next (); + continue; + } + else if (t && t->type == tok_operator && t->content == ",") { locations.push_back(pp); @@ -821,6 +832,10 @@ parser::parse_probe (std::vector<probe *> & probe_ret, else { probe_alias* p = new probe_alias (aliases); + if(epilogue_alias) + p->epilogue_style = true; + else + p->epilogue_style = false; p->tok = t0; p->locations = locations; p->body = parse_stmt_block (); @@ -1068,7 +1083,8 @@ parser::parse_probe_point () t = peek (); if (t && t->type == tok_operator - && (t->content == "{" || t->content == "," || t->content == "=")) + && (t->content == "{" || t->content == "," || t->content == "=" + || t->content == "+=" )) break; if (t && t->type == tok_operator && t->content == "(") @@ -1093,7 +1109,7 @@ parser::parse_probe_point () if (t && t->type == tok_operator && t->content == ".") next (); else - throw parse_error ("expected '.' or ',' or '(' or '{' or '='"); + throw parse_error ("expected '.' or ',' or '(' or '{' or '=' or '+='"); } return pl; |