hafriedlander / php-peg

PEG (parsing expression grammar) compiler for PHP
Other
191 stars 53 forks source link

Rule names sometimes don't work #10

Open ksmolyanin opened 13 years ago

ksmolyanin commented 13 years ago

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']; }