Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Parsing a ruby code
Zeeshan Haq
6/8/2008 3:00:00 PM
Hello,
I am using the below given code to parse ruby code line by line and
generate its s-expression (AST). The help i need from you is that i want
to parse the whole ruby file at a time instead of parsing line by line.
require "ruby_parser"
# puts RubyParser.new.parse("My name is defecto")
counter = 1
file = File.new("readfile.rb", "r")
while (line = file.gets)
puts "#{counter}: #{RubyParser.new.parse(line)}"
counter = counter + 1
end
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Parsing a ruby code
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password