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

Entity names should not be allowed to include () bracket openings and closings #243

Open
stschiff opened this issue Apr 5, 2023 · 2 comments

Comments

@stschiff
Copy link
Member

stschiff commented Apr 5, 2023

In Xerxes, we have a YAML and a simple text interface to read in statistics. The simple text interface looks like

F3(Pop1, Pop2, Pop3)

because of this structure, the names of the groups cannot contain bracket openings and closings, and that is something that has to part of the parser. Right now, poseidon-hs does not include that constraints, which unfortunately leads to Xerxes having a redundant parser (https://github.com/poseidon-framework/poseidon-analysis-hs/blob/fedf433d10b5fb9f7bd9847928193c8fbc7f4318/src/Poseidon/Analysis/FStatsConfig.hs#L162)

It would be nice if we could simply add the two symbols ( and ) to the forbidden symbols in entity names here (

parseName = P.many1 (P.satisfy (\c -> not (isSpace c || c `elem` ":,<>*")))
) so we can avoid this redundancy.

@nevrome
Copy link
Member

nevrome commented Jun 8, 2023

Should this be added to the Poseidon schema? 🤔

@stschiff
Copy link
Member Author

Hmm... good point. I don't really know, to be honest. Technically, it is unnecessary to forbid brackets altogether, since I could in principle parse things like "MyFavoriteGroup(take 1)" by matching opening and closing brackets. The only thing that wouldn't work is "LetsTryAndHackThis)".

Finally, I could also change the interface to accept group names in quotation marks, optionally. Perhaps that would even be better...

I would not act on the schema for now, I will think more about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants