https://github.com/fbernier/tomlrb
A Racc based TOML parser
https://github.com/fbernier/tomlrb
Keywords
lalr1 parser racc ruby toml
Keywords from Contributors
deployment xslt rubocop xerces sax ruby-gem activerecord nokogiri libxml2 libxslt
Last synced: about 21 hours ago
JSON representation
Repository metadata
A Racc based TOML parser
- Host: GitHub
- URL: https://github.com/fbernier/tomlrb
- Owner: fbernier
- License: mit
- Created: 2015-04-09T01:03:13.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2025-12-18T07:08:42.000Z (3 months ago)
- Last Synced: 2026-01-24T08:33:53.218Z (about 1 month ago)
- Topics: lalr1, parser, racc, ruby, toml
- Language: Ruby
- Homepage:
- Size: 302 KB
- Stars: 70
- Watchers: 3
- Forks: 17
- Open Issues: 2
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
README.md
Tomlrb
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
- Fork it ( https://github.com/[my-github-username]/tomlrb/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Thanks
Thanks to @jpbougie for the crash course on the Chomsky hierarchy and general tips.
Owner metadata
- Name: François Bernier
- Login: fbernier
- Email: frankbernier@gmail.com
- Kind: user
- Description: Struggling to understand how computers work.
- Website: https://fbernier.me
- Location: Montreal
- Twitter: f_bernier
- Company: EraDB
- Icon url: https://avatars.githubusercontent.com/u/147585?u=2f264aea3638b579000f532e84192430504c98ff&v=4
- Repositories: 110
- Last ynced at: 2025-12-09T18:43:51.292Z
- Profile URL: https://github.com/fbernier
GitHub Events
Total
- Watch event: 3
- Issue comment event: 6
- Push event: 6
- Pull request review event: 2
- Pull request review comment event: 1
- Pull request event: 4
- Fork event: 1
Last Year
- Watch event: 2
- Issue comment event: 3
- Push event: 5
- Pull request review event: 2
- Pull request review comment event: 1
- Pull request event: 2
Committers metadata
Last synced: 1 day ago
Total Commits: 263
Total Committers: 14
Avg Commits per committer: 18.786
Development Distribution Score (DDS): 0.38
Commits in past year: 33
Committers in past year: 2
Avg Commits per committer in past year: 16.5
Development Distribution Score (DDS) in past year: 0.03
| Name | Commits | |
|---|---|---|
| Kitaiti Makoto | K****o@g****m | 163 |
| Francois Bernier | f****r@g****m | 58 |
| gyfis | g****s@s****z | 21 |
| Ryan Davis | r****y@z****m | 5 |
| Axel | a****l@g****e | 3 |
| Jon Yu | c****a@g****m | 3 |
| Daniel K. Sierpiński | s****y@c****m | 2 |
| Sergio Garcia | s****a@g****m | 2 |
| Tim Smith | t****h@c****o | 1 |
| Otto Urpelainen | o****e@i****i | 1 |
| Olle Jonsson | o****n@g****m | 1 |
| Kosuke Yamashita | o****3@g****m | 1 |
| Ben Langfeld | b****n@l****e | 1 |
| LUO Boming | l****g@f****m | 1 |
Committer domains:
- fixstars.com: 1
- langfeld.me: 1
- iki.fi: 1
- chef.io: 1
- comic.com: 1
- gmx.de: 1
- zenspider.com: 1
- seznam.cz: 1
Issue and Pull Request metadata
Last synced: 12 days ago
Total issues: 22
Total pull requests: 35
Average time to close issues: 7 months
Average time to close pull requests: about 2 months
Total issue authors: 17
Total pull request authors: 16
Average comments per issue: 2.09
Average comments per pull request: 2.34
Merged pull request: 31
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 4
Past year average time to close issues: N/A
Past year average time to close pull requests: 24 days
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 1.25
Past year merged pull request: 4
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sgarciac (3)
- Axel2 (3)
- StanBright (2)
- evanleck (1)
- jcarnu (1)
- michael-okeefe (1)
- KitaitiMakoto (1)
- rampion (1)
- myrrlyn (1)
- ojej (1)
- bettse (1)
- fur0ut0 (1)
- rkutin (1)
- marzer (1)
- fbernier (1)
Top Pull Request Authors
- KitaitiMakoto (15)
- 513ry (3)
- sgarciac (2)
- Axel2 (2)
- benlangfeld (2)
- gyfis (1)
- tas50 (1)
- oturpe (1)
- olleolleolle (1)
- fbernier (1)
- cedarvera (1)
- ochaochaocha3 (1)
- itsliamegan (1)
- zenspider (1)
- fur0ut0 (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 13
-
Total downloads:
- rubygems: 188,650,333 total
- Total docker downloads: 931,066,448
- Total dependent packages: 43 (may contain duplicates)
- Total dependent repositories: 4,344 (may contain duplicates)
- Total versions: 74
- Total maintainers: 2
gem.coop: tomlrb
A racc based toml parser
- Homepage: https://github.com/fbernier/tomlrb
- Documentation: http://www.rubydoc.info/gems/tomlrb/
- Licenses: MIT
- Latest release: 2.0.4 (published 3 months ago)
- Last Synced: 2026-03-02T07:31:51.563Z (1 day ago)
- Versions: 23
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 94,339,133 Total
- Docker Downloads: 465,533,224
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.123%
- Docker downloads count: 0.227%
- Downloads: 0.266%
- Maintainers (2)
rubygems.org: tomlrb
A racc based toml parser
- Homepage: https://github.com/fbernier/tomlrb
- Documentation: http://www.rubydoc.info/gems/tomlrb/
- Licenses: MIT
- Latest release: 2.0.4 (published 3 months ago)
- Last Synced: 2026-02-28T13:01:19.062Z (3 days ago)
- Versions: 23
- Dependent Packages: 43
- Dependent Repositories: 4,344
- Downloads: 94,311,200 Total
- Docker Downloads: 465,533,224
-
Rankings:
- Docker downloads count: 0.279%
- Downloads: 0.331%
- Dependent repos count: 0.477%
- Dependent packages count: 0.619%
- Average: 2.554%
- Stargazers count: 6.686%
- Forks count: 6.933%
- Maintainers (2)
proxy.golang.org: github.com/fbernier/tomlrb
- Homepage:
- Documentation: https://pkg.go.dev/github.com/fbernier/tomlrb#section-documentation
- Licenses: mit
- Latest release: v2.0.4+incompatible (published 3 months ago)
- Last Synced: 2026-02-28T13:01:20.241Z (3 days ago)
- Versions: 18
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 5.224%
- Forks count: 5.453%
- Average: 7.763%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
debian-10: ruby-tomlrb
- Homepage: https://github.com/fbernier/tomlrb
- Documentation: https://packages.debian.org/buster/ruby-tomlrb
- Licenses:
- Latest release: 1.2.8-1 (published 20 days ago)
- Last Synced: 2026-02-13T04:26:38.751Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-11: ruby-tomlrb
- Homepage: https://github.com/fbernier/tomlrb
- Documentation: https://packages.debian.org/bullseye/ruby-tomlrb
- Licenses:
- Latest release: 1.3.0-1 (published 20 days ago)
- Last Synced: 2026-02-13T08:25:49.858Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-tomlrb
- Homepage: https://github.com/fbernier/tomlrb
- Documentation: https://packages.debian.org/bookworm/ruby-tomlrb
- Licenses:
- Latest release: 1.3.0-2 (published 18 days ago)
- Last Synced: 2026-02-12T23:43:01.062Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-13: ruby-tomlrb
- Homepage: https://github.com/fbernier/tomlrb
- Documentation: https://packages.debian.org/trixie/ruby-tomlrb
- Licenses:
- Latest release: 1.3.0-2 (published 19 days ago)
- Last Synced: 2026-02-13T13:20:25.322Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- aho-corasick * development
- filetime * development
- kernel32-sys * development
- libc * development
- memchr * development
- primal * development
- rand * development
- regex * development
- regex-syntax * development
- tempdir * development
- time * development
- winapi * development
- benchmark-ips >= 0 development
- bundler >= 0 development
- minitest >= 0 development
- minitest-reporters >= 0 development
- racc >= 0 development
- rake >= 0 development
- psych ~> 4 development
- actions/checkout v2 composite
- ruby/setup-ruby v1 composite
Score: 27.752069536456023