csscrape -> statement_list statement_list -> statement statement_list | "" statement -> ID `:` rvalue filter_list `;` rvalue -> element | leaf element -> maybe_url selector_list `{` statement_list `}` qualifier inline -> `<` leaf filter_list `>` maybe_url -> inline | "" selector_list -> selector selector2 # TODO: pseudo-class, attr selector -> `.` ID | `#` ID | ID | `*` selector2 -> selector_combinator selector selector2 | "" selector_combinator -> `+` | `>` | `~` | WHITESPACE | `,` # can we wrap in parentheses? i don't think so. | "" qualifier -> `?` | `*` | "" filter_list -> `|` filter qualifier filter_list | "" filter -> ID `(` arg_list `)` | `[` ID `:` leaf filter_list `]` value -> leaf | inline arg_list -> ID `:` value arg_list2 | "" # allow optional trailing comma arg_list2 -> `,` arg_list | "" leaf -> variable | INT | FLOAT | STRING variable -> `$` ID