RE: [PHP-DEV] show_source()

2002-11-15 Thread John Coggeshall

Since I'm not entirely comfortable with the lexer (or the Zend Engine)
yet, I need to get a few questions answered:

1) I notice that there seems to be a T_LINE token, which should be the
linenumber? However, this never seems
To even come up in the lexer from the zend_highlight() function... 
2) Assuming I'm wrong about the T_LINE token in this use, (I suspect I
am)... I need to break up the parser
So that it identifies NEWLINE differently than just WHITESPACE. Any
thoughts/comments/etc on this?

Regarding the function ref... 
1) What is the token identifying a function name?
2) Is there a good way to determine if a function name is user-defined
or not?

I may be completely off base here (it wouldn't surprise me) but as far
as I can tell thus far looking at the source,
I need to modify the zend_highlight() function in order to add the
requested features. I'm not so sure on how to handle
Line numbers (I was thinking of a state machine that determined if the
line number should be printed -- only should happen immediately before
the first token is displayed every new-line)... But as far as the
function-ref goes I'd
Think I could simply add a condition to check if the token is a function
... Determine if it is user-defined or not, and if it isn't create a
HREF wrapper...

Like I said, am I completely off base?

John


|-Original Message-
|From: Eric Coleman [mailto:eric.coleman;zaireweb.com] 
|Sent: Friday, November 15, 2002 12:29 AM
|To: [EMAIL PROTECTED]
|Subject: Re: [PHP-DEV] show_source()
|
|
|I would actually love to see that :)
|
|
|John Coggeshall [EMAIL PROTECTED] wrote in message 
|news:000701c28c5e$ac9cb200$9d10fea9;coogle...
|
|If no one has an objection, I'll look into making some of that happen.
|
|John
|
|
||-Original Message-
||From: [EMAIL PROTECTED] [mailto:nicos;php.net]
||Sent: Thursday, November 14, 2002 10:15 PM
||To: [EMAIL PROTECTED]
||Subject: [PHP-DEV] show_source()
||
||
||Hello,
||
||Some users are requesting some new arguments in
||show_source() like having the line numbers, having a link to the php 
||manual when a function is called... (see  #12442 )
||
||What do you think of that?
||
||Regards.
||M.CHAILLAN Nicolas
||[EMAIL PROTECTED]
||www.WorldAKT.com Hébergement de sites internets.
||
||
||
||
||--
||PHP Development Mailing List http://www.php.net/
||To unsubscribe, visit: http://www.php.net/unsub.php
||
||
|
|
|
|-- 
|PHP Development Mailing List http://www.php.net/
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] show_source()

2002-11-15 Thread Jon Parise
On Fri, Nov 15, 2002 at 03:11:10AM -0500, John Coggeshall wrote:

 1) I notice that there seems to be a T_LINE token, which should be the
 linenumber? However, this never seems
 To even come up in the lexer from the zend_highlight() function... 

T_LINE is the token for the '__LINE__' constant.  The current line
number is stored in zend_lineno (e.g. CG(zend_lineno)).

-- 
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] show_source()

2002-11-14 Thread Eric Coleman
I would actually love to see that :)


John Coggeshall [EMAIL PROTECTED] wrote in message
news:000701c28c5e$ac9cb200$9d10fea9;coogle...

If no one has an objection, I'll look into making some of that happen.

John


|-Original Message-
|From: [EMAIL PROTECTED] [mailto:nicos;php.net]
|Sent: Thursday, November 14, 2002 10:15 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-DEV] show_source()
|
|
|Hello,
|
|Some users are requesting some new arguments in
|show_source() like having the line numbers, having a link to
|the php manual when a function is called... (see  #12442 )
|
|What do you think of that?
|
|Regards.
|M.CHAILLAN Nicolas
|[EMAIL PROTECTED]
|www.WorldAKT.com Hébergement de sites internets.
|
|
|
|
|--
|PHP Development Mailing List http://www.php.net/
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DEV] show_source()

2002-11-14 Thread Derick Rethans
On Thu, 14 Nov 2002, John Coggeshall wrote:

 
 If no one has an objection, I'll look into making some of that happen.

THere was already some discussion about this a few weeks ago on this 
list. AFAIK the concensus was to re-implement the whole show_source() 
thing, see: 
http://marc.theaimsgroup.com/?l=php-devm=103190697430631w=2
http://marc.theaimsgroup.com/?l=php-devm=103260607216272w=2

Derick

-- 

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php