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
i'll second that idea, but not the syntax.
template engine such smarty, and compiler compiler, need it really.
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 <file> <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