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

BUG: <foo>[0].<bar> raises ValueError #188

Closed
TimScheckenbach opened this issue Dec 19, 2024 · 6 comments
Closed

BUG: <foo>[0].<bar> raises ValueError #188

TimScheckenbach opened this issue Dec 19, 2024 · 6 comments
Assignees
Labels
prio: high High priority issue scope: bug Something isn't working status: in progress Task is in progress

Comments

@TimScheckenbach
Copy link
Collaborator

Using the persons.fan and the constraint str(<start>[0].<last_name>..<lowercase_letter>) == "c"; raises a ValueError, but this should be valid.

@joszamama joszamama added scope: bug Something isn't working prio: high High priority issue labels Dec 19, 2024
@addisoncrump
Copy link
Collaborator

How would this work? Is this a forall or exists constraint on lowercase letter?

andreas-zeller added a commit that referenced this issue Dec 20, 2024
…aint check. Added support for ".." and "["; improved symbol recognition #188
@andreas-zeller
Copy link
Collaborator

andreas-zeller commented Dec 20, 2024

Fixed in andreas branch. Added support for .. and [; improved symbol recognition.

@andreas-zeller
Copy link
Collaborator

Output is Locisg Eccccc,50 as expected

@TimScheckenbach
Copy link
Collaborator Author

But this now only checks if any child of <start> has a child <last_name>, or am I missing something? I'd rather expected that Fandango should check if the first child of <start> has <last_name>. Now str(<start>[0].<digit>) == "1", doesn't raise an error, even though this shouldn't be a valid constraint, because <person_name> doesn't have a child <digit>.

@TimScheckenbach
Copy link
Collaborator Author

TimScheckenbach commented Dec 20, 2024

How would this work? Is this a forall or exists constraint on lowercase letter?

It's a forall constraint on lowercase letters in the last name.

andreas-zeller added a commit that referenced this issue Dec 23, 2024
@andreas-zeller
Copy link
Collaborator

Yes, <parent>[...].<symbol> is now handled like <parent>..<symbol>, i.e. simply checking whether there is a <symbol> at the end of the chain. We could also interpret the actual [...] contents here, but slices ([a:b]) and chains ([0][1][2]) make this somewhat risky to code correctly. I have left a TODO comment in the parse.py code.

@joszamama joszamama changed the title <foo>[0].<bar> raises ValueError BUG: <foo>[0].<bar> raises ValueError Jan 14, 2025
@joszamama joszamama moved this to Backlog in Fandango Roadmap Jan 14, 2025
@joszamama joszamama added the status: in progress Task is in progress label Jan 14, 2025
@joszamama joszamama moved this from Backlog to In Progress in Fandango Roadmap Jan 14, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Fandango Roadmap Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: high High priority issue scope: bug Something isn't working status: in progress Task is in progress
Projects
Status: Done
Development

No branches or pull requests

4 participants