php-peg
php-peg copied to clipboard
PEG (parsing expression grammar) compiler for PHP
Are there any maintained forks? I see some more recent but they don't have issues open. /cc @jkenn99 @smuuf
php-peg library is included by other projects, for example: https://github.com/maths/moodle-qtype_stack/tree/master/thirdparty/php-peg In this example, the other library is deployed on available on a web server. This leads to opportunity to run...
Currently matches within predicates execute attached functions. It's impossible to distinguish whether call came from a legit match or from a predicate. One possible fix is to pass stack into...
Predicates works in a very weird manner. For example this doesn't work as expected: `static_content_symbol: ( / [^\{] / | "{" !"{" | "{" !"*" )+` but this (which is...
Hello! Single quotes in a literal would cause the PEG to crash with: ``` PHP Parse error: syntax error, unexpected '';' (T_ENCAPSED_AND_WHITESPACE), expecting ';' ``` This happens because the literal...
Not really an issue, but to get it working with the default configuration, right now, you need disable pcre.jit for the cli.php & compiler: `ini_set("pcre.jit", "0");` works as intended afterwards.
This - allows to use modifiers like 'u' (for unicode support) to be used. - makes the Rfc822UTF8.peg.inc example working again. This change might break regexp rules not followd by...
Hi, I got a php5-Segmentation fault when I run cli.php with the BooleanParser.peg.inc_new (https://gist.github.com/4623645), with BooleanParser.peg.inc (https://gist.github.com/4623616) everything works. Any Idea what this may be? The difference is really small...
The library would be much easier to integrate with composer autoloading.