Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a path datastructure to constraints #6

Open
jaapdejong15 opened this issue Mar 9, 2023 · 0 comments
Open

Add a path datastructure to constraints #6

jaapdejong15 opened this issue Mar 9, 2023 · 0 comments

Comments

@jaapdejong15
Copy link
Member

jaapdejong15 commented Mar 9, 2023

There should also be a path datastructure in the constraints, accompanying the tree datastructure.
It should define a constraint on the path from the root to the current hole.

Furthermore, it should also support variables, e.g. 1-x-2, meaning that there is a variable number of nodes allowed between rulenode 1 and 2. This can be used to e.g. define the ComesAfter constraint.

Nice-to-haves:

  • Define a syntax with which users can easily provide these paths
  • Support for defining options, e.g. [1,2] matches either rulenode 1 or 2
  • Support for various regex-like symbols, such as
    • + for matching 1 or more
    • ? for matching 0 or 1
    • * for matching 0 or more
    • . for matching every rule
    • r{n} for matching rule r exactly n times. This could also be desugared.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant