syntax VoidRule = RuleAttributes "void" Name "=" RuleExpression SimpleRuleBody;
Its main purpose is to describe the rules that recognize minor grammar entities, such as space characters (whitespace, tab, end-of-line) and comments.
Since Nitra automatically inserts whitespaces by default, the two void rules –
S – are usually required. The
s rule should recognize minor characters (space and comments). The
S rule should be similar to
s and in addition it should contain a predicate that verifies that incoming flow of characters doesn’t contain the characters identical to identifier characters of the processed language.
S is placed after a keyword described with literals locally in the grammar.
void S = !IdentifierPartCharacters s; void s = IgnoreToken*;