Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Best lexer/parser for Ruby language itself

Reply
Thread Tools

Best lexer/parser for Ruby language itself

 
 
Anatol Pomozov
Guest
Posts: n/a
 
      12-21-2005
------=_Part_2535_24192139.1135164518028
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi, all.

I need to do following thing: I have some program on ruby and I would like
parse this program, do some manipulations with code and write back it to
file.

Manipulations with sourcecode quite simple, like changing from
puts 2 if a.nil?
to
if a.nil?
puts 2
end

or %Q{hello world} -> "hello world"

program is very similar to ruby code beautifier (and probably will be
somewhere in the future).

I am looking for articles/documents with theory background in this area as
well as example programs (better on ruby)

Could you also help me with choosing what is the best lib for doing that. I
saw bunch of ruby parser/lexer libs among them: grammar, parsetree,
rubylexer, syntax, ripper. I dont know what is the best for my task. And I
dont know from what to start. Could you give me any advice on that?

--
anatol (http://pomozov.info)

------=_Part_2535_24192139.1135164518028--


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
obtain element name, or attribute and value of the document name itself, and some elemnts and attributes from an ancestor or the node itself using xquery Jeff Kish XML 4 10-30-2008 05:47 PM
limited python virtual machine (WAS: Another scripting language implementedinto Python itself?) Steven Bethard Python 29 01-30-2005 08:30 PM
Another scripting language implemented into Python itself? ajsiegel@optonline.net Python 0 01-27-2005 05:36 PM
Another scripting language implemented into Python itself? Quest Master Python 33 01-27-2005 04:08 PM
Python is the best and most popular general purpose scripting language; the universal scripting language Ron Stephens Python 23 04-12-2004 05:32 PM



Advertisments