From: Ryan Davis Date: 2010-12-29T19:32:18+09:00 Subject: Re: [ANN] parslet 1.0 - a PEG parser library On Dec 29, 2010, at 01:37 , Kaspar Schiess wrote: > parslet is a Parsing Expression Grammar based[1] parser generator library. Uff. Now that is out of our system, here goes what it really does: It makes writing parsers pleasant for the rest of us. No code generation, clear access to data, unit testable. > > * http://kschiess.github.com/parslet/index.html > * https://github.com/kschiess/parslet > > Installation: > > gem install parslet > > Changes: > > This hasn't ever been publicly announced, so that is the real big change. > > Synopsis: > > require 'parslet' > class Mini < Parslet::Parser > rule(:integer) { match('[0-9]').repeat(1) } > root(:integer) > end > > Mini.new.parse("132432") # => 132432 Cool! Questions: + Any performance benchmarks? + Does this PEG support left recursion? + I assume with it subclassing Parslet::Parser that it does support language extension via further subclassing... But does that also imply that it can't support composition? I've usually seen that via multiple inheritance, and we'd usually do it via modules in ruby. AH! I see that Parslet is a module and provides at least some of the grammar API.