[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cardinal-dev] ripper 0.0.5
From: |
David Robins |
Subject: |
[Cardinal-dev] ripper 0.0.5 |
Date: |
Wed, 20 Nov 2002 23:45:54 -0500 (EST) |
On Wed, 20 Nov 2002, Sean Chittenden wrote:
[snip]
> While the grammar may be slightly older, have you tried using ripper?
> If so, I'm curious as to your reactions/thoughts. -sc
I took a look at it - v0.0.4 gave me the same error as someone on RubyGarden
mentioned (http://www.rubygarden.org/article.php?sid=129) but I tracked down
v0.0.5 (found one bad link, but the correct one is
http://www.loveruby.net/archive/ripper/ripper-0.0.5.tar.gz for those
interested). Interesting that it's event based, but I'd rather have an AST
that I can traverse and manipulate, and ripper's method calls don't seem to
give any context for the tags (e.g. if I see an operator I want to be able
to get its arguments). There is no documentation whatsoever, except for how
to build it. Editing test.rb to actually produce some output (basically
change missing_method to puts mid.inspect + " : " + args.each { |i|
i.inspect }.join(" ")) gives output like this:
...
:on__newline :
:on__scan : end
:on__KEYWORD : end
:on__class : R
:on__set_line : 4
:on__local_pop :
:on__scan :
...
It's really too low-level to build a compiler on, IMO (maybe something to
build a parser from - seems to be at that level). I don't want to know
about whitespace, comments, newlines, or raw scanner tokens. But if I'm
just using it wrongly and it has the info I want, please enlighten me.
Dave
Isa. 40:31
- Re: [Cardinal-dev] Ping?!, (continued)
- Re: [Cardinal-dev] Ping?!, Phil Tomson, 2002/11/14
- Re: [Cardinal-dev] Ping?!, Dan Sugalski, 2002/11/14
- [Cardinal-dev] There Is No Wheel, David Robins, 2002/11/14
- Re: [Cardinal-dev] There Is No Wheel, Phil Tomson, 2002/11/14
- Re: [Cardinal-dev] There Is No Wheel, Sean Chittenden, 2002/11/20
- Re: [Cardinal-dev] There Is No Wheel, Phil Tomson, 2002/11/20
- Re: [Cardinal-dev] There Is No Wheel, Sean Chittenden, 2002/11/20
- Re: [Cardinal-dev] There Is No Wheel, Phil Tomson, 2002/11/20
- Re: [Cardinal-dev] There Is No Wheel, David Robins, 2002/11/20
- Re: [Cardinal-dev] There Is No Wheel, Sean Chittenden, 2002/11/20
- [Cardinal-dev] ripper 0.0.5,
David Robins <=
- Re: [Cardinal-dev] Ping?!, Einar Karttunen, 2002/11/14
- Re: [Cardinal-dev] Ping?!, Leon Brocard, 2002/11/14
Re: [Cardinal-dev] Ping?!, Phil Tomson, 2002/11/12