[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] ruby-ast-c++ 0.0.1

Alexander Kellett

2/14/2005 1:47:00 AM

over the last few hours i finally got around to writing
an elsa based c++ "parsetree" style library for ruby.

an example usage is parsing of the Qt header qstring.h, and
listing of all the method names defined in QString.

anyone with interest please contact me for sources,
Alex



8 Answers

ptkwt

2/14/2005 10:06:00 AM

0

In article <fd29665dd4983337159fae67024bc7e3@lypanov.net>,
Alexander Kellett <ruby-lists@lypanov.net> wrote:
>over the last few hours i finally got around to writing
>an elsa based c++ "parsetree" style library for ruby.
>
>an example usage is parsing of the Qt header qstring.h, and
>listing of all the method names defined in QString.
>
>anyone with interest please contact me for sources,
>Alex
>


Definately interested. What is elsa?


Phil


Alexander Kellett

2/14/2005 10:36:00 AM

0


Alex

George Ogata

2/14/2005 7:09:00 PM

0

ptkwt@aracnet.com (Phil Tomson) writes:

> In article <fd29665dd4983337159fae67024bc7e3@lypanov.net>,
> Alexander Kellett <ruby-lists@lypanov.net> wrote:
>>over the last few hours i finally got around to writing
>>an elsa based c++ "parsetree" style library for ruby.
>>
>>an example usage is parsing of the Qt header qstring.h, and
>>listing of all the method names defined in QString.
>>
>>anyone with interest please contact me for sources,
>>Alex
>>
>
>
> Definately interested.

I've got a C99 (not C++) AST-constructor if you're interested too.
Pure ruby (right down to the lexer) though, so pretty slow at the
moment. The AST nodes are of different Node classes rather than just
being nested arrays. You can also use it to parse snippets (e.g.,
just a statement or a type name or something).

If you're interested.

Shashank Date

2/14/2005 7:17:00 PM

0

George Ogata wrote:
>
> I've got a C99 (not C++) AST-constructor if you're interested too.
> Pure ruby (right down to the lexer) though, so pretty slow at the
> moment. The AST nodes are of different Node classes rather than just
> being nested arrays. You can also use it to parse snippets (e.g.,
> just a statement or a type name or something).
>
> If you're interested.

Very, very interested ! Please let me know where I can get it :-)
-- shanko

Ryan Davis

2/15/2005 12:50:00 AM

0


On Feb 14, 2005, at 11:14 AM, George Ogata wrote:

> I've got a C99 (not C++) AST-constructor if you're interested too.
> Pure ruby (right down to the lexer) though, so pretty slow at the
> moment. The AST nodes are of different Node classes rather than just
> being nested arrays. You can also use it to parse snippets (e.g.,
> just a statement or a type name or something).
> If you're interested.

GIMMIE!!!! WANT WANT WANT!!!


ptkwt

2/15/2005 9:09:00 AM

0

In article <87ekfjj6ws.fsf@optushome.com.au>,
George Ogata <g_ogata@optushome.com.au> wrote:
>ptkwt@aracnet.com (Phil Tomson) writes:
>
>> In article <fd29665dd4983337159fae67024bc7e3@lypanov.net>,
>> Alexander Kellett <ruby-lists@lypanov.net> wrote:
>>>over the last few hours i finally got around to writing
>>>an elsa based c++ "parsetree" style library for ruby.
>>>
>>>an example usage is parsing of the Qt header qstring.h, and
>>>listing of all the method names defined in QString.
>>>
>>>anyone with interest please contact me for sources,
>>>Alex
>>>
>>
>>
>> Definately interested.
>
>I've got a C99 (not C++) AST-constructor if you're interested too.
>Pure ruby (right down to the lexer) though, so pretty slow at the
>moment. The AST nodes are of different Node classes rather than just
>being nested arrays. You can also use it to parse snippets (e.g.,
>just a statement or a type name or something).
>
>If you're interested.


Yes, please share. These sorts of things could really help us to
translate the Ruby C libs into pure Ruby.

Phil

Ryan Davis

2/15/2005 5:37:00 PM

0


On Feb 15, 2005, at 1:39 AM, Phil Tomson wrote:

>> I've got a C99 (not C++) AST-constructor if you're interested too.
>> Pure ruby (right down to the lexer) though, so pretty slow at the
>> moment. The AST nodes are of different Node classes rather than just
>> being nested arrays. You can also use it to parse snippets (e.g.,
>> just a statement or a type name or something).
>>
>> If you're interested.
>
>
> Yes, please share. These sorts of things could really help us to
> translate the Ruby C libs into pure Ruby.

I don't think that is the case actually. There is just far too much
going on on the C side that isn't necessary once ported to ruby. We
hand translated a smallish C file and it dropped about 40% off the
size.

What we CAN do with it is make another feeder into the ruby2c tool
chain and play with making more analysis tools. I'd LOVE to have
something that can do the C family so I can extend parse_tree_abc and
do complexity metrics on C (and with some work objective-c) code. This
can help us identify the stickier files and get cracking on those first
(or at least help people decide if they want to take a crack at it :).

--
ryand-ruby@zenspider.com - Seattle.rb -
http://www.zenspider.com/...
http://blog.zens... - http://rubyforge.org/proje...



George Ogata

2/16/2005 8:37:00 PM

0

Shashank Date <sdate@everestkc.net> writes:

> George Ogata wrote:
>> I've got a C99 (not C++) AST-constructor if you're interested too.
>> Pure ruby (right down to the lexer) though, so pretty slow at the
>> moment. The AST nodes are of different Node classes rather than just
>> being nested arrays. You can also use it to parse snippets (e.g.,
>> just a statement or a type name or something).
>> If you're interested.
>
> Very, very interested ! Please let me know where I can get it :-)
> -- shanko

Sorry for taking a while to follow up. Give me some time to doc' it
up properly and I'll have it on RubyForge shortly.