grammar!
Getty Ritter
9 years ago
31 | 31 | markup formats in which you might want to have arbitrary new |
32 | 32 | tags, but don't want to use an XML-based solution. |
33 | 33 | |
34 | # Formal Grammar | |
35 | ||
36 | ~~~~ | |
37 | <document> ::= <fragment>* | |
38 | <fragment> ::= <tag> | <text> | |
39 | ||
40 | <text> ::= /[^\]|\\[\{}|]*/ | |
41 | ||
42 | <tag> ::= "\" <tagname> <spaces> "{" <arglist> "}" | |
43 | <tagname> ::= /[A-Za-z][A-Za-z0-9_-]*/ | |
44 | <arglist> ::= document ("|" document)* | |
45 | <spaces> ::= /[ \t\r\n]*/ | |
46 | ~~~~ | |
47 | ||
34 | 48 | # Possible Future Modifications |
35 | 49 | |
36 | 50 | Variations on this theme that might be possible: |