Skip to content

Instantly share code, notes, and snippets.

Created December 20, 2014 05:35
What would you like to do?
BBCode grammar
grammar BBCode {
regex TOP { (<para> | <code>)* }
regex para { [\N+ [\n|$]]+ [\n|$] }
regex code { '[code]' .* '[/code]' <.ws> }
BBCode.parse: Q:to[END];
a := f()
just a line
another line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment