-
-
Notifications
You must be signed in to change notification settings - Fork 41
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] Parser error when using EXCEPT and @ #757
Comments
By removing line 362, which is a comment containing the symbol '@', this parse error disappears. It also disappears when the '@' in the comment is replaced by the expression for which it is a placeholder. |
I see what is happening here. There is a piece of TLA code that contains |
Yes, the annotation parser tries to treat |
What we could do is to issue a warning instead of throwing an error. |
|
I also thought about that, but it looks like TLA+ is using almost all of the available symbols except maybe the pound sign and euro sign :-) |
A few of the symbols commonly found in programming languages don't often appear in TLA+: |
I am just rewriting the lexer for the annotations, so it treats |
* closes #757: rewrote the annotation parser to avoid common pitfalls * updates the docs * format fix * fixing the issues that were surfaced by the integration tests * fix the integration test * fix formatting * fix the test once again
Description
Running Snowcat gives the following parse error:
I suspect that the following line is problematic:
packetCommitments' = [packetCommitments EXCEPT ![upcomingEvent.chain] = @ \ {upcomingEvent.packet}]
Input specification
https://github.com/informalsystems/cross-chain-validation/blob/ilina/type_annotations/tla/CrossChainValidation_draft_001.tla
The command line parameters used to run the tool
apalache-mc typecheck CrossChainValidation_draft_001.tla
Expected behavior
No parser error, because the both the Toolbox and VSCode plugin do not report parse errors.
Log files
detailed.log
command line output:
System information
The text was updated successfully, but these errors were encountered: