This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC/UML/XMI extraction (was gcc front end )
- From: aschwarz1309 at att dot net
- To: gcc at gcc dot gnu dot org
- Date: Sun, 12 May 2002 20:35:48 +0000
- Subject: Re: GCC/UML/XMI extraction (was gcc front end )
It sounds as if what is wanted is the ability to to 'end-
around' processing, that is, generating code from UML
and then generating UML from code.
The generation of code from UML shouldn't be difficult.
The 'end-around' part can be hard and commercial vendors
have salesman that sell you the world, with product
documentation which (sometimes) tells you the caveats.
In any case, you do not need a compiler to generate code
from UML. Assuming that the user put's correct 'code'
and 'data' into the classes, then all linkages are
strictly ordered with known semantics and 'code
generation' consists of outputting the code, data, and
class declarations according to user's intent and
langage defined semantics.
If either end-around capability or syntax checking of
user inputs is required, then a compiler front-end is
required. However, 'you own the turf'. You can define
acceptable inputs and unacceptable inputs so that issues
raised can be circumvented. You define the environment
needed to be successful and then define the result if
input conditions are violated. Otherwise, there is
bedlam. For example:
C++: class
# ifdef FOO
bar
# else
BAR
# endif
{ ... };
class derived :
# ifdef FOO
bar
# else
BAR
# endif
{ ... };
Should work but what do you do with it?
Legacy code is another matter. But, if your 'rules' are
violated then legacy code will only be partially
understood. A problem, but then legacy code is always a
problem.
You may want to involve yourself with one of the ongoing
UML projects and leverage your interests onto work
already started.
art