Parslet 1.5.0

parslet is many peoples favorite parser construction toolkit. It uses a
grammar system called Parsing Expression Grammar (PEG)[1]. With parslet,
you can create neat parsers, from big to small. parslet has unit testing
support and spits out error messages for human beings.

Installation:

gem install parslet

Synopsis:

require ‘parslet’
class Mini < Parslet::Parser
rule(:integer) { match(’[0-9]’).repeat(1) }
root(:integer)
end

Mini.new.parse(“132432”) # => “132432”@0

Changes:

Why the new release? So soon? Here’s why: parslet 1.5 features Ruby
HEREDOC support! Please look at the documentation or the ‘capture.rb’ in
the examples folder[2].

This also includes a few bugfixes, notably to EOF support - end of file
conditions are now normal error conditions that are handled by the same
code that handles other parse errors. As a consequence of this, you
might notice improved messages on premature EOF.

[1] http://en.wikipedia.org/wiki/Parsing_expression_grammar
[2] https://github.com/kschiess/parslet/blob/master/example/capture.rb

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs