grammars-v4
grammars-v4 copied to clipboard
[bnf and ebnf] Rename old bnf grammar to ebnf. Add new bnf grammar.
This PR is a partial fix for #3798.
- The bnf grammar wasn't really BNF, but actually EBNF. This is because it had kleene operators. The directory containing the old grammar was moved to "ebnf". Otherwise, the original grammar is unchanged.
- Another PR will add a new EBNF grammar along with keeping the old EBNF grammar. The new EBNF grammar will be more flexible in order to handle different popular EBNF.
- I added a new bnf grammar and examples. This grammar also switches between various flavors of BNF, which are described in the references in the Readme.
- The purpose of this grammar is to aide in automated refactoring of BNF grammars.
Waiting for https://github.com/antlr/grammars-v4/pull/4076
I will need to change perf-changed.sh to not fail. The problem was caused by a rename of bnf. However, the "bnf" grammar is new and has nothing to do with the old grammar.
@kaby76 thanks!