CAnalyer

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

CAnalyer

Schwab,Wilhelm K
I was digging around on Squeak Source for OSProcess and friends, and ran across CAnalyzer.  Are there any papers on it?  How robust is it?  What does it extract from C code?  For example, might one put the GSL (www.gnu.org/software/gsl) header files into it, pull out all of the structure definitions and function prototypes, and generate LOTS of FFI code to make a wrapper?  Just a thought...

Bill


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Igor Stasenko
2009/9/26 Schwab,Wilhelm K <[hidden email]>:
> I was digging around on Squeak Source for OSProcess and friends, and ran across CAnalyzer.  Are there any papers on it?  How robust is it?  What does it extract from C code?  For example, might one put the GSL (www.gnu.org/software/gsl) header files into it, pull out all of the structure definitions and function prototypes, and generate LOTS of FFI code to make a wrapper?  Just a thought...
>

I having a modified version of SWIG, which can parse C++ files,
including classes and
nested classes, to produce smalltalk code wrappers.

Reproducing the SWIG in smalltalk would be very time consuming.
But it would be cool to have a C/C++ parser implementation.

SWIG is not only parsing, its also doing macro preprocessing, so its
can't be fooled with macros :)

> Bill
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Schwab,Wilhelm K
Sig,

Is it something you have made available?  One snag in my world is that the "code" is not always something that can be compiled.  However, for GSL and other libraries of interest, the code is valid, if not full of macro-based annoyances and other distractions.

Bill


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Igor Stasenko
Sent: Friday, September 25, 2009 11:03 PM
To: [hidden email]
Subject: Re: [Pharo-project] CAnalyer

2009/9/26 Schwab,Wilhelm K <[hidden email]>:
> I was digging around on Squeak Source for OSProcess and friends, and ran across CAnalyzer.  Are there any papers on it?  How robust is it?  What does it extract from C code?  For example, might one put the GSL (www.gnu.org/software/gsl) header files into it, pull out all of the structure definitions and function prototypes, and generate LOTS of FFI code to make a wrapper?  Just a thought...
>

I having a modified version of SWIG, which can parse C++ files, including classes and nested classes, to produce smalltalk code wrappers.

Reproducing the SWIG in smalltalk would be very time consuming.
But it would be cool to have a C/C++ parser implementation.

SWIG is not only parsing, its also doing macro preprocessing, so its can't be fooled with macros :)

> Bill
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Igor Stasenko
2009/9/26 Schwab,Wilhelm K <[hidden email]>:
> Sig,
>
> Is it something you have made available?  One snag in my world is that the "code" is not always something that can be compiled.  However, for GSL and other libraries of interest, the code is valid, if not full of macro-based annoyances and other distractions.
>
the code i written is the module to SWIG.
The project what i developed once is to write a smalltalk interpreter by own,
and the aim was to use it as a scripting engine for C++ projects.
My experiments stopped shortly after i understood that my interpreter
implementation having some flaws
and i need to spend much time to rewrite everything :)
But, along the way, i started making bindings to Ogre 3D engine
(http://www.ogre3d.org/)
and my SWIG-based binding code generator were able to reflect C++
classes in my own smalltalk, including
being able to call constructors/destructors, methods and directly
access the fields by using auto-generated primives.
If you wanna to get deeper into that, i can send you the sources and examples.
With a little effort, the code generation could be easily changed to
satisfy the FFI/Alien demands, then you will be able to bind
any C library with Squeak VM.

> Bill
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Igor Stasenko
> Sent: Friday, September 25, 2009 11:03 PM
> To: [hidden email]
> Subject: Re: [Pharo-project] CAnalyer
>
> 2009/9/26 Schwab,Wilhelm K <[hidden email]>:
>> I was digging around on Squeak Source for OSProcess and friends, and ran across CAnalyzer.  Are there any papers on it?  How robust is it?  What does it extract from C code?  For example, might one put the GSL (www.gnu.org/software/gsl) header files into it, pull out all of the structure definitions and function prototypes, and generate LOTS of FFI code to make a wrapper?  Just a thought...
>>
>
> I having a modified version of SWIG, which can parse C++ files, including classes and nested classes, to produce smalltalk code wrappers.
>
> Reproducing the SWIG in smalltalk would be very time consuming.
> But it would be cool to have a C/C++ parser implementation.
>
> SWIG is not only parsing, its also doing macro preprocessing, so its can't be fooled with macros :)
>
>> Bill
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Schwab,Wilhelm K
Sig,

Interesting.  I looked at swig and decided that I would have a better chance of success with pattern matching, especially since some of the "code" I want to analyze is barely pseudo code (but still full of valuable information).  I ended up with a bit of a mess in Dolphin, but it strangely manages to work; for Pharo, I planned to clean it up, got as far as noticing the regex package, and saw CAnalyzer.  

That is a long way around saying that I am not eager to tear back into swig, but your argument about the working preprocessor and parser is well taken and I would like to see what you did.  I should at least look at CAnalyzer and then either switch to it or begin moving my unit tests and higher-level recognizers to Pharo.  Leaving the whole thing in Dolphin is an option too, but the code really needs some cleaning, so the port would do it and me some good.  I will be glad to look over your work and maybe put swig back into consideration.

Bill



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Igor Stasenko
Sent: Saturday, September 26, 2009 12:53 AM
To: [hidden email]
Subject: Re: [Pharo-project] CAnalyer

2009/9/26 Schwab,Wilhelm K <[hidden email]>:
> Sig,
>
> Is it something you have made available?  One snag in my world is that the "code" is not always something that can be compiled.  However, for GSL and other libraries of interest, the code is valid, if not full of macro-based annoyances and other distractions.
>
the code i written is the module to SWIG.
The project what i developed once is to write a smalltalk interpreter by own, and the aim was to use it as a scripting engine for C++ projects.
My experiments stopped shortly after i understood that my interpreter implementation having some flaws and i need to spend much time to rewrite everything :) But, along the way, i started making bindings to Ogre 3D engine
(http://www.ogre3d.org/)
and my SWIG-based binding code generator were able to reflect C++ classes in my own smalltalk, including being able to call constructors/destructors, methods and directly access the fields by using auto-generated primives.
If you wanna to get deeper into that, i can send you the sources and examples.
With a little effort, the code generation could be easily changed to satisfy the FFI/Alien demands, then you will be able to bind any C library with Squeak VM.

> Bill
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Igor
> Stasenko
> Sent: Friday, September 25, 2009 11:03 PM
> To: [hidden email]
> Subject: Re: [Pharo-project] CAnalyer
>
> 2009/9/26 Schwab,Wilhelm K <[hidden email]>:
>> I was digging around on Squeak Source for OSProcess and friends, and ran across CAnalyzer.  Are there any papers on it?  How robust is it?  What does it extract from C code?  For example, might one put the GSL (www.gnu.org/software/gsl) header files into it, pull out all of the structure definitions and function prototypes, and generate LOTS of FFI code to make a wrapper?  Just a thought...
>>
>
> I having a modified version of SWIG, which can parse C++ files, including classes and nested classes, to produce smalltalk code wrappers.
>
> Reproducing the SWIG in smalltalk would be very time consuming.
> But it would be cool to have a C/C++ parser implementation.
>
> SWIG is not only parsing, its also doing macro preprocessing, so its
> can't be fooled with macros :)
>
>> Bill
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Schwab,Wilhelm K
The CAnalyzer entry on Squeak Source says to install it like this:

ScriptLoader new installer ss project: 'CAnalyzer'; install: 'CAnalyzerLoader'. ScriptLoader perform: #loadCAnalyzer.

But that blows up for want of what looks like parts of MOOSE.   I have the new beta at least attempting to install MOOSE; so far, it ended in a frozen image, but I'm retrying it.   Is there a better way to load CAnalyzer?  

Bill


________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Schwab,Wilhelm K [[hidden email]]
Sent: Saturday, September 26, 2009 9:42 AM
To: [hidden email]
Subject: Re: [Pharo-project] CAnalyer

Sig,

Interesting.  I looked at swig and decided that I would have a better chance of success with pattern matching, especially since some of the "code" I want to analyze is barely pseudo code (but still full of valuable information).  I ended up with a bit of a mess in Dolphin, but it strangely manages to work; for Pharo, I planned to clean it up, got as far as noticing the regex package, and saw CAnalyzer.

That is a long way around saying that I am not eager to tear back into swig, but your argument about the working preprocessor and parser is well taken and I would like to see what you did.  I should at least look at CAnalyzer and then either switch to it or begin moving my unit tests and higher-level recognizers to Pharo.  Leaving the whole thing in Dolphin is an option too, but the code really needs some cleaning, so the port would do it and me some good.  I will be glad to look over your work and maybe put swig back into consideration.

Bill



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Igor Stasenko
Sent: Saturday, September 26, 2009 12:53 AM
To: [hidden email]
Subject: Re: [Pharo-project] CAnalyer

2009/9/26 Schwab,Wilhelm K <[hidden email]>:
> Sig,
>
> Is it something you have made available?  One snag in my world is that the "code" is not always something that can be compiled.  However, for GSL and other libraries of interest, the code is valid, if not full of macro-based annoyances and other distractions.
>
the code i written is the module to SWIG.
The project what i developed once is to write a smalltalk interpreter by own, and the aim was to use it as a scripting engine for C++ projects.
My experiments stopped shortly after i understood that my interpreter implementation having some flaws and i need to spend much time to rewrite everything :) But, along the way, i started making bindings to Ogre 3D engine
(http://www.ogre3d.org/)
and my SWIG-based binding code generator were able to reflect C++ classes in my own smalltalk, including being able to call constructors/destructors, methods and directly access the fields by using auto-generated primives.
If you wanna to get deeper into that, i can send you the sources and examples.
With a little effort, the code generation could be easily changed to satisfy the FFI/Alien demands, then you will be able to bind any C library with Squeak VM.

> Bill
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Igor
> Stasenko
> Sent: Friday, September 25, 2009 11:03 PM
> To: [hidden email]
> Subject: Re: [Pharo-project] CAnalyer
>
> 2009/9/26 Schwab,Wilhelm K <[hidden email]>:
>> I was digging around on Squeak Source for OSProcess and friends, and ran across CAnalyzer.  Are there any papers on it?  How robust is it?  What does it extract from C code?  For example, might one put the GSL (www.gnu.org/software/gsl) header files into it, pull out all of the structure definitions and function prototypes, and generate LOTS of FFI code to make a wrapper?  Just a thought...
>>
>
> I having a modified version of SWIG, which can parse C++ files, including classes and nested classes, to produce smalltalk code wrappers.
>
> Reproducing the SWIG in smalltalk would be very time consuming.
> But it would be cool to have a C/C++ parser implementation.
>
> SWIG is not only parsing, its also doing macro preprocessing, so its
> can't be fooled with macros :)
>
>> Bill
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Schwab,Wilhelm K
The second load attempt was happier.  The tests pass.  Now I gotta try to figure out what it all means =:0

Bill




-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Schwab,Wilhelm K
Sent: Saturday, September 26, 2009 9:37 AM
To: [hidden email]
Subject: Re: [Pharo-project] CAnalyer

The CAnalyzer entry on Squeak Source says to install it like this:

ScriptLoader new installer ss project: 'CAnalyzer'; install: 'CAnalyzerLoader'. ScriptLoader perform: #loadCAnalyzer.

But that blows up for want of what looks like parts of MOOSE.   I have the new beta at least attempting to install MOOSE; so far, it ended in a frozen image, but I'm retrying it.   Is there a better way to load CAnalyzer?  

Bill


________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Schwab,Wilhelm K [[hidden email]]
Sent: Saturday, September 26, 2009 9:42 AM
To: [hidden email]
Subject: Re: [Pharo-project] CAnalyer

Sig,

Interesting.  I looked at swig and decided that I would have a better chance of success with pattern matching, especially since some of the "code" I want to analyze is barely pseudo code (but still full of valuable information).  I ended up with a bit of a mess in Dolphin, but it strangely manages to work; for Pharo, I planned to clean it up, got as far as noticing the regex package, and saw CAnalyzer.

That is a long way around saying that I am not eager to tear back into swig, but your argument about the working preprocessor and parser is well taken and I would like to see what you did.  I should at least look at CAnalyzer and then either switch to it or begin moving my unit tests and higher-level recognizers to Pharo.  Leaving the whole thing in Dolphin is an option too, but the code really needs some cleaning, so the port would do it and me some good.  I will be glad to look over your work and maybe put swig back into consideration.

Bill



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Igor Stasenko
Sent: Saturday, September 26, 2009 12:53 AM
To: [hidden email]
Subject: Re: [Pharo-project] CAnalyer

2009/9/26 Schwab,Wilhelm K <[hidden email]>:
> Sig,
>
> Is it something you have made available?  One snag in my world is that the "code" is not always something that can be compiled.  However, for GSL and other libraries of interest, the code is valid, if not full of macro-based annoyances and other distractions.
>
the code i written is the module to SWIG.
The project what i developed once is to write a smalltalk interpreter by own, and the aim was to use it as a scripting engine for C++ projects.
My experiments stopped shortly after i understood that my interpreter implementation having some flaws and i need to spend much time to rewrite everything :) But, along the way, i started making bindings to Ogre 3D engine
(http://www.ogre3d.org/)
and my SWIG-based binding code generator were able to reflect C++ classes in my own smalltalk, including being able to call constructors/destructors, methods and directly access the fields by using auto-generated primives.
If you wanna to get deeper into that, i can send you the sources and examples.
With a little effort, the code generation could be easily changed to satisfy the FFI/Alien demands, then you will be able to bind any C library with Squeak VM.

> Bill
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Igor
> Stasenko
> Sent: Friday, September 25, 2009 11:03 PM
> To: [hidden email]
> Subject: Re: [Pharo-project] CAnalyer
>
> 2009/9/26 Schwab,Wilhelm K <[hidden email]>:
>> I was digging around on Squeak Source for OSProcess and friends, and ran across CAnalyzer.  Are there any papers on it?  How robust is it?  What does it extract from C code?  For example, might one put the GSL (www.gnu.org/software/gsl) header files into it, pull out all of the structure definitions and function prototypes, and generate LOTS of FFI code to make a wrapper?  Just a thought...
>>
>
> I having a modified version of SWIG, which can parse C++ files, including classes and nested classes, to produce smalltalk code wrappers.
>
> Reproducing the SWIG in smalltalk would be very time consuming.
> But it would be cool to have a C/C++ parser implementation.
>
> SWIG is not only parsing, its also doing macro preprocessing, so its
> can't be fooled with macros :)
>
>> Bill
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Stéphane Ducasse
In reply to this post by Schwab,Wilhelm K
this is just a wrapper around scrML to create C entities in Moose


stef
On Sep 26, 2009, at 4:36 PM, Schwab,Wilhelm K wrote:

> The CAnalyzer entry on Squeak Source says to install it like this:
>
> ScriptLoader new installer ss project: 'CAnalyzer'; install:  
> 'CAnalyzerLoader'. ScriptLoader perform: #loadCAnalyzer.
>
> But that blows up for want of what looks like parts of MOOSE.   I  
> have the new beta at least attempting to install MOOSE; so far, it  
> ended in a frozen image, but I'm retrying it.   Is there a better  
> way to load CAnalyzer?
>
> Bill
>
>
> ________________________________________
> From: [hidden email] [[hidden email]
> ] On Behalf Of Schwab,Wilhelm K [[hidden email]]
> Sent: Saturday, September 26, 2009 9:42 AM
> To: [hidden email]
> Subject: Re: [Pharo-project] CAnalyer
>
> Sig,
>
> Interesting.  I looked at swig and decided that I would have a  
> better chance of success with pattern matching, especially since  
> some of the "code" I want to analyze is barely pseudo code (but  
> still full of valuable information).  I ended up with a bit of a  
> mess in Dolphin, but it strangely manages to work; for Pharo, I  
> planned to clean it up, got as far as noticing the regex package,  
> and saw CAnalyzer.
>
> That is a long way around saying that I am not eager to tear back  
> into swig, but your argument about the working preprocessor and  
> parser is well taken and I would like to see what you did.  I should  
> at least look at CAnalyzer and then either switch to it or begin  
> moving my unit tests and higher-level recognizers to Pharo.  Leaving  
> the whole thing in Dolphin is an option too, but the code really  
> needs some cleaning, so the port would do it and me some good.  I  
> will be glad to look over your work and maybe put swig back into  
> consideration.
>
> Bill
>
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]
> ] On Behalf Of Igor Stasenko
> Sent: Saturday, September 26, 2009 12:53 AM
> To: [hidden email]
> Subject: Re: [Pharo-project] CAnalyer
>
> 2009/9/26 Schwab,Wilhelm K <[hidden email]>:
>> Sig,
>>
>> Is it something you have made available?  One snag in my world is  
>> that the "code" is not always something that can be compiled.  
>> However, for GSL and other libraries of interest, the code is  
>> valid, if not full of macro-based annoyances and other distractions.
>>
> the code i written is the module to SWIG.
> The project what i developed once is to write a smalltalk  
> interpreter by own, and the aim was to use it as a scripting engine  
> for C++ projects.
> My experiments stopped shortly after i understood that my  
> interpreter implementation having some flaws and i need to spend  
> much time to rewrite everything :) But, along the way, i started  
> making bindings to Ogre 3D engine
> (http://www.ogre3d.org/)
> and my SWIG-based binding code generator were able to reflect C++  
> classes in my own smalltalk, including being able to call  
> constructors/destructors, methods and directly access the fields by  
> using auto-generated primives.
> If you wanna to get deeper into that, i can send you the sources and  
> examples.
> With a little effort, the code generation could be easily changed to  
> satisfy the FFI/Alien demands, then you will be able to bind any C  
> library with Squeak VM.
>
>> Bill
>>
>>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of  
>> Igor
>> Stasenko
>> Sent: Friday, September 25, 2009 11:03 PM
>> To: [hidden email]
>> Subject: Re: [Pharo-project] CAnalyer
>>
>> 2009/9/26 Schwab,Wilhelm K <[hidden email]>:
>>> I was digging around on Squeak Source for OSProcess and friends,  
>>> and ran across CAnalyzer.  Are there any papers on it?  How robust  
>>> is it?  What does it extract from C code?  For example, might one  
>>> put the GSL (www.gnu.org/software/gsl) header files into it, pull  
>>> out all of the structure definitions and function prototypes, and  
>>> generate LOTS of FFI code to make a wrapper?  Just a thought...
>>>
>>
>> I having a modified version of SWIG, which can parse C++ files,  
>> including classes and nested classes, to produce smalltalk code  
>> wrappers.
>>
>> Reproducing the SWIG in smalltalk would be very time consuming.
>> But it would be cool to have a C/C++ parser implementation.
>>
>> SWIG is not only parsing, its also doing macro preprocessing, so its
>> can't be fooled with macros :)
>>
>>> Bill
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CAnalyer

Alexandre Bergel
In reply to this post by Schwab,Wilhelm K
Hi Bill.

CAnalyzer comprises:
        - an extension to the Moose FAMIX metamodel to cope with C modules, C  
functions, C variables...
        - an importer for Moose that takes as input .xml files generated by  
srcML
        - invocation resolution since srcML does not provide this

CAnalyzer is meant to be used with Moose and Mondrian.
It depends on srcML, which is an excellent tool for getting XML tree  
from source code. I have been using it for a while already, and have  
been always happy with it.

The squeaksource project description has been adjusted.

Cheers,
Alexandre

On 25 Sep 2009, at 22:56, Schwab,Wilhelm K wrote:

> I was digging around on Squeak Source for OSProcess and friends, and  
> ran across CAnalyzer.  Are there any papers on it?  How robust is  
> it?  What does it extract from C code?  For example, might one put  
> the GSL (www.gnu.org/software/gsl) header files into it, pull out  
> all of the structure definitions and function prototypes, and  
> generate LOTS of FFI code to make a wrapper?  Just a thought...
>
> Bill
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project