Skip to content

Instantly share code, notes, and snippets.

@CosmicToast
Last active December 19, 2019 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CosmicToast/7121e2b6a46b2fd730a01cbffd791ba3 to your computer and use it in GitHub Desktop.
Save CosmicToast/7121e2b6a46b2fd730a01cbffd791ba3 to your computer and use it in GitHub Desktop.
Toast NEWS PEG
Document <- DocPart+
DocPart <- VersionHeader ( AuthPart EOL )+
VersionHeader <- SectSep Version '(' Date ')' EndOfLine EndOfLine
AuthPart <- AuthorLine Item+
AuthorLine <- Author EOL
Author <- ASCII+ ('"' DomChar+ '"')? ASCII+ '<' Email '>'
Email <- Char+ '@' Domain
Domain <- DomChar+ ( PERIOD DomChar+ )+
Item <- Bullet SPACE ( BaseChar TxtChar* EOL )+
Version <- 'v' Num '.' Num '.' Num PreVer VerMeta
PreVer <- '-' VerChar+ / ''
VerMeta <- '+' VerChar+ / ''
Date <- Year DASH Month DASH Day
Year <- Num
Month <- '1' ( '0' / '1' / '2' ) / Digit
Day <- '3' ( '0' / '1' ) / '2' Digit / '1' Digit / Digit
BaseChar <- ASCII / Digit
DomChar <- BaseChar / DASH
Num <- Digit+
TxtChar <- VerChar / Punct
VerChar <- DomChar / PERIOD
ASCII <- [a-zA-Z]
Bullet <- PERIOD / STAR / DASH
Digit <- [0-9]
Punct <- [,;]
SectSep <- TAB / STAB
DASH <- '-'
EOF <- !.
EOL <- '\r\n' / '\n' / '\r'
PERIOD <- '.'
SPACE <- ' '
STAB <- ' '
STAR <- '*'
TAB <- '\t'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment