bem 0.2.7

Parser for the BEM file format (Block, Element, Modifier)
Documentation
1
2
3
4
5
6
name      = @{ ASCII_ALPHA_LOWER ~ ("-"? ~ ASCII_ALPHANUMERIC)* }
modifiers =  { "[" ~ ws* ~ name ~ ws* ~ ("," ~ ws* ~ name ~ ws*)* ~ ","? ~ ws* ~ "]" }
block     =  { SOI ~ name ~ modifiers? }
element   =  { NEWLINE ~ name ~ modifiers? }
bem       = _{ block ~ element* ~ NEWLINE* ~ EOI }
ws        = _{ " " | "\t" | NEWLINE }