Modelling C

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Modelling C

abergel
Hi!

Today I worked on modeling C/C++ files and headers in Famix.
I have introduced the class FAMIXModule, FAMIXCompilationUnit, FAMIXHeader, FAMIXInclude
Here is an example using MSE:

                        '(
                (FAMIX.Class (id: 1) (name ''AClass'') (sourceAnchor (ref: 3)) (container (ref: 5)))
                (FAMIX.Method (id: 2) (name ''aMethod'') (parentType (ref: 1)) (sourceAnchor (ref: 4)))
                (FAMIX.FileAnchor (id: 3) (element (ref: 1)) (fileName ''afile''))
                (FAMIX.FileAnchor (id: 4) (element (ref: 2)) (fileName ''afile'') (startLine 3) (endLine 30) )
                (FAMIX.Module (id: 5)
                        (compilationUnit (ref: 6))
                )
                (FAMIX.CompilationUnit (id: 6)
                        (name ''foobar.cpp'')
                )
               
                (FAMIX.Include (id: 7)
                        (from (ref: 6))
                        (to (ref: 8)))

                (FAMIX.Include (id: 10)
                        (from (ref: 6))
                        (to (ref: 9)))
                       
                (FAMIX.Header (id: 8)
                        (name ''foobar.hpp'')
                        )
                       
                (FAMIX.Header (id: 9)
                        (name ''foobar2.hpp'')
                        )
        )’

It would be nice if someone could review it (if there is an interest of course).
My implementation does not use Fame, simply because I do not understand how it works.

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev