[Uml-devel] PHP parsing

Jonathan Riddell jr at jriddell.org
Tue Feb 25 19:16:07 UTC 2003


On Wed, 26 Feb 2003, Luis De la Parra Blum wrote:
> On Wednesday 26 February 2003 00:41, Duncan Mac-Vicar Prett wrote:
> > Hi guys, is anyone working in PHP class parsing? I am looking for this
> > feature, and I have been thinking about adding it myself using some code
> > from gideon, any advice, guide or comments? Please cc: me since I am not
>
> acutally the C++ parser in Umbrello comes from an old version of KDevelop, but
> it's pretty much hard-coded into Umbrello (ie, it's not flexible like the
> code generators). Now that KDevelop (Gideon) is getting support for more
> languages, we hope we can use their parsers in Umbrello, but there has been
> no work in that area yet.
> I think Jonathan was checking that out (at least for the C++ parser) but I
> dont think he's started getting the code into Umbrello.

Looking at the Gideon code, they don't have any standard interface for
code import.

I think the only thing to do is to define our own interface (similar to
the code export one) and just nick the code from gideon and adapt it for
each language.

> btw. I think the parser (at least the C++ one) in Gideon outputs some kind of
> AST (abstract syntax tree)... I dont know how difficult it would be, but it
> be nice if *all* parsers in Umbrello would output XMI code instead...
> Then it'd be easier to implement some kind of "diff", and get the round-trip.
> (after generating a class and modifying it you can reimport it and would get
> the changes into the model)
> Also, I would think the parser discards all coments (which is what's expected
> of a compiler-like parser) but ther's been requests in the list for the
> coments to be imported as Class documentation, and maybe the methods
> implementations as Methods associated with the operations in classes.

I think the C++ code import for Gideon has changed substantially in the
last few days.  Previously it wasn't much different from the fork that we
use.

Jonathan Riddell






More information about the umbrello-devel mailing list