What a Ruby parser would you suggest to parse Ruby sources?

parsing, ruby

Solution

- Treetop

- Ragel

Or in case you want to parse Ruby itself:

parse_tree and ruby_parser

Edit:

I just saw your last comment about needing a subset of Ruby for your project, in that case I'd also recommend having a look at tinyrb.

Problem

A parser I'm looking for should: - be Ruby parsing friendly, - be elegant by rule design, - produce user friendly parsing errors, - user documentation should be available in volume more than a calculator example, - UPD: allowing to omit optional whitespaces writing a grammar. Fast parsing is not an important feature. I tried Citrus but the lack of documentation and need to specify every space in rules just turned me away from it.

Original source