diff options
author | Caleb Palmer <cnpalmer@us.ibm.com> | 2016-04-13 08:30:52 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-05-02 11:59:51 -0400 |
commit | bd81810ed1cb2a9559fd14ae8babb63415b596e7 (patch) | |
tree | 85500afd151a50f73322b848c8304a47efde2609 /src/usr/diag/prdf/common/rule/prdrCompile.y | |
parent | 5158ff4eb76e7623d32579525012b5b3a4d4d4ed (diff) | |
download | talos-hostboot-bd81810ed1cb2a9559fd14ae8babb63415b596e7.tar.gz talos-hostboot-bd81810ed1cb2a9559fd14ae8babb63415b596e7.zip |
PRD: Create Rule Summary Construct
Change-Id: I3cec3ff667250964c28faa37c520ef308f8ac8f5
RTC: 146125
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23205
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23806
Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/usr/diag/prdf/common/rule/prdrCompile.y')
-rw-r--r-- | src/usr/diag/prdf/common/rule/prdrCompile.y | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/usr/diag/prdf/common/rule/prdrCompile.y b/src/usr/diag/prdf/common/rule/prdrCompile.y index 48120ec4b..a76df8e13 100644 --- a/src/usr/diag/prdf/common/rule/prdrCompile.y +++ b/src/usr/diag/prdf/common/rule/prdrCompile.y @@ -129,6 +129,7 @@ using namespace PRDR_COMPILER; %token PRDR_BIT_KW %token PRDR_OP_LEFTSHIFT %token PRDR_OP_RIGHTSHIFT +%token PRDR_SUMMARY %token PRDR_ACT_THRESHOLD %token PRDR_ACT_ANALYSE @@ -169,7 +170,7 @@ using namespace PRDR_COMPILER; %type <reg> register reglines regline %type <reg_mask> register_mask %type <chip> chiplines chipline -%type <expr> ruleexpr ruleexpr_small ruleexpr_shift ruleop1 ruleop2 +%type <expr> ruleexpr ruleexpr_small ruleexpr_shift ruleop1 ruleop2 summary %type <expr> bitgroup bitandlist bitorlist %type <expr> time_units %type <grp> grouplines groupline @@ -751,6 +752,18 @@ ruleexpr_small: '(' ruleexpr ')' { $$ = $2; } $$ = new ExprBitString(*$1); delete $1; } + | summary + { + $$ = $1; + } +; + +summary: PRDR_SUMMARY '(' PRDR_INTEGER ',' PRDR_ID ')' + { + $$ = new ExprOp2(Prdr::SUMMARY, new ExprInt($3, Prdr::INT_SHORT), + new ExprRef($5)); + g_references.push_front(RefPair("r", *$5)); + } ; ruleexpr_shift: ruleexpr_small PRDR_OP_LEFTSHIFT PRDR_INTEGER |