Yan LR: Add restriction about duplicate keys
@@ -227,6 +227,17 @@ The plugin should, but does not, limit the amount
. These restrictions would make it less easy to crash the parser, by feeding it unrestricted data.
+### Duplicate Keys
+
+Currently the plugin parses the input
+
+```yaml
+duplicate: one
+duplicate: two
+```
+
+storing the value `two`. According to the YAML specification the parser should not allow duplicated keys, and instead fail with an error, for the input above.
+
### Comments
The [lexer](yaml_lexer.cpp) does currently tokenize comments. Consequently the [plugin grammar](YAML.g4) of the plugin does also match comments. However, the [listener](listener.cpp) does currently **ignore comments**.
