Skip to content

Instantly share code, notes, and snippets.

@rarous
Created June 16, 2014 16:10
Show Gist options
  • Save rarous/42009e87088d02fa5ce8 to your computer and use it in GitHub Desktop.
Save rarous/42009e87088d02fa5ce8 to your computer and use it in GitHub Desktop.
modifier = <'.'> (title|classes|styles|align)*
title = <'('> #"[^\)]*" <')'>
classes = <'['> ident? (<ws> ident)* <']'>
styles = <'{'> declaration* <'}'>
align = halign|valign|halign valign|valign halign|ε
declaration = property <":" ows> value <";"?>
ws = #"\s+"
ows = #"\s*"
ident = #"#?-?[_a-zA-Z][_a-zA-Z0-9-]*"
property = #"-?[a-zA-Z][_a-zA-Z0-9-]*"
value = #"[a-zA-Z0-9\.\(\)\'\/\:!#$%&*~, -]+"
halign = '<' | '>' | '<>' | '='
valign = '^' | '_' | '-'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment