Perform emulation by replacing #[ with %[, then patching % back to # and coalescing #[ into T_ATTRIBUTE if it is a freestanding token.