You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for bringing this up! I am not sure yet, but I have a guess.
The current bnf::Grammar::parse doesn't have a way to designate the "starting" term. So as is, it assumes the first rule begins with the "starting" term.
In this example, this means the "starting" term is <base>, which cannot parse "GATTACA".
Sorry if this turns out to be the reason! I meant to mark this strange implicit assumption in the API documentation, but I must have forgotten.
That's what I figured was happening, but I figured I'd file a bug so you have a nice reminder to add it to the documentation or whatever you end up doing. :) Thanks!
Describe the bug
BNF grammar should be independent of the order of the rules as long as it is otherwise well-formed.
To Reproduce
Take the
dna_left_recursive
test and reverse the order of the rules. The BNF parser can no longer successfully parse the input string.The text was updated successfully, but these errors were encountered: