alogos._grammar.parsing.io_with_regex
¶
Functions¶
|
Read grammar from text in BNF notation. |
|
Read grammar from text in EBNF notation. |
|
Write grammar as text in BNF notation. |
|
Write grammar as text in EBNF notation. |
Detailed object descriptions¶
- alogos._grammar.parsing.io_with_regex.read_bnf(grammar, bnf_text, verbose, *symbols)[source]¶
Read grammar from text in BNF notation.
- alogos._grammar.parsing.io_with_regex.read_ebnf(grammar, ebnf_text, verbose, *symbols)[source]¶
Read grammar from text in EBNF notation.
References
Conversion of EBNF to BNF notation
https://stackoverflow.com/questions/2466484/converting-ebnf-to-bnf
https://stackoverflow.com/questions/2842809/lexers-vs-parsers useful notes in “EBNF really doesn’t add much to the power of grammars.”
https://condor.depaul.edu/ichu/csc447/notes/wk3/BNF.pdf useful notes in summary on last page
https://stackoverflow.com/questions/20175248/ebnf-is-this-an-ll1-grammar