Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README outdated? #7

Closed
adler99 opened this issue Dec 16, 2017 · 5 comments
Closed

README outdated? #7

adler99 opened this issue Dec 16, 2017 · 5 comments
Assignees
Labels

Comments

@adler99
Copy link

adler99 commented Dec 16, 2017

Hi,
I wanted to play around with a simple grammar but I'm running into problems, even when using the example ebnf: ebnf = EBNF.parse(File.open('tmp/ebnf.ebnf'))
1.

ebnf.to_ebnf
NoMethodError: undefined method `to_ebnf'
ebnf.to_ruby
NoMethodError: undefined method `sort_by' for nil:NilClass
	from /var/lib/gems/2.3.0/gems/ebnf-1.1.2/lib/ebnf/ll1.rb:270:in `outputTable'

Thanks!

@gkellogg gkellogg self-assigned this Dec 16, 2017
@gkellogg gkellogg added the bug label Dec 16, 2017
@gkellogg
Copy link
Collaborator

Indeed, seems to be some regression (and examples in the README should have tests!). I'll take a look at it shortly.

I was about to send an update anyway to change some dependencies.

@gkellogg
Copy link
Collaborator

Fixed in fceffb9.

@adler99
Copy link
Author

adler99 commented Dec 18, 2017

Thank you!

@mengu
Copy link

mengu commented Feb 9, 2018

hi @gkellogg, i also get the same error when i call ebnf.to_ruby method.

i use the version 1.1.2.

gkellogg added a commit that referenced this issue Feb 9, 2018
Consider nil id when sorting rules.
Fixes #7
@gkellogg
Copy link
Collaborator

gkellogg commented Feb 9, 2018

There was a bug in to_ttl which modified the rule being formatted, which could have contributed to the issue you were seeing. I'll need to release an updated gem, but in the mean time, you can require from the repo and try it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants