From: Ryan Davis Date: 2008-06-10T07:35:28+09:00 Subject: Re: AST for ruby code On Jun 9, 2008, at 04:09 , John Micheal wrote: > But how I can parse the full source file(given below)? RubyParser.new.parse(File.read(path)) > Further, whenever I try to parse the string containing class or def in > it, it gives error (it means, it is parsing C code not ruby) I have > also because you're throwing individual lines at the parser when it expects complete source. RubyParser.new.parse("class Blah") is not valid ruby.