crparse

Parser Combinator library for Crystal

crparse

Parser Combinator library for Crystal.

Installation

Add this to your application's shard.yml:

dependencies:
  crparse:
    github: agatan/crparse

Usage

require "crparse"

module MyParser
  extern self
  include Crparse::Parsers

  def integer
    range('0'..'9').many1.map(&.join.to_i)
  end
end

p MyParser.integer.run("123").success!.attribute # => 123

Contributing

  1. Fork it ( https://github.com/agatan/crparse/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • agatan Naomichi Agata - creator, maintainer
Repository

crparse

Owner
Statistic
  • 1
  • 0
  • 0
  • 0
  • 0
  • over 7 years ago
  • July 30, 2017
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 10:13:29 GMT

Languages