Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18518 invoked by uid 1010); 11 May 2006 18:19:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18501 invoked from network); 11 May 2006 18:19:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2006 18:19:06 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:42471] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 86/C7-19568-71083644 for ; Thu, 11 May 2006 14:19:03 -0400 Received: from baumbart.mbo (dslb-084-063-015-157.pools.arcor-ip.net [84.63.15.157]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id DA8D035C1DC; Thu, 11 May 2006 20:19:00 +0200 (CEST) Date: Thu, 11 May 2006 20:19:09 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1908746682.20060511201909@marcus-boerger.de> To: William Candillon Cc: internals In-Reply-To: <43b5c44e0605110031j28b533ffk10cb40178906f85a@mail.gmail.com> References: <43b5c44e0605110031j28b533ffk10cb40178906f85a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] #line C macro equivalent in php ? From: helly@php.net (Marcus Boerger) Hello William, as long as php has no goto no such generator is capable of generating php code. When that changes we want to have something alike of course. But actuall it is already in HEAD ... So then....Why not cimply go with this: #line to simple becuase the tools in question would already do that? Thursday, May 11, 2006, 9:31:49 AM, you wrote: > Hello, > I'd like to know, if it's possible to create a php function in C which > modify the line number and the php interpreter. It will be very useful > for tools generating php code (lex, yacc, smarty etc). > For exemple: > echo __FILE__//show parser.php > __setLine(8);__setFile('parser.y'); > toto(); > Will show the following warning: > Call to undefined function: toto() in parser.y at line 9 > Best regards, > William > -- > William Candillon > Telecom Lille Student > E-mail: wcandillon@elv.enic.fr > Tel: +33(0) 6 67 99 13 16 > CV: http://wcandillon.netcv.org > Resume: http://wcandillon.en.netcv.org Best regards, Marcus