On 10/19/2010 01:19 PM, Gary wrote:
> Eric M. Ludlam wrote:
>> On 10/18/2010 10:27 AM, Lennart Borgman wrote:
>>> On Mon, Oct 18, 2010 at 3:23 PM, Gary wrote:
>>>> http://www.program-transformation.org/PHP/PhpFront (LGPL) "a package
>> you
>>>> can use to generate, analyse, or transform PHP code". Would it be
>> easier
>>>> to write some glue between cedet and PFP-front than to write it all
>> from
>>>> scratch?
>>>
>>> Unfortunately it looks like PHP-Front is not cross-platform so it does
>>> not look like a good candidate.
>>
>> I didn't see anything on their web site that indicated they were not
>> cross patform.
>
> I have bookmarks for many similar tools, actually (one is either C or
> something like M4, another in PHP, another in TCL, and so on), which
> must all have some way of recognising PHP syntax. I only really posted
> that particular one because I noticed that they actually have grammars
> (SDF[1]) for PHP versions 4[2]& 5[3], and thought even if the tool was
> not directly useful, those might be. IIRC though, cedet/semantic uses
> some other syntax for describing language grammars? Anyway, the tools
> are (at least partly) generated from the grammars AFAICT.
>
> Wouldn't it be nice to have some tool to basically convert from one way
> of describing grammars to "some other" way of describing grammaers? Or
> am I either completely off the track (or, possibly, my trolley)?
Indeed. I tried that with bison->wisent, but found the translation left
out a lot, and I just ended up getting confused.
>> From a generic sense, any tool that can be configured to output a tag
>> table from a single source file in a format that an Emacs program can
>> convert into a Semantic tags table will work.
>
> What do you mean by "an Emacs program", please? Some program one would
> have to write, or some specific code that already exists, or what? I
> mean... CTAGS can output a tag table from a single source file, right?
In this case, "Emacs program" means something written in Emacs Lisp that
will convert the output of some external program into something
Emacs/CEDET/Semantic can use. This would be similar to the exuberant
ctags support that is part of Semantic.
>> In the case of what I read (not much) about the php-tools part it
>> appears that there is a tool set, one of which displays functions. I
>> would assume that the easiest course here is to add some "tool" to the
>> list already there that will dump out an Emacs Lisp formatted Semantic
>> Tag table.
>
> Okay.
>
>> Once there, the CEDET part is pretty easy.
>
> Easy for you to say :)
If I made it sound hard, no one would try. :)
Besides, the exuberant ctags example already in Semantic can likely be
used to prototype in new programs.
Eric
|