On Saturday 17 December, Michael Sheets wrote:
That's a repository rule, you have to include it in the main grammar at some point. Look above and you'll see the php repository item included at some point.
So it was. I hadn't spotted that.
In response to the later email, the order of repository items doesn't matter. But the order they are included in the syntax does matter.
Once I'd referenced my rule before the PHP rule it worked great. Thanks!