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. * http://kschiess.github.com/parslet/index.html * https://github.com/kschiess/parslet 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/ex...
on 2012-12-27 15:27
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.