You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #898, we added a new ABNF file src/ssvc/utils/ssvc_namespace_pattern.abnf
that was used to generate the namespace regex patterns in src/ssvc/utils/patterns.py. However, this conversion was a one-shot static event.
I'd like us to be able to dynamically read the .abnf file and have that populate the items in patterns.py automatically at run time. I believe this is possible using library methods from abnf-to-regex.
Activity
bernhardreiter commentedon Sep 17, 2025
Added eclipse-aascw/abnf-to-regexp#44 to fix the repetition regex difference in upstream first.
bernhardreiter commentedon Feb 19, 2026
Meanwhile https://github.com/aas-core-works/abnf-to-regexp/releases/tag/v1.2.0 has what we need, so I'll prepare a merge request.
bernhardreiter commentedon Feb 19, 2026
Do you prefer to read the
.abnffile each time at runtime?(As opposed to have a "make regenerate" step that creates the .py file.)
Looking at https://github.com/aas-core-works/abnf-to-regexp/blob/1fc56a6a93c0aa777f641828788595535dbbba94/abnf_to_regexp/main.py#L48 and deeper, it seems that
abpf-to-regexpdoes not offer library functions that return the generated patterns. It generates strings. In order to get this into the code dynamically would mean toexec()them in python.The parsing and exec() step in runtime will add an overhead to the startup time of ssvc.
Instead a classic Makefile rule could be used that creates a new
abnf_pattern.pyfile each time the source.abnffile has been changed.improve ABNFpattern integration
bernhardreiter commentedon Feb 19, 2026
See #1065 for the Makefile based approach.
improve ABNF integration of ssvc namespaces
bernhardreiter commentedon Feb 20, 2026
But it can be done. See #1067 for the runtime parsing approach.
Chose the one you prefer.