Formal grammar for Magic templating
As you know, one of the things on my to-do list is to make Incantus parse oracle text directly. As a necessary first step for that, we need to define a formal grammar for Magic (for those of you wondering what a formal grammar is, read this). Since trying to define a formal grammar with all the possibilities in Magic by yourself is *ahem* difficult, I thought I'd ask if anyone was interested in helping.
I've already written the first line for you:
EDIT: Actually, this would be better:
I've already written the first line for you:
- Code: Select all
<ability> ::= <activated-ability> | <triggered-ability> | <static-ability> | <spell-ability> | <keyword>
EDIT: Actually, this would be better:
- Code: Select all
<ability> ::= <activated-ability> | <triggered-ability> | <static-ability> | <spell-ability> | <keyword-line>
<keyword-line> ::= <keyword> <EOL> | <keyword> ", " <keyword-line>