gdritter repos telml / 44e9b3f
grammar! Getty Ritter 9 years ago
1 changed file(s) with 14 addition(s) and 0 deletion(s). Collapse all Expand all
3131 markup formats in which you might want to have arbitrary new
3232 tags, but don't want to use an XML-based solution.
3333
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
3448 # Possible Future Modifications
3549
3650 Variations on this theme that might be possible: