From: Kaspar Schiess Date: 2011-03-09T20:06:51+09:00 Subject: [ANN] parslet 1.2 - a PEG parser library 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: * All parsers are now parser atoms as well. Not only can you freely combine atoms, you can mix in parsers! Example: str('ip:') >> IpParser.new >> str(';') * Parslet now returns slices instead of strings. Slices are strings that retain original source offsets and are printed as "string"@0. This allows line and column information to be accessed in later stages: See Parslet::Slice for details. * #prsnt? and #absnt? are now deprecated. Please use only #present? and #absent Synopsis: require 'parslet' class Mini < Parslet::Parser rule(:integer) { match('[0-9]').repeat(1) } root(:integer) end Mini.new.parse("132432") # => "132432"@0 Go wild. Write that compiler! [1] http://en.wikipedia.org/wiki/Parsing_expression_grammar