[grammarians] s-expression dumper: works
MenTaLguY
mental at rydia.net
Sat Dec 17 12:15:22 EST 2005
On Tue, 2005-12-13 at 20:54 -0500, Duncan Mak wrote:
> Hello,
>
> I'm trying to use the dump-ruby script, and I'm having trouble running
> it.
>
> I installed ParseTree and RubyInline using Rubygems and when I try to
> run your script, I see this error message:
>
> diphthong:~/src/ruby $ ruby dump-ruby.rb hello.rb
> /usr/lib/ruby/gems/1.8/gems/RubyInline-3.5.0/./inline.rb:372:in
> `build': undefined method `+' for nil:NilClass (NoMethodError)
Hmm, I'm using ParseTree 1.3.7 and RubyInline 3.4.0, which may be the
difference. As far as I know it's not a problem with the script itself,
but rather an incompatibility between the two versions of those
libraries you've got. Does the parse_tree_show script which comes with
ParseTree work (it does basically the same thing)?
> P.S, Have you looked into RubyLexer at all? The README claims that
> it's more robust than other implementations out there.
RubyLexer is only a lexer, not a full-blown parser. It is, however,
probably going to be useful as a reference when writing the ANTLR lexer;
thanks!
-mental
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/rubygrammar-grammarians/attachments/20051217/0bf29f00/attachment-0001.bin
More information about the Rubygrammar-grammarians
mailing list