On Wed, Mar 25, 2009 at 8:13 PM, Jeremy <jer...@pinacol.com> wrote:
> Is there any way to access the parse tree of a PHP file from within PHP?

will this work for you?
http://docs.php.net/manual/en/tokenizer.examples.php

> I'm trying to write a code-checking utility to find namespace-related
> problems in code and alert me to them.  Specifically:
>
> namespace foo\bar;
>
> function foobar()
> {
>        try
>        {
>                ...
>        }
>        catch(Exception $e)
>        {
>                //nothing will be caught
>                //I forgot to qualify
>                //code silently fails
>        }
> }
>
> I didn't want to put a whole lot of work into this, so I'm trying to avoid
> having to write in C/flex/ANTLR/etc.  There's a bit of grease-monkey
> internals stuff in PHP so I thought I would check.
>
> Thanks,
> Jeremy
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Alexey Zakhlestin
http://www.milkfarmsoft.com/

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

Reply via email to