From: Leonard W. <le...@ne...> - 2004-03-16 09:15:49
|
Hello, Here is a preliminary dia2code version that preserve the methods source code. I've only adapted java and php generators for now. In order to make it work, you must add a @diaoid <oid> tag in the methods comment field. <oid> must be unique for a method in a class, and may be any string without spacing character, eg. you can use method name or a number: "My method description - @diaoid setList" "My method description - @diaoid m001" This should be a temporary constraint as iasked the dia developer team to add an oid attribute to methods and attributes in dia XML format. I've included for a sample diagram under tests/categories.dia. I fixed some segfaults, among which a tricky one in parse_diagram.c due to a <parent> tag in (i guess recent) dia XML. I've added an hidden --debug <level> switch to show a few informations about the generation process. Most of the code parsing stuff is in source_parser.c (new file). It is very basic for now, a major "Todo" is to interprets comments and quoted strings correctly. As the list may not accept attachements, you can get the tarball @ http://lwest.free.fr/dia2code-codepreserve.tgz I also have a question about dia2ode history: what is the right way to output code , as there are so many functions to do that (d2c_printf, emit, fprintf....) --Leo |