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 warning for syntax priority / associativity mismatch #2710

Merged
merged 10 commits into from
Jul 19, 2022

Conversation

Baltoli
Copy link
Contributor

@Baltoli Baltoli commented Jul 7, 2022

Fixes #2460

This PR adds a compiler check that the labels in a syntax associativity sentence are not in different priority groups, and updates the relevant sections of the K tutorial and user manual to reflect this.

Note that the error message doesn't have location information, because the SyntaxAssociativity sentence that I use in the check doesn't seem to include any - is there a better way to phrase this implementation?

@Baltoli Baltoli requested a review from radumereuta July 7, 2022 14:22
@Baltoli Baltoli requested a review from dwightguth as a code owner July 7, 2022 14:22
@ehildenb
Copy link
Member

ehildenb commented Jul 7, 2022

Grab location information here and make sure it's preserved in the frontend KORE (not the same as backend Kore) that is produced: https://github.com/runtimeverification/k/blob/master/kernel/src/main/java/org/kframework/kore/convertors/KILtoKORE.java#L141

KIL are the flat parsed data-structures produced by the frontend outer parser.

Copy link
Contributor

@radumereuta radumereuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor issues.

@Baltoli Baltoli requested a review from radumereuta July 13, 2022 22:07
@dwightguth dwightguth merged commit 27d723e into master Jul 19, 2022
@dwightguth dwightguth deleted the syntax-priority branch July 19, 2022 16:22
h0nzZik pushed a commit to h0nzZik/k that referenced this pull request Nov 24, 2022
…untimeverification#2132)

* haskell-backend/src/main/native/haskell-backend: 75be3ad5a - Update regression tests (runtimeverification#2803)

* haskell-backend/src/main/native/haskell-backend: edd0ca2a1 - Fixing trim-source-paths.sh for macos (runtimeverification#2791)

* haskell-backend/src/main/native/haskell-backend: 32ecb98c2 - `SideCondition.definedTerms`: check if AC terms are always defined before caching them (runtimeverification#2800)

* haskell-backend/src/main/native/haskell-backend: 6394bf2d - Remove _PREDICATE sort (runtimeverification#2719)

* haskell-backend/src/main/native/haskell-backend: fd8775cc - Check function definitions tool (runtimeverification#2710)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[KIP] - Add a Warning when defining 'syntax left' for operators with different priority
5 participants