dryruby/ebnf

README outdated?

Closed this issue · 5 comments

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!

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.

Fixed in fceffb9.

Thank you!

mengu commented

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

i use the version 1.1.2.

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.