summaryrefslogtreecommitdiff
path: root/Zend/zend_language_scanner.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't return T_ERROR from token_get_all()Nikita Popov2015-07-091-199/+191
| | | | | | This turned out to be rather inconvenient after all. Instead just return the same output we did on PHP 5. If people want to have an error, use TOKEN_PARSE.
* Fix bug #69430Nikita Popov2015-07-091-348/+353
| | | | | Don't throw from token_get_all() unless TOKEN_PARSE is used. Errors are reported as T_ERROR tokens.
* Switch code on thrown TypeError and ParseError to 0, update related testsAaron Piotrowski2015-07-071-5/+5
|
* Replace references to PHP_WIN32 and TSRM_WIN32 with ZEND_WIN32 in Zend/, ↵Kalle Sommer Nielsen2015-07-041-2/+2
| | | | this also fixes 1 instance of where fflush(stderr) was misplaced (zend_extensions.c)
* Switch position of ce in exception ce variable namesAaron Piotrowski2015-07-031-5/+5
|
* Cleanup exception ce APIAaron Piotrowski2015-07-031-5/+5
| | | | | Removed recently added functions to get Error ce's and marked the old functions fetching default_exception_ce and error_exception_ce as deprecated.
* Merge branch 'master' into throwable-interfaceAaron Piotrowski2015-06-141-537/+560
|\ | | | | | | | | | | | | # Conflicts: # Zend/zend_language_scanner.c # Zend/zend_language_scanner.l # ext/simplexml/tests/SimpleXMLElement_xpath.phpt
| * Rebuild scanner, add NEWS/UPGRADINGBob Weinand2015-05-251-537/+560
| |
* | Remodel exceptions based on Throwable interfaceAaron Piotrowski2015-05-161-5/+5
|/ | | | | | | | | | | Added Throwable interface that exceptions must implement in order to be thrown. BaseException was removed, EngineException renamed to Error, and TypeException and ParseException renamed to TypeError and ParseError. Exception and Error no longer extend a common base class, rather they both implement the Throwable interface.
* Add line_start/end info to main op_arrayBob Weinand2015-04-251-348/+352
|
* Move more stuff to file_contextNikita Popov2015-04-211-350/+348
| | | | | | | | Introduce helper macro FC(x) for CG(file_context).x. end_compilation() now handled by file_context_end(). While at it, dropped zval wrapper for ticcks.
* Fixed bug #69388Nikita Popov2015-04-201-354/+362
| | | | | | | | | | | | Renamed compiler_context to oparray_context. Introduced per-file file_context. Moved import tables into the file_context. context_stack no longer exists, instead keeping backups of contexts on C stack. Same for file contexts. TODO: Move more things out of CG into file_context. There should be a number of other things that we should not try to reuse in nested compilations.
* Merge branch 'coroutineDelegation' of https://github.com/bwoebi/php-srcBob Weinand2015-04-141-974/+1033
|\
| * Added yield from operatorBob Weinand2015-03-071-972/+1031
| |
* | Throw ParseException from lexerNikita Popov2015-04-021-358/+376
| | | | | | | | | | | | | | Primarily to avoid getting fatal errors from token_get_all(). Implemented using a magic E_ERROR token, which the lexer emits to force a parser failure.
* | Use zend_error_noreturn() for fatal errorsDmitry Stogov2015-04-011-1/+1
| |
* | Optimize zend_string_realloc() add more specialized versions ↵Dmitry Stogov2015-03-201-1/+1
| | | | | | | | zend_string_extend() and zend_string_truncate()
* | Support ParseException for require etcNikita Popov2015-03-171-379/+371
| |
* | Use zend_string* instead of char* for opened_patch handling. Avoid ↵Dmitry Stogov2015-03-041-2718/+2712
| | | | | | | | reallocations and improve string reuse.
* | Blast off to space.Andrea Faulds2015-01-291-2949/+2964
|/
* Fixed compiler reenterabilityDmitry Stogov2015-01-221-344/+350
|
* Provide compiler hook for altering the AST pre-compilation.Sara Golemon2015-01-191-344/+350
|
* Fixed annoying incompatible pointer type warningXinchen Hui2015-01-181-2529/+2525
|
* Error on invalid octal (fixes PHPSadness #31)Andrea Faulds2015-01-171-456/+503
| | | | Further error checks
* bump yearXinchen Hui2015-01-151-1/+1
|
* trailing whitespace removalStanislav Malyshev2015-01-101-225/+225
|
* fix invalid free mentioned in bug 68665Anatol Belski2014-12-281-2545/+2543
| | | | thanks honey at internot dot info
* C89 compatAnatol Belski2014-12-191-2525/+2521
|
* Unicode Codepoint Escape SyntaxAndrea Faulds2014-12-191-2700/+2783
|
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-120/+120
|
* fix datatype mismatch warningsAnatol Belski2014-10-291-349/+351
|
* Remove <% and <script language="php"> tagsNikita Popov2014-10-051-3728/+3327
| | | | | | | | | | | | As per https://wiki.php.net/rfc/remove_alternative_php_tags. Removes: * <% opening tag * %> closing tag * <%= short opening tag * /<script\s+language\s*=\s*(php|"php"|'php')\s*>/i opening tag * /</script>/i closing tag * asp_tags ini directive
* Initial coalesce operator implementationNikita Popov2014-09-161-3021/+3031
|
* Fix yy_limit computation after encoding switchNikita Popov2014-09-111-1/+1
| | | | | | | | | | The three assignments above this line are still broken - they assume that byte offsets in one encoding directly map to byte offsets in another encoding. I'm fixing the length here because it is the one causing out-of-bounds reads and is easy to fix. For the others we'd have to actually compute new offsets.
* Remove self-contradictory zend multibyte assertionNikita Popov2014-09-111-2/+2
| | | | | Code that explicitly exists to handle an incompatible internal encoding should not assert that the internal encoding is compatible.
* Remove unnecessary branch/temp variableXinchen Hui2014-09-091-363/+359
|
* Fix parser stack destruction with dummy ENCAPSED_AND_WHITESPACENikita Popov2014-09-081-161/+163
| | | | | T_ENCAPSED_AND_WHITESPACE is now specified to always hold a value, so give it a NULL value in the dummy cases.
* Use efree_size() instead of efree() where posibleDmitry Stogov2014-08-271-1/+1
|
* Handle remaining magic constants in parser as wellNikita Popov2014-08-261-175/+146
| | | | | As far as I can see the !filename case cannot occur, so I dropped it.
* eval() with parse error uses clean shutdown nowNikita Popov2014-08-261-384/+370
|
* Remove ZEND_ACC_INTERACTIVE and CG(interactive)Nikita Popov2014-08-251-354/+350
| | | | | | | | | As far as I can discern these are leftovers of the interactive shell implementation that was used before PHP 5.4. Now the readline ext makes use of normal eval calls for this. So, dropping these until there is evidence to the contrary, as they currently wouldn't work anyway.
* Fix compiler warningsNikita Popov2014-08-251-1/+1
|
* Merge branch 'ast'POST_AST_MERGENikita Popov2014-08-251-389/+321
|\ | | | | | | | | Conflicts: Zend/zend_compile.c
| * Merge remote-tracking branch 'php-src/master' into astNikita Popov2014-08-251-21/+21
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Zend/zend_compile.c Zend/zend_compile.h Zend/zend_globals.h Zend/zend_language_parser.y Zend/zend_language_scanner.c Zend/zend_language_scanner.l Zend/zend_types.h
| * | zend_do_return -> zend_emit_final_returnNikita Popov2014-07-261-355/+354
| | |
| * | Make lexer return AST nodesNikita Popov2014-07-261-359/+350
| | |
| * | Remove DUMMY_STRINGLNikita Popov2014-07-261-316/+306
| | | | | | | | | | | | What is that for?
| * | Fix leaksNikita Popov2014-07-261-2/+2
| | | | | | | | | | | | Must find a good way to handle constant expressions...
| * | Use arena allocator (currently leaky!)Nikita Popov2014-07-261-350/+354
| | |
| * | Expose ast via CG(ast)Nikita Popov2014-07-241-352/+358
| | |