grammar_and_parser.md: cleanup

This commit is contained in:
Yann Cébron 2022-02-24 16:07:38 +01:00
parent c8d053200c
commit 93c7de98ae

View File

@ -51,12 +51,10 @@ private item_ ::= (property|COMMENT|CRLF)
property ::= (KEY? SEPARATOR VALUE?) | KEY
```
As shown, a Simple Language file can contain properties, comments, and line breaks.
Please see [Grammar Kit](https://github.com/JetBrains/Grammar-Kit) documentation for more details on BNF syntax.
The grammar defines the flexibility of the support for a language.
The above grammar specifies that a property may have or may not have key and value.
The above grammar specifies that a property may have or may not have a key and value.
This flexibility allows the IntelliJ Platform to recognize incorrectly defined properties and provide corresponding code analysis and quick-fixes.
Note that the `SimpleTypes` class in the `elementTypeHolderClass` attribute above specifies the name of a class that gets generated from the grammar; it doesn't exist at this point.