Dne 23. 04. 23 v 13:29 Richard Shaw napsal(a):


    NEW: the package fedora-license-data now contains BNF grammar which you can 
use. It is available in
    `/usr/share/fedora-license-data/grammar.lark`


You'll have to explain to me the significance of this.

This is good starting point:

https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form

The BNF is one of the basic grammar used in formal automata. It is the data part of any formal validation or compiler. The validation is most relevant in this case.

There is lot of libraries that load the grammar and validate or tranform the 
input.

I wrote this grammar for Lark library. The validation is then just two-liner

You can see it used e.g., here

https://pagure.io/copr/license-validate/blob/main/f/license-validate.py#_31

Miroslav

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to