diff --git a/README.md b/README.md index a7c9a8fee7..8711eab6c1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ PHP Parser ========== -This is a PHP 5.4 (and older) parser written in PHP. It's purpose is to simplify static code analysis and +This is a PHP 5.5 (and older) parser written in PHP. It's purpose is to simplify static code analysis and manipulation. Documentation can be found in the [`doc/`][1] directory. diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index bc78518bc9..d4b0b7b912 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -1,7 +1,7 @@ Introduction ============ -This project is a PHP 5.4 (and older) parser **written in PHP itself**. +This project is a PHP 5.5 (and older) parser **written in PHP itself**. What is this for? ----------------- @@ -26,12 +26,12 @@ programmatic PHP code analysis are incidentally PHP developers, not C developers What can it parse? ------------------ -The parser uses a PHP 5.4 compliant grammar, which is backwards compatible with at least PHP 5.3 and PHP -5.2 (and maybe older). +The parser uses a PHP 5.5 compliant grammar, which is backwards compatible with at least PHP 5.4, PHP 5.3 +and PHP 5.2 (and maybe older). As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP -version it runs on), additionally a wrapper for emulating new tokens from 5.3 and 5.4 is provided. This -allows to parse PHP 5.4 source code running on PHP 5.2, for example. This emulation is very hacky and not +version it runs on), additionally a wrapper for emulating new tokens from 5.3, 5.4 and 5.5 is provided. This +allows to parse PHP 5.5 source code running on PHP 5.2, for example. This emulation is very hacky and not yet perfect, but it should work well on any sane code. What output does it produce? diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 23f85d0e2e..b4d5599f90 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -49,7 +49,7 @@ The `parse` method will return an array of statement nodes (`$stmts`). ### Emulative lexer Instead of `PHPParser_Lexer` one can also use `PHPParser_Lexer_Emulative`. This class will emulate tokens -of newer PHP versions and as such allow parsing PHP 5.4 on PHP 5.2, for example. So if you want to parse +of newer PHP versions and as such allow parsing PHP 5.5 on PHP 5.2, for example. So if you want to parse PHP code of newer versions than the one you are running, you should use the emulative lexer. Node tree