All Projects → fbernier → tomlrb

fbernier / tomlrb

Licence: MIT license
A Racc based TOML parser

Programming Languages

ruby
36898 projects - #4 most used programming language
Yacc
648 projects
shell
77523 projects

Projects that are alternatives of or similar to tomlrb

Staert
Merge your configuration sources
Stars: ✭ 108 (+71.43%)
Mutual labels:  toml
Toml
A PHP parser for TOML
Stars: ✭ 152 (+141.27%)
Mutual labels:  toml
Config
📝 Go config manage(load,get,set). support JSON, YAML, TOML, INI, HCL, ENV and Flags. Multi file load, data override merge, parse ENV var. Go应用配置加载管理,支持多种格式,多文件加载,远程文件加载,支持数据合并,解析环境变量名
Stars: ✭ 225 (+257.14%)
Mutual labels:  toml
Devshell
Per project developer environments
Stars: ✭ 129 (+104.76%)
Mutual labels:  toml
Fig
A minimalist Go configuration library
Stars: ✭ 142 (+125.4%)
Mutual labels:  toml
Protodep
Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies
Stars: ✭ 167 (+165.08%)
Mutual labels:  toml
Config Lite
A super simple & flexible & useful config module.
Stars: ✭ 78 (+23.81%)
Mutual labels:  toml
Cli
A simple, fast, and fun package for building command line apps in Go
Stars: ✭ 16,995 (+26876.19%)
Mutual labels:  toml
Tinytoml
A header only C++11 library for parsing TOML
Stars: ✭ 153 (+142.86%)
Mutual labels:  toml
Tomlc99
TOML C library
Stars: ✭ 216 (+242.86%)
Mutual labels:  toml
Toml To Go
Translates TOML into a Go type in your browser instantly
Stars: ✭ 134 (+112.7%)
Mutual labels:  toml
Rq
Record Query - A tool for doing record analysis and transformation
Stars: ✭ 1,808 (+2769.84%)
Mutual labels:  toml
Python Benedict
dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. 📘
Stars: ✭ 204 (+223.81%)
Mutual labels:  toml
Datafiles
A file-based ORM for Python dataclasses.
Stars: ✭ 113 (+79.37%)
Mutual labels:  toml
Konf
A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats
Stars: ✭ 225 (+257.14%)
Mutual labels:  toml
Night Config
Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations
Stars: ✭ 93 (+47.62%)
Mutual labels:  toml
Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (+161.9%)
Mutual labels:  toml
tomlcheck
A syntax checker for TOML files
Stars: ✭ 28 (-55.56%)
Mutual labels:  toml
Joshuto
ranger-like terminal file manager written in Rust
Stars: ✭ 224 (+255.56%)
Mutual labels:  toml
Awesome Cms
📚 A collection of open and closed source Content Management Systems (CMS) for your perusal.
Stars: ✭ 2,498 (+3865.08%)
Mutual labels:  toml

Tomlrb

Code Climate Gem Version Build status A Racc based TOML Ruby parser supporting the 1.0.0 version of the spec.

TODO

  • Dumper

Installation

Add this line to your application's Gemfile:

gem 'tomlrb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tomlrb

Usage

Tomlrb.parse("[toml]\na = [\"array\", 123]")

or

Tomlrb.load_file('my_file', symbolize_keys: true)

Benchmark

You can run the benchmark against the only other v0.5.0 compliant parser to my knowledge with ruby benchmarks/bench.rb.

Here are the results on my machine:

Warming up --------------------------------------
      emancu/toml-rb     1.000  i/100ms
     fbernier/tomlrb    33.000  i/100ms
Calculating -------------------------------------
      emancu/toml-rb     15.597  (± 6.4%) i/s -     78.000  in   5.020321s
     fbernier/tomlrb    348.307  (± 5.2%) i/s -      1.749k in   5.034878s

Comparison:
     fbernier/tomlrb:      348.3 i/s
      emancu/toml-rb:       15.6 i/s - 22.33x  (± 0.00) slower

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

Do not forget to regenerate the parser when you modify rules in the parser.y file using rake compile.

Run the tests using rake test.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/tomlrb/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

Thanks

Thanks to @jpbougie for the crash course on the Chomsky hierarchy and general tips.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].