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
I would propose to define a grammar that could then be used to parse datacards into in-memory structures.
I'm somewhat familiar with PEG grammars (see references below) but also there are many others.
I would propose to define a grammar that could then be used to parse datacards into in-memory structures.
I'm somewhat familiar with PEG grammars (see references below) but also there are many others.
Some references:
https://bford.info/pub/lang/peg.pdf
https://peps.python.org/pep-0617/#overview
https://github.com/yhirose/cpp-peglib (this is what is used in correctionlib for the formulas)
https://lark-parser.readthedocs.io/en/latest/
A WIP implementation is shown below (but it could probably be expressed much better)
You can play with this online with https://yhirose.github.io/cpp-peglib/
The text was updated successfully, but these errors were encountered: