A language for describing grammars. Lada language subset
Lada has its own means of describing grammar, so this notation is used in the text, a brief description of which is below.
1. The concept is determined by the Determination operator, followed by the name of the concept being defined and then the defining sequence of concepts in brackets. 2. The name of the defined concept may contain no more than forty letters, or any signs enclosed in nominal brackets "" ". For more information, see the naming rules (Section 1). 3. If it is necessary to define several concepts at once, they are enclosed in curly brackets (or in parentheses separated by commas) after the Determination operator. Section 2.1. Objects enclosed in brackets will be called a group. 4. The sequence of characters directly involved in parsing is highlighted with text brackets "" "and" "". 5. Objects or groups separated by “|” signify the execution of one of these objects or groups. Operation "Or". 6. The sequence of definitions in brackets (group), and the “|” sign after the opening bracket (without a space) denotes the choice of one option from this sequence. Group "Or". 7. The sign “¬” in front of a concept (or a group of concepts) means that anything other than this concept (or a group of concepts) is permissible in the analysis. Operation "No". 8. The sequence of definitions in parentheses (group), and the “¬” sign after the opening bracket (without a space) indicates that there is no match with any variant of this sequence. Group "No". 9. Superscript value, after the closing parenthesis, determines the maximum number of permissible repetitions of concepts united by the group that this bracket closes. 10. Subscript value after the group of concepts indicates the minimum number of occurrences of this concept in the definition. A value of 0 allows the absence of a group of concepts in parsing.
These rules are used to program grammars. For use in the text, the Determination Operator will be omitted, and the “=” sign is used after the concept being defined. And we recall once again that the presence of commas separating objects is necessary only when grouped by parentheses. Objects separated by the infix operation "Or" are considered one object and do not need to be separated by commas even when using parentheses.
Example.
Digit = (| 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
As such, it looks like Backus-Naur forms and is more easily perceived.