RubyGems.org

parser

0.9.alpha

ruby_parser (RP) is a ruby parser written in pure ruby (utilizing racc--which does by default use a C extension). RP's output is the same as ParseTree's output: s-expressions using ruby's arrays and base types. As an example: def conditional1 arg1 return 1 if arg1 == 0 return 0 end becomes: s(:defn, :conditional1, s(:args, :arg1), s(:if, s(:call, s(:lvar, :arg1), :==, s(:lit, 0)), s(:return, s(:lit, 1)), nil), s(:return, s(:lit, 0)))

installgem install parser -v 0.9.alpha --pre
Authors

Peter Zotov

312,125 total downloads 112 for this version
Owners

89d887b50262bbe10225d36d974fdb0c644bcc0c58aa01920c4de4f941afcac9

Gemfile
gem 'parser', '~> 0.9.alpha'
Versions
  1. 2.1.7 March 5, 2014 (308 KB)
  2. 2.1.6 March 4, 2014 (308 KB)
  3. 2.1.5 February 24, 2014 (308 KB)
  4. 2.1.4 January 10, 2014 (308 KB)
  5. 2.1.3 January 10, 2014 (308 KB)
Show all versions (46 total)
Runtime Dependencies
  1. sexp_processor ~> 4.1