Last active
February 3, 2016 18:58
-
-
Save irskep/a155703d3caf2ef3bb43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // BB_WORD: a valid tag name; essentially a string literal terminated by whitespace or a reserved character | |
| // TEXT: non-BBCode text (i.e. string literal) | |
| // BB_VAL: A string literal inside a BBCode tag | |
| // e.g. [img src="foo"] matches [BB_WORD BB_WORD=BB_VAL] | |
| Stmts -> Stmt Stmts | |
| | ε | |
| Stmt -> TEXT | |
| | Tag | |
| Tag -> OpenTag Stmts CloseTag | |
| | SelfClosingTag | |
| OpenTag -> [ TagContents ] | |
| CloseTag -> [ / BB_WORD ] | |
| SelfClosingTag -> [ TagContents / ] | |
| TagContents -> BB_WORD TagArgs | |
| | BB_WORD | |
| TagArgs -> TagArg TagArgs | |
| | ε | |
| TagArg -> BB_WORD = ArgValue | |
| ArgValue -> BB_WORD | |
| | NUMBER | |
| | STRING |
timtadh
commented
Feb 3, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment