using class import code
Roberto Raggi
roberto at kdevelop.org
Sun Feb 23 11:08:04 UTC 2003
On Sat, 2003-02-22 at 22:11, Jonathan Riddell wrote:
> I was looking at the gideon libkdev*support.so parts in the hope of
> using them for class import for Umbrello UML Modeller. However there
> dosen't seem to be any consistant interface for code import, so it looks
> like the easiest thing to be done is rip out the appropriate parts of the
> code from each of libkdev*support.so and add it to Umbrello with an import
> wrapper.
>
> I'd rather not make a forked copy of the code, it's what we have just now
> with your old c++ import code and it gets out of date, so I was wondering
> if anyone had any suggestions for a more elegant way to do it.
Hi Jonathan,
the new c++ parser is almost finished(at the moment it lacks the rules
for parsing "c++ expressions").. it supports namespace, templates,
using directives, and all other features of modern
c++.
the nice thing of the new parser engine is that it is pretty independent
from gideon, so it's simple to integrate it into your tool.
if you want to try it you must copy from parts/cppsupport
lexer.h -- the c++ tokenizer
lexer.cpp
parser.h -- the parser
parser.cpp
error.h -- the list of errors
error.cpp
driver.h -- the driver
driver.cpp
ast.h
ast.cpp -- the abstract syntax tree
tree_parser.h -- the base class for walkers
tree_parser.cpp
in attachment you'll find a small example that show how to use the engine to
perform syntax checking of c++ source files.
ciao robe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++
Size: 1174 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20030223/fbf3ad4d/attachment.bin>
More information about the KDevelop-devel
mailing list