scikit-hep / scikit-hep/formulate

Potential to merge effort with correctionlib parser?

Open
#55 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
14
Forks
6
Avg merge
4h 20m
Merged PRs (30d)
4

Description

I recently became aware of the effort here to make a formal grammar for TFormula. This is great!
I had made my own attempt for correctionlib using a PEG parser (see here for early thoughts in that direction), with the current grammar viewable here. As of this PR the parsed AST is also accessible from python. Perhaps it might be useful to investigate if we can merge efforts? One feature of the C++ PEG parser is it will in general be much faster than lark.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing formulate’s TFormula grammar with correctionlib’s parser in src/formula_ast.cc, especially the grammar around lines 46-68, and review correctionlib discussion 17 and PR 214 for parser and Python AST context. Done means establishing whether the efforts should be merged and documenting a concrete direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.