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

Missing clause in Interpreter.num_concat #11

Open
niahoo opened this issue Jul 8, 2016 · 2 comments
Open

Missing clause in Interpreter.num_concat #11

niahoo opened this issue Jul 8, 2016 · 2 comments

Comments

@niahoo
Copy link

niahoo commented Jul 8, 2016

Hi,

I have a bug with my grammar, but maybe it is a bug in you code. Sometimes num_concat is called with a list and no_input. So I added this clause and it works well :

  defp num_concat(_, [], _) do
    nil
  end
@marcelog
Copy link
Owner

marcelog commented Jul 8, 2016

Hello,

Please open a pull request with the fix, and add a unit test for the new code with a minimal example that reproduces it (grammar and/or any other code needed).

Thanks!

@niahoo
Copy link
Author

niahoo commented Jul 8, 2016

Well I would like to, but I'm not sure what you code does there.

I think that there are bugs in my grammar file, but it's weird that ex_abnf fails this way whereas other grammar errors are handled properly.

I'll try to run the tests and let you know.

Edit: your test suite passes with the change. But I have no clue how to provide a valid use case to test it. It happens when the code tries to match stuff but it reaches end of input. (Not really sure about that).

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

No branches or pull requests

2 participants