Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15103 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23389 invoked by uid 1010); 18 Feb 2005 23:17:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23366 invoked by uid 1007); 18 Feb 2005 23:17:40 -0000 Message-ID: <20050218231740.23365.qmail@lists.php.net> To: internals@lists.php.net, =?UTF-8?B?RnLDqWTDqXJpYw==?= LECOINTRE Date: Sat, 19 Feb 2005 00:16:33 +0100 References: <005801c5156b$ae0711b0$0201a8c0@gabriel> <855185390.20050218092558@marcus-boerger.de> <008701c515a7$4fec38d0$0201a8c0@gabriel> <20050218121817.30870.qmail@lists.php.net> <00c001c515d4$840fdf90$0201a8c0@gabriel> Lines: 29 User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Posted-By: 217.235.240.222 Subject: Re: [PHP-DEV] function proposal - php_check_syntax_string From: johannes@php.net (Johannes Schlueter) Hi, Frédéric LECOINTRE wrote: > oups ... well. > > php_check_syntax works fine with zend_compile_file. so what's the No, it doesn't work fine, too :-) http://bugs.php.net/bug.php?id=27406 But I didn't know the problem either when reading your patch where I stumbled over the compile_string() call. > difference? i read parse_kit extension and after compiling, attempt to > remove class and function with "php_parsekit_common". > > Is there possibilty to run syntax check only with compil_string in > zend_language_scanner.c (or something else) instead of removing the > introduced code? No. At least I don't know a how (but I don't know everything about the engine) The only thing I currently can think of is using the scanner to tokenize the string (using zend_prepare_string_for_scanning() and lex_scan()) but such a solution would only reject totally bogus code and wouldn't tell you wether the code was valid... johannes -- Johannes Schlüter Mayflower GmbH / ThinkPHP http://thinkphp.de http://blog.thinkphp.de