We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Parsing ABNF files does not work.
To reproduce The following uses the latest version of the library and opens examples/abnf/examples/postal-address.abnf from this repo.
examples/abnf/examples/postal-address.abnf
> pry [1] pry(main)> require 'ebnf' => true [2] pry(main)> grammar = EBNF.parse(File.open('postal-address.abnf', format: :abnf)) SyntaxError: ERROR [line: 1] syntax error, expecting "@terminals", "@pass", :LHS (found "postal-address = n") from /Users/aaronlasseigne/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/ebnf-2.3.0/lib/ebnf/parser.rb:302:in `rescue in initialize' Caused by EBNF::PEG::Parser::Error: ERROR [line: 1] syntax error, expecting "@terminals", "@pass", :LHS (found "postal-address = n") from /Users/aaronlasseigne/.asdf/installs/ruby/3.1.0/lib/ruby/gems/3.1.0/gems/ebnf-2.3.0/lib/ebnf/peg/parser.rb:253:in `parse'
Expected behavior Parsing ABNF files works.
The text was updated successfully, but these errors were encountered:
I just noticed the example in the README is wrong. See: https://github.com/dryruby/ebnf#parsing-an-abnf-grammar
- grammar = EBNF.parse(File.open('./etc/abnf.abnf', format: :abnf)) + grammar = EBNF.parse(File.open('./etc/abnf.abnf'), format: :abnf)
It works as expected. Looks like the README just needs a tweak.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Parsing ABNF files does not work.
To reproduce
The following uses the latest version of the library and opens
examples/abnf/examples/postal-address.abnf
from this repo.Expected behavior
Parsing ABNF files works.
The text was updated successfully, but these errors were encountered: