[Scons-users] Custom Scanner question

Jason Fritz jasonfritzpublic at gmail.com
Tue Sep 30 12:25:02 EDT 2014


Hi SCons folks,

I'm trying to write a custom Scanner to scan IBM Rhapsody project files and
could use some help.

Some background:
- Rhapsody is a UML tool that allows you to define C++ classes and also
state machines. It can generate C++ code (.h and .cpp files) from what you
build into the project.
- The top-level Rhapsody file is called a project (.rpy extension).  The
project "includes" many other Rhapsody files, e.g. packages (.sbs
extension), diagrams (.omd), components (.cmp), etc.  Some sub-files, like
packages and components, can include other sub-files
- The list of generated source code is totally dependent upon the contents
of the Rhapsody project.  E.g. you could add a new class called "Foo" to
the project, generate code, and you will get Foo.h and Foo.cpp in addition
to whatever else is already defined in the project.  There is no one-to-one
mapping between Rhapsody files and generated source files.

Now getting back to my Scanner question
- What exactly does my scanner need to do?  It looks like I need to write a
Scanner function that will parse the top-level project file (.rpy) and
return a list of Nodes for all the sub-files included by the top-level
project.
- What about the generated source code?  How will SCons know that
Foo.h/.cpp are generated by Rhapsody, and therefore will be regenerated if
the Rhapsody project files change?

Thank you for any help!!!
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20140930/3a8588dd/attachment.html>


More information about the Scons-users mailing list