Grammar-Kit
root_rule ::= rule_A rule_B rule_C rule_D // a sequence
rule_A ::= token | 'or_text' | "another_one" // a choice
rule_B ::= [ optional_token ] and_another_one? // optional parts
rule_C ::= &required !forbidden // predicates
rule_D ::= { can_use_braces + (and_parens) * } // grouping and repetition
// Grammar-Kit extensions:
private left rule_with_modifier ::= '+' // rule modifiers
left rule_with_attributes ::= '?' {elementType=rule_D} // left rule and attributes
private meta list_macro ::= <
> (',' <
>) * // meta rule
private list_usage ::= <> // external expression
https://github.com/JetBrains/Grammar-Kit