-
Notifications
You must be signed in to change notification settings - Fork 0
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
Clarification for CaseStmt and DefaultStmt #4
Comments
Best idea is to write a wizard and test it in the old parser 🤷♀️ |
Calling the Technical Readme a specification is a bit of a strong term - plus the parser itself doesn't obey it. For example, it allows this:
... even though the Technical Readme claims that function calls need parentheses. |
Well, if this was the case, then the
Even if you don't put the wizards in the repository, could you put links to them somewhere (if these are available online) so that we can check them? |
Added that to the TODO list in #1 Edit: Beermotor also posted a link to a bunch of his wizards here. I haven't gotten around to adding them to the test suite, but none of them seem to use 'Default` either. |
Thanks for the extra wizards, I'll try them when I can. I checked a few things with the current release of Wrye Bash and
Also, I noticed that the |
What exactly do you mean by that? Something like this?
I'm not sure how the current parser handles this - does it read this as one of its weird bare strings? And what if foo is defined as a variable beforehand, i.e. would this work?
The bare strings thing is definitely a bad idea and should already not work anymore, all those bare strings will now get parsed as identifiers instead. The question here is then only if we want to allow the new parser to use variables for |
Both works actually...
If there is a Also, the |
I think |
Me, again....
The specification+ for the
SelectOne
/SelectMany
+ Case / Default is not clear for me.Is each
Case
/Default
followed by exactly oneBreak
? For instance, is this valid (like in many language):If it is valid, what is the expected behavior? In particular for
SelectMany
? Case A implies A + B?If it is not valid, then I think it would be a good idea to explicitly add the
'Break'
in the grammar in theselectCaseList
rule.Also, is
Default
allowed to not be the last case? And isDefault
allowed inSelectMany
, in which case, is it run when nothing is selected?Edit: Well, actually, what is the purpose of
Default
? I assume withSelectOne
, the user has to select an option, so no default, and forSelectMany
... If none of the option was selected?None of the test wizards in
tests/
haveDefault
and all uses aBreak
afterCase
, so having this kind of rule:Would be very nice to write an interpreter :D
+ I am assuming this is the official specification : https://wrye-bash.github.io/docs/Wrye%20Bash%20Technical%20Readme.html, let me know if it's not !
The text was updated successfully, but these errors were encountered: