php-zephir-parser
php-zephir-parser copied to clipboard
The Zephir Parser delivered as a C extension for the PHP language.
Using the `sql` output of the `lemon` parser generator with the query shown bellow give us an EBNF understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams. ``` lemon -S zephir.lemon ```...
**Describe the bug** The process interrupted by signal 11: SIGSEGV when do same logic in return val of zephir_parse_file twice. **To Reproduce** Run this code: ```php function once() { $code...
_From @chilimatic on September 29, 2017 9:29_ the parser throws an syntax error if const are not declared in an consecutive block ```php namespace Bugreport; class ConstOrder { const MY_FIRST_CONST...
_From @valVk on April 22, 2015 23:14_ The code `chmod(file, 0666 & ~umask());` produces the error `Scanner error: -2 umask());` http://php.net/manual/en/language.operators.bitwise.php Thanks. _Copied from original issue: phalcon/zephir#908_
_From @ikandars on February 16, 2014 10:31_ I've got "Zephir\ParseException: Syntax error" when try to call a static method dynamically. echo self::{"name"}(); -----------^ ``` php namespace Test; class MyClass {...
```zep namespace Test\Calls; class A { } ``` ```bash $ zephir fullclean; zephir generate --backend=ZendEngine3 Zephir\Parser\ParseException: Syntax error in /home/vladimir/workspace/zephir/test/calls/a.zep on line 3 at Library/CompilerFile.php(595) #0 Library/Compiler.php(258): Zephir\CompilerFile->preCompile(Object(Zephir\Compiler)) #1 Library/Compiler.php(297):...
like php here: http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc ``` php const VARIABLE_REGEX =
calling `zephir_parse_file` with content as follows ```zep public function extract() { char ch1; string name = "peter"; let ch1 = name[1]; return (uchar)ch1; } ``` will print to stderr >...
Php 5.5 example: ``` php namespace Name\Space; class ClassName {} echo ClassName::class; echo "\n"; ``` Output: ``` text Name\Space\ClassName ```
The compiler, at its discretion, can use it in the form of an execution operator.