Created
January 1, 2019 15:37
-
-
Save Kilerd/e27cdbe59aedfaba8539d20256c06c2e to your computer and use it in GitHub Desktop.
blog article pest template
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
FILE = { SOI ~ article ~ EOI} | |
article = { META ~ (DESCRIPTION ~ LINE)? ~ content } | |
META = { META_ITEM* ~ META_LINE} | |
META_ITEM = { COMMENTED_ITEM | ITEM} | |
COMMENTED_ITEM = {"#" ~ ITEM} | |
ITEM = {KEY ~ ":" ~ value ~ "\n"*} | |
KEY = {(!(":" | "\n" | "#") ~ ANY)*} | |
value = {INLINE_STRING} | |
INLINE_STRING = {(!(":" | "\n") ~ ANY)*} | |
META_LINE = {"<-----meta----->\n"} | |
DESCRIPTION = { STRING } | |
content = { STRING } | |
STRING = { inner } | |
inner = @{ char* } | |
LINE = { "<-----more----->" } | |
char = { | |
!("<-----more----->" | "<-----meta----->") ~ ANY | |
} | |
WHITESPACE = _{ " " } | |
NEWLINE = {"\n" | "\r\n" | "\r"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment