diff options
author | aiju <devnull@localhost> | 2018-12-08 15:07:53 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2018-12-08 15:07:53 +0000 |
commit | 58fa29447b845f91dfc2a6734f525ed47375393b (patch) | |
tree | e2ee80e7728e26bc74e1f667ea48968b11a24fc6 /sys/src/cmd/dtracy/parse.y | |
parent | 03e60450c2acc20866867cc5d3649aaed07d0326 (diff) |
dtracy: add support for aggregations
Diffstat (limited to 'sys/src/cmd/dtracy/parse.y')
-rw-r--r-- | sys/src/cmd/dtracy/parse.y | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/src/cmd/dtracy/parse.y b/sys/src/cmd/dtracy/parse.y index 9f231dbc9..81a57f79b 100644 --- a/sys/src/cmd/dtracy/parse.y +++ b/sys/src/cmd/dtracy/parse.y @@ -16,7 +16,8 @@ Type *t; } -%type <n> expr +%type <n> expr optexpr +%type <sym> optsym %type <t> type %token <sym> TSYM @@ -63,7 +64,9 @@ stats0: stat | stats0 ';' stat stat: expr { addstat(STATEXPR, exprcheck($1, 0)); } | TPRINT { addstat(STATPRINT); } pelist | TPRINTF { addstat(STATPRINTF); } pelist - +| '@' optsym '[' expr ']' '=' TSYM '(' optexpr ')' { addstat(STATAGG, $2, $4, $7, $9); } +optsym: TSYM | { $$ = nil; } +optexpr: expr | { $$ = nil; } pelist: '(' ')' |