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

Parser for annotated BNF (ANBNF) grammar #890

Open
jenetics opened this issue Oct 9, 2023 · 0 comments
Open

Parser for annotated BNF (ANBNF) grammar #890

jenetics opened this issue Oct 9, 2023 · 0 comments

Comments

@jenetics
Copy link
Owner

jenetics commented Oct 9, 2023

The extended Cfgobject created in issue #889 allows to add annotations. In this ticket, the BNF format should be extended such that it is possible to such annotations in a BNF string.

Example

<expr> ::= <num> | <var> @weight=4 | '(' <expr> <op> <expr> ')' @weight=5
<op>   ::= + | - | * | /
<var>  ::= x | y
<num>  ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
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

1 participant