Review Board 2.0.15


ruby: add new rule to grammer to handle new'd objects with parameters

Review Request #3427 - Created April 4, 2016 and updated

Information
Brandon Potter
gem5
default
Reviewers
Default
Changeset 11429:5990fc6e2e53
---------------------------
ruby: add new rule to grammer to handle new'd objects with parameters

   

Issue Summary

1 1 0 0
Posted (April 6, 2016, 12:25 p.m.)



  
src/mem/slicc/ast/NewExprASTParams.py (Diff revision 1)
 
 

I will highlight this myself since I'd like to fix this, but I don't know what a good solution would look like.

The issue is that I need to supply a parameter list here with the m_ attached with the constructor. (The block_size (and any other parameters) will be using the m_ notation.)
This is a hacky way to achieve that and I don't think that the other grammer statements do this for member types.

Also, I do not check to verify that this param has been declared witin slicc. I am open to solutions on how to fix that too.

  1. Let's talk off-line about how to improve this patch. I do not think adding a new AST file is necessary. I believe we can make updates to the existing NewExprAST.py file instead. As far as verifying that the param has been declared, look at MemberExprAST.py as an example.