--90e6ba6e8a5266f179049e104f74 Content-Type: text/plain; charset=ISO-8859-1 Thanks for your continued work on this, Kaspar! Jos -- Peace cannot be achieved through violence, it can only be attained through understanding. On Mar 9, 2011 3:07 AM, "Kaspar Schiess" <eule / space.ch> 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: > > * 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 > > > --90e6ba6e8a5266f179049e104f74--