Lines Matching refs:is
4 This project is a PHP parser **written in PHP itself**.
6 What is this for?
9 A parser is useful for [static analysis][0], manipulation of code and basically any other
13 There are other ways of processing source code. One that PHP supports natively is using the
14 token stream generated by [`token_get_all`][2]. The token stream is much more low level than
16 a file. On the other hand, the token stream is much harder to deal with for more complex analysis.
21 Another question is: Why would I want to have a PHP parser *written in PHP*? Well, PHP might not be
22 a language especially suited for fast parsing, but processing the AST is much easier in PHP than it
42 error. In error recovery mode, it is possible to continue parsing after such declarations.
44 As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP
45 version it runs on), additionally a wrapper for emulating tokens from newer versions is provided.
46 This allows to parse PHP 8.4 source code running on PHP 7.4, for example. This emulation is not
50 code. It will generally accept code that is only valid in newer versions (even when targeting an
51 older one), and accept code that is syntactically correct, but would result in a compiler error.
86 * Support for pretty printing, which is the act of converting an AST into PHP code. Please note
87 that "pretty printing" does not imply that the output is especially pretty. It's just how it's