Created
December 20, 2014 05:35
-
-
Save raiph/2714c5decbc9463dd095 to your computer and use it in GitHub Desktop.
BBCode grammar
This file contains 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
grammar BBCode { | |
regex TOP { (<para> | <code>)* } | |
regex para { [\N+ [\n|$]]+ [\n|$] } | |
regex code { '[code]' .* '[/code]' <.ws> } | |
} | |
BBCode.parse: Q:to[END]; | |
[code] | |
a := f() | |
[/code] | |
just a line | |
another line | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment