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
Looks related to nullable productions: #108 #112 #117
This grammar fails to match when we change a production from left-recursive to right-recursive.
The left-recursive grammar failed on 0.4.0 ≤ bnf ≤ 0.4.1 – the right-recursive still fails on 0.4.0 ≤ bnf ≤ 0.4.3
0.4.0 ≤ bnf ≤ 0.4.1
0.4.0 ≤ bnf ≤ 0.4.3
So this issue must have been partially addressed by @CrockAgile in #109 (0.4.2)
0.4.2
Happy to help battle-testing any proposed fixes ⚔️
use bnf::Grammar; #[test] fn test() { let input = "aa a"; let left_recursive: &str = " <conjunction> ::= <conjunction> <ws> <predicate> | <predicate> <predicate> ::= <string_null_one> | <special-string> '.' <string_null_one> ::= <string_null_two> <string_null_two> ::= <string_null_three> <string_null_three> ::= <string> <string> ::= <char_null> | <string> <char_null> <special-string> ::= <special-char> | <special-string> <special-char> <char_null> ::= <char> <char> ::= 'a' <special-char> ::= <char_null> | <whitespace> <whitespace> ::= ' ' <ws> ::= ' ' | ' ' <ws> "; assert!(left_recursive.parse::<Grammar>().unwrap().parse_input(input).next().is_some()); let right_recursive = left_recursive.replace( // rewrite production from left- to right- recursive "<string> ::= <char_null> | <string> <char_null>", "<string> ::= <char_null> | <char_null> <string>", ); assert!( right_recursive.parse::<Grammar>().unwrap().parse_input(input).next().is_some(), "right-recursive grammar failed to parse: {input}" ); }
The text was updated successfully, but these errors were encountered:
test example from issue #118
a5ca206
cf2a121
Traversal Trees (#120)
07eb3bf
* test example from issue #118 * tracing events earley traversals * stash * minimal reproduction * working? * test nullable productions issue #117 * remove test logging * repro wip test * traversal tree wip * wip, completion ownership hard * borrow checked * infinite recursion * ughhhh * reverse matching iter walk * cleanup unused * hmmm * hmmmmmm * rename * maybe working? * tomorrow * limit nullable hack * all passing * remove nullability detection * tracing instead of prints * log parse trees * infinite parse benchmark * polish * clippy * snapshot testing * btree for ordered term completions * snapshot test bugs
Successfully merging a pull request may close this issue.
Looks related to nullable productions: #108 #112 #117
This grammar fails to match when we change a production from left-recursive to right-recursive.
The left-recursive grammar failed on
0.4.0 ≤ bnf ≤ 0.4.1
– the right-recursive still fails on0.4.0 ≤ bnf ≤ 0.4.3
So this issue must have been partially addressed by @CrockAgile in #109 (
0.4.2
)Happy to help battle-testing any proposed fixes ⚔️
The text was updated successfully, but these errors were encountered: