php-peg
php-peg copied to clipboard
Rule names sometimes don't work
This doesn't match:
static: (static_content:( / [^\{] / | "{" !("{" | "*") )+ | comment)+ function static_content (&$res, $sub) { $res['content'][0] = "'"; $res['content'][1] .= $sub['text']; }
but this (which is logically the same) works ok:
static_content: ( / [^\{] / | "{" !("{" | "*") )+ static: (static_content | comment)+ function static_content (&$res, $sub) { $res['content'][0] = "'"; $res['content'][1] .= $sub['text']; }