[Pharo-project] Initial PetitC parser

Tudor Girba tudor.girba at gmail.com
Fri Apr 8 08:41:15 CEST 2011

Hi Javier,

On 8 Apr 2011, at 05:37, Javier Pimás wrote:

> Hi,
>      I took some time to start developing a C parser with PetitParser. I used the slides of the smalltalk school, they were pretty useful, and after some hours I have a very basic tokens scanner. The idea of this work is to be able to feed the parser with C headers and automagically get the C bindings done in smalltalk.

Nice. I took a quick look. If you want to scale, please write tests (one small example per test). Grammars become complex and if you do not have close to 100% coverage, you will get stuck.


> Now I have to actually start doing something with the scanned code. How should I do that, all in the same class? What if I want to generate bindings for different kinds of FFIs? Other question, how should I handle preprocessing? (now there isn't any kind of preprocessing)
> You can see the code, download it and commit improvements to the repo at www.squeaksource.com/Bindings
> Anybody who is interested is welcomed to help in the development!
> Regards,
>           Javier.
> -- 
> Javier Pimás
> Ciudad de Buenos Aires


"Sometimes the best solution is not the best solution."

More information about the Pharo-project mailing list