refactor: use Pratt's parser for expressions in attributes

This doesn't merge cleanly due to the custom attributes commit that landed but I'm opening a PR anyway for the early review. 

@mlaval I will need your help with rebasing this one on top of your changes. Could you give me a hand with this one when you are available?
Ooops, actually this change should be part of this commit. I guess this is a left-over from my testing. Good catch, will revert this diff!