The problem comes from updating code to C++11, which uses initialisers.
So:
a = X(4); b = X(); c = X( (1+2)*(3+4) ); void P : X(5) { foo(); }
This is because the operators * and + are greedy. However, you can enforce laziness by using the expression
X\((.*?)\);
The ? Symbol enforces a lazy match.